Exemplo n.º 1
0
        public ActionResult CreateLaw(LawEditModel model)
        {
            LawService service = new LawService();

            if (!TryUpdateModel(model))
            {
                service.InitializeExistingLawEditModel(model, SessionManager.Current.CurrentParliamentId);
                return(View(model));
            }

            model = service.CreateLaw(model);
            return(RedirectToAction("LawDetails", new { lawId = model.LawID }));
        }