conn.Open();
OleDbDataAdapter myDA2
=new OleDbDataAdapter("select * from Grade", conn);
myDA2.Fill(ds,
"table");
//绑定combox数据源
comboBox1.DataSource
=ds.Tables["table"];
comboBox1.ValueMember
="Grade_ID";
comboBox1.DisplayMember
="Grade_Name";

conn.Close();

int k =int.Parse(this.comboBox1.SelectedValue.ToString());//获取combox的选中值

相关文章:

  • 2021-06-14
  • 2022-12-23
  • 2022-02-20
  • 2022-12-23
  • 2021-08-19
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-12
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-25
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案