Exemplo n.º 1
0
        public virtual ActionResult AddCity(AddCityFormViewModel form)
        {
            return Handle(() =>
                              {
                                  if (!HasRight(RightType.AddCities))
                                      throw new SecurityAccessDeniedException();

                                  var city = new AdministrativeDivision(null, form.Name, form.Alias, form.Latitude, form.Longitude);
                                  _documentSession.Store(city);
                              });
        }
Exemplo n.º 2
0
        public virtual ActionResult AddCity()
        {
            if (!HasRight(RightType.AddCities))
                return RedirectToAction(MVC.Home.Index());

            SetNavigationHierarchy(GetGamblingNavigationItems());

            var addCityViewModel = new AddCityFormViewModel();

            return View(addCityViewModel);
        }