private void search_product_btn_Click(object sender, EventArgs e) { if (Searchbar.Text == "") { MessageBox.Show("尚未輸入查詢品項"); } else { string searchkeyword = Searchbar.Text; dataGridView1.DataSource = ProductUtility.SearchProduct(searchkeyword); dataGridView1.Refresh(); } }