日期:2014-05-17 浏览次数:20939 次
sql = "select distinct * from planeinformation"; da = new SqlDataAdapter(sql,DBHelper.Connection); st = new DataSet(); da.Fill(st,"start"); DataRow row = st.Tables["start"].NewRow(); row["id"] = -1; row["setout"] = "请选择"; st.Tables["start"].Rows.InsertAt(row,0); this.comboBox1.DataSource = st.Tables["start"]; this.comboBox1.DisplayMember = "setout"; this.comboBox1.ValueMember = "id";
select distinct(setout) as setout,id from planeinformation