?? bookshop.asmx.cs
字號:
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Web;
using System.Web.Services;
namespace BookShop
{
/// <summary>
/// BookShop 的摘要說明。
/// </summary>
public class BookShop : System.Web.Services.WebService
{
public BookShop()
{
//CODEGEN:該調(diào)用是 ASP.NET Web 服務(wù)設(shè)計器所必需的
InitializeComponent();
}
#region Component Designer generated code
//Web 服務(wù)設(shè)計器所必需的
private IContainer components = null;
/// <summary>
/// 設(shè)計器支持所需的方法 - 不要使用代碼編輯器修改
/// 此方法的內(nèi)容。
/// </summary>
private void InitializeComponent()
{
}
/// <summary>
/// 清理所有正在使用的資源。
/// </summary>
protected override void Dispose( bool disposing )
{
if(disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}
#endregion
// WEB 服務(wù)示例
// HelloWorld() 示例服務(wù)返回字符串 Hello World
// 若要生成,請取消注釋下列行,然后保存并生成項目
// 若要測試此 Web 服務(wù),請按 F5 鍵
// [WebMethod]
// public string HelloWorld()
// {
// return "Hello World";
// }
[WebMethod]
public DataSet GetOrderDetail(string Name,string Password,int OrderId)
{
DataSet myDs;
string pwd;
try
{
pwd=DBProjectGuide.Functions.Encrypt(Password,1);
DBProjectGuide.Book myOrder=new DBProjectGuide.Book();
myDs=myOrder.GetOrderDetail(Name,pwd,OrderId);
return myDs;
}
catch(Exception er)
{
throw new Exception(er.Message);
}
}
[WebMethod]
public DataSet SearchBook(string msg)
{
DataSet myDs;
try
{
DBProjectGuide.Book myBook=new DBProjectGuide.Book();
myDs=myBook.SearchBook(msg);
return myDs;
}
catch(Exception er)
{
throw new Exception(er.Message);
}
}
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -