示例#1
0
        private void CompletelyRemove_Click(object sender, RoutedEventArgs e)
        {
            _record = (ShowRecord)unfinishedShows.SelectedItem;
            MessageBoxResult result = MessageBox.Show("Are you sure you want to completely remove this show?This action will remove" +
                                                      " the selected show and all it's related data from the app.", "confirmation", MessageBoxButton.YesNo, MessageBoxImage.Question);

            if (result == MessageBoxResult.Yes)
            {
                _repo.removeShow(_record);
            }
        }
示例#2
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();
        }