コード例 #1
0
        private void Edit(object sender, EventArgs e)
        {
            var editPublisher = new EditPublisherForm(_publisher, _context);

            editPublisher.ShowDialog();
            UpdateForm();
        }
コード例 #2
0
        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();
        }