private void btnSearchAnyYear_Click(object sender, EventArgs e) { if (string.IsNullOrWhiteSpace(txtSearch.Text)) { MessageBox.Show("Enter somethingin the search!", "Noting To Search!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } else if (rdoItem.Checked) { dataGridView.DataSource = PrepAndPaintDB.SearchItemAnyYear(txtSearch.Text); if (dataGridView.Rows.Count <= 0) { MessageBox.Show($"Nothing found with name {txtSearch.Text}", "Nothing found!", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { SetDataGridView(); } } else if (rdoJobNumber.Checked) { dataGridView.DataSource = PrepAndPaintDB.SearchJobsByAnyYear(txtSearch.Text); if (dataGridView.Rows.Count <= 0) { MessageBox.Show($"Nothing found for Job# {txtSearch.Text}", "Nothing found!", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { SetDataGridView(); } } }