Пример #1
0
        private void btnEmployeeAdd_Click(object sender, EventArgs e)
        {
            AddEmployee add = new AddEmployee();

            add.Show();
            Hide();
        }
Пример #2
0
        private void addEmployeeToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (addEmployee == null || addEmployee.IsDisposed)
            {
                addEmployee = new AddEmployee();
            }

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