private void btnEdit_Click(object sender, EventArgs e) { if (contectTableBindingSource.DataSource == null) { return; } using (AddForm ad = new AddForm(contectTableBindingSource.Current as ContectTable)) { if (ad.ShowDialog() == DialogResult.OK) { contectTableBindingSource.DataSource = services.GetAll(); } } }