예제 #1
0
        private async void AppBarButton_Delete(object sender, RoutedEventArgs e)
        {
            int itemId = ((Driver)this.DefaultViewModel["Driver"]).Id;

            string response = await SampleDataSource.DeleteDriver(itemId);

            MessageDialog msgbox = new MessageDialog("Driver deleted! Byebye!");

            await msgbox.ShowAsync();

            if (!Frame.Navigate(typeof(HubPage)))
            {
                var resourceLoader = ResourceLoader.GetForCurrentView("Resources");
                throw new Exception(resourceLoader.GetString("NavigationFailedExceptionMessage"));
            }
        }