Foxtable(狐表)用户栏目专家坐堂 → [求助]第二列首行填充问题


  共有2737人关注过本帖树形打印复制链接

主题:[求助]第二列首行填充问题

帅哥哟,离线,有人找我吗?
有点甜
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2014/9/24 17:16:00 [显示全部帖子]

Dim Cols1() As String = {"产品"}
Dim Cols2() As String = {"产品名称"}
Dim count As Integer = DataTables("表A").Compute("count(_Identify)", "产品名称 is null")
Dim drs1 As List(Of DataRow) = DataTables("表B").Select("")
If drs1.Count > count Then
    DataTables("表A").AddNew(drs1.Count - count)
End If

Dim drs2 As List(Of DataRow) = DataTables("表A").Select("产品名称 is null")
For i As Integer = 0 To drs1.Count -  1
    Dim dr1 As DataRow = drs1(i)
    Dim dr2 As DataRow = drs2(i)
    For j As Integer = 0 To Cols1.Length -1
        dr2(Cols2(j)) = dr1(Cols1(j))
    Next
Next

Dim Cols3() As String = {"规格"}
Dim Cols4() As String = {"规格型号"}
count = DataTables("表A").Compute("count(_Identify)", "规格型号 is null")
drs1 = DataTables("表C").Select("")
If drs1.Count > count Then
    DataTables("表A").AddNew(drs1.Count - count)
End If
drs2 = DataTables("表A").Select("规格型号 is null")
For i As Integer = 0 To drs1.Count -  1
    Dim dr1 As DataRow = drs1(i)
    Dim dr2 As DataRow = drs2(i)
    For j As Integer = 0 To Cols1.Length -1
        dr2(Cols4(j)) = dr1(Cols3(j))
    Next
Next


 回到顶部