Exemple #1
0
 private void btnLogin_Click(object sender, EventArgs e)
 {
     if (txtUsername.Text == "jhloli" && txtPassword.Text == "20145779")
     {
         frmPrincipal frm = new frmPrincipal();
         frm.ShowDialog();
     }
 }
Exemple #2
0
        private void IngresarSistema()
        {
            bool existeUsuario = usuarioBL.IngresarSistema(txtUsername.Text, txtPassword.Text);

            if (existeUsuario)
            {
                frmPrincipal frm = new frmPrincipal();
                this.Hide();
                frm.ShowDialog();
                this.Visible = true;
            }
            else
            {
                MessageBox.Show("ERROR: El usuario o la contraseña no existe", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }