Пример #1
0
 public void GetAllBidders()
 {
     Assert.IsNotNull(TestData.NewItem, "Failed because no item available -- requires successful AddItem test");
     GetAllBiddersCall api = new GetAllBiddersCall(this.apiContext);
     api.ItemID = TestData.NewItem.ItemID;
     api.CallMode = GetAllBiddersModeCodeType.ViewAll;
     // Make API call.
     OfferTypeCollection bidders = api.GetAllBidders(api.ItemID, api.CallMode);
     // No bidders for the new item.
     Assert.IsTrue(bidders == null || bidders.Count == 0);
 }
Пример #2
0
		private void BtnGetAllBidders_Click(object sender, System.EventArgs e)
		{
			try
			{
				LstHighBids.Items.Clear();
				
				GetAllBiddersCall apicall = new GetAllBiddersCall(Context);
				OfferTypeCollection	bids = apicall.GetAllBidders(TxtItemId.Text, (GetAllBiddersModeCodeType) Enum.Parse(typeof(GetAllBiddersModeCodeType), CboCallMode.SelectedItem.ToString()));

				foreach (OfferType offer in bids)
				{
					string[] listparams = new string[6];
					listparams[0] = offer.Action.ToString();
					listparams[1] = offer.User.UserID;
					listparams[2] = offer.Currency.ToString();
					listparams[3] = offer.MaxBid.Value.ToString();
					listparams[4] = offer.Quantity.ToString();
					listparams[5] = offer.TimeBid.ToString();

					ListViewItem vi = new ListViewItem(listparams);
					this.LstHighBids.Items.Add(vi);

				}

			}
			catch (Exception ex)
			{
				MessageBox.Show(ex.Message);
			}
		}