Foxtable(狐表)用户栏目专家坐堂 → [求助]根据标准划分等级问题


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

主题:[求助]根据标准划分等级问题

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


加好友 发短信 F6
等级:狐精 帖子:3030 积分:19188 威望:0 精华:2 注册:2008/9/1 7:50:00
  发帖心情 Post By:2009/3/31 8:15:00 [显示全部帖子]

以下是引用czy在2009-3-30 18:24:00的发言:
Dim ColNames() As String = {"语文","数学","英语","物理","化学","总分"}
Dim dt2 As DataTable = DataTables("优分线")
Dim dr As DataRow
For Each Name As String In ColNames
    For Each dr1 As DataRow In DataTables("成绩分析").DataRows
        dr = dt2.Find("[月份] = '" & dr1("月份") & "' And [科目] = '" & Name & "'")
        If dr IsNot Nothing Then
            dr1(Name.SubString(0,1) & "优") = iif(dr1(Name)>=dr("A优线"),"A",iif(dr1(Name)>=dr("B1优线"),"B1",iif(dr1(Name)>=dr("B2优线"),"B2",iif(dr1(Name)>=dr("C优线"),"C",""))))
        End If
    Next
Next

学习了


 回到顶部