private void DelBtn_Click(object sender, RoutedEventArgs e) { if (DataGridSubscribers.SelectedItem != null) { MainWindow.manager.RemoveFromList(DataGridSubscribers.SelectedItem as Subscriber); DataGridSubscribers.SelectedItem = null; DataGridSubscribers.ItemsSource = MainWindow.getManagerSubList(); MainWindow.BackToList(); } }
private void DataGridSubscribers_Loaded(object sender, RoutedEventArgs e) { DataGridSubscribers.ItemsSource = MainWindow.getManagerSubList(); }