private void btnSearchPublisher_Click(object sender, EventArgs e) { PublisherForm searchPublisher = new PublisherForm(dbContext, true); searchPublisher.publisherSaved += new EventHandler <List <Publisher> >(publisherSaved); searchPublisher.ShowDialog(); }
//Publishers private void btnAddPublisher_Click(object sender, EventArgs e) { PublisherForm addPublisher = new PublisherForm(dbContext); addPublisher.publisherSaved += new EventHandler <List <Publisher> >(publisherSaved); addPublisher.ShowDialog(); }
private void btnEditPublisher_Click(object sender, EventArgs e) { Publisher publisher = (Publisher)GuiUtils.GetSelected <Publisher>(lstViewPublishers, publisherTagSet); if (publisher != null) { PublisherForm editPublisher = new PublisherForm(dbContext, publisher); editPublisher.publisherSaved += new EventHandler <List <Publisher> >(publisherSaved); editPublisher.ShowDialog(); } else { MessageBox.Show("Nie wybrano wydawcy!", "Błąd"); } }