public IActionResult Delete(int annualLeaveRequestID) { try { _annualLeaveRequestLogic.Delete(annualLeaveRequestID); return(NoContent()); } catch (Exception) { return(StatusCode(StatusCodes.Status500InternalServerError, "Error deleting the annual leave request")); } }
public IActionResult DeleteConfirmed(int annualLeaveRequestId) { _annualLeaveRequestLogic.Delete(annualLeaveRequestId); return(RedirectToAction("Overview", new { selectedYear = DateTime.UtcNow.Year })); }