Пример #1
0
        public bool Update(ChucvuModel model)
        {
            string msgError = "";

            try
            {
                var result = _dbHelper.ExecuteScalarSProcedureWithTransaction(out msgError, "sp_mon_an_update",
                                                                              "@macv", model.ma_cv,
                                                                              "@tencv", model.ten_cv);
                if ((result != null && !string.IsNullOrEmpty(result.ToString())) || !string.IsNullOrEmpty(msgError))
                {
                    throw new Exception(Convert.ToString(result) + msgError);
                }
                return(true);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Пример #2
0
 public bool Update(ChucvuModel model)
 {
     return(_res.Update(model));
 }
Пример #3
0
 public bool Create(ChucvuModel model)
 {
     return(_res.Create(model));
 }
Пример #4
0
 public ChucvuModel UpdateChuvu([FromBody] ChucvuModel model)
 {
     _itemBusiness.Update(model);
     return(model);
 }
Пример #5
0
 public ChucvuModel CreateChucvu([FromBody] ChucvuModel model)
 {
     model.ma_cv = Guid.NewGuid().ToString();
     _itemBusiness.Create(model);
     return(model);
 }