private void creerToolStripMenuItem_Click(object sender, EventArgs e) { using (FormAddEditAndContact frm = new FormAddEditAndContact(null)) { if (frm.ShowDialog() == DialogResult.OK) { contactBindingSource.DataSource = ContactServices.GetAll(); } } }
private void modifierToolStripMenuItem_Click(object sender, EventArgs e) { if (contactBindingSource.Current == null) { return; } using (FormAddEditAndContact frm = new FormAddEditAndContact(contactBindingSource.Current as Contact)) { if (frm.ShowDialog() == DialogResult.OK) { contactBindingSource.DataSource = ContactServices.GetAll(); } } }