private void btnSair_Click(object sender, EventArgs e)
        {
            frmPrincipal fp = new frmPrincipal();

            fp.Show();
            Close();
        }
Beispiel #2
0
 private void Logar()
 {
     if (txtLogin.Text == "ADM" && txtSenha.Text == "421")
     {
         frmPrincipal fp = new frmPrincipal();
         fp.Show();
     }
 }
Beispiel #3
0
 private void btnOk_Click(object sender, EventArgs e)
 {
     if (txtLogin.Text == "ADM" && txtSenha.Text == "421")
     {
         frmPrincipal fp = new frmPrincipal();
         fp.Show();
     }
 }
Beispiel #4
0
 private void okBtn_Click(object sender, EventArgs e)
 {
     if (txtLogin.Text == "adm" && txtSenha.Text == "123")
     {
         frmPrincipal fp = new frmPrincipal();
         fp.Show();
     }
 }
Beispiel #5
0
 private void logar()
 {
     tbUsuarioBindingSource.Filter = "nm_login ='******' and ds_senha ='" + txtSenha.Text + "'";
     tbUsuarioTableAdapter.Fill(contasDataSet.tbUsuario);
     if ((txtLogin.Text == "adm" && txtSenha.Text == "123") || tbUsuarioBindingSource.Count > 0)
     {
         frmPrincipal fp = new frmPrincipal();
         fp.Show();
         Hide();
     }
 }
Beispiel #6
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            string query = "nm_login = '******' AND cd_senha ='" + txtPw.Text + "' ";

            tb_administradorBindingSource.Filter = query;
            tb_administradorTableAdapter.Fill(contasDataSet.tb_administrador);

            int nrLinhas = tb_administradorBindingSource.Count;

            if (validaCampos())
            {
                if (txtLogin.Text == "adm" && txtPw.Text == "123" || nrLinhas > 0)
                {
                    frmPrincipal fp = new frmPrincipal();
                    fp.Show();
                    Hide();
                }
                else
                {
                    MessageBox.Show("Login ou senha incorretos");
                }
            }
        }