private void toolbtnAdd_Click(object sender, EventArgs e) { AddContacts addContacts = new AddContacts(); addContacts.ShowDialog(); FillContactsList(); lbphones.Items.Clear(); }
private void toolbtnUpdate_Click(object sender, EventArgs e) { if (lbUsers.SelectedIndex == -1) { return; } AddContacts addContacts = new AddContacts((Contact)lbUsers.SelectedItem); addContacts.ShowDialog(); FillContactsList(); }