Beispiel #1
0
        public ActionResult GetPaging(int?page)
        {
            int pageSize = 10;          // Số sản phẩm của 1 trang
            int pageNum  = (page ?? 1); // If(page==null)->set page==1

            return(PartialView("_GetPaging", dmRepo.GetAll().ToPagedList(pageNum, pageSize)));
        }
Beispiel #2
0
 public ActionResult Create()
 {
     ViewBag.DanhMucID = new SelectList(dmRepo.GetAll(), "DanhMucID", "TenDanhMuc");
     return(View());
 }
Beispiel #3
0
 public ActionResult _PartialViewDanhMuc()
 {
     return(PartialView(dmRepo.GetAll()));
 }