Esempio n. 1
0
        /// <summary>
        /// Resetar senha do modo mais simples possível
        /// TODO: Renato;
        /// </summary>
        static async Task ResetarSenhaCliente()
        {
            long customerId = 1431756660;

            wsChangePasswordData changePasswordData = new wsChangePasswordData();

            changePasswordData.oldPassword = "******";
            changePasswordData.newPassword = "******";

            var response = await new ComarchService().ChangePasswordAsync(customerId, changePasswordData);

            Console.WriteLine("", response);
        }
Esempio n. 2
0
        public async Task <changePasswordResponse1> ChangePasswordAsync(long customerId, wsChangePasswordData changedPasswordData)
        {
            var userContext = new extUserContextView {
                clientLogin = _clientUsername, clientPass = _clientPassword, channel = "U", langCode = "pt"
            };

            changePasswordResponse1 response = null;

            await Resilience.HandleAsync(async() =>
            {
                response = await _comarchService.changePasswordAsync(userContext, customerId, changedPasswordData);
            }, "ComarchEnrollCustomerExtAsync");

            if (response == null)
            {
                throw new Exception();
            }

            return(response);
        }