Exemplo n.º 1
0
        /// <summary>
        /// 竞赛用户管理页面
        /// </summary>
        /// <param name="cid">竞赛ID</param>
        /// <param name="id">页面索引</param>
        /// <returns>操作后的结果</returns>
        public ActionResult UserList(Int32 cid, Int32 id = 1)
        {
            PagedList <ContestUserEntity> list = ContestUserManager.AdminGetContestUserList(cid, id);

            ViewBag.ContestID = cid;

            return(ViewWithPager(list, id));
        }
Exemplo n.º 2
0
        public ActionResult Export(Int32 id, FormCollection form)
        {
            String usernames = String.Empty;

            if (String.Equals(form["enablerealname"], "1"))
            {
                IMethodResult result = ContestUserManager.AdminGetContestUserList(id, 0x02 + 0x04, false);

                if (!result.IsSuccess)
                {
                    return(RedirectToErrorMessagePage(result.Description));
                }

                usernames = result.ResultObject as String;
            }
            else if (String.Equals(form["enablerealname"], "2"))
            {
                usernames = form["usernames"];
            }

            return(ResultToFile(ContestManager.AdminGetExportRanklist, id, usernames, id.ToString(), "xls"));
        }