public void GetUserDisputes()
 {
     GetUserDisputesCall api = new GetUserDisputesCall(this.apiContext);
     api.DisputeFilterType = DisputeFilterTypeCodeType.AllInvolvedDisputes;
     api.DisputeSortType = DisputeSortTypeCodeType.DisputeCreatedTimeAscending;
     // Pagination
     PaginationType pt = new PaginationType();
     pt.EntriesPerPage = 10; pt.EntriesPerPageSpecified = true;
     pt.PageNumber = 1; pt.PageNumberSpecified = true;
     api.Pagination = pt;
     // Make API call.
     DisputeTypeCollection disputes = api.GetUserDisputes(pt);
 }
		private void BtnGetUserDisputes_Click(object sender, System.EventArgs e)
		{
			try
			{
				LstDisputes.Items.Clear();
	
				GetUserDisputesCall apicall = new GetUserDisputesCall(Context);

				apicall.DisputeFilterType = (DisputeFilterTypeCodeType) Enum.Parse(typeof(DisputeFilterTypeCodeType), CboFilter.SelectedItem.ToString());
				apicall.DisputeSortType = (DisputeSortTypeCodeType) Enum.Parse(typeof(DisputeSortTypeCodeType), CboSort.SelectedItem.ToString());

				PaginationType page = new PaginationType();
				page.PageNumber = 1;
				DisputeTypeCollection disputes = apicall.GetUserDisputes(page);
				
				foreach (DisputeType dsp in disputes)
				{
					string[] listparams = new string[10];
					listparams[0] = dsp.DisputeID;
					listparams[1] = dsp.Item.ItemID;
					listparams[2] =  dsp.TransactionID;
					listparams[3] =  dsp.DisputeState.ToString();
					listparams[4] =  dsp.DisputeStatus.ToString();
					listparams[5] =  dsp.OtherPartyName;
					listparams[6] =  dsp.UserRole.ToString();
					listparams[7] =  dsp.DisputeReason.ToString();
					listparams[8] =  dsp.DisputeExplanation.ToString();
					listparams[9] =  dsp.DisputeModifiedTime.ToString();

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

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

		}