コード例 #1
0
        private void btnSyncWithLinkedIn_Click(object sender, EventArgs e)
        {
            if (AreYouSure("RE-SYNC with linked in?"))
            {
                dataIsLoaded = false;
                InitializeLinkedInDriver();

                if (!repo.AllContactsAreCurrent())
                {
                    repo.Update_IsStillLinkedInContactToFalse(DateTime.Now.AddDays(-2));

                    foreach (var linkedInContact in linkedInDriver.Contacts)
                    {
                        repo.AddOrUpdate_IsStillLinkedInContactToTrue(linkedInContact);
                    }
                }

                contacts = repo.GetCurrentLinkedInContacts();
                LoadDataGrid();
            }
        }