| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- 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
- {
- /// <summary>
- /// 数据库表COM_BASE_SUPP所对应的BLL类(生成工具:代码生成工具4.0 访问地址:http://172.16.2.128/tool/)
- /// 作者:tgcx-test 时间:2016-08-16
- /// </summary>
- public class ComBaseSuppBLL
- {
- private OpeBase _ob;
- public ComBaseSuppBLL(OpeBase ob)
- {
- _ob = ob;
- }
- /// <summary>
- /// 查询
- /// </summary>
- public DataTable Query(string suppCode, string suppName, string suppLinkMan, string validflag)
- {
- DataTable dt = ServerHelper.GetData(
- "com.steering.pss.qcm.DAL.ComBaseSuppDAL.Query",
- new object[] { suppCode, suppName, suppLinkMan, validflag }, _ob);
- return dt;
- }
- /// <summary>
- /// 通过主键查询
- /// </summary>
- public ComBaseSuppEntity QueryByPk(string SuppCode)
- {
- List<ComBaseSuppEntity> comBaseSuppEntity = EntityHelper.GetData<ComBaseSuppEntity>(
- "com.steering.pss.qcm.DAL.ComBaseSuppDAL.QueryByPk", new object[] { SuppCode }, _ob);
- if (comBaseSuppEntity.Count > 0)
- {
- return comBaseSuppEntity[0];
- }
- else
- {
- return null;
- }
- }
- /// <summary>
- /// 新增
- /// </summary>
- public string Insert(ComBaseSuppEntity supp)
- {
- return ServerHelper.SetDataReturnObj("com.steering.pss.qcm.DAL.ComBaseSuppDAL.Insert",
- new object[] { JsonConvert.SerializeObject(supp) }, _ob).ToString();
- }
- /// <summary>
- /// 修改
- /// </summary>
- public void Update(ComBaseSuppEntity supp)
- {
- ServerHelper.SetData("com.steering.pss.qcm.DAL.ComBaseSuppDAL.Update",
- new object[] { JsonConvert.SerializeObject(supp) }, _ob);
- }
- /// <summary>
- /// 修改作废标志
- /// </summary>
- public void UpdateValidflag(ComBaseSuppEntity comBaseSuppEntity, string validflag)
- {
- ServerHelper.SetData("com.steering.pss.qcm.DAL.ComBaseSuppDAL.UpdateValidflag",
- new object[] { JsonConvert.SerializeObject(comBaseSuppEntity), validflag }, _ob);
- }
- public DataTable QueryRegion()
- {
- return ServerHelper.GetData("com.steering.pss.qcm.DAL.ComBaseSuppDAL.QueryRegion",
- new object[] { }, _ob);
- }
- public bool IsRepeat(string suppName, string suppCode)
- {
- DataTable dt = ServerHelper.GetData("com.steering.pss.qcm.DAL.ComBaseSuppDAL.IsRepeat",
- new object[] { suppName, suppCode }, _ob);
- return dt.Rows[0][0].ToString() == "0" ? false : true;
- }
- }
- }
|