using Core.Mes.Client.Comm.Server; using Core.Mes.Client.Comm.Tool; using Core.StlMes.Client.Qcm.model; using CoreFS.CA06; using Newtonsoft.Json; using System.Collections.Generic; namespace Core.StlMes.Client.Qcm.BLL { /// /// 数据库表COM_BASE_PURCHASE_RANGE所对应的BLL类(生成工具:代码生成工具4.0 访问地址:http://172.16.2.128/tool/) /// 作者:tgcx-test 时间:2017-06-07 /// public class ComBasePurchaseRangeBLL { private OpeBase _ob; public ComBasePurchaseRangeBLL(OpeBase ob) { _ob = ob; } /// /// 查询 /// public List Query(string suppCode) { List comBasePurchaseRangeEntity = EntityHelper.GetData( "com.steering.pss.qcm.DAL.ComBasePurchaseRangeDAL.Query", new object[] { suppCode }, _ob); return comBasePurchaseRangeEntity; } /// /// 通过主键查询 /// public List QueryByPk(string RangeId) { List comBasePurchaseRangeEntity = EntityHelper.GetData( "com.steering.pss.qcm.DAL.ComBasePurchaseRangeDAL.QueryByPk", new object[] { RangeId }, _ob); return comBasePurchaseRangeEntity; } /// /// 新增 /// public void Insert(List comBasePurchaseRangeEntitys) { List jsons = new List(); foreach (var comBasePurchaseRangeEntity in comBasePurchaseRangeEntitys) { jsons.Add(JsonConvert.SerializeObject(comBasePurchaseRangeEntity)); } ServerHelper.SetData("com.steering.pss.qcm.DAL.ComBasePurchaseRangeDAL.Insert", new object[] { jsons }, _ob); } /// /// 修改 /// public void Update(List comBasePurchaseRangeEntitys) { List jsons = new List(); foreach (var comBasePurchaseRangeEntity in comBasePurchaseRangeEntitys) { jsons.Add(JsonConvert.SerializeObject(comBasePurchaseRangeEntity)); } ServerHelper.SetData("com.steering.pss.qcm.DAL.ComBasePurchaseRangeDAL.Update", new object[] { jsons }, _ob); } /// /// 保存 /// public void Save(List comBasePurchaseRangeEntitys) { List jsons = new List(); foreach (var comBasePurchaseRangeEntity in comBasePurchaseRangeEntitys) { jsons.Add(JsonConvert.SerializeObject(comBasePurchaseRangeEntity)); } ServerHelper.SetData("com.steering.pss.qcm.DAL.ComBasePurchaseRangeDAL.Save", new object[] { jsons }, _ob); } /// /// 修改作废标志 /// public void UpdateValidflag(List comBasePurchaseRangeEntitys, string validflag) { List jsons = new List(); foreach (var comBasePurchaseRangeEntity in comBasePurchaseRangeEntitys) { jsons.Add(JsonConvert.SerializeObject(comBasePurchaseRangeEntity)); } ServerHelper.SetData("com.steering.pss.qcm.DAL.ComBasePurchaseRangeDAL.UpdateValidflag", new object[] { jsons, validflag }, _ob); } /// /// 删除 /// public void Delete(List comBasePurchaseRangeEntitys) { List jsons = new List(); foreach (var comBasePurchaseRangeEntity in comBasePurchaseRangeEntitys) { jsons.Add(JsonConvert.SerializeObject(comBasePurchaseRangeEntity)); } ServerHelper.SetData("com.steering.pss.qcm.DAL.ComBasePurchaseRangeDAL.Delete", new object[] { jsons }, _ob); } } }