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(); }
public ViewAllShows() { InitializeComponent(); _repo = new ShowRepository(); shows.ItemsSource = _repo.getAllShows(); }