Exemplo n.º 1
0
        private void btnEmployeeAdd_Click(object sender, EventArgs e)
        {
            AddEmployee add = new AddEmployee();

            add.Show();
            Hide();
        }
Exemplo n.º 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++;
            }
        }