Rss & SiteMap

Foxtable(狐表) http://www.foxtable.com

新一代数据库软件,完美融合Access、Foxpro、Excel、vb.net之优势,人人都能掌握的快速软件开发工具!
共4 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

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

1楼
abcdzabcdz 发表于:2009/3/30 17:52:00
 问题:如何根据”优分线”中各科A、B1、B2、C优线的标准,对“成绩分析”表中各科成绩进行优生级别划分?

说明:以语文科为例:“语文”科“A优线”为“142分”,则“成绩分析”表中“语文”成绩高于或等于142分的,均在相应的“语优”中确定等级为“A”;同理语文成绩在133分以上、低于142分为“B1”,126分及以上、低于133分相应等级为B2,117分及以上、低于126分相应“语优”为“C“。其它科目类推。

 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:问题21.table

2楼
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
3楼
kylin 发表于: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

学习了

4楼
abcdzabcdz 发表于:2009/3/31 8:51:00

谢谢!学习中.......

共4 条记录, 每页显示 10 条, 页签: [1]

Copyright © 2000 - 2018 foxtable.com Tel: 4000-810-820 粤ICP备11091905号

Powered By Dvbbs Version 8.3.0
Processed in .02344 s, 3 queries.