コード例 #1
0
        private void BtnNew_Click(object sender, RoutedEventArgs e)
        {
            AddAndEditWindow addAndEdit = new AddAndEditWindow(null);

            addAndEdit.ShowDialog();
            lBoxMembers.ItemsSource = Refresh();
        }
コード例 #2
0
        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();
            }
        }