private void btnEdition_Click(object sender, EventArgs e) { AddEdProvForm form = new AddEdProvForm(); if (form.ShowDialog() == DialogResult.OK) { } else { } }
private void btnEdition_Click(object sender, EventArgs e) { AddEdProvForm form = new AddEdProvForm(); form.provisionerBindingSource.DataSource = provisionerBindingSource; form.provisionerBindingSource.Position = provisionerBindingSource.Position; if (form.ShowDialog() == DialogResult.OK) { provisionerTableAdapter.Update(this.myDataBaseDataSet.Provisioner); int index = dgvProv.CurrentRow.Index; this.provisionerTableAdapter.Fill(this.myDataBaseDataSet.Provisioner); dgvProv.CurrentCell = dgvProv.Rows[index].Cells[2]; } }