Example #1
0
        public PartialViewResult ListNews(int?page)
        {
            int pageCurrent = 1;

            if (page.HasValue)
            {
                pageCurrent = page.Value;
            }

            shNewService _new = new shNewService();

            IPagedList <shNew> dsNews = _new.DanhSachNews_PhanTrang(pageCurrent, Config.PAGE_SIZE_10);

            ViewBag.ListNews = dsNews;
            return(PartialView("ListNews", dsNews));
        }
Example #2
0
        public ActionResult DsNews(int?page)
        {
            int pageCurrent = 1;

            if (page.HasValue)
            {
                pageCurrent = page.Value;
            }

            shNewService _tintuc = new shNewService();

            IPagedList <shNew> dsNew = _tintuc.DanhSachNews_PhanTrang(pageCurrent, Config.PAGE_SIZE_9);

            ViewBag.DsNews = dsNew;

            return(PartialView("DsNews", ViewBag.DsNews));
        }