Exemplo n.º 1
0
        public async void ChangePassword(string password)
        {
            try
            {
                UserLoginDataPayLoad userDetail = new UserLoginDataPayLoad();
                userDetail.userPassword = password;
                userDetail.username     = email;

                ResponseMessage msgUpdateUser = await service.ChangeUserPasswordFromTokenControllerService(userDetail);

                if (msgUpdateUser.ResponseStatusCode == System.Net.HttpStatusCode.Found)
                {
                    MessageDialog ms = new MessageDialog("Password Changed Successful");
                    await ms.ShowAsync();

                    this.Frame.Navigate(typeof(HubPage));
                    //txtDesiredPassword.Text = "";
                }
                else
                {
                    MessageDialog ms = new MessageDialog(msgUpdateUser.Message, "Error");
                    await ms.ShowAsync();
                }
            }
            catch (Exception ex)
            {
                checkInternet();
            }
        }