Beispiel #1
0
        public async Task <IActionResult> AddVacationToAllEmployees(VacationViewModel model)
        {
            if (ModelState.IsValid)
            {
                await vacationRepository.AddVacationToAllEmployees(model, await applicationUserRepository.GetAllUsers());

                TempData["StatusMessage"] = "New general vacation has been created to all employees successfully.";
                return(RedirectToAction(nameof(Manage)));
            }
            return(View(model));
        }