public bool Update(KhuvucModel model)
        {
            string msgError = "";

            try
            {
                var result = _dbHelper.ExecuteScalarSProcedureWithTransaction(out msgError, "sp_khu_vuc_update",
                                                                              "@makv", model.ma_kv,
                                                                              "@tenkv", model.ten_kv);
                if ((result != null && !string.IsNullOrEmpty(result.ToString())) || !string.IsNullOrEmpty(msgError))
                {
                    throw new Exception(Convert.ToString(result) + msgError);
                }
                return(true);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Beispiel #2
0
 public bool Update(KhuvucModel model)
 {
     return(_res.Update(model));
 }
Beispiel #3
0
 public bool Create(KhuvucModel model)
 {
     return(_res.Create(model));
 }
Beispiel #4
0
 public KhuvucModel UpdateKhuvuc([FromBody] KhuvucModel model)
 {
     _itemBusiness.Update(model);
     return(model);
 }
Beispiel #5
0
 public KhuvucModel CreateKhuvuc([FromBody] KhuvucModel model)
 {
     model.ma_kv = Guid.NewGuid().ToString();
     _itemBusiness.Create(model);
     return(model);
 }