Esempio n. 1
0
 private void btnIngresar_Click(object sender, EventArgs e)
 {
     if (!Validar())
     {
         return;
     }
     usrAct             = new Usuario();
     ll                 = new LogicLogin();
     usrAct.Usr         = txtUsuario.Text;
     usrAct.PassEncrypt = txtPassword.Text; // GUARDO LA CONTRASEÑA ENCRIPTADA
     try
     {
         ll.ValidarUsuario(usrAct);
         MainWindow.Instancia.Inicializar();
         MainWindow.Instancia.Show();
         this.Hide();
     }
     catch (AppException appex)
     {
         InformarError(appex.Message, "Iniciar Sesión");
     }
     catch (Exception ex)
     {
         InformarError(ex.Message, "Iniciar Sesión");
     }
 }
Esempio n. 2
0
        private void btnLog_Click(object sender, EventArgs e)
        {
            LogicLogin logicLogin = new LogicLogin();

            if (logicLogin.CheckinCard(int.Parse(txtCardId.Text), txtPin.Text.ToString()))
            {
                MessageBox.Show("Login is OK");
                count = 0;
                Close();
                using (frmISLAM_ATM newForm = new frmISLAM_ATM(int.Parse(txtCardId.Text)))
                {
                    newForm.ShowDialog();
                }
            }
            else
            {
                MessageBox.Show("Bad Card Id or Pin");
                count++;
                if (count == 3)
                {
                    logicLogin.Block(int.Parse(txtCardId.Text));
                    MessageBox.Show("Card was blocked");
                    Close();
                }
            }
        }
Esempio n. 3
0
 private void Login_Load(object sender, EventArgs e)
 {
     ll = new LogicLogin();
     try
     {
         ll.TestConnection();
     }
     catch (Exception ex)
     {
         InformarError(ex.Message, "Conexión a base de datos.");
         EditConexionBD window = new EditConexionBD();
         window.Show();
     }
 }
Esempio n. 4
0
 private void linkMonitor_Click(object sender, EventArgs e)
 {
     usrAct = new Usuario("Monitor", 0, 0);
     ll     = new LogicLogin();
     try
     {
         ll.MonitorMode(usrAct);
         MainWindow.Instancia.Inicializar();
         this.Hide();
         MainWindow.Instancia.Ocultar();
     }
     catch (Exception ex)
     {
         InformarError(ex.Message, "Iniciar SafCom");
     }
 }