Dim Result As DialogResult
Result = MessageBox.Show("确定导出?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question,MessageBoxDefaultButton.Button2)
Dim Cols1() As String = {"工作单位","县公司","姓名","性别","身份证号码","文化程度","鉴定等级","申报鉴定工种","鉴定批次","申报性质","备注","照片","是否合格","理论考否","考试性质"}
Dim Cols2() As String = {"工作单位","县公司","姓名","性别","身份证号码","文化程度","鉴定等级","申报鉴定工种","鉴定批次","申报性质","备注","照片","是否合格","理论考否","考试性质"}
For Each dr1 As DataRow In DataTables("审核合格表").Select("[理论考否] = True ")
Dim dr2 As DataRow = DataTables("理论机考表").Find("身份证号码 = '" & dr1("身份证号码") & "'")
If dr2 Is Nothing Then
dr2 = DataTables("理论机考表").AddNew
End If
For i As Integer = 0 To Cols1.Length -1
dr2(Cols2(i)) = dr1(Cols1(i))
Next
Next
这段代码中为什么我把For Each dr1 As DataRow In DataTables("审核合格表").Select("[理论考否] = True ")
改成 For Each dr1 As DataRow In DataTables("审核合格表").Select("[考试性质] = 纸质考试 ")就提示找不到列?
因为考试性质中有:上机考试、纸质考试、补考实操......等,我要根据对考试性质的筛选分别将考生导向不同中的表,那我应该怎么写代码?请版主指教!