Esempio n. 1
0
        /// <summary>
        /// �����б�
        /// </summary>
        /// <param name="typeMain">����ĿID</param>
        /// <param name="typeDe">����ĿID</param>
        /// <param name="showTypes">��ʾ��Ϣ������</param>
        /// <param name="orderTypes">����ʽ</param>
        /// <returns></returns>
        public ActionResult List(int typeMain,int typeDe,int showTypes,int orderTypes)
        {
            bizBBSMain b = new bizBBSMain();
            int count;
            int pageSize = 200;
            int page;
            string keyword;
            page = Request.QueryString["page"] == null ? 1 : int.Parse(Request.QueryString["page"].ToString());
            keyword = Request.QueryString["keyword"] == null ? "" : Request.QueryString["keyword"].ToString();

            ViewData["ShowBall"] = "no";
            if (showTypes == 0 && orderTypes == 1 && page == 1)
            {
                List<BBSMainBallList> ballList = b.ListByBall(typeMain, typeDe);
                ViewData["AdminBallList"] = b.ListByAdminBall(typeMain, typeDe);
                ViewData["BallList"] = ballList;
                ViewData["ShowBall"] = "yes";
            }

            List<BBSMain> list = b.ListPage(typeMain,typeDe,(Enumerations.BBSShowType)showTypes,(Enumerations.OrderTypes)orderTypes,keyword, UserID, pageSize,page, out count);
            ViewData["BBSMainPageList"] = bbs.GetBBSMainPageList(UserID, typeMain, typeDe, showTypes, orderTypes, keyword, count, pageSize, page);
            ViewData["typeMain"] = typeMain;
            ViewData["typeDe"] = typeDe;
            ViewData["showTypes"] = showTypes;
            ViewData["AdminType"] = AdminType;
            ViewData["TypeList"] = (new bizBBSTypes()).ListByMainID(typeMain);
            ViewData["ListBar"] = bbs.GetListBarHtml((Enumerations.BBSTypeMain)typeMain, (Enumerations.BBSShowType)showTypes);
            return View(list);
        }