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_IMPACT所对应的BLL类(生成工具:代码生成工具4.0 访问地址:http://172.16.2.128/tool/) /// 作者:tgcx-test 时间:2017-05-25 /// public class ComBaseImpactBLL { private OpeBase _ob; public ComBaseImpactBLL(OpeBase ob) { _ob = ob; } /// /// 查询 /// public List Query(string impact, string validflag) { List comBaseImpactEntity = EntityHelper.GetData( "com.steering.pss.qcm.DAL.ComBaseImpactDAL.Query", new object[] { impact, validflag }, _ob); return comBaseImpactEntity; } /// /// 通过主键查询 /// public List QueryByPk(string Id) { List comBaseImpactEntity = EntityHelper.GetData( "com.steering.pss.qcm.DAL.ComBaseImpactDAL.QueryByPk", new object[] { Id }, _ob); return comBaseImpactEntity; } /// /// 新增 /// public void Insert(List comBaseImpactEntitys) { List jsons = new List(); foreach (var comBaseImpactEntity in comBaseImpactEntitys) { jsons.Add(JsonConvert.SerializeObject(comBaseImpactEntity)); } ServerHelper.SetData("com.steering.pss.qcm.DAL.ComBaseImpactDAL.Insert", new object[] { jsons }, _ob); } /// /// 修改 /// public void Update(List comBaseImpactEntitys) { List jsons = new List(); foreach (var comBaseImpactEntity in comBaseImpactEntitys) { jsons.Add(JsonConvert.SerializeObject(comBaseImpactEntity)); } ServerHelper.SetData("com.steering.pss.qcm.DAL.ComBaseImpactDAL.Update", new object[] { jsons }, _ob); } /// /// 保存 /// public void Save(ComBaseImpactEntity comBaseImpactEntity, List subList, List subTempList) { List subJsons = new List(); foreach (var list in subList) { subJsons.Add(JsonConvert.SerializeObject(list)); } List subTempJsons = new List(); foreach (var list in subTempList) { subTempJsons.Add(JsonConvert.SerializeObject(list)); } ServerHelper.SetData("com.steering.pss.qcm.DAL.ComBaseImpactDAL.Save", new object[] { JsonConvert.SerializeObject(comBaseImpactEntity), subJsons, subTempJsons }, _ob); } /// /// 修改作废标志 /// public void UpdateValidflag(List comBaseImpactEntitys, string validflag) { List jsons = new List(); foreach (var comBaseImpactEntity in comBaseImpactEntitys) { jsons.Add(JsonConvert.SerializeObject(comBaseImpactEntity)); } ServerHelper.SetData("com.steering.pss.qcm.DAL.ComBaseImpactDAL.UpdateValidflag", new object[] { jsons, validflag }, _ob); } } }