private void btnModifyEmployee_Click(object sender, EventArgs e) { ModifyEmployee m = new ModifyEmployee(EmployeeId); m.Show(); Hide(); }
private void editEmployeeToolStripMenuItem_Click(object sender, EventArgs e) { if (modifyEmployee == null || modifyEmployee.IsDisposed) { modifyEmployee = new ModifyEmployee(empId); } if (tabControl.Contains(modifyEmployee)) { tabControl.TabPages[modifyEmployee].Select(); } else { modifyEmployee.Text = "Edit Employee Details"; tabControl.TabPages.Add(modifyEmployee); tabCount++; } }