//GetListForCategory public IEnumerable <AuctionShort> GetListForCategory(CategoryFilterParams filter) { int?totalrecords = 0; var pageindex = (filter.page > 0) ? filter.page - 1 : 0; var ash = GetListForCategory(filter.Id, false, (int)filter.Sortby - 1, (byte)filter.Orderby == 2, pageindex, filter.PageSize, out totalrecords); return(new PagedList <AuctionShort>(ash, pageindex, filter.PageSize, totalrecords.HasValue ? totalrecords.Value : 0)); }
//GetPastListForEvent public IEnumerable <AuctionShort> GetPastListForEvent(CategoryFilterParams filter) { int?totalrecords = 0; var pageindex = (filter.page > 0) ? filter.page - 1 : 0; var ash = (from p in dataContext.spAuction_View_List((long)filter.Id, -1, 2, (int)filter.Sortby - 1, (byte)filter.Orderby == 2, pageindex, filter.PageSize, ref totalrecords) select new AuctionShort { Bids = p.Bids.Value, CurrentBid = p.CurrentBid.Value, Estimate = p.Estimate, IsBold = p.IsBold.Value, IsFeatured = p.IsFeatured.Value, IsUnsoldOrPulledOut = p.IsUnsold.Value || p.IsPulledOut.Value, LinkParams = new LinkParams { ID = p.Auction_ID.Value, EventTitle = p.EventTitle, MainCategoryTitle = p.MainCategoryTitle, CategoryTitle = p.CategoryTitle }, Lot = p.Lot.HasValue ? p.Lot.Value : (short)0, Price = p.Price.Value, PriceRealized = p.PriceRealized.Value, PulledOut = p.IsPulledOut.Value, Status = p.AuctionStatus.Value, ThumbnailPath = p.ThumbnailPath, Title = p.Title, UnsoldOrPulledOut = p.IsUnsold.Value ? "UNSOLD" : "WITHDRAWN" }); return(new PagedList <AuctionShort>(ash.ToList(), pageindex, filter.PageSize, totalrecords.HasValue ? totalrecords.Value : 0)); }
//GetListForCategory public IEnumerable<AuctionShort> GetListForCategory(CategoryFilterParams filter) { int? totalrecords = 0; var pageindex = (filter.page > 0) ? filter.page - 1 : 0; var ash = GetListForCategory(filter.Id, false, (int) filter.Sortby - 1, (byte) filter.Orderby == 2, pageindex, filter.PageSize, out totalrecords); return new PagedList<AuctionShort>(ash, pageindex, filter.PageSize, totalrecords.HasValue ? totalrecords.Value : 0); }
//GetPastListForEvent public IEnumerable<AuctionShort> GetPastListForEvent(CategoryFilterParams filter) { int? totalrecords = 0; var pageindex = (filter.page > 0) ? filter.page - 1 : 0; var ash = (from p in dataContext.spAuction_View_List((long) filter.Id, -1, 2, (int) filter.Sortby - 1, (byte) filter.Orderby == 2, pageindex, filter.PageSize, ref totalrecords) select new AuctionShort { Bids = p.Bids.Value, CurrentBid = p.CurrentBid.Value, Estimate = p.Estimate, IsBold = p.IsBold.Value, IsFeatured = p.IsFeatured.Value, IsUnsoldOrPulledOut = p.IsUnsold.Value || p.IsPulledOut.Value, LinkParams = new LinkParams { ID = p.Auction_ID.Value, EventTitle = p.EventTitle, MainCategoryTitle = p.MainCategoryTitle, CategoryTitle = p.CategoryTitle }, Lot = p.Lot.HasValue ? p.Lot.Value : (short) 0, Price = p.Price.Value, PriceRealized = p.PriceRealized.Value, PulledOut = p.IsPulledOut.Value, Status = p.AuctionStatus.Value, ThumbnailPath = p.ThumbnailPath, Title = p.Title, UnsoldOrPulledOut = p.IsUnsold.Value ? "UNSOLD" : "WITHDRAWN" }); return new PagedList<AuctionShort>(ash.ToList(), pageindex, filter.PageSize, totalrecords.HasValue ? totalrecords.Value : 0); }
public ActionResult pPastCategoriesView(long event_id, CategoryFilterParams param, int page, int viewmode, int imageviewmode) { SetFilterParams(param); ViewData["IsPastGrid"] = true; ViewData["PageActionPath"] = "PastCategoriesView"; ViewData["IsUserRegisteredForEvent"] = Consts.IsAllUsersCanSeeBids; ViewData["IsShownOpenBidOne"] = Consts.IsShownOpenBidOne; return View("pAuctionGrid", AuctionRepository.GetPastListForCategory(param)); }
[ChildActionOnly] //, ActionOutputCache(Consts.CachingTime_01min) public ActionResult pCategoryViewCurrent(long event_id, bool iscurrentevent, CategoryFilterParams param, int page, int viewmode, int imageviewmode, int eventstep) { SetFilterParams(param); ViewData["IsPastGrid"] = !iscurrentevent && eventstep == 2; ViewData["PageActionPath"] = "CategoryView"; ViewData["IsUserRegisteredForEvent"] = Consts.IsAllUsersCanSeeBids; ViewData["IsShownOpenBidOne"] = Consts.IsShownOpenBidOne; ViewData["PageParams"] = String.Join(",", (new object[] { param.Id, false, (int)param.Sortby - 1, (byte)param.Orderby == 2, (param.page > 0) ? param.page - 1 : 0, param.PageSize })); return View("pAuctionGrid", AuctionRepository.GetListForCategory(param)); }