Example #1
0
        private void btnDepartmentAdd_Click(object sender, EventArgs e)
        {
            DepartmentMaintenance d = new DepartmentMaintenance();

            d.Show();
            Hide();
        }
Example #2
0
        private void addDepartmentToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (addDepartment == null || addDepartment.IsDisposed)
            {
                addDepartment = new DepartmentMaintenance();
            }

            if (tabControl.Contains(addDepartment))
            {
                tabControl.TabPages[addDepartment].Select();
            }
            else
            {
                addDepartment.Text = "Add Department";
                tabControl.TabPages.Add(addDepartment);
                tabCount++;
            }
        }