Пример #1
0
        private void button3_Click(object sender, EventArgs e)
        {
            this.Hide();
            Menu_Manager vnt2 = new Menu_Manager();

            vnt2.Show();
        }
Пример #2
0
 private void txtP_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar == Convert.ToChar(Keys.Enter))
     {
         try
         {
             if (con.conectar() == true)
             {
                 if (validar(con.conexion, txtU.Text, txtP.Text))
                 {
                     con.desconectar();
                     con.conectar();
                     String tipoUser = obtenerTipoUsuario(con.conexion, txtU.Text, txtP.Text);
                     if (tipoUser == "ADMIN")
                     {
                         this.Hide();
                         Menu_Manager vnt1 = new Menu_Manager();
                         vnt1.Show();
                     }
                     else if (tipoUser == "LOCAL")
                     {
                     }
                     else
                     {
                     }
                 }
                 else
                 {
                     MessageBox.Show("error en inicio de sesión, usuario o contraseña incorrecto");
                 }
             }
         }
         catch (Exception ex)
         {
             MessageBox.Show("error en conexion" + ex);
         }
         con.desconectar();
     }
 }