Пример #1
0
        public ActionResult Content(int id,int page)
        {
            int userID = UserID;
            bizBBSMain b = new bizBBSMain();
            bizBBSDE bde = new bizBBSDE();
            bizUserXCard uc = new bizUserXCard();

            BBSMainRelationQuery model = b.GetBBSMainDetail(id);
            if(model==null)
                return Redirect("/bbs/NoPage.html");
            if (UserCommon.CheckBBSAdminRight(AdminType) == false && model.DeleteType != 0)
                return Redirect("/bbs/NoPage.html");
            List<BBSTypes> listBBSType = (new bizBBSTypes()).ListByMainID(1);
            b.AddHit(id);
            int count;
            List<BBSDERelationQuery> list = bde.List(id, page-1, 50, out count);
            ViewData["List"] = list;
            ViewData["PageList"] = bbs.GetBBSContentPageList(id, count, page);
            ViewData["Page"] = page;
            ViewData["deID"] = 0;
            ViewData["ID"] = id;
            ViewData["AdminType"] = AdminType;
            ViewData["ShowAllQM"] = ShowAllQM;
            ViewData["ShowSelfQM"] = ShowSelfQM;
            ViewData["TypesName"] = SZXX.UI.Public.CommonHelper.GetBBSTypeName(listBBSType, model.TypeDeID);
            if (userID != 0)
            {
                ViewData["Niming"] = uc.GetCardNum(userID, "niming");
                ViewData["BigNiming"] = uc.GetCardNum(userID, "bigniming");
            }

            bizPopUp bp = new bizPopUp();
            DataSet pmodel = bp.GetNew(userID);
            if (pmodel != null)
            {
                //if (pmodel.Tables[0].Rows[0][2].ToString() == "1") //��ʾΪϵͳ��Ϣ
                //{
                //    if (SZXX.UI.Public.PublicHelper.GetCookie("PopInfoID") != pmodel.Tables[0].Rows[0][0].ToString())
                //    {
                //        ViewData["PopUp"] = pmodel;
                //        SZXX.UI.Public.PublicHelper.WriteCookie("PopInfoID", pmodel.Tables[0].Rows[0][0].ToString());
                //    }
                //    else
                //        ViewData["PopUp"] = null;
                //}
                //else
                if (ShowPopup)
                    ViewData["PopUp"] = pmodel;
                else
                    ViewData["PopUp"] = null;
            }

            return View(model);
        }