Пример #1
0
        public ActionResult ForbidMain()
        {
            int pageSize = 30;
            int page = Request.QueryString["page"] == null ? 1 : int.Parse(Request.QueryString["page"].ToString());
            int count;
            string username = Request.QueryString["username"] == null ? "" : Request.QueryString["username"].ToString().Trim();

            int? userID = null;
            string title = Request.QueryString["title"] == null ? "" : Request.QueryString["title"].ToString().Trim();
            if (username != "")
            {
                Users modelUser = (new bizUsers()).Get(username);
                if (modelUser != null)
                    userID = modelUser.UserID;
            }
            ViewData["username"] = username;
            ViewData["title"] = title;
            bizBBSMain b = new bizBBSMain();
            List<BBSMain> list = b.ListByDeleted(1, 0,title,userID, Enumerations.OrderTypes.����ʱ��, pageSize, page, out count);
            ViewData["PageList"] = Page.GetPageList("/AdminBBS/ForbidMain?username="******"&title=" + Server.HtmlEncode(title), count, pageSize, page, true);
            return View(list);
        }