public static async Task <ObservableCollection <Artist> > GetArtister() { ObservableCollection <Artist> Artister = new ObservableCollection <Artist>(); var localSettings = Windows.Storage.ApplicationData.Current.LocalSettings; CDServiceSoapClient klient = new CDServiceSoapClient(); //Konto Object valueKonto = localSettings.Values["id"]; if (valueKonto == null) { // No data } else { string ID = valueKonto.ToString(); var ArtistLista = await klient.getArtist10Async(ID); string s = ArtistLista.Body.getArtist10Result; var j = JsonConvert.DeserializeObject <List <Artist> >(s); foreach (var item in j) { Artister.Add(GetNewArtist(item.artist)); } } return(Artister); }
private async void btnLoogain_Click(object sender, RoutedEventArgs e) { var localSettings = Windows.Storage.ApplicationData.Current.LocalSettings; ServiceCD.CDServiceSoapClient klient = new CDServiceSoapClient(); var svar = await klient.loggaInAsync(txtUser.Text, txtPassword.Password); string s = svar.Body.loggaInResult; string[] anv = s.Split(';'); localSettings.Values["Konto"] = txtUser.Text; localSettings.Values["Password"] = txtPassword.Password; localSettings.Values["User"] = anv[0]; localSettings.Values["id"] = anv[1]; }
private async void gArtist_SelectionChanged(object sender, Syncfusion.UI.Xaml.Grid.GridSelectionChangedEventArgs e) { var row = this.gArtist.SelectedItem; if (row != null) { var R = row as Artist; string s = R.artist; CDServiceSoapClient klient = new CDServiceSoapClient(); var A = await klient.getAlbum10Async(ID, s); string albums = A.Body.getAlbum10Result; var j = JsonConvert.DeserializeObject <List <Album> >(albums); _lastSelectedItem = R; GridAlbum.ItemsSource = j; if (Frame.ActualWidth < 720) { Frame.Navigate(typeof(MinaPlattorDetail), _lastSelectedItem.artist, new SuppressNavigationTransitionInfo()); } } }
protected async override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); String ID = string.Empty; var localSettings = Windows.Storage.ApplicationData.Current.LocalSettings; Object valueKonto = localSettings.Values["id"]; if (valueKonto == null) { // No data } else { ID = valueKonto.ToString(); } CDServiceSoapClient klient = new CDServiceSoapClient(); var A = await klient.getAlbum10Async(ID, e.Parameter.ToString()); string albums = A.Body.getAlbum10Result; var j = JsonConvert.DeserializeObject <List <Album> >(albums); listAlbums.ItemsSource = j; }