Esempio n. 1
0
        public ActionResult CreateScheduler(SchedulerViewModel model)
        {
            if (!ModelState.IsValid)
            {
                return(View(model));
            }
            var dto = model.ToDto();
            var vm  = SchedulerViewModel.Create(dto);

            SchedulerRepository.Create(model.ToDto());
            return(RedirectToAction("scheduler-manager"));
        }
Esempio n. 2
0
 public ActionResult EditScheduler(SchedulerViewModel model)
 {
     if (!ModelState.IsValid)
     {
         return(View(model));
     }
     SchedulerRepository.Update(model.ToDto());
     return(RedirectToAction("scheduler-manager"));
 }