Esempio n. 1
0
        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);
            }
        }
Esempio n. 2
0
        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();
            });
        }
Esempio n. 3
0
        public async Task InsertEventItem(dxevent eventItem)
        {
            try
            {
                await eventTable.InsertAsync(eventItem);

                items.Add(eventItem);

                //await SyncAsync(); // offline sync
            }
            catch
            {
            }
        }
Esempio n. 4
0
        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
            {
            }
        }
Esempio n. 5
0
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     _chosenEvent     = e.Parameter as dxevent;
     myWebView.Source = new Uri(_chosenEvent.registerationlink);
 }