Exemple #1
0
        public ActionResult Create()
        {
            var states = new SelectList(ResourceService.GetStates(), "StateId", "Name");
            var cities = new SelectList(ResourceService.GetCities(1), "CityId", "Name");

            ViewBag.States = states;
            ViewBag.Cities = cities;

            Int32 magazines = MagazineService.CountUserMagazines();
            var   user      = UserService.GetCurrentUser();

            if (user == null)
            {
                SetMessage("Inicie sesión por favor.", BootstrapAlertTypes.Danger);
                return(RedirectToAction("Login", "Account"));
            }

            ViewBag.CurrenUser = Session["currentUser"];
            //if (magazines >= 10 && user.Stage != PaymentStages.Pagado)
            //{
            //    return Redirect("/Magazines/PaymentDetails");

            //}
            return(View());
        }