private void btnAddEmployee_Click(object sender, EventArgs e) { FrmEmployeeDetail frmEmployeeDetail = new FrmEmployeeDetail(null); frmEmployeeDetail.ShowDialog(); loadEmployees(); }
private void toolStripMenuItem2_Click(object sender, EventArgs e) { if (dgvEmployee.CurrentRow != null) { int EmployeeId = (int)dgvEmployee.CurrentRow.Cells["EmployeeId"].Value; FrmEmployeeDetail frmEmployeeDetail = new FrmEmployeeDetail(EmployeeId); frmEmployeeDetail.ShowDialog(this); } }