Exemple #1
0
        public ActionResult Details(int id, BidDetailsOptions options)
        {
            // Default options
            if (options == null)
            {
                options = new BidDetailsOptions();
            }

            // Filtering
            var bids = _bidService.GetBidsForBidedContent(id);

            var entries = bids.List().Select(CreateBidEntry).ToList();
            var model   = new BidsDetailsViewModel {
                Bids    = entries,
                Options = options,
                DisplayNameForBidedItem = _bidService.GetDisplayForBidedContent(id) == null ? "" : _bidService.GetDisplayForBidedContent(id).DisplayText,
                BidedItemId             = id,
                BidsClosedOnItem        = _bidService.BidsDisabledForBidedContent(id),
            };

            return(View(model));
        }