// GET: /Admin/CMSNews/ public ActionResult Index(string keyword, int page = 1) { int totalItems = 0; var categories = _cmsNewsService.GetCMSNews(page, OnlineStore.Infractructure.Utility.Define.PAGE_SIZE, out totalItems); IPagedList <CMSNewsView> pageNews = new StaticPagedList <CMSNewsView>(categories, page, OnlineStore.Infractructure.Utility.Define.PAGE_SIZE, totalItems); return(View(pageNews)); }
public ActionResult Index(string keyword, int page = 1) { int totalItems = 0; var categories = _cmsNewsService.GetCMSNews(keyword, page, Define.PAGE_SIZE, out totalItems); IPagedList <CMSNewsViewModel> pageNews = new StaticPagedList <CMSNewsViewModel>(categories, page, Define.PAGE_SIZE, totalItems); return(View(pageNews)); }