以下是引用大红袍在2015/8/27 11:43:00的发言:
nr("科目") = e.Form.Controls("Label" & i).Text & CLNum(i) & "级"
我用的
Dim dt As DataTable = DataTables("课类分类表")
Dim fl As String = e.Form.Controls("Combobox2").text
Dim km As String = e.Form.Controls("Textbox13").text
For i As Integer = 1 To 4
e.Form.Controls("CheckedComboBox" & i).Visible = i <= val(e.Form.Controls("Combobox1").Text)
Next
For i As Integer = 1 To e.Form.Controls("Combobox1").Text
Dim nr As DataRow = dt.find("分类 = '" & fl & "' and 培训科目 = '" & km & "' and 科目 = '" & CLNum(i) & km & "'")
If nr Is Nothing
nr = dt.AddNew
nr("分类") = fl
nr("培训科目") = km
nr("科目") = e.Form.Controls("CheckedComboBox" & i).Text & km
End If
nr("课时费") = e.Form.Controls("Textbox" & i).text
nr.save
Next
e.Form.close
居然被我瞎猫碰上死耗子了~~~。。。