public IActionResult EditUrgency(UrgencyEditDto model) { UrgencyEntity entity = _mapper.Map <UrgencyEntity>(model); _urgencyService.Update(entity); return(RedirectToAction("Index")); }
public IActionResult UpdateUrgency(UrgencyUpdateViewModel model) { if (ModelState.IsValid) { _urgencyService.Update(new Urgency { Id = model.Id, Definition = model.Definition }); return(RedirectToAction("Index")); } return(View(model)); }
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)); }
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)); }