using System; using System.Collections; using System.Configuration; using System.Data; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml.Linq; using System.Text; using System.Data.SqlClient; using System.Collections.Generic; using System.Xml; using DSWeb.EntityDA; using DSWeb.DataAccess; using DSWeb.Models; using System.Web.Script.Serialization; namespace DSWeb.Handler { /// /// UserCodeName 的摘要说明 /// public class UserCodeName : IHttpHandler { public void ProcessRequest(HttpContext context) { //string inquireStr = "and CODENAME='" + context.Request.Form["ce"].ToString().Trim() + "'"; string codeName = context.Request.Form["ce"].ToString(); string userName = context.Request.Form["ue"].ToString(); //string password = context.Request.Form["pd"].ToString(); //UserDA userDA=new UserDA(); DataTable dt = UserDA.GetUserTipInfo(codeName, userName); //DataTable dt = ds.Tables[0]; StringBuilder sb = new StringBuilder(); if (dt.Rows.Count == 0) { sb.Append("[{\"id\":\"\"}]"); } else { sb.Append(JsonClass.DataTable2Json(dt)); } context.Response.ContentType = "text/plain"; context.Response.Write(sb.ToString()); context.Response.End(); } public bool IsReusable { get { return false; } } } }