private void pictureBox1_Click(object sender, EventArgs e) { try { ShowBookForm showbook = new ShowBookForm(listId[0]); showbook.ShowDialog(); } catch (Exception) { } }
private void btnView_Click(object sender, EventArgs e) { ShowBookForm showBook = new ShowBookForm(dgvBooks.SelectedCells[0].Value.ToString()); showBook.ShowDialog(); }