一厂MES,含注塑,喷涂,冲孔
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.
 
 
 
 
 

122 lines
3.1 KiB

using MESClassLibrary.BLL.BasicInfo;
using MESClassLibrary.EFModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace MESWebSite.HttpHandlers
{
public class DeptHandler : 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;
case "QueryForCombobox":
QueryForCombobox();
break;
default:
break;
}
}
public bool IsReusable
{
get
{
return false;
}
}
void QueryList()
{
string page = Request.Params["page"];
string pagesize = Request.Params["rows"];
string DeptName = Request.Params["DeptName"];
if (string.IsNullOrEmpty(page))
{
page = "0";
}
if (string.IsNullOrEmpty(pagesize))
{
pagesize = "15";
}
DeptBLL bll = new DeptBLL();
Response.Write(bll.SearchInfo(page, pagesize, DeptName));
Response.End();
}
void SaveInfo()
{
//string LineID = Request.Params["LineID"];
//string PlaceID = Request.Params["PlaceID"];
//string LineName = Request.Params["LineName"];
//string Des = Request.Params["Des"];
//DeptBLL bll = new DeptBLL();
//TA_DEPT md = new TA_DEPT();
//md.PlaceID = PlaceID;
//md.LineName = LineName;
//md.Des = Des;
//if (LineID == "0")
//{
// //新增
// md.LineID = Guid.NewGuid().ToString();
// Response.Write(bll.AddInfo(md) == true ? "true" : "false");
//}
//else
//{
// //修改
// md.LineID = LineID;
// Response.Write(bll.UpdateInfo(md) == true ? "true" : "false");
//}
Response.End();
}
void DelInfo()
{
//string GUID = Request.Params["GUID"];
//DeptBLL bll = new DeptBLL();
//TA_DEPT md = new TA_DEPT();
//md.GUID = GUID;
//Response.Write(bll.DelInfo(md) == true ? "true" : "false");
Response.End();
}
void QueryForCombobox()
{
DeptBLL bll = new DeptBLL();
Response.Write(bll.GetComboboxData());
Response.End();
}
}
}