Exemple #1
0
        private void BtnNew_Click(object sender, RoutedEventArgs e)
        {
            AddCdWindow addCdWindow = new AddCdWindow();

            addCdWindow.ShowDialog();

            _cds = Repository.GetInstance().GetAllCds();
            lbxCds.ItemsSource = _cds;
        }
Exemple #2
0
        private void BtnEdit_Click(object sender, RoutedEventArgs e)
        {
            Cd selectedCd = lbxCds.SelectedItem as Cd;

            if (selectedCd == null)
            {
                MessageBox.Show("Sie müssen eine Cd auswählen!");
            }
            else
            {
                AddCdWindow addCdWindow = new AddCdWindow(selectedCd);
                addCdWindow.ShowDialog();
            }

            _cds = Repository.GetInstance().GetAllCds();
            lbxCds.ItemsSource = _cds;
        }