public ActionResult Create(ActModel model) { if (ModelState.IsValid) { try { _adminData.CreateAct(model); _alert.Set(this, AlertType.Success, "Changes have been saved"); return(RedirectToAction("Index", "Performers")); } catch (Exception) { _alert.Set(this, AlertType.Error, "Unable to save changes"); } } return(View(model)); }
public ActionResult Edit(Guid id, ActModel model) { model.Id = id; if (ModelState.IsValid) { try { _adminData.UpdateAct(model); _alert.Set(this, AlertType.Success, "Changes have been saved"); } catch (Exception) { _alert.Set(this, AlertType.Error, "Unable to save changes"); } } return(RedirectToAction("Index", "Performers")); }