public void EditBook() { var bookModel = booksTable.SelectedItem as BookModel; if (bookModel != null) { var bookCreatingWindow = new AddNewBookWindow(_unitOfWork, _booksDisplayViewModel, bookModel); bookCreatingWindow.ShowDialog(); } }
private void addBookButton_Click(object sender, RoutedEventArgs e) { var bookCreatingWindow = new AddNewBookWindow(_unitOfWork, _booksDisplayViewModel); bookCreatingWindow.ShowDialog(); }