public ActionResult Product() { shCategoryService _category = new shCategoryService(); IEnumerable <shCategory> model = _category.DanhSachCategory_TopHot(); int max_ = 4; IEnumerable <shCategory> dsC = (new shCategoryService()).DanhSachCategory().Where(x => x.ParentId == "abbce1a1efc649eabbd6949f40f83c60").Take(max_); int socconlai = 4 - dsC.Count(); IEnumerable <shProduct> dsP = (new shProductService()).DanhSachProduct_TheoDanhMuc("abbce1a1efc649eabbd6949f40f83c60").Take(socconlai); return(PartialView("Product", model)); }
public PartialViewResult ListCategoryHighLight(int?page) { int pageCurrent = 1; if (page.HasValue) { pageCurrent = page.Value; } shCategoryService _category = new shCategoryService(); IPagedList <shCategory> dsCategory = _category.DanhSachCategory_TopHot().ToPagedList(pageCurrent, Config.PAGE_SIZE_10); ViewBag.ListCategoryHighLight = dsCategory; return(PartialView("ListCategoryHighLight", dsCategory)); }