예제 #1
0
        public IActionResult Default()
        {
            int             CateID  = DataConverter.CLng(RequestEx["cateid"]);
            string          Skey    = RequestEx["skey"];
            M_GuestBookCate cateMod = cateBll.SelReturnModel(CateID);

            if (cateMod == null)
            {
                cateMod = new M_GuestBookCate()
                {
                    CateID = 0, CateName = "留言信息", NeedLog = 0
                };
            }
            ViewBag.cateMod = cateMod;
            ViewBag.cateDt  = cateBll.SelByGuest();
            ViewBag.needlog = cateMod.NeedLog;
            ViewBag.mu      = buser.GetLogin();
            PageSetting setting = B_GuestBook.SelPage(CPage, PSize, new F_Guest()
            {
                parentId  = 0,
                skey      = Skey,
                cateIds   = cateMod.CateID.ToString(),
                uids      = mu.UserID.ToString(),
                onlyAudit = true
            });

            return(View(setting));
        }
예제 #2
0
        public IActionResult GuestShow()
        {
            int GID = DataConverter.CLng(RequestEx["GID"]);

            if (GID < 1)
            {
                return(WriteErr("没有传入留言ID"));
            }
            M_GuestBook info = guestBll.SelReturnModel(GID);
            M_UserInfo  mu   = buser.GetLogin();

            if (info.IsNull || info.ParentID > 0 || info.Status == -1)
            {
                return(WriteErr("留言信息不存在!"));
            }
            if (info.Status == 0 && info.UserID != mu.UserID)
            {
                return(WriteErr("该留言未通过审核,无法查看详情"));
            }
            M_GuestBookCate cateMod = cateBll.SelReturnModel(info.CateID);

            ViewBag.mu      = mu;
            ViewBag.cateMod = cateMod;
            ViewBag.GTitle  = info.Title;
            ViewBag.cateDt  = cateBll.SelByGuest();
            PageSetting setting = B_GuestBook.SelPage(CPage, 20, new F_Guest()
            {
                gid = GID
            });

            return(View(setting));
        }
예제 #3
0
        public PartialViewResult GuestShow_Data()
        {
            int         GID     = DataConverter.CLng(RequestEx["GID"]);
            PageSetting setting = B_GuestBook.SelPage(CPage, 20, new F_Guest()
            {
                gid = GID
            });

            return(PartialView(setting));
        }
예제 #4
0
        public PartialViewResult Cate_Data()
        {
            int         CateID  = DataConverter.CLng(RequestEx["cateid"]);
            PageSetting setting = B_GuestBook.SelPage(CPage, PSize, new F_Guest()
            {
                parentId  = 0,
                skey      = RequestEx["skey"],
                cateIds   = CateID.ToString(),
                uids      = mu.UserID.ToString(),
                onlyAudit = true
            });

            return(PartialView("Default_List", setting));
        }
예제 #5
0
        public IActionResult MsgList()
        {
            ViewBag.viewDir = viewDir;
            int         Status  = DataConvert.CLng(GetParam("status"), 0);
            PageSetting setting = B_GuestBook.SelPage(CPage, PSize, new F_Guest()
            {
                status  = Status,
                skey    = GetParam("skey"),
                cateIds = CateID.ToString()
            });

            if (Request.IsAjax())
            {
                return(PartialView("Msg_List", setting));
            }
            return(View("MsgList", setting));
        }