コード例 #1
0
        private void btn_alterar_Click(object sender, EventArgs e)
        {
            string email         = txtEmail.Text;
            string senhaNova     = txtSenhaNova.Text;
            string confirmaSenha = txtConfirmaSenha.Text;

            ClienteBLL objBLL = new ClienteBLL();

            if (objBLL.ValidarLogin(email) == false)
            {
                MessageBox.Show("O email informado não existe.");
            }
            else
            {
                if (senhaNova == confirmaSenha)
                {
                    objBLL.AlterarSenha(email, senhaNova);
                    MessageBox.Show("Senha alterada com sucesso.");
                }
                else
                {
                    MessageBox.Show("As senhas informadas estão diferentes.");
                }
            }
        }