private void AddNewBorrow(object sender, RoutedEventArgs e) { var window = new BorrowEditor(null); if (window.ShowDialog() ?? false) { LoadBorrowedBooksList(); LoadBookData(); } }
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(); } }