Beispiel #1
0
 private void bunifuThinButton21_Click(object sender, EventArgs e)
 {
     try
     {
         if (user.ingresar(usertxt.Text.ToString(), contraseñatxt.Text.ToString()))
         {
             frm_menuPrincipal men = new frm_menuPrincipal();
             men.Show();
             this.Hide();
         }
         else
         {
             MessageBox.Show("El login es incorrecto");
         }
     }
     catch (Exception ERR)
     {
         MessageBox.Show("error" + ERR);
     }
 }
Beispiel #2
0
 private void frm_login_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         try
         {
             if (user.ingresar(usertxt.Text.ToString(), contraseñatxt.Text.ToString()))
             {
                 frm_menuPrincipal men = new frm_menuPrincipal();
                 men.Show();
                 this.Hide();
             }
             else
             {
                 MessageBox.Show("El login es incorrecto");
             }
         }
         catch (Exception ERR)
         {
             MessageBox.Show("error" + ERR);
         }
     }
 }
Beispiel #3
0
 private void bunifuThinButton21_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar == Convert.ToChar(Keys.Enter))
     {
         try
         {
             if (user.ingresar(usertxt.Text.ToString(), contraseñatxt.Text.ToString()))
             {
                 frm_menuPrincipal menuprincipal = new frm_menuPrincipal();
                 menuprincipal.FormClosed += new FormClosedEventHandler(menuprincipal_FormClosed);
                 menuprincipal.Show();
                 this.Hide();
             }
             else
             {
                 MessageBox.Show("El login es incorrecto");
             }
         }
         catch (Exception ERR)
         {
             MessageBox.Show("error" + ERR);
         }
     }
 }