public void EditBook(Book book) { if (book != null) { BookDialogViewModel bookDialogViewModel = new BookDialogViewModel(book, BooksModel); string tmpTitle = book.Title; string tmpAuthor = book.Author; ushort tmpYear = book.Year; Category tmpCategory = book.Category; ((App)Application.Current).WindowService.ShowDialog(bookDialogViewModel); //if (bookDialogViewModel.dialogResult == false) //{ // book.Title = tmpTitle; // book.Author = tmpAuthor; // book.Year = tmpYear; // book.Category = tmpCategory; //} } }
public void AddBook() { BookDialogViewModel bookDialogViewModel = new BookDialogViewModel(null, BooksModel); ((App)Application.Current).WindowService.ShowDialog(bookDialogViewModel); }