//[OutputCache(Duration = 28800, Location = OutputCacheLocation.ServerAndClient)] public ActionResult Index(int?pageIndex) { var model = _Service.All(null, null, false, null, pageIndex, 20); int totalPage = model?.Total ?? 0; ViewBag.TotalPage = totalPage; ViewBag.PageIndex = pageIndex ?? 1; return(View(model.Videos)); }
public ActionResult Index(string searchKey, DateTime?fromDate, DateTime?toDate, int?pageIndex) { var model = _Service.All(searchKey, fromDate, false, toDate, pageIndex, 20); int totalPage = model?.Total ?? 0; ViewBag.TotalPage = totalPage; ViewBag.pageIndex = pageIndex ?? 1; ViewBag.SearchKey = string.IsNullOrWhiteSpace(searchKey) ? string.Empty : searchKey; ViewBag.FromDate = fromDate?.ToString("MM/dd/yyyy") ?? null; ViewBag.ToDate = toDate?.ToString("MM/dd/yyyy") ?? null; ViewBag.Quanlyvideo = "active"; return(View(model?.Videos ?? new List <Video>())); }