Foxtable(狐表)用户栏目专家坐堂 → 请帮忙查找问题


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

主题:请帮忙查找问题

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


加好友 发短信
等级:管理员 帖子:47497 积分:251403 威望:0 精华:91 注册:2008/6/17 17:14:00
  发帖心情 Post By:2013/11/14 18:04:00 [显示全部帖子]

DataTables("FCST").DataRows.Clear()
Dim wks As List (Of String) = DataTables("Calendar").GetUniqueValues("","Week")
For Each r As Row In Tables("DemandTable").Rows
    For Each wk As String In wks
        If wk > "" Then
            If r.IsNull(wk) = False Then
                Dim dr As DataRow = DataTables("Calendar").Find("Week = '" & wk & "'")
                Dim dr0 As DataRow = DataTables("FCST").AddNew()
                dr0("DemandDate") = dr("DemandDate")
                dr0("StokvisPN") = r("StokvisPN")
                dr0("CustomerPN") = r("CustomerPN")
                dr0("CustomerCode") = r("CustomerCode")
                dr0("PlanQuantity") = r(wk)
            End If
        End If
    Next
Next
Tables("FCST").Sort = "DemandDate"
Tables("DemandTable").Filter = ""
DataTables("FCST").Save()

 回到顶部