Beispiel #1
0
        public void SplitTable()
        {
            Maticsoft.Model.ps_outfall psOutfallModel = new Maticsoft.Model.ps_outfall();
            Maticsoft.Model.ps_outfall resultPsComb   = EntityAssignValue.BindModelValue <Maticsoft.Model.ps_outfall, Maticsoft.Model.cjplp>(psOutfallModel, _cjplpModel);
            // Console.WriteLine("哈哈哈" + resultPsComb);
            //todo:填充计算的信息
            // resultPsComb.Exp_No = _exp_no;
            resultPsComb.Code = _code;

            //todo:补充添加固定信息
            resultPsComb.Prj_Name = ConfiguInfo.Prj_Name;
            resultPsComb.Prj_No   = ConfiguInfo.Prj_No;
            //todo:缺失信息忽略

            //增加数据库记录
            Maticsoft.DAL.ps_outfall psOutfallDAL = new Maticsoft.DAL.ps_outfall();

            bool exist = psOutfallDAL.Exists(resultPsComb.Exp_No);

            if (!exist)
            {
                psOutfallDAL.Add(resultPsComb);
            }
            else
            {
                //todo:2重复的数据,返回给用户
            }
        }
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(Maticsoft.Model.ps_outfall model)
 {
     return(dal.Update(model));
 }
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public bool Add(Maticsoft.Model.ps_outfall model)
 {
     return(dal.Add(model));
 }