Home > Software engineering >  How novice for help in Form2 click on the button in the Grid of Form1 show
How novice for help in Form2 click on the button in the Grid of Form1 show

Time:11-02

Private void button1_Click (object sender, EventArgs e)
{
The Form Form=new Form3 ();
Form. The Show ();
String con="server=GY10720RTME5INM; The Database=HIS; User id=sa; Password=3333 ";
String SQL="select * from drug information where pinyin code like '% keyborad %'";
SqlDataAdapter data=https://bbs.csdn.net/topics/new SqlDataAdapter (SQL, con);
The DataSet ds=new DataSet ();
Data. The Fill (ds);
Form2. DataGridView1. The DataSource=ds. Tables [0].
This is the code of my students didn't understand fuzzy search drugs and then in the table shows the data grid in Form2 set the view1 into publiv

And why don't show this code a second value
Private void comboBox5_SelectedIndexChanged (object sender, EventArgs e)
{
This.com boBox6. Items. The Clear ();
If (this.com boBox5. Text=="regions")
{

This.com boBox6. Items. The Add (" Chen Changfa ");
}

Else if (this.com boBox6. Text=="internal")

{this.com boBox6. Items. The Add (" Chen Changfa ");
This.com boBox6. Items. The Add (" Liu Canpeng ");
}
  • Related