private void CommandBinding_ChangeBookExecuted(object sender, ExecutedRoutedEventArgs e) { Book book = this.booksDataGrid.SelectedItem as Book; book.IsNew = false; var bookWindow = new NewBook(book); bookWindow.ShowDialog(); this.booksDataGrid.Items.Refresh(); }
private void CommandBinding_NewBookExecuted(object sender, ExecutedRoutedEventArgs e) { var curAuth = (Author)this.authorsListView.SelectedItem; var book = new Book(); var bookWindow = new NewBook(book); if ((bool)bookWindow.ShowDialog()) { curAuth.Books.Add(book); } }