Esempio n. 1
0
        public IActionResult EditUrgency(UrgencyEditDto model)
        {
            UrgencyEntity entity = _mapper.Map <UrgencyEntity>(model);

            _urgencyService.Update(entity);
            return(RedirectToAction("Index"));
        }
Esempio n. 2
0
 public IActionResult UpdateUrgency(UrgencyUpdateViewModel model)
 {
     if (ModelState.IsValid)
     {
         _urgencyService.Update(new Urgency
         {
             Id         = model.Id,
             Definition = model.Definition
         });
         return(RedirectToAction("Index"));
     }
     return(View(model));
 }
Esempio n. 3
0
        public IActionResult EditUrgency(UrgencyEditDTO model)
        {
            var urgency = _urgencyService.GetById(model.Id);

            if (ModelState.IsValid)
            {
                urgency.Title = model.Title;
                _urgencyService.Update(urgency);

                return(RedirectToAction("Index"));
            }

            return(View(model));
        }
Esempio n. 4
0
 public IActionResult UpdateUrgency(UrgencyUpdateViewModel model)
 {
     TempData["active"] = "urgency";
     if (ModelState.IsValid)
     {
         _urgencyService.Update(new Urgency
         {
             Id           = model.Id,
             UrgencyLevel = model.UrgencyLevel
         });
         return(RedirectToAction("Index"));
     }
     return(View(model));
 }