Exemple #1
0
        public bool Update(NhacungcapModel model)
        {
            string msgError = "";

            try
            {
                var result = _dbHelper.ExecuteScalarSProcedureWithTransaction(out msgError, "sp_nhacc_update",
                                                                              "@mancc", model.ma_ncc,
                                                                              "@tenncc", model.ten_ncc,
                                                                              "@diachi", model.dia_chi,
                                                                              "@sdt", model.sdt);
                if ((result != null && !string.IsNullOrEmpty(result.ToString())) || !string.IsNullOrEmpty(msgError))
                {
                    throw new Exception(Convert.ToString(result) + msgError);
                }
                return(true);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemple #2
0
 public NhacungcapModel UpdateNhacungcap([FromBody] NhacungcapModel model)
 {
     _itemBusiness.Update(model);
     return(model);
 }
Exemple #3
0
 public NhacungcapModel CreateNhacc([FromBody] NhacungcapModel model)
 {
     model.ma_ncc = Guid.NewGuid().ToString();
     _itemBusiness.Create(model);
     return(model);
 }
 public bool Update(NhacungcapModel model)
 {
     return(_res.Update(model));
 }
 public bool Create(NhacungcapModel model)
 {
     return(_res.Create(model));
 }