Exemple #1
0
        public ActionResult LawDetails(int lawId)
        {
            LawService   service = new LawService();
            LawEditModel model   = service.GetLawEditModel(lawId);

            return(View(model));
        }
Exemple #2
0
        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 }));
        }