一厂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.
 
 
 
 
 

73 lines
1.9 KiB

using MESClassLibrary.BLL.BasicInfo;
using MESClassLibrary.EFModel;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web;
using NPOI.SS.UserModel;
using NPOI.XSSF.UserModel;
namespace MESWebSite.HttpHandlers
{
/// <summary>
/// ModelProductHandler 的摘要说明
/// </summary>
public class ModelProductHandler : BaseHandler
{
//public ModelProductHandler(): base()
//{
// RegisterAction(QueryExcel);
//}
protected override void QueryList()
{
string ProductID = GetParam("ProductID");
string ModelID = GetParam("ModelID");
ModelProductBLL bll = new ModelProductBLL();
Response.Write(bll.SearchInfoAll(Page, Rows, ModelID, ProductID));
Response.End();
}
protected override void SaveInfo()
{
string ID = GetParam("ID");
string ProductID = GetParam("ProductID");
string ModelID = GetParam("ModelID");
tb_Model_Product md = new tb_Model_Product
{
ProuctID = ProductID,
ModelID = ModelID
};
ModelProductBLL bll = new ModelProductBLL();
if (ID == "0")
{
md.ID = Guid.NewGuid().ToString();
Response.Write(bll.AddInfo(md) ? "true" : "false");
}
else
{
md.ID = ID;
Response.Write(bll.UpdateInfo(md) ? "true" : "false");
}
Response.End();
}
protected override void DelInfo()
{
string ID = GetParam("ID");
ModelProductBLL bll = new ModelProductBLL();
tb_Model_Product mp = new tb_Model_Product
{
ID = ID
};
Response.Write(bll.DeleteInfo(mp) ? "true" : "false");
Response.End();
}
}
}