コード例 #1
0
        public ActionResult AddVoteResult(VoteResultModel model)
        {
            if (ModelState.IsValid)
            {
                VoteResultInfo voteResultInfo = new VoteResultInfo {
                    VoteId       = model.VoteId,
                    DisplayOrder = model.DisplayOrder,
                    Result       = model.Result,
                    Count        = model.Count
                };
                Vote.CreateVoteResults(voteResultInfo);

                return(PromptView("投票选项添加成功"));
            }

            ViewData["referer"] = SiteUtils.GetAdminRefererCookie();
            return(View(model));
        }