public void EditAuthor() { Author oldAuthor = new Author(_view.GetSelecetedAuthor().FirstName, _view.GetSelecetedAuthor().LastName); additionalWindow window = new additionalWindow(_view.GetSelecetedAuthor()); bool? res = window.ShowDialog(); if (res != null && res == true) { _model.EditAuthor(oldAuthor, window.Author); } _view.MyListView.ItemsSource = _model.GetList(); }
public void AddAuthor() { additionalWindow window = new additionalWindow(); bool? res = window.ShowDialog(); if (res != null && res == true) { Author author = window.Author; _model.AddAuthor(author); } _view.MyListView.ItemsSource = _model.GetList(); }