conn.Open();
SqlCommand cmd1 = new SqlCommand("Select BianHao from BuMen where MingCheng='" + comboBox1.Text + "'", conn);
SqlDataReader dr1 = cmd1.ExecuteReader();
if (dr1.Read())
{
String a = dr1[0].ToString();
}
SqlCommand cmd2 = new SqlCommand("Select BianHao from GangWei where MingCheng='" + comboBox2.Text + "' " +
"and BuMinBianHao='" + comboBox2.Text + "'", conn);
SqlDataReader dr2 = cmd2.ExecuteReader();
if (dr2.Read())
{
String b = dr2[0].ToString();
}//根据部门编号以及岗位名称,取出相对应的岗位编号
SqlCommand cmd3 = new SqlCommand("Select BianHao from QuanXian where MingCheng='" + comboBox3.Text + "'", conn);
SqlDataReader dr3 = cmd3.ExecuteReader();
if (dr3.Read())
{
String c = dr3[0].ToString();
}//根据权限名称,取出权限编号
谁帮我看看哪里出问题了?