コード例 #1
0
        //kiem duyet truyen
        public ActionResult Censorship()
        {
            if (_user != null && _user.RoleId == 1)
            {
                int page = Convert.ToInt32(Request["page"]);

                if (page <= 0)
                {
                    page = 1;
                }

                ComicDAO comicDao = new ComicDAO();
                var      list     = comicDao.CensorshipComic(new Pagination(10, page));

                ViewBag.Comics  = list.Comics;
                ViewBag.Page    = list.Page;
                ViewBag.Numpage = list.PageSize;

                return(View());
            }
            else
            {
                return(Redirect(Url.Action("Index", "User")));
            }
        }
コード例 #2
0
        //kiem duyet truyen
        public ActionResult Censorship()
        {
            if (CheckStatusUser())
            {
                return(RedirectToAction("Login"));
            }

            if (CheckAdmin())
            {
                int page = Convert.ToInt32(Request["page"]);

                if (page <= 0)
                {
                    page = 1;
                }

                ComicDAO comicDao = new ComicDAO();
                var      list     = comicDao.CensorshipComic(new Pagination(10, page));

                ViewBag.Comics  = list.Comics;
                ViewBag.Page    = list.Page;
                ViewBag.Numpage = list.PageSize;

                return(View());
            }

            return(Redirect(Url.Action("Index", "User")));
        }