private void btnInsert_Click(object sender, EventArgs e) { PersonForm pForm = new PersonForm(); pForm.Show(); pForm.updateDGW += this.updateDGVfromDb; }
private void btnUpdate_Click(object sender, EventArgs e) { int index = profileDataGridView.SelectedCells[0].RowIndex; DataRow row = ((DataTable)profileDataGridView.DataSource).Rows[index]; Profile profile = new Profile(row); PersonForm pForm = new PersonForm(profile); pForm.Show(); pForm.updateDGW += this.updateDGVfromDb; }