
IPP .NET DevKit v2 - QBD CustomerQuery - Retrieve All
By:
IDNPeterL on
May 9th, 2012 | syntax:
C# | size: 0.82 KB | hits: 134 | expires: Never
//Retrieve all QBD Customers
//Documentation: http://goo.gl/XsxjR
List<Intuit.Ipp.Data.Qbd.Customer> customerSet = new List<Intuit.Ipp.Data.Qbd.Customer>();
List<Intuit.Ipp.Data.Qbd.Customer> customerQueryResult = null;
int startPage = 1;
do
{
Intuit.Ipp.Data.Qbd.CustomerQuery qbdCustomerQuery = new Intuit.Ipp.Data.Qbd.CustomerQuery();
qbdCustomerQuery.ChunkSize = "100";
qbdCustomerQuery.ItemElementName = ItemChoiceType4.StartPage;
qbdCustomerQuery.Item = startPage.ToString();
customerQueryResult = qbdCustomerQuery.ExecuteQuery<Intuit.Ipp.Data.Qbd.Customer>(context).ToList<Intuit.Ipp.Data.Qbd.Customer>();
if (customerQueryResult.Count > 0) { customerSet.AddRange(customerQueryResult); }
startPage++;
} while (customerQueryResult.Count > 0);
int customerCount = customerSet.Count;