public void SplitTable() { Maticsoft.Model.ps_pipe psPipeModel = new Maticsoft.Model.ps_pipe(); Maticsoft.Model.ps_pipe resultPsPipe = EntityAssignValue.BindModelValue <Maticsoft.Model.ps_pipe, Maticsoft.Model.cjpll>(psPipeModel, _cjpllModel); resultPsPipe.Code = _code; //todo:补充添加固定信息 resultPsPipe.Prj_Name = ConfiguInfo.Prj_Name; resultPsPipe.Prj_No = ConfiguInfo.Prj_No; //todo:缺失信息忽略 //增加数据库记录 Maticsoft.DAL.ps_pipe psPipeDAL = new Maticsoft.DAL.ps_pipe(); bool exist = psPipeDAL.Exists(resultPsPipe.Lno); if (!exist) { psPipeDAL.Add(resultPsPipe); } else { //todo:2重复的数据,返回给用户 } }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(Maticsoft.Model.ps_pipe model) { return(dal.Update(model)); }
/// <summary> /// 增加一条数据 /// </summary> public bool Add(Maticsoft.Model.ps_pipe model) { return(dal.Add(model)); }