Esempio n. 1
0
        public async Task <IActionResult> Edit(string id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            Vacation vacation = await vacationRepository.GetByID(id);

            if (vacation == null)
            {
                return(NotFound());
            }

            VacationViewModel model = new VacationViewModel(vacation);

            return(model.TotalDays != 0.5 ? View(model) : View("EditHalfDay", model));
        }