예제 #1
0
        private void AddNewBorrow(object sender, RoutedEventArgs e)
        {
            var window = new BorrowEditor(null);

            if (window.ShowDialog() ?? false)
            {
                LoadBorrowedBooksList();
                LoadBookData();
            }
        }
예제 #2
0
        private void BorrowedBooksList_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            var selectedBorrow = BorrowedBooksList.SelectedItem as BorrowedBook;

            if (selectedBorrow != null)
            {
                var window = new BorrowEditor(selectedBorrow);
                if (window.ShowDialog() ?? false)
                {
                    LoadBorrowedBooksList();
                }
                LoadBookData();
                BorrowedBooksList.UnselectAll();
            }
        }