예제 #1
0
        private void btnAdd_Click(object sender, RoutedEventArgs e)
        {
            AddEditBookWin addEditBookWin = new AddEditBookWin();

            this.Opacity = 0.5;
            addEditBookWin.ShowDialog();
            ListBook.ItemsSource = AppData.context.Book.ToList();
            this.Opacity         = 1;
        }
예제 #2
0
 private void btnChange_Click(object sender, RoutedEventArgs e)
 {
     if (ListBook.SelectedItem is Book selectbook)
     {
         AddEditBookWin addEditBookWin = new AddEditBookWin(selectbook);
         this.Opacity = 0.5;
         addEditBookWin.ShowDialog();
         ListBook.ItemsSource = AppData.context.Book.ToList();
         this.Opacity         = 1;
     }
     else
     {
         MessageBox.Show("Запись не выбрана", "Внимание", MessageBoxButton.OK, MessageBoxImage.Information);
     }
 }