public IActionResult Index(string thongbao) { List <HangSanPham> hang = ctx.HangSanPham.ToList(); ViewBag.Hang = hang; //Thông báo if (thongbao != null) { ViewBag.ThongBao = thongbao; } SanPhamBUS sanphambus = new SanPhamBUS(); List <SanPham> spnam = sanphambus.GetSanPhams("PhanLoai", "Nam", pagenumber, pagesize); List <SanPham> spnu = sanphambus.GetSanPhams("PhanLoai", "Nữ", pagenumber, pagesize); List <SanPham> spmoi = sanphambus.GetSanPhams("", "", pagenumber, pagesize); List <SanPham> spbanchay = sanphambus.GetBanChay(); ViewBag.SanPhamNam = spnam; ViewBag.SanPhamNu = spnu; ViewBag.SanPhamMoi = spmoi; ViewBag.SanPhamBanChay = spbanchay; return(View()); }