private void Add_person() { using (Form_person formPerson = new Form_person()) { if (formPerson.ShowDialog() == DialogResult.OK) { Setup_grd_main(formPerson.PersonID); } } }
private void Edit_person() { if (grd_main.SelectedCells.Count == 0) { return; } int int_person = (int)grd_main.SelectedCells[0].OwningRow.Cells["person"].Value; using (Form_person dlg = new Form_person(int_person)) { if (dlg.ShowDialog() == DialogResult.OK) { Setup_grd_main(int_person); } } }