Пример #1
0
        private async void BtnChangePassword_Clicked(object sender, EventArgs e)
        {
            var response = await APIService.ChangePassword(EntOldPassword.Text, EntNewPassword.Text, EntConfirmPassword.Text);

            if (!response)
            {
                await DisplayAlert("Error", "Došlo je do greške.", "Cancel");
            }
            else
            {
                await DisplayAlert("Lozinka uspješno promijenjena", "Molimo prijavite se koristeći novu lozinku.", "OK");

                Preferences.Set("access_token", string.Empty);
                Application.Current.MainPage = new NavigationPage(new LoginPage());
            }
        }