You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
67 lines
1.7 KiB
Plaintext
67 lines
1.7 KiB
Plaintext
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
using System.Web;
|
|
using BP.DA;
|
|
using BP.En;
|
|
using BP.Port;
|
|
|
|
namespace CCFlow.App
|
|
{
|
|
/// <summary>
|
|
/// Handler 的摘要说明
|
|
/// </summary>
|
|
public class Handler : IHttpHandler
|
|
{
|
|
#region 基本属性.
|
|
public HttpContext context = null;
|
|
public string DoType
|
|
{
|
|
get
|
|
{
|
|
return context.Request.QueryString["DoType"];
|
|
}
|
|
}
|
|
public string Key
|
|
{
|
|
get
|
|
{
|
|
return context.Request.QueryString["Key"];
|
|
}
|
|
}
|
|
#endregion 基本属性.
|
|
|
|
public void ProcessRequest(HttpContext c)
|
|
{
|
|
context = c;
|
|
context.Response.ContentType = "text/plain";
|
|
|
|
string sql = "";
|
|
if (this.DoType.Equals("Emps") == true)
|
|
{
|
|
DataTable dt = DBAccess.RunSQLReturnTable("SELECT top 10 No,Name FROM Port_Emp WHERE No LIKE '" + this.Key + "%' ");
|
|
string str = BP.Tools.Json.ToJson(dt);
|
|
context.Response.Write(str);
|
|
return;
|
|
}
|
|
|
|
if (this.DoType.Equals("EmpFull") == true)
|
|
{
|
|
DataTable dt = DBAccess.RunSQLReturnTable("SELECT * FROM Port_Emp WHERE No='" + this.Key + "' ");
|
|
string str = BP.Tools.Json.ToJson(dt);
|
|
context.Response.Write(str);
|
|
return;
|
|
}
|
|
|
|
context.Response.Write("err@没有判断的标记:"+this.DoType);
|
|
}
|
|
|
|
public bool IsReusable
|
|
{
|
|
get
|
|
{
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
} |