public ActionResult Listing(int?categoryID, string searchTerm, int?pageNo) { AuctionListingViewModel model = new AuctionListingViewModel(); model.Auctions = auctionsService.SearchAuction(categoryID, searchTerm, pageNo, 1); return(PartialView(model)); }
// GET: Auctions public ActionResult Index() { AuctionListingViewModel model = new AuctionListingViewModel(); model.PageTitle = "AuctionsTable"; model.PageDescription = "List of Auctions"; return(View(model)); }
public ActionResult Listing(int?categoryID, string searchTerm, int?pageNo) { var pageSize = 5; AuctionListingViewModel model = new AuctionListingViewModel(); model.Auctions = auctionsService.SearchAuctions(categoryID, searchTerm, pageNo, pageSize); var totalAuctions = auctionsService.GetAuctionCount(); model.Pager = new Pager(totalAuctions, pageNo, pageSize); return(PartialView(model)); }
// GET: Auctions public ActionResult Index(int?categoryID, string SearchTerm, int?pageNo) { AuctionListingViewModel model = new AuctionListingViewModel(); model.PageTitle = "Auctions"; model.PageDescription = "Auction listing page"; model.CategoryID = categoryID; model.SearchTerm = SearchTerm; model.PageNo = pageNo; return(View(model)); }
// GET: Auctions public PartialViewResult AuctionsTable(int?categoryId, string search, int?pageNo) { var pageSize = 10; pageNo = pageNo ?? 1; AuctionListingViewModel model = new AuctionListingViewModel(); model.CategoryId = categoryId; model.SearchTerm = search; model.AllAuctions = AuctionsService.Instance.FilterAuctions(categoryId, search, pageNo.Value, pageSize); model.Categories = CategoryService.Instance.AllCategories(); var totalAuctions = AuctionsService.Instance.GetAuctionCount(categoryId, search); model.pager = new Pager(totalAuctions, pageNo, pageSize); return(PartialView(model)); }
public ActionResult Index() { AuctionsService auctionsService = new AuctionsService(); AuctionListingViewModel model = new AuctionListingViewModel(); model.PageTitle = "Auctions"; model.PageDescription = "Auction Listing Page"; model.Auctions = auctionsService.GetAuction(); model.Categories = categoriesService.GetAllCategories(); if (Request.IsAjaxRequest()) { return(PartialView(model)); } else { //dasborad for change this return(View(model)); //return PartialView(model); } }