Beispiel #1
0
        public ReBusPivotMenu()
        {
            InitializeComponent();

            UpdateAccountScreen();

            SubscriptionWebServiceClient subscriptionService = new SubscriptionWebServiceClient();
            subscriptionService.GetActiveSubscriptinsCompleted += new EventHandler<GetActiveSubscriptinsCompletedEventArgs>(subscriptionService_GetActiveSubscriptinsCompleted);
            subscriptionService.GetActiveSubscriptinsAsync((App.Current as App).SUserData);

            TicketWebServiceClient ticketService = new TicketWebServiceClient();
            ticketService.GetActiveTicketCompleted += new EventHandler<GetActiveTicketCompletedEventArgs>(ticketService_GetActiveTicketCompleted);
            ticketService.GetActiveTicketAsync((App.Current as App).TUserData);

            ticketService.GetHistoryCompleted += new EventHandler<TicketServiceReference.GetHistoryCompletedEventArgs>(ticketService_GetHistoryCompleted);
            ticketService.GetHistoryAsync((App.Current as App).TUserData);

            ShowPopup();

            subscriptionService.GetHistoryCompleted += new EventHandler<SubscriptionServiceReference.GetHistoryCompletedEventArgs>(subscriptionService_GetHistoryCompleted);
            subscriptionService.GetHistoryAsync((App.Current as App).SUserData);

            subscriptionsList = new ObservableCollection<SubscriptionData>();
            subscriptionsListBox.ItemsSource = subscriptionsList;

            historyList = new ObservableCollection<HistoryItem>();
            historyListBox.ItemsSource = historyList;
        }
Beispiel #2
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            if ((App.Current as App).ShouldRequestAgain)
            {
                ticketHistoryRecieved = false;
                subscriptionHistoryRecieved = false;
                activeSubscriptionRecieved = false;
                activeTicketRecieved = false;
                (App.Current as App).ShouldRequestAgain = false;

                ShowPopup();

                SubscriptionWebServiceClient subscriptionService = new SubscriptionWebServiceClient();
                subscriptionService.GetActiveSubscriptinsCompleted += new EventHandler<GetActiveSubscriptinsCompletedEventArgs>(subscriptionService_GetActiveSubscriptinsCompleted);
                subscriptionService.GetActiveSubscriptinsAsync((App.Current as App).SUserData);

                TicketWebServiceClient ticketService = new TicketWebServiceClient();
                ticketService.GetActiveTicketCompleted += new EventHandler<GetActiveTicketCompletedEventArgs>(ticketService_GetActiveTicketCompleted);
                ticketService.GetActiveTicketAsync((App.Current as App).TUserData);

                ticketService.GetHistoryCompleted += new EventHandler<TicketServiceReference.GetHistoryCompletedEventArgs>(ticketService_GetHistoryCompleted);
                ticketService.GetHistoryAsync((App.Current as App).TUserData);

                subscriptionService.GetHistoryCompleted += new EventHandler<SubscriptionServiceReference.GetHistoryCompletedEventArgs>(subscriptionService_GetHistoryCompleted);
                subscriptionService.GetHistoryAsync((App.Current as App).SUserData);
            }

            base.OnNavigatedTo(e);
        }