Foxtable(狐表)用户栏目专家坐堂 → dataclochanged


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

主题:dataclochanged

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


加好友 发短信
等级:八尾狐 帖子:1942 积分:14925 威望:0 精华:0 注册:2016/4/28 9:58:00
dataclochanged  发帖心情 Post By:2019/3/10 21:36:00 [只看该作者]

Select e.DataCol.name
    Case "B2","B17","B47","B68","B69","B70"
        e.DataRow("B0")= e.DataRow("B2")+e.DataRow("B17")+ e.DataRow("B47")+ e.DataRow("B68")+ e.DataRow("B69")+ e.DataRow("B70")
    Case "B3","B10"
        e.DataRow("B1")=e.DataRow("B3")+e.DataRow("B10")
    Case "B4","B11"
        e.DataRow("B2")=e.DataRow("B4")+e.DataRow("B11")
    Case "B4","B7"
        e.DataRow("B3")=e.DataRow("B4")+e.DataRow("B7")
    Case "B11","B15"
        e.DataRow("B10")=e.DataRow("B11")+e.DataRow("B15")      
    Case "B18","B19","B32"
        e.DataRow("B16")=e.DataRow("B18")+e.DataRow("B19")+e.DataRow("B32")
    Case "B20","B21","B33"
        e.DataRow("B17")=e.DataRow("B20")+e.DataRow("B21")+e.DataRow("B33")
    Case "B20","B26"
        e.DataRow("B18")=e.DataRow("B20")+e.DataRow("B26")
    Case "B21","B27"
        e.DataRow("B19")=e.DataRow("B21")+e.DataRow("B27")
    Case "B33","B38"
        e.DataRow("B32")=e.DataRow("B33")+e.DataRow("B38")
    Case "B34","B35","B36","B37"
        e.DataRow("B33")=e.DataRow("B34")+e.DataRow("B35")+e.DataRow("B36")+e.DataRow("B37")
    Case "B39","B40","B41","B42"
        e.DataRow("B38")=e.DataRow("B39")+e.DataRow("B40")+e.DataRow("B41")+e.DataRow("B42")
    Case "B46","B50","B58"
        e.DataRow("B44")=e.DataRow("B46")+e.DataRow("B50")+e.DataRow("B58")
    Case "B47","B51","B59"
        e.DataRow("B45")=e.DataRow("B47")+e.DataRow("B51")+e.DataRow("B59")
    Case "B47","B49"
        e.DataRow("B46")=e.DataRow("B47")+e.DataRow("B49")
    Case "B51","B53"
        e.DataRow("B50")=e.DataRow("B51")+e.DataRow("B53")
    Case "B59","B65"
        e.DataRow("B58")=e.DataRow("B59")+e.DataRow("B65")
  Case "学校名称"
        Dim dr As DataRow = DataTables("学校信息").find("单位全称='" & e.DataRow("学校名称") & "'")
        If dr IsNot Nothing
            e.DataRow("所属中心校") = dr("所属中心校")
        End If

        
End Select
老师,请问红色代码中,为什么B11输入数字B10不能改变,但B15输入数字B10能求出B11+B15,是什么原因

 回到顶部
帅哥哟,离线,有人找我吗?
有点甜
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2019/3/10 21:41:00 [只看该作者]

不能重复,重复的时候,需要写多个 select end select

 

Select e.DataCol.name
    Case "B2","B17","B47","B68","B69","B70"
        e.DataRow("B0")= e.DataRow("B2")+e.DataRow("B17")+ e.DataRow("B47")+ e.DataRow("B68")+ e.DataRow("B69")+ e.DataRow("B70")
    Case "B3","B10"
        e.DataRow("B1")=e.DataRow("B3")+e.DataRow("B10")
    Case "B4","B11"
        e.DataRow("B2")=e.DataRow("B4")+e.DataRow("B11")
    Case "B4","B7"
        e.DataRow("B3")=e.DataRow("B4")+e.DataRow("B7")
    Case "B11","B15"
        e.DataRow("B10")=e.DataRow("B11")+e.DataRow("B15") 

 回到顶部