public bool Create(HopdongModel model) { string msgError = ""; try { var result = _dbHelper.ExecuteScalarSProcedureWithTransaction(out msgError, "hd_item_create", "@mahopdong", model.mahopdong, "@makhachhang", model.makhachhang, "@tenkhachhang", model.tenkhachhang, "@sodienthoai", model.sodienthoai); 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 Create(HopdongModel model) { return(_res.Create(model)); }
public bool Update(HopdongModel model) { return(_res.Update(model)); }
public HopdongModel Update([FromBody] HopdongModel model) { _itemBusiness.Update(model); return(model); }
public HopdongModel CreateItem([FromBody] HopdongModel model) { _itemBusiness.Create(model); return(model); }