SqlDataAdapter sda = new SqlDataAdapter("select*from xsda", "Data Source=.;Initial Catalog=XS;Integrated Security=True"); DataTable dt = new DataTable(); sda.Fill(dt); dataGridView1.DataSource = dt; } dbcon db = new dbcon(); //第一种方法 private void button2_C...