GetMoreResults() public method

public GetMoreResults ( ) : FuelSDK.GetReturn
return FuelSDK.GetReturn
        // ------------------------------------------------------------
        // Name: UpdateConvertedProspects
        // Abstract: Retrieve subscribers from a list
        // ------------------------------------------------------------
        public static void SetPublicationListBooleans()
        {
            Dictionary<string, string> dctNewsletterListSubscribers = new Dictionary<string, string>();
            Dictionary<string, string> dctDENewsletterSubscribers = new Dictionary<string, string>();
            Dictionary<string, string> dctRemindersListSubscribers = new Dictionary<string, string>();
            Dictionary<string, string> dctDERemindersSubscribers = new Dictionary<string, string>();

            List<string> alstrValidSubscriberKeys = new List<string>();

            try
            {
                string strSubscriberKey = "";
                string strStatus = "";
                string strDEStatus = "";
                int intUpdateRecordCount = 0;
                int intResults = 0;
                string x;

                // Data
                DateTime dtmCreatedDate = DateTime.Now;


                // Newsletter Publication List
                // Get subscriber dates
                ET_List_Subscriber getListSub = new ET_List_Subscriber();
                getListSub.AuthStub = m_etcTDClient;
                getListSub.Props = new string[] { "SubscriberKey", "Status", "CreatedDate" };
                getListSub.SearchFilter = new SimpleFilterPart() { Property = "ListID", SimpleOperator = SimpleOperators.equals, Value = new string[] { "2726" } };
                GetReturn getLSResponse = getListSub.Get();
                Console.WriteLine("Get Status: " + getLSResponse.Status.ToString());
                Console.WriteLine("Message: " + getLSResponse.Message.ToString());
                Console.WriteLine("Code: " + getLSResponse.Code.ToString());
                Console.WriteLine("Results Length: " + getLSResponse.Results.Length);
                intResults = getLSResponse.Results.Length;

                // Get all subscriber keys associated with active subscribers
                while (getLSResponse.MoreResults == true || intResults > 0)
                {
                    foreach (ET_List_Subscriber sub in getLSResponse.Results)
                    {
                        strStatus = sub.Status.ToString();
                        dctNewsletterListSubscribers.Add(sub.SubscriberKey, strStatus);
                        Console.WriteLine("Added Subscriber: " + sub.SubscriberKey + " Status: " + strStatus);

                    }

                    getLSResponse = getListSub.GetMoreResults();
                    intResults = getLSResponse.Results.Length;
                }

                Console.WriteLine("Retrieved Newsletter List Subscription Status");

                // Get all customers and their 'NewsletterPublicationList' field from CustomerBaseDatabase
                Console.WriteLine("\n Retrieve All Rows from DataExtension");
                ET_DataExtensionRow deRowGetNewsletter = new ET_DataExtensionRow();
                deRowGetNewsletter.AuthStub = m_etcTDClientShared;
                deRowGetNewsletter.DataExtensionName = "CustomerDatabase";
                deRowGetNewsletter.Props = new string[] { "SubscriberKey", "NewsletterPublicationList" };
                GetReturn grRowNewsletter = deRowGetNewsletter.Get();
                Console.WriteLine("Get Status: " + grRowNewsletter.Status.ToString());
                Console.WriteLine("Message: " + grRowNewsletter.Message.ToString());
                Console.WriteLine("Code: " + grRowNewsletter.Code.ToString());
                Console.WriteLine("Results Length: " + grRowNewsletter.Results.Length);
                intResults = grRowNewsletter.Results.Length;

                while (grRowNewsletter.MoreResults == true || intResults > 0)
                {
                    foreach (ET_DataExtensionRow column in grRowNewsletter.Results)
                    {
                        strSubscriberKey = column.ColumnValues["SubscriberKey"];
                        strStatus = column.ColumnValues["NewsletterPublicationList"];

                        if (dctNewsletterListSubscribers.TryGetValue(strSubscriberKey, out x) == true)
                        {
                            dctDENewsletterSubscribers.Add(strSubscriberKey, strStatus);
                            Console.WriteLine("Added NPL customer: " + strSubscriberKey);
                        }

                    }

                    grRowNewsletter = deRowGetNewsletter.GetMoreResults();
                    intResults = grRowNewsletter.Results.Length;
                }

                // Update statuses
                ET_DataExtensionRow deRowPatchNewsletter = null;
                foreach (KeyValuePair<string, string> entry in dctDENewsletterSubscribers)
                {
                    strSubscriberKey = entry.Key;
                    strDEStatus = entry.Value;

                    // if our status = active, set to true
                    strStatus = dctNewsletterListSubscribers[strSubscriberKey];
                    if (strStatus.Equals("Active") == true)
                    {
                        strStatus = "True";
                    }
                    else
                    {
                        strStatus = "False";
                    }

                    // Is the status of our subscriber the same on the All Subscribers list as it is on the Data Extension?
                    if (strDEStatus.Equals(strStatus) == false)
                    {
                        intUpdateRecordCount += 1;
                        // No, update the verified email field
                        deRowPatchNewsletter = new ET_DataExtensionRow();
                        deRowPatchNewsletter.AuthStub = m_etcTDClientShared;
                        deRowPatchNewsletter.DataExtensionCustomerKey = "CustomerDBKey";
                        deRowPatchNewsletter.ColumnValues.Add("SubscriberKey", strSubscriberKey);
                        deRowPatchNewsletter.ColumnValues.Add("NewsletterPublicationList", strStatus);
                        PatchReturn patchRowResponse = deRowPatchNewsletter.Patch();
                        Console.WriteLine("Post Status: " + patchRowResponse.Status.ToString());
                        Console.WriteLine("Count: " + intUpdateRecordCount.ToString());
                        Console.WriteLine("Changed newsletter boolean for subscriber: " + strSubscriberKey + " from " + strDEStatus + " to " + strStatus);
                    }
                }
                
                Console.WriteLine("Completed Newsletter Boolean Update");

                // Reminders Publication List
                // Get subscriber dates
                ET_List_Subscriber getListSubReminders = new ET_List_Subscriber();
                getListSubReminders.AuthStub = m_etcTDClient;
                getListSubReminders.Props = new string[] { "SubscriberKey", "Status", "CreatedDate" };
                getListSubReminders.SearchFilter = new SimpleFilterPart() { Property = "ListID", SimpleOperator = SimpleOperators.equals, Value = new string[] { "2727" } };
                GetReturn getLSResponseReminders = getListSubReminders.Get();
                Console.WriteLine("Get Status: " + getLSResponseReminders.Status.ToString());
                Console.WriteLine("Message: " + getLSResponseReminders.Message.ToString());
                Console.WriteLine("Code: " + getLSResponseReminders.Code.ToString());
                Console.WriteLine("Results Length: " + getLSResponseReminders.Results.Length);
                intResults = getLSResponseReminders.Results.Length;

                // Get all subscriber keys associated with active subscribers
                while (getLSResponseReminders.MoreResults == true || intResults > 0)
                {
                    foreach (ET_List_Subscriber sub in getLSResponseReminders.Results)
                    {
                        strStatus = sub.Status.ToString();
                        dctRemindersListSubscribers.Add(sub.SubscriberKey, strStatus);
                        Console.WriteLine("Added Subscriber: " + sub.SubscriberKey + " Status: " + strStatus);

                    }

                    getLSResponseReminders = getListSubReminders.GetMoreResults();
                    intResults = getLSResponseReminders.Results.Length;
                }

                Console.WriteLine("Retrieved Reminders List Subscription Status");

                // Get all customers and their 'ReminderssPublicationList' field from CustomerBaseDatabase
                Console.WriteLine("\n Retrieve All Rows from DataExtension");
                ET_DataExtensionRow deRowGetReminders = new ET_DataExtensionRow();
                deRowGetReminders.AuthStub = m_etcTDClientShared;
                deRowGetReminders.DataExtensionName = "CustomerDatabase";
                deRowGetReminders.Props = new string[] { "SubscriberKey", "RemindersPublicationList" };
                GetReturn grRowReminders = deRowGetReminders.Get();
                Console.WriteLine("Get Status: " + grRowReminders.Status.ToString());
                Console.WriteLine("Message: " + grRowReminders.Message.ToString());
                Console.WriteLine("Code: " + grRowReminders.Code.ToString());
                Console.WriteLine("Results Length: " + grRowReminders.Results.Length);
                intResults = grRowReminders.Results.Length;

                while (grRowReminders.MoreResults == true || intResults > 0)
                {
                    foreach (ET_DataExtensionRow column in grRowReminders.Results)
                    {
                        strSubscriberKey = column.ColumnValues["SubscriberKey"];
                        strStatus = column.ColumnValues["RemindersPublicationList"];

                        if (dctRemindersListSubscribers.TryGetValue(strSubscriberKey, out x) == true)
                        {
                            dctDERemindersSubscribers.Add(strSubscriberKey, strStatus);
                            Console.WriteLine("Added RPL customer: " + strSubscriberKey);
                        }

                    }

                    grRowReminders = deRowGetReminders.GetMoreResults();
                    intResults = grRowReminders.Results.Length;
                }

                intUpdateRecordCount = 0;

                // Update statuses
                ET_DataExtensionRow deRowPatchReminders = null;
                foreach (KeyValuePair<string, string> entry in dctDERemindersSubscribers)
                {
                    strSubscriberKey = entry.Key;
                    strDEStatus = entry.Value;


                    // if our status = active, set to true
                    strStatus = dctRemindersListSubscribers[strSubscriberKey];
                    if (strStatus.Equals("Active") == true)
                    {
                        strStatus = "True";
                    }
                    else
                    {
                        strStatus = "False";
                    }

                    // Is the status of our subscriber the same on the All Subscribers list as it is on the Data Extension?
                    if (strDEStatus.Equals(strStatus) == false)
                    {
                        intUpdateRecordCount += 1;
                        // No, update the verified email field
                        deRowPatchReminders = new ET_DataExtensionRow();
                        deRowPatchReminders.AuthStub = m_etcTDClientShared;
                        deRowPatchReminders.DataExtensionCustomerKey = "CustomerDBKey";
                        deRowPatchReminders.ColumnValues.Add("SubscriberKey", strSubscriberKey);
                        deRowPatchReminders.ColumnValues.Add("RemindersPublicationList", strStatus);
                        PatchReturn patchRowResponse = deRowPatchReminders.Patch();
                        Console.WriteLine("Post Status: " + patchRowResponse.Status.ToString());
                        Console.WriteLine("Count: " + intUpdateRecordCount.ToString());
                        Console.WriteLine("Changed reminders boolean for subscriber: " + strSubscriberKey + " from " + strDEStatus + " to " + strStatus);
                    }
                }

                Console.WriteLine("Completed Reminders Boolean Update");
            }
            catch (Exception excError)
            {
                // Display Error
                Console.WriteLine("Error: " + excError.ToString());
            }
        }
        // ------------------------------------------------------------
        // Name: UpdateConvertedProspects
        // Abstract: Retrieve subscribers from a list
        // ------------------------------------------------------------
        public static void SetVerifiedEmailStatus()
        {
            Dictionary<string, string> dctAllSubscribers = new Dictionary<string, string>();
            Dictionary<string, string> dctDataExtensionSubscribers = new Dictionary<string, string>();
            Dictionary<string, string> dctNewsletterListSubscribers = new Dictionary<string, string>();
            Dictionary<string, string> dctDENewsletterSubscribers = new Dictionary<string, string>();
            Dictionary<string, string> dctRemindersListSubscribers = new Dictionary<string, string>();
            Dictionary<string, string> dctDERemindersSubscribers = new Dictionary<string, string>();

            List<string> alstrValidSubscriberKeys = new List<string>();

            try
            {
                string strSubscriberKey = "";
                string strEmail = "";
                string strCustomerNumber = "";
                string strStatus = "";
                string strDEStatus = "";
                int intUpdateRecordCount = 0;
                // Data
                DateTime dtmCreatedDate = DateTime.Now;

                
                // Get subscriber dates
                ET_Subscriber getSub = new ET_Subscriber();
                getSub.AuthStub = m_etcTDClientShared;
                getSub.Props = new string[] { "SubscriberKey", "EmailAddress", "Status", "CreatedDate" };
                GetReturn getResponse = getSub.Get();
                
                Console.WriteLine("Get Status: " + getResponse.Status.ToString());
                Console.WriteLine("Message: " + getResponse.Message.ToString());
                Console.WriteLine("Code: " + getResponse.Code.ToString());
                Console.WriteLine("Results Length: " + getResponse.Results.Length);
                int intResults = getResponse.Results.Length;

                // Get all subscriber keys associated with active subscribers
                while (getResponse.MoreResults == true || intResults > 0)
                {
                    foreach (ET_Subscriber sub in getResponse.Results)
                    {
                        strStatus = sub.Status.ToString();
                        dctAllSubscribers.Add(sub.SubscriberKey, strStatus);
                        Console.WriteLine("Added EmailAddress: " + sub.EmailAddress + " Status: " + strStatus);
                        
                    }

                    getResponse = getSub.GetMoreResults();
                    intResults = getResponse.Results.Length;
                }
                

                // Get all customers and their 'VerifiedEmail' field from CustomerBaseDatabase
                Console.WriteLine("\n Retrieve All Rows from DataExtension");
                ET_DataExtensionRow deRowGet = new ET_DataExtensionRow();
                deRowGet.AuthStub = m_etcTDClientShared;
                deRowGet.DataExtensionName = "CustomerDatabase";
                deRowGet.Props = new string[] { "SubscriberKey", "VerifiedEmail" };
                GetReturn grRow = deRowGet.Get();
                Console.WriteLine("Get Status: " + grRow.Status.ToString());
                Console.WriteLine("Message: " + grRow.Message.ToString());
                Console.WriteLine("Code: " + grRow.Code.ToString());
                Console.WriteLine("Results Length: " + grRow.Results.Length);
                intResults = grRow.Results.Length;
                string x;
                while (grRow.MoreResults == true || intResults > 0)
                {
                    foreach (ET_DataExtensionRow column in grRow.Results)
                    {
                        strSubscriberKey = column.ColumnValues["SubscriberKey"];
                        strStatus = column.ColumnValues["VerifiedEmail"];

                        if (dctAllSubscribers.TryGetValue(strSubscriberKey, out x) == true)
                        {
                            dctDataExtensionSubscribers.Add(strSubscriberKey, strStatus);
                            Console.WriteLine("Added customer: " + strSubscriberKey);
                        }

                    }

                    grRow = deRowGet.GetMoreResults();
                    intResults = grRow.Results.Length;
                }            

                // Update statuses
                ET_DataExtensionRow deRowPatch = null;
                foreach (KeyValuePair<string, string> entry in dctDataExtensionSubscribers)
                {
                    strSubscriberKey = entry.Key;
                    strDEStatus = entry.Value;

                    // if our status = active, set to true
                    strStatus = dctAllSubscribers[strSubscriberKey];
                    if (strStatus.Equals("Active") == true)
                    {
                        strStatus = "True";
                    }
                    else
                    {
                        strStatus = "False";
                    }

                    // Is the status of our subscriber the same on the All Subscribers list as it is on the Data Extension?
                    if (strDEStatus.Equals(strStatus) == false)
                    {
                        intUpdateRecordCount += 1;
                        // No, update the verified email field
                        deRowPatch = new ET_DataExtensionRow();
                        deRowPatch.AuthStub = m_etcTDClientShared;
                        deRowPatch.DataExtensionCustomerKey = "CustomerDBKey";
                        deRowPatch.ColumnValues.Add("SubscriberKey", strSubscriberKey);
                        deRowPatch.ColumnValues.Add("VerifiedEmail", strStatus);
                        PatchReturn patchRowResponse = deRowPatch.Patch();
                        Console.WriteLine("Post Status: " + patchRowResponse.Status.ToString());
                        Console.WriteLine("Count: " + intUpdateRecordCount.ToString());
                    }
                }

                Console.WriteLine("Done editing email statuses!");
   
            }
            catch (Exception excError)
            {
                // Display Error
                Console.WriteLine("Error: " + excError.ToString());
            }
        }