private void btnAddNew_Click(object sender, EventArgs e) { NewPersonForm npf = new NewPersonForm(null); if (npf.ShowDialog() == DialogResult.OK) { UpdateList(); } }
private void btnEditOld_Click(object sender, EventArgs e) { if (dgvDetail.SelectedRows.Count >= 1) { Person pp = (Person)dgvDetail.SelectedRows[0].Tag; NewPersonForm npf = new NewPersonForm(pp); if (npf.ShowDialog() == DialogResult.OK) { UpdateList(); } } }