Пример #1
0
        public ActionResult TimKiemSanPhamAdmin(string txttimkiem, int?page)
        {
            int pageNumber = (page ?? 1);
            int pageSize   = 7;
            var sp         = new SANPHAMFunction().SANPHAMs.Where(p => p.tensanpham.Contains(txttimkiem));

            return(View(sp.ToList().OrderBy(n => n.ID_SP).ToPagedList(pageNumber, pageSize)));
        }
Пример #2
0
        //
        // GET: /Admin/SANPHAMADMIN/
        public ActionResult Index(int?page)
        {
            int pageNumber = (page ?? 1);
            int pageSize   = 12;
            var sp         = new SANPHAMFunction().SANPHAMs
                             .Where(p => p.ID_SP != null);

            return(View(sp.ToList().OrderBy(n => n.ID_SP).ToPagedList(pageNumber, pageSize)));
        }