Beispiel #1
0
        public void MudarSenhaPrincipal(string senha, string repetirSenha, ref string erro)
        {
            if (senha.Trim() == "")
            {
                erro = "Senha Vazia!";
                throw new Exception("É preciso informar uma nova senha!");
            }

            if (repetirSenha.Trim() == "")
            {
                erro = "Senha Inválida!";
                throw new Exception("É necessário confirmar a senha");
            }

            if (senha != repetirSenha)
            {
                erro = "Senhas Incompatíveis!";
                throw new Exception("As senhas digitadas devem se corresponder!");
            }

            configuracoesDAL.MudarSenhaPrincipal(senha);
        }