public async Task <bool> RefreshSessionItems(dxevent _chosenSession) { MobileServiceInvalidOperationException exception = null; try { // This code refreshes the entries in the list view by querying the session table. items = await sessionTable .Where(sessionItem => sessionItem.eventid == _chosenSession.id) .ToCollectionAsync(); } catch (MobileServiceInvalidOperationException e) { exception = e; } if (exception != null) { //await new MessageDialog(exception.Message, "Error loading items").ShowAsync(); return(false); } else { return(true); } }
private void myListView_ItemClick(object sender, ItemClickEventArgs e) { dxevent _clickedEvent = e.ClickedItem as dxevent; App._chosenSessionDescript = _clickedEvent.description; Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => { App.MyStaticFrame.Navigate(typeof(Events_Details_Page), _clickedEvent); Window.Current.Activate(); }); }
public async Task InsertEventItem(dxevent eventItem) { try { await eventTable.InsertAsync(eventItem); items.Add(eventItem); //await SyncAsync(); // offline sync } catch { } }
protected async override void OnNavigatedTo(NavigationEventArgs e) { try { dxevent _chosenEvent = e.Parameter as dxevent; _eventToPassForRegisteration = _chosenEvent; EventDescriptionTxtBlock.Text = _chosenEvent.description; if (await _sessionTableViewModel.RefreshSessionItems(_chosenEvent)) { //myDescriptionListView.ItemsSource = _sessionTableViewModel.items; myAgendaListView.ItemsSource = _sessionTableViewModel.items; mySpeakersListView.ItemsSource = _sessionTableViewModel.items; } } catch { } }
protected override void OnNavigatedTo(NavigationEventArgs e) { _chosenEvent = e.Parameter as dxevent; myWebView.Source = new Uri(_chosenEvent.registerationlink); }