Exemple #1
0
        private void onClick_Remove(object sender, RoutedEventArgs e)
        {
            MessageBoxResult result = MessageBox.Show("Are you sure you want to delete this record?", "Confirmation",
                                                      MessageBoxButton.YesNo, MessageBoxImage.Question);

            if (result == MessageBoxResult.Yes)
            {
                _show = (ShowRecord)shows.SelectedItem;
                _repo.removeShow(_show);
            }
            shows.ItemsSource = _repo.getAllShows();
        }
Exemple #2
0
 public ViewAllShows()
 {
     InitializeComponent();
     _repo             = new ShowRepository();
     shows.ItemsSource = _repo.getAllShows();
 }