private void txtISBN_TextChanged(object sender, EventArgs e) { if (txtISBN.Text != "") { try { //dgvBookDetails.DataSource = bc.GetAllBooks(); dgvBookDetails.DataSource = bc.GetBookDetailsByBookName(txtISBN.Text); } catch (Exception ex) { MessageBox.Show(ex.Message); } } else { dgvBookDetails.Visible = false; } }
private void txtBookName_TextChanged(object sender, EventArgs e) { dgvBookDetails.DataSource = bc.GetBookDetailsByBookName(txtBookName.Text); }