public ActionResult PopupSelect(string seach, string cat, int?p) { int limit = 10; var count = _productSevice.GetCount(); var Paging = CalcPaging(limit, p, count); var viewModel = new AdminProductViewModel { Paging = Paging, ListProduct = _productSevice.GetList(limit, Paging.Page) }; return(PartialView(viewModel)); }
public ActionResult AjaxProductForClass(Guid id, int?page) { var pcls = _productSevice.GetProductClass(id); if (pcls == null) { return(HttpNotFound()); } int limit = 12; var count = _productSevice.GetCount(pcls); var Paging = CalcPaging(limit, page, count); var model = new ClassProductViewModel { ProductClass = pcls, Paging = Paging, ListProduct = _productSevice.GetList(pcls, limit, Paging.Page) }; return(PartialView("AjaxProductForClass", model)); }
public ActionResult ShowBySlugProduct(string Slug, int?p) { var cat = _categoryService.GetBySlug(Slug); if (cat == null) { return(Redirect("/" + SiteConstants.Instance.ProductUrlIdentifier)); } int limit = 12; var count = _productSevice.GetCount(cat); var Paging = CalcPaging(limit, p, count); var model = new CategoryProductListViewModel { Cat = cat, Paging = Paging, ListProduct = _productSevice.GetList(cat, limit, Paging.Page) }; return(View(model)); }