private async void UpdateLocation()
        {
            var proxy = new AccountProxy();

            var location = await DeviceHelper.GetLocation();

            var result = await proxy.UpdateProfile(latitude : location?.Latitude, longitude : location?.Longitude);

            if (!result.Succeeded)
            {
                await pageDialogService.DisplayAlertAsync("Error", result.Response.ToString(), "Ok");
            }
        }
Пример #2
0
        private async void Save()
        {
            var proxy = new AccountProxy();

            var location = await DeviceHelper.GetLocation();

            var response = await proxy.UpdateProfile(model.Motto, model.Range, location?.Latitude, location?.Longitude);

            if (response.Succeeded)
            {
                var navParams = new NavigationParameters
                {
                    { "new_model", model }
                };
                await navigationService.GoBackAsync(navParams);
            }
            else
            {
                await pageDialogService.DisplayAlertAsync("Error", response.Response.ToString(), "Ok");
            }
        }