private void button1_Click(object sender, EventArgs e) { AddEditNA aena = new AddEditNA() { User = User }; aena.ShowDialog(); if (aena.DialogResult == DialogResult.OK) { RebindEmployeeNAs(); } }
private void button2_Click(object sender, EventArgs e) { if (dgvNAs.SelectedRows.Count > 0) { AddEditNA aena = new AddEditNA() { User = User }; aena.NAID = EmployeeNAs[dgvNAs.SelectedRows[0].Index].Id; aena.ShowDialog(); if (aena.DialogResult == DialogResult.OK) { RebindEmployeeNAs(); } } }