private void BtnNew_Click(object sender, RoutedEventArgs e) { AddAndEditWindow addAndEdit = new AddAndEditWindow(null); addAndEdit.ShowDialog(); lBoxMembers.ItemsSource = Refresh(); }
private void BtnEdit_Click(object sender, RoutedEventArgs e) { if (lBoxMembers.SelectedItem == null) { MessageBox.Show("Sie haben kein Mitglied ausgewählt!"); } else { AddAndEditWindow addAndEdit = new AddAndEditWindow(lBoxMembers.SelectedItem as Person); addAndEdit.ShowDialog(); lBoxMembers.ItemsSource = Refresh(); } }