コード例 #1
0
        //EVENTO QUE FAZ AUTENTICAÇÃO DO USUARIO PARA EFETUAR O LOGIN
        private void BtnLogar_Click(object sender, EventArgs e)
        {
            novoLogin.Nome  = txtLogin.Text;
            novoLogin.Senha = txtPassword.Text;

            if (novoLogin.Autenticar())
            {
                this.Close();
                frmMenu.destravarForm();
            }
            else
            {
                lblErro.Text = "Login ou Senha Incorretos";

                txtLogin.Text    = string.Empty;
                txtPassword.Text = string.Empty;

                txtLogin.Focus();
            }
        }