private void Edit(object sender, EventArgs e) { var editPublisher = new EditPublisherForm(_publisher, _context); editPublisher.ShowDialog(); UpdateForm(); }
private void Edit(object sender, EventArgs e) { if (PublishersListBox.SelectedItem == null) { MessageBox.Show(@"You must select the publisher you want to edit", @"No publisher selected", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } var editPublisher = new EditPublisherForm((Publisher)PublishersListBox.SelectedItem, _context); editPublisher.ShowDialog(); UpdateList(); }