Example #1
0
        private void New_Book_Button_Click(object sender, RoutedEventArgs e)
        {
            var window = new BookEditor(null);

            if (window.ShowDialog() ?? false)
            {
                LoadBorrowedBooksList();
                LoadBookData();
            }
        }
Example #2
0
        private void BookList_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            var selectedBook = BookList.SelectedItem as Book;

            if (selectedBook != null)
            {
                var window = new BookEditor(selectedBook);
                if (window.ShowDialog() ?? false)
                {
                    LoadBorrowedBooksList();
                    LoadBookData();
                }
                BookList.UnselectAll();
            }
        }