Advertisement
IDNPeterL

IPP .NET DevKit v2 - QBD CustomerQuery - Retrieve All

May 9th, 2012
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.82 KB | None | 0 0
  1. //Retrieve all QBD Customers
  2. //Documentation: http://goo.gl/XsxjR
  3.  
  4. List<Intuit.Ipp.Data.Qbd.Customer> customerSet = new List<Intuit.Ipp.Data.Qbd.Customer>();
  5. List<Intuit.Ipp.Data.Qbd.Customer> customerQueryResult = null;
  6. int startPage = 1;
  7.  
  8. do
  9. {
  10.     Intuit.Ipp.Data.Qbd.CustomerQuery qbdCustomerQuery = new Intuit.Ipp.Data.Qbd.CustomerQuery();
  11.     qbdCustomerQuery.ChunkSize = "100";
  12.     qbdCustomerQuery.ItemElementName = ItemChoiceType4.StartPage;
  13.     qbdCustomerQuery.Item = startPage.ToString();
  14.     customerQueryResult = qbdCustomerQuery.ExecuteQuery<Intuit.Ipp.Data.Qbd.Customer>(context).ToList<Intuit.Ipp.Data.Qbd.Customer>();
  15.     if (customerQueryResult.Count > 0) { customerSet.AddRange(customerQueryResult); }
  16.     startPage++;
  17. } while (customerQueryResult.Count > 0);
  18.  
  19. int customerCount = customerSet.Count;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement