private void BtnGetItemTransactions_Click(object sender, EventArgs e)
        {
            try
            {
                LstTransactions.Items.Clear();

                GetItemTransactionsCall apicall = new GetItemTransactionsCall(apiContext);

                TransactionTypeCollection transactions = apicall.GetItemTransactions(TxtItemId.Text, DatePickModFrom.Value, DatePickModTo.Value);

                if (transactions.Count == 0)
                {
                    MessageBox.Show("There is no transaction");
                    return;
                }

                foreach (TransactionType trans in transactions)
                {
                    string[] listparams = new string[6];
                    listparams[0] = trans.TransactionID;
                    listparams[1] = trans.TransactionPrice.Value.ToString();
                    listparams[2] = trans.AmountPaid.Value.ToString();
                    listparams[3] = trans.QuantityPurchased.ToString();
                    listparams[4] = trans.Buyer.UserID;
                    listparams[5] = trans.BestOfferSale.ToString();

                    ListViewItem vi = new ListViewItem(listparams);
                    LstTransactions.Items.Add(vi);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
 public void GetItemTransactions()
 {
     Assert.IsNotNull(TestData.NewItem, "Failed because no item available -- requires successful AddItem test");
     GetItemTransactionsCall api = new GetItemTransactionsCall(this.apiContext);
     api.ItemID = TestData.NewItem.ItemID;
     // Time filter
     System.DateTime calTo = DateTime.Now;
     System.DateTime calFrom = calTo.AddHours(-1);
     TimeFilter tf = new TimeFilter(calFrom, calTo);
     api.ModTimeFrom = calFrom;
     api.ModTimeTo = calTo;
     // Pagination
     PaginationType pt = new PaginationType();
     pt.EntriesPerPage = 100; pt.EntriesPerPageSpecified = true;
     pt.PageNumber = 1; pt.PageNumberSpecified = true;
     api.Pagination = pt;
     TransactionTypeCollection trans = api.GetItemTransactions(api.ItemID, api.ModTimeFrom, api.ModTimeTo);
     // NO transaction should be returned.
     Assert.IsTrue(trans == null || trans.Count == 0);
 }