public bool Update(NhanvienModel model) { string msgError = ""; try { var result = _dbHelper.ExecuteScalarSProcedureWithTransaction(out msgError, "sp_nhan_vien_update", "@manv", model.ma_nv, "@macv", model.ma_cv, "@tennv", model.ten_nv, "@gioitinh", model.gioi_tinh, "@ngaysinh", model.ngay_sinh, "@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; } }
public bool Update(NhanvienModel model) { return(_res.Update(model)); }
public bool Create(NhanvienModel model) { return(_res.Create(model)); }
public NhanvienModel UpdateNhanvien([FromBody] NhanvienModel model) { _itemBusiness.Update(model); return(model); }
public NhanvienModel CreateNhanvien([FromBody] NhanvienModel model) { model.ma_nv = Guid.NewGuid().ToString(); _itemBusiness.Create(model); return(model); }