コード例 #1
0
        public ActionResult Listing(int?categoryID, string searchTerm, int?pageNo)
        {
            AuctionListingViewModel model = new AuctionListingViewModel();

            model.Auctions = auctionsService.SearchAuction(categoryID, searchTerm, pageNo, 1);
            return(PartialView(model));
        }
コード例 #2
0
        // GET: Auctions
        public ActionResult Index()
        {
            AuctionListingViewModel model = new AuctionListingViewModel();

            model.PageTitle       = "AuctionsTable";
            model.PageDescription = "List of Auctions";

            return(View(model));
        }
コード例 #3
0
        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));
        }
コード例 #4
0
        // 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));
        }
コード例 #5
0
        // 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));
        }
コード例 #6
0
        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);
            }
        }