Ejemplo n.º 1
0
        private void Edit(object sender, EventArgs e)
        {
            var editAuthor = new EditAuthorForm(_author, _context);

            editAuthor.ShowDialog();
            UpdateForm();
        }
Ejemplo n.º 2
0
        private void Edit(object sender, EventArgs e)
        {
            if (AuthorsListBox.SelectedItem == null)
            {
                MessageBox.Show(@"You must select the author you want to edit", @"No author selected", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            var editAuthor = new EditAuthorForm((Author)AuthorsListBox.SelectedItem, _context);

            editAuthor.ShowDialog();
            UpdateList();
        }