public ActionResult LawDetails(int lawId) { LawService service = new LawService(); LawEditModel model = service.GetLawEditModel(lawId); return(View(model)); }
public ActionResult EditLaw(LawEditModel model) { LawService service = new LawService(); if (!TryUpdateModel(model)) { service.InitializeExistingLawEditModel(model, SessionManager.Current.CurrentParliamentId); return(View(model)); } model = service.UpdateLaw(model); return(RedirectToAction("LawDetails", new { lawId = model.LawID })); }