Example #1
0
        public Auction RemoveAuction(Auction auction)
        {
            if (Auctions.Contains(auction))
            {
                Auctions.Remove(auction);
                return auction;
            }

            return null;
        }
Example #2
0
 public void AddAuction(Auction auction)
 {
     auction.Listing = this;
     Auctions.Add(auction);
 }
        public void UpdateAuction(Auction auction)
        {
            Auction targetAuction = context.Auctions.Find(auction.AuctionID);

            if (targetAuction != null)
            {
                targetAuction.CreatedTime = auction.CreatedTime;
                targetAuction.AlternativePrize = auction.AlternativePrize;
                targetAuction.EndTime = auction.EndTime;
                targetAuction.IsSilent = auction.IsSilent;
                targetAuction.MinimumBid = auction.MinimumBid;
                targetAuction.WinnerID = auction.WinnerID;
                targetAuction.ListingID = auction.ListingID;
                targetAuction.CreatorID = auction.CreatorID;
                targetAuction.Copies = auction.Copies;
                targetAuction.Increment = auction.Increment;
            }

            foreach (AuctionBid bid in auction.AuctionBids)
            {
                if (bid.AuctionBidID == 0)
                {
                    InsertAuctionBid(bid);
                }
                else
                {
                    UpdateAuctionBid(bid);
                }
            }
        }
 public ActivityFeedContainer(Auction auction, DateTime date)
     : this()
 {
     ItemDate = date;
     CreatedAuction = auction;
 }
 public void InsertAuction(Auction auction)
 {
     context.Auctions.Add(auction);
 }