private void btnAddRecord_Click(object sender, EventArgs e) { using (var page = new AddEmployeePage()) { page.ShowDialog(); } EmployeePage_Load(null, null); }
private void EditRecord() { using (var page = new AddEmployeePage()) { if (dgv.CurrentRow != null) { page.EmployeeId = (int)dgv.CurrentRow.Cells["clnId"].Value; page.ShowDialog(); } } EmployeePage_Load(null, null); }