private void AddPublisher_Click(object sender, RoutedEventArgs e) { var addPublisherWindow = new AddPublisherWindow(); addPublisherWindow.PublisherAdded += (_, e) => PublishingHouses.Add(e.Entity); addPublisherWindow.Show(); }
public void Add(PublishHouseInformation publishHouse) { if (publishHouse == null) { throw new System.ArgumentNullException(nameof(publishHouse)); } try { PublishingHouses.Add(new PublishingHouse() { category = publishHouse.Category, location = publishHouse.Location, name = publishHouse.Name }); PublishingHouses.Save(); OnOperationExecute(true); } catch { OnOperationExecute(false); } }