📄 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:该调用是 ASP.NET Web 服务设计器所必需的
InitializeComponent();
}
#region Component Designer generated code
//Web 服务设计器所必需的
private IContainer components = null;
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
}
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
if(disposing && components != null)
{
components.Dispose();
}
base.Dispose(disposing);
}
#endregion
// WEB 服务示例
// HelloWorld() 示例服务返回字符串 Hello World
// 若要生成,请取消注释下列行,然后保存并生成项目
// 若要测试此 Web 服务,请按 F5 键
// [WebMethod]
// public string HelloWorld()
// {
// return "Hello World";
// }
[WebMethod]
public DataSet GetOrderDetail(string Name,string Password,int OrderId)
{
DataSet myDs;
string pwd;
try
{
pwd=DataAccessLayer.Functions.Encrypt(Password,1);
DataAccessLayer.Book myOrder=new DataAccessLayer.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
{
DataAccessLayer.Book myBook=new DataAccessLayer.Book();
myDs=myBook.SearchBook(msg);
return myDs;
}
catch(Exception er)
{
throw new Exception(er.Message);
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -