Beispiel #1
0
        private void newEmployeeBtn_Click(object sender, EventArgs e)
        {
            if (!new Empleado(this.User_employeeID).isAdmin)
            {
                return;
            }
            panelEmpleados_nuevoEmpleado empleadosNuevoEmpleado = new panelEmpleados_nuevoEmpleado(true);
            DarkForm darkForm = new DarkForm();

            darkForm.Show();
            if (empleadosNuevoEmpleado.ShowDialog() == DialogResult.OK)
            {
                this.employee = new Empleado(empleadosNuevoEmpleado.newEmployeeID);
                this.setEmployeeInfo();
            }
            darkForm.Close();
        }
        private void t_Tick(object sender, EventArgs e)
        {
            Form_Login           formLogin            = new Form_Login("Iniciar Sesión");
            SecondStartingWindow secondStartingWindow = new SecondStartingWindow();

            (sender as Timer).Stop();
            this.TopMost = false;
            if (Turno.isFirsUsageDateSet)
            {
                if (formLogin.ShowDialog() == DialogResult.OK)
                {
                    this.Hide();
                    new Form1(formLogin.ID).Show();
                }
                else
                {
                    this.Close();
                }
            }
            else
            {
                DarkForm darkForm = new DarkForm();
                panelEmpleados_nuevoEmpleado empleadosNuevoEmpleado = new panelEmpleados_nuevoEmpleado(false);
                this.Hide();
                darkForm.Show();
                if (empleadosNuevoEmpleado.ShowDialog() == DialogResult.OK)
                {
                    resetDefaultFonts();
                    if (secondStartingWindow.ShowDialog() == DialogResult.OK)
                    {
                        new Form1(empleadosNuevoEmpleado.newEmployeeID).Show();
                    }
                }
                else
                {
                    this.Close();
                }
                darkForm.Close();
            }
        }