private void btnModifyDepartment_Click(object sender, EventArgs e) { ModifyDepartment m = new ModifyDepartment(); m.Show(); Hide(); }
private void editDepartmentToolStripMenuItem_Click(object sender, EventArgs e) { if (modifyDepartment == null || modifyDepartment.IsDisposed) { modifyDepartment = new ModifyDepartment(); } if (tabControl.Contains(modifyDepartment)) { tabControl.TabPages[modifyDepartment].Select(); } else { modifyDepartment.Text = "Modify Department"; tabControl.TabPages.Add(modifyDepartment); tabCount++; } }