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; using System.Data; namespace Core.StlMes.Client.Qcm.BLL { /// /// 数据库表COM_BASE_SUPP_BANK所对应的BLL类(生成工具:代码生成工具4.0 访问地址:http://172.16.2.128/tool/) /// 作者:tgcx-test 时间:2016-08-16 /// public class ComBaseSuppBankBLL { private OpeBase _ob; public ComBaseSuppBankBLL(OpeBase ob) { _ob = ob; } /// /// 查询 /// public DataTable Query(string suppCode) { DataTable dt = ServerHelper.GetData( "com.steering.pss.qcm.DAL.ComBaseSuppBankDAL.Query", new object[] { suppCode }, _ob); return dt; } /// /// 通过主键查询 /// public List QueryByPk(string SuppCode, string BankAccount) { List comBaseSuppBankEntity = EntityHelper.GetData( "com.steering.pss.qcm.DAL.ComBaseSuppBankDAL.QueryByPk", new object[] { SuppCode, BankAccount }, _ob); return comBaseSuppBankEntity; } /// /// 新增 /// public string Insert(ComBaseSuppBankEntity comBaseSuppBankEntity) { return ServerHelper.SetDataReturnObj("com.steering.pss.qcm.DAL.ComBaseSuppBankDAL.Insert", new object[] { JsonConvert.SerializeObject(comBaseSuppBankEntity) }, _ob).ToString(); } /// /// 修改 /// public void Update(ComBaseSuppBankEntity comBaseSuppBankEntity) { ServerHelper.SetData("com.steering.pss.qcm.DAL.ComBaseSuppBankDAL.Update", new object[] { JsonConvert.SerializeObject(comBaseSuppBankEntity) }, _ob); } /// /// 删除 /// public void Delete(ComBaseSuppBankEntity comBaseSuppBankEntity) { ServerHelper.SetData("com.steering.pss.qcm.DAL.ComBaseSuppBankDAL.Delete", new object[] { JsonConvert.SerializeObject(comBaseSuppBankEntity) }, _ob); } public bool IsRepeat(string bankAccount, string id) { DataTable dt = ServerHelper.GetData("com.steering.pss.qcm.DAL.ComBaseSuppBankDAL.IsRepeat", new object[] { bankAccount, id }, _ob); return dt.Rows[0][0].ToString() == "0" ? false : true; } } }