public bool Edit(LeaveRequestHistory leaveRequest) { try { return(_leaveRepository.Edit(leaveRequest)); } catch (Exception ex) { throw ex; } }
public RedirectToActionResult Edit(Leave employee) { Leave newEmployee = _empRepo.GetLeave(employee.LeaveId); newEmployee.Type = employee.Type; newEmployee.FromDate = employee.FromDate; newEmployee.ToDate = employee.ToDate; newEmployee.EmployeeName = employee.EmployeeName; _empRepo.Edit(newEmployee); return(RedirectToAction("AllDetails")); }