private void ReposUpdateEmployeePTOBalanceSPROC(int Id, PTOBalanceUpdateRequest ptoBalanceUpdateRequest) { SqlParameter employeeptobalanceid = new SqlParameter("@EmployeePTOBalanceId", Id); SqlParameter hrstaken = new SqlParameter("@HrsTaken", ptoBalanceUpdateRequest.HrsTaken); SqlParameter comments = new SqlParameter("@Comments", ptoBalanceUpdateRequest.Comments); _dbContext.Database.ExecuteSqlCommand("dbo.EmpPTOBalance_Update @EmployeePTOBalanceId, @HrsTaken, @Comments", employeeptobalanceid, hrstaken, comments); }
public HttpResponseMessage UpdateEmployeePTOBalance(int Id, PTOBalanceUpdateRequest ptoBalanceUpdateRequest) { try { _employeePTOBalanceController.UpdateEmployeePTOBalance(Id, ptoBalanceUpdateRequest); return(new HttpResponseMessage(HttpStatusCode.OK)); } catch (Exception ex) { return(new HttpResponseMessage(HttpStatusCode.InternalServerError)); } }
public void UpdateEmployeePTOBalance(int Id, PTOBalanceUpdateRequest ptoBalanceUpdateRequest) { ReposUpdateEmployeePTOBalanceSPROC(Id, ptoBalanceUpdateRequest); }