Page tree
Skip to end of metadata
Go to start of metadata

This function fetches chunks of TCustomer from the system

Parameters

Used to call the function

  1. RecordId - Integer
  2. NumberofRecords - Integer
  3. opt - TCustomerOptions

Returns

Returns the following

 

Example if Sync with process
        public event FetchEventHandler OnFetch;
        public List<TCustomer> GetCustomer(TCustomerOptions options , int max = -1)
        {
            
            var numberofREcs = client.NumberOfModifiedCustomers(new DateTime(1900,1,1));
            var customer = client.GetCustomersEx(0, 100, options);
            List<TCustomer> resList = new List<TCustomer>(customer);            
            if (null != OnFetch) OnFetch(this, customer.Count(), numberofREcs);
            while(customer.Length >= 100)
            {
                int resListLastRecordID = resList.Last().RecordID;
                customer = client.GetCustomersEx(resListLastRecordID + 1, 100, options);                
                resList.AddRange(customer);
                if (null != OnFetch) OnFetch(this, resList.Count, numberofREcs);
                if((max != -1) && resList.Count > max)
                {
                    break;
                }
            }
            return resList;
        }