// GET: Review public ActionResult Index(int? page) { ViewBag.HomeStatus = "inactive"; ViewBag.VideoStatus = "inactive"; ViewBag.ReviewStatus = "active"; ViewBag.ContactStatus = "inactive"; if (page == null) { if (TempData["currentPage"] != null) { page = Int32.Parse(TempData["currentPage"].ToString()); //Chuyển hướng từ action delete } else { page = 1; TempData["currentPage"] = page; } } else TempData["currentPage"] = page; if (TempData["strSort"] == null) TempData["strSort"] = "ID"; FilmService phimService = new FilmService(); ViewBag.maxPage = phimService.countPage(); ViewBag.maxIndexPage = phimService.getMaxIndexPage(); return View(phimService.getAllFilms(page, (String)TempData["strSort"], false)); }
// GET: AdminMovies public ActionResult Index(int? page) { if (page == null) { if (TempData["currentPage"] != null) { page = Int32.Parse(TempData["currentPage"].ToString()); //Chuyển hướng từ action delete } else { page = 1; TempData["currentPage"] = page; } } else TempData["currentPage"] = page; if (TempData["strSort"] == null) TempData["strSort"] = "ID"; if (TempData["sortDirection"] == null) TempData["sortDirection"] = "false"; FilmService phimService = new FilmService(); ViewBag.maxPage = phimService.countPage(); ViewBag.maxIndexPage = phimService.getMaxIndexPage(); ViewBag.maxProductOnEachPage = phimService.getMaxProductOnEachPage(); return View(phimService.getAllFilms(page, (String)TempData["strSort"], Boolean.Parse(TempData["sortDirection"].ToString()))); }