/// <summary> /// 获取投票结果详情 /// </summary> /// <returns></returns> public ActionResult VoteResult() { int id = GetRouteInt("id"); if (id == 0) { id = WebHelper.GetQueryInt("id"); } VoteInfo voteInfo = Vote.GetVote(id); if (voteInfo == null) { return(PromptView("/", "您访问的页面不存在")); } List <VoteResultInfo> voteResultInfo = Vote.GetVoteResultsList(id); VoteResultModel model = new VoteResultModel { ResultsList = voteResultInfo, Id = voteInfo.Id, Title = voteInfo.Title, State = voteInfo.State, Type = voteInfo.Type }; return(View(model)); }
public ActionResult VoteResultsList(int Id = -1) { List <VoteResultInfo> voteResultInfo = Vote.GetVoteResultsList(Id); VoteResultListModel model = new VoteResultListModel { ResultsList = voteResultInfo }; SiteUtils.SetAdminRefererCookie(Url.Action("VoteResultsList", new { Id = Id })); return(View(model)); }