public SAuctionItem GetCurrentItem()
 {
     AuctionItem currentItem = auction.CurrentItem;
     SAuctionItem sCurrentItem = new SAuctionItem()
     {
         Id = currentItem.Id,
         ItemName = currentItem.ItemName,
         Bid = currentItem.Bid
     };
     return sCurrentItem;
 }
示例#2
0
        public bool PlaceBid(SAuctionItem auctionItem, decimal amount, string bidder)
        {
            string itemAsString = JsonConvert.SerializeObject(auctionItem);

            bidder += commandClient.Client.LocalEndPoint.ToString(); 

            commandWriter.WriteLine("bid|" + itemAsString + "|" + amount + "|" + bidder);

            bool success;
            bool.TryParse(commandReader.ReadLine(), out success);

            return success;
        }
示例#3
0
 public void getCurrentItem()
 {
     try
     {
         auctionItem = placeBidsController.GetCurrentItem();
         itemLabel.Content = auctionItem.ItemName;
         currentBidLabel.Content = auctionItem.Bid;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
 public bool PlaceBid(SAuctionItem auctionItem, decimal amount, string bidder)
 {
     return auction.PlaceBid(auctionItem.Id, amount, bidder);
 }