Example #1
0
        // GET: Admin/Slide
        public ActionResult Index(string searchString = "", int page = 1, int pagesize = 2)
        {
            ViewBag.searchString = searchString;
            SlideDAO slideDAO = new SlideDAO();

            if (searchString == "")
            {
                var listSlide = slideDAO.SelectAll().ToPagedList(page, pagesize);
                return(View(listSlide));
            }
            else
            {
                var listSlide = slideDAO.SelectWithConditon(searchString).ToPagedList(page, pagesize);
                return(View(listSlide));
            }
        }