protected async override void OnNavigatedTo(NavigationEventArgs e) { RootObject r1 = new RootObject(); gv2.ItemsSource = results; tblock.Text = (App.Current as App).NavigateText; var path = ApplicationData.Current.LocalFolder.Path + "/myDb1.DB"; var con = new SQLiteAsyncConnection(path); List<Favourite> favs = await con.QueryAsync<Favourite>(string.Format("select id from Favourite where userName = '******' and placeName = '{1}'", tblock.Text, results[0].name)) as List<Favourite>; if (favs.Count > 0 && favs.First().id > 0) { aptb.IsChecked = true; } //con.CreateTableAsync<Favourite>(); }
private void gv1_SelectionChanged(object sender, SelectionChangedEventArgs e) { RootObject r1 = new RootObject(); Result result = e.AddedItems[0] as Result; BlankPage1.results = new List<Result>() { result }; Frame.Navigate(typeof(BlankPage1)); }