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; } }
public bool Update(KhuvucModel model) { return(_res.Update(model)); }
public bool Create(KhuvucModel model) { return(_res.Create(model)); }
public KhuvucModel UpdateKhuvuc([FromBody] KhuvucModel model) { _itemBusiness.Update(model); return(model); }
public KhuvucModel CreateKhuvuc([FromBody] KhuvucModel model) { model.ma_kv = Guid.NewGuid().ToString(); _itemBusiness.Create(model); return(model); }