Exemplo n.º 1
0
        /// <summary>
        /// 8.不良事件
        /// </summary>
        private void ManagerBLSJ()
        {
            bool bolState = false;

            try
            {
                KPS.Model.BuLiangShiJianInfo _Modelinfo = (KPS.Model.BuLiangShiJianInfo)_control.GetSaveData();
                _Modelinfo.DataType = thisdeviceinfo.DeviceID;

                KPS.BLL.BuLiangShiJianManager blsjmanager = new BuLiangShiJianManager();
                if (ModelData != null)
                {
                    _Modelinfo.ID = ((BuLiangShiJianInfo)ModelData).ID;
                    bolState      = blsjmanager.Update(_Modelinfo);
                }
                else
                {
                    bolState = blsjmanager.Add(_Modelinfo);
                }
            }
            catch (Exception ex)
            {
                bolState = false;
            }

            ShowMsgStateInfo(bolState, ModelData);
        }
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(KPS.Model.BuLiangShiJianInfo model)
 {
     return(dal.Update(model));
 }
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public bool Add(KPS.Model.BuLiangShiJianInfo model)
 {
     return(dal.Add(model));
 }