备注的问题
Dim dt1 As DataTable = DataTables("表A")
Dim dt2 As DataTable = DataTables("表B")
dt2.DataRows.Clear
Dim remark As String = ""
For Each ary() As String In dt1.GetValues("板块|编号", "", "_Sortkey")
Dim drs As List(Of DataRow) = dt1.Select("板块 = '" & ary(0) & "' And 编号 = '" & ary(1) & "'", "_sortkey")
Dim ndr As DataRow = dt2.AddNew
ndr("板块") = ary(0)
ndr("编号") = ary(1)
Dim str1 As String = ""
If drs.count > 0 Then
If drs(0)("备注") > "" AndAlso drs(0)("备注") <> "同上" Then
remark = drs(0)("备注")
End If
ndr("成人价") = drs(0)("价格")
ndr("发团情况") = drs(0)("发团日期")
ndr("进店数") = drs(0)("进店数")
ndr("地接名称") = drs(0)("地接名称")
ndr("备注") = remark
str1 &= drs(0)("线路名称")
End If
If drs.count > 1 Then
ndr("儿童价") = drs(1)("价格")
ndr("年龄大组") = drs(1)("发团日期")
str1 &= "," & drs(1)("线路名称")
End If
If drs.count > 2 Then
ndr("房差") = drs(2)("价格")
str1 &= "," & drs(2)("线路名称")
End If
If drs.count > 3 Then
str1 &= "," & drs(3)("线路名称")
End If
ndr("线路名称") = str1
Next