示例#1
0
        private void BtnLogin_Click(object sender, EventArgs e)
        {
            clsDbConnection _db = clsDbConnection.Instance;

            bool result = _db.CheckLogin(txbUser.Text, txbPass.Text);

            this.blLogado = result;

            if (result)
            {
                MessageBox.Show("Seja bem vindo!");
                clsClient _clt = clsClient.Instance;
                _clt.SetLoggedUser(txbUser.Text);
                this.Close();
            }
            else
            {
                MessageBox.Show("Usuário ou senha incorreto!");
            }
        }