1)动态生成ComboBox
参考 http://www.yesky.com/20020226/218658_4.shtml
其中 comboBox.DisplayMember = "myTable.TkjName";
comboBox.ValueMember = "myTable.TkjID";
2)在 comboBox_SelectedValueChanged事件中
string strText = comboBox..Text.ToString();
string strID = comboBox.SelectedValue.ToString();
3)把strID 转换为int型 ,插入数据库。
参考 http://www.yesky.com/20020226/218658_4.shtml
其中 comboBox.DisplayMember = "myTable.TkjName";
comboBox.ValueMember = "myTable.TkjID";
2)在 comboBox_SelectedValueChanged事件中
string strText = comboBox..Text.ToString();
string strID = comboBox.SelectedValue.ToString();
3)把strID 转换为int型 ,插入数据库。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货