Esempio n. 1
0
        public ActionResult VoteAction(VoteFrontModel backm)
        {
            var variant = Request["variant"];

            if (!String.IsNullOrEmpty(variant))
            {
                string[] AnswerArr = variant.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
                _Repository.ActionVote(backm.Item.Id, AnswerArr);
            }

            //return View("Item",model);
            return(Redirect("/vote/item/" + backm.Item.Id));
        }
Esempio n. 2
0
        protected override void OnActionExecuting(ActionExecutingContext filterContext)
        {
            base.OnActionExecuting(filterContext);
            //Есть ли у сайта доступ к модулю
            if (!_Repository.ModuleAllowed(ControllerName))
            {
                Response.Redirect("/page/error/451");
            }

            model = new VoteFrontModel()
            {
                LayoutInfo  = _layoutData,
                Breadcrumbs = _breadcrumb,
                PageName    = _pageName,
                User        = CurrentUser
            };
        }