예제 #1
0
        // GET: Home
        public ActionResult Index(int page = 1, int pagesize = 8)
        {
            SanPhamDao spDao     = new SanPhamDao();
            LoaiSPDao  loaiSpDao = new LoaiSPDao();

            ViewBag.sanphammoi      = spDao.dsSanPhamTheoUuTien(3, page, pagesize).Take(4);
            ViewBag.loaisanpham     = loaiSpDao.dsLoaiSP();
            ViewBag.danhsachsanpham = spDao.listProduct(page, pagesize);
            return(View());
        }
예제 #2
0
 public ActionResult Create()
 {
     ViewBag.danhmucsanpham = dmDao.li();
     ViewBag.loaisanpham    = loaiSPDao.dsLoaiSP();
     return(View());
 }