// GET: Product public ActionResult Index(string s, int?p, bool isSale = false, bool isSelling = false) { int limit = 12; var finder = _productSevice.GetFinder().SeachText(s); var count = finder.Count(); var Paging = CalcPaging(limit, p, count); var model = new CategoryProductListViewModel { Paging = Paging, ListProduct = finder.ToPage(limit, Paging.Page) }; return(View(model)); }
public ActionResult PopupSelect(string seach, string cat, int?p) { int limit = 10; var finder = _productSevice.GetFinder().SeachText(seach); var count = finder.Count(); var Paging = CalcPaging(limit, p, count); var viewModel = new AdminProductViewModel { Paging = Paging, ListProduct = finder.ToPage(limit, Paging.Page) }; return(PartialView(viewModel)); }