private void button1_Click(object sender, EventArgs e)
{
Form form = new Form3();
form.Show();
string con = "server=GY10720RTME5INM;Database=HIS;user id=sa;password=3333";
string sql = "select*from 藥品資料 where 拼音碼 like'%keyborad%'";
SqlDataAdapter data = new SqlDataAdapter(sql, con);
DataSet ds = new DataSet();
data.Fill(ds);
Form2.dataGridView1.DataSource = ds.Tables[0];
這是我的代碼 學生一點都不懂 模糊查找藥品 然后在表格中顯示 Form2中的data grid view1設定成了publiv
還有這段代碼 為什么 顯示不了第二個值
private void comboBox5_SelectedIndexChanged(object sender, EventArgs e)
{
this.comboBox6.Items.Clear();
if (this.comboBox5.Text == "中醫科")
{
this.comboBox6.Items.Add("陳長法");
}
else if (this.comboBox6.Text == "內科")
{ this.comboBox6.Items.Add("陳長法");
this.comboBox6.Items.Add("劉燦鵬");
}
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/153482.html
標籤:基礎類
上一篇:VS2015安裝出錯
