コード例 #1
0
        public IActionResult GetAllActive()
        {
            try
            {
                var viewModel = new HolidayApplicationViewModel
                {
                    HolidayApplications = holidayApplicationService.GetAllActive()
                };

                return(PartialView("_GetAllActive", viewModel));
            }
            catch (Exception e)
            {
                return(BadRequest(e.Message));
            }
        }
コード例 #2
0
        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));
            }
        }