public IActionResult GetAllActive() { try { var viewModel = new HolidayApplicationViewModel { HolidayApplications = holidayApplicationService.GetAllActive() }; return(PartialView("_GetAllActive", viewModel)); } catch (Exception e) { return(BadRequest(e.Message)); } }
public IActionResult GetAllForEmployee() { try { var userId = userManager.GetUserId(User); var viewModel = new HolidayApplicationViewModel { Employee = employeeService.GetByUserId(userId), HolidayApplications = holidayApplicationService.GetAllForEmployee(userId) }; return(PartialView("_GetAllForEmployee", viewModel)); } catch (Exception e) { return(BadRequest(e.Message)); } }