DataTables("成绩管理").DataRows.Clear
For Each r As Row In Tables("学籍管理").Rows
Dim fdr As DataRow = DataTables("课程设置").Find("主考院校 = '" & r("主考院校") & "' And 专业 = '" & r("专业") & "'")
If fdr IsNot Nothing Then
Dim vals As List(Of String()) = DataTables("课程设置").GetValues("课程|课程性质","课程 Is Not Null And 主考院校 = '" & r("主考院校") & "' And 专业 = '" & r("专业") & "'")
For Each val As String() In vals
Dim nr As Row = Tables("成绩管理").AddNew
For Each c As Col In Tables("学籍管理").Cols
If Tables("成绩管理").Cols.Contains(c.Name) Then
nr(c.Name) = r(c.Name)
End If
Next
nr("课程") = val(0)
nr("课程性质") = val(1)
Next
End If
Next
[此贴子已经被作者于2014-5-15 10:57:27编辑过]