Esempio n. 1
0
        private void registrarTorneoToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            RegistroTorneo r = new RegistroTorneo();

            r.Show();
            this.Hide();
        }
Esempio n. 2
0
        private void btnIniciar_Click(object sender, EventArgs e)
        {
            string retorno1 = sesion.Rol1(txtUsuario.Text, txtContraseña.Text);
            string retorno  = sesion.rol2(txtUsuario.Text, txtContraseña.Text);
            string retorno2 = sesion.rol3(txtUsuario.Text, txtContraseña.Text);

            if (txtUsuario.Text == "")
            {
                MessageBox.Show("Ingrese su cedula");
            }
            else
            {
                if (txtContraseña.Text == "")
                {
                    MessageBox.Show("Ingrese la contraseña");
                }
                else
                {
                    if (retorno1 != "")
                    {
                        RegistroTorneo torneo = new RegistroTorneo();
                        torneo.Show();
                        this.Hide();
                    }
                    else if (retorno != "")
                    {
                        Form1 menu = new Form1();
                        menu.Show();
                        this.Hide();
                    }
                    else if (retorno2 != "")
                    {
                        registroUsuario r = new registroUsuario();
                        r.Show();
                        this.Hide();
                    }
                    else
                    {
                        MessageBox.Show("usuario o contraseña incorrectas");
                        txtContraseña.Clear();
                        txtUsuario.Clear();
                        txtUsuario.Focus();
                    }
                }
            }
        }