using MESClassLibrary.BLL.Keep; using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace MESWebSite.HttpHandlers { /// /// KeepRecordHandler 的摘要说明 /// public class KeepRecordHandler : IHttpHandler { HttpRequest Request = null; HttpResponse Response = null; public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; Request = context.Request; Response = context.Response; string method = Request.Params["method"]; switch (method) { case "AddInfo": AddInfo(); break; case "EditInfo": EditInfo(); break; } } public bool IsReusable { get { return false; } } public class parmQuery { public string ID { get; set; } } void AddInfo() { string CommonlyInspection = Request.Params["CommonlyInspection"]; string CheckUserID = Request.Params["CheckUserID"]; string ConfirmUserID = Request.Params["ConfirmUserID"]; string CheckDate = Request.Params["CheckDate"]; string KeepPlanID = Request.Params["KeepPlanID"]; //string CheckType = Request.Params["CheckType"]; //string ErrMes = Request.Params["ErrMes"]; string UserID = Request.Params["UserID"]; KeepRecordBLL bll = new KeepRecordBLL(); Response.Write(bll.AddInfo(CommonlyInspection, CheckUserID, ConfirmUserID, UserID, CheckDate, KeepPlanID) == true ? "true" : "false"); Response.End(); } void EditInfo() { string CommonlyInspection = Request.Params["CommonlyInspection"]; string CheckUserID = Request.Params["CheckUserID"]; string ConfirmUserID = Request.Params["ConfirmUserID"]; string CheckDate = Request.Params["CheckDate"]; string KeepPlanID = Request.Params["KeepPlanID"]; //string CheckType = Request.Params["CheckType"]; //string ErrMes = Request.Params["ErrMes"]; string UserID = Request.Params["UserID"]; KeepRecordBLL bll = new KeepRecordBLL(); Response.Write(bll.UpdateInfo(CommonlyInspection, CheckUserID, ConfirmUserID, UserID, CheckDate, KeepPlanID) == true ? "true" : "false"); Response.End(); } } }