private void LoadContacts(string filename) { try { Contacts.ContactsDatabaseManager mgr = new ContactsDatabaseManager(); mgr.LoadDatabaseFromFile(dataSet.Contacts, filename); UpdateSources(); UpdateContactsFile(filename); } catch (Exception ex) { MessageBox.Show("" + ex); } }
void Login() { LoginForm form = new LoginForm(); if (form.ShowDialog() != System.Windows.Forms.DialogResult.OK) { return; } ContactsDatabaseManager mgr = new ContactsDatabaseManager(); mgr.LoadDatabaseFromContactList(dataSet.Contacts, form.Addresses); //Addresses = form.Addresses; UpdateSources(); }
private void SaveContacts(string filename) { Contacts.ContactsDatabaseManager mgr = new ContactsDatabaseManager(); mgr.SaveDatabaseToFile(dataSet.Contacts, filename); }
void Login() { LoginForm form = new LoginForm(); if (form.ShowDialog() != System.Windows.Forms.DialogResult.OK) return; ContactsDatabaseManager mgr = new ContactsDatabaseManager(); mgr.LoadDatabaseFromContactList(dataSet.Contacts, form.Addresses); //Addresses = form.Addresses; UpdateSources(); }