将同一列的数据复制到另外一个表不同的列,如何串联。
代码如下:
Select Case e.DataCol.Name
Case "C11"
Dim dr As DataRow = DataTables("o").Find(" B11 = " & "'" & e.DataRow("C114") & "' And G = " & "'" & e.DataRow("C4") & "'" )
If dr IsNot Nothing'如果找到,则设置各列内容
dr("O")=e.DataRow("C11")
dr("P")=e.DataRow("C12")
End If
Case "C11"
Dim dr As DataRow = DataTables("o").Find(" B11 = " & "'" & e.DataRow("C114") & "' And W = " & "'" & e.DataRow("C4") & "'" )
If dr IsNot Nothing'如果找到,则设置各列内容
dr("A1")=e.DataRow("C11")
dr("B1")=e.DataRow("C12")
End If
Case "C11"
Dim dr As DataRow = DataTables("o").Find(" B11 = " & "'" & e.DataRow("C114") & "' And C1 = " & "'" & e.DataRow("C4") & "'" )
If dr IsNot Nothing'如果找到,则设置各列内容
dr("G1")=e.DataRow("C11")
dr("H1")=e.DataRow("C12")
End If
Case "C11"
Dim dr As DataRow = DataTables("o").Find(" B11 = " & "'" & e.DataRow("C114") & "' And I1 = " & "'" & e.DataRow("C4") & "'" )
If dr IsNot Nothing'如果找到,则设置各列内容
dr("M1")=e.DataRow("C11")
dr("N1")=e.DataRow("C12")
End If
End Select