Foxtable(狐表)用户栏目专家坐堂 → [求助]怎样取数?


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

主题:[求助]怎样取数?

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


加好友 发短信
等级:狐神 帖子:6708 积分:34304 威望:0 精华:11 注册:2012/8/18 23:10:00
  发帖心情 Post By:2013/2/25 10:56:00 [显示全部帖子]

 弄死,还以为是各个分数段人次……还傻傻的累加一次……

 代码加在最后便可。注意,分数段、加n分,列变成数值类型

Dim dt_source As DataTable = DataTables("市级1分段")
    For Each Km As String In Kms
        For Each bb As String In bbs
            Dim t As Table = Tables(Km & tjnj &"级"& bb &"前 N 名")
            For Each r As Row In t.Rows
                Dim gw As Integer = CInt(r("总分")) Mod 10
                Dim fsd As Integer = CInt(r("总分")) - gw
                Dim fdr As DataRow = dt_source.Find("分数段 = " & fsd)
                If fdr IsNot Nothing Then             
                    r("市一诊名次") = fdr("加" & gw & "分")
                End If
            Next
        Next
    Next

[此贴子已经被作者于2013-2-25 10:58:21编辑过]

 回到顶部