Foxtable(狐表)用户栏目专家坐堂 → 数据合并


  共有9622人关注过本帖平板打印复制链接

主题:数据合并

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


加好友 发短信
等级:超级版主 帖子:106209 积分:540168 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2020/4/13 15:55:00 [只看该作者]

For Each Product As String In DataTables("灵川中心表一").GetValues("教师" ,"教师 is not null")
    Dim dict As new Dictionary(of String,Integer)
    Dim srr() As String = {"一","二","三","四","五"}
    
    For Each dr As DataRow In DataTables("灵川中心表一").Select("教师='" & Product & "'" )
        For Each s As String In srr
            If dr.IsNull("星期_" & s) = False Then
                Dim c As String = dr("星期_" & s)
                If dict.ContainsKey(c) Then
                    dict(c) = dict(c)+1
                Else
                    dict.Add(c,1)
                End If
            End If
        Next
    Next
    Dim sm As String = ""
    For Each key As String In dict.Keys
        sm = sm & dict(key) & key & "+"
    Next
    sm = Product & ": " & sm.trim("+")
    Output.Show(sm)
    'Dim rr As Row = Tables("课程表").AddNew()
    'rr("节序") = sm
Next

 回到顶部
总数 82 1 2 3 4 5 6 7 8 9 下一页