public SAuctionItem GetCurrentItem() { AuctionItem currentItem = auction.CurrentItem; SAuctionItem sCurrentItem = new SAuctionItem() { Id = currentItem.Id, ItemName = currentItem.ItemName, Bid = currentItem.Bid }; return sCurrentItem; }
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; }
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); }