You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
117 lines
3.1 KiB
117 lines
3.1 KiB
using MESClassLibrary.BLL.Report;
|
|
using MESClassLibrary.EFModel;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
|
|
namespace MESWebSite.HttpHandlers
|
|
{
|
|
/// <summary>
|
|
/// FiveScreenLastHandler 的摘要说明
|
|
/// </summary>
|
|
public class FiveScreenLastHandler : 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 "QueryList":
|
|
QueryList();
|
|
break;
|
|
case "SaveInfo":
|
|
SaveInfo();
|
|
break;
|
|
case "DelInfo":
|
|
DelInfo();
|
|
break;
|
|
default:
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
public bool IsReusable
|
|
{
|
|
get
|
|
{
|
|
return false;
|
|
}
|
|
}
|
|
|
|
void QueryList()
|
|
{
|
|
string page = Request.Params["page"];
|
|
string pagesize = Request.Params["rows"];
|
|
|
|
if (string.IsNullOrEmpty(page))
|
|
{
|
|
page = "0";
|
|
}
|
|
if (string.IsNullOrEmpty(pagesize))
|
|
{
|
|
pagesize = "15";
|
|
}
|
|
|
|
FiveScreenLastBLL bll = new FiveScreenLastBLL();
|
|
Response.Write(bll.SearchInfoAll(page, pagesize));
|
|
Response.End();
|
|
|
|
|
|
}
|
|
void SaveInfo()
|
|
{
|
|
string ID = Request.Params["ID"];
|
|
string StationID = Request.Params["StationID"];
|
|
string StationNo = Request.Params["StationNo"];
|
|
string UseRate = Request.Params["UseRate"];
|
|
string PassRate = Request.Params["PassRate"];
|
|
string Remark1 = Request.Params["Remark1"];
|
|
|
|
|
|
FiveScreenLastBLL bll = new FiveScreenLastBLL();
|
|
tb_Report_FiveScreenLast md = new tb_Report_FiveScreenLast();
|
|
|
|
md.StationID = StationID;
|
|
md.StationNo = StationNo;
|
|
md.UseRate = UseRate;
|
|
md.PassRate = PassRate;
|
|
md.Remark1 = Remark1;
|
|
|
|
if (ID == "0")
|
|
{
|
|
//新增
|
|
md.ID = Guid.NewGuid().ToString();
|
|
md.CreateTime = DateTime.Now;
|
|
Response.Write(bll.AddInfo(md) == true ? "true" : "false");
|
|
}
|
|
else
|
|
{
|
|
//修改
|
|
md.ID = ID;
|
|
Response.Write(bll.UpdateInfo(md) == true ? "true" : "false");
|
|
}
|
|
Response.End();
|
|
}
|
|
void DelInfo()
|
|
{
|
|
string ID = Request.Params["ID"];
|
|
|
|
FiveScreenLastBLL bll = new FiveScreenLastBLL();
|
|
tb_Report_FiveScreenLast md = new tb_Report_FiveScreenLast();
|
|
md.ID = ID;
|
|
Response.Write(bll.DeleteInfo(md) == true ? "true" : "false");
|
|
Response.End();
|
|
|
|
}
|
|
}
|
|
}
|