Foxtable(狐表)用户栏目专家坐堂 → for each 遍历方法效率是不是有点低?


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

主题:for each 遍历方法效率是不是有点低?

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


加好友 发短信
等级:管理员 帖子:47448 积分:251054 威望:0 精华:91 注册:2008/6/17 17:14:00
  发帖心情 Post By:2013/8/6 10:04:00 [显示全部帖子]

这样看看:

For i As Integer = 0 To DtEmployee.DataRows.Count -1
    Dim r sa DataRow = DtEmployee.DataRows(i)
    strCName = r("员工姓名")
    If strCName = strCCName Then
        strTel = r("联系电话")
        '=====
        '面护
        '=====
        strF =strFilter2 & "  And [项目大类] = '面护'"
        nXCount = DtCstmCard.Compute("Sum(期初金额)", strF)
        DtEmployee.DataCols("面护_销售业绩").AllowEdit = True
        r("面护_销售业绩") =  nXCount
        DtEmployee.DataCols("面护_销售业绩").AllowEdit = False
       
        strF =strFilter & "  And [项目大类] = '面护'"
        nSCount = DtNurse.Compute("Sum(次数)", strF)
        DtEmployee.DataCols("面护_护理次数").AllowEdit = True
        r("面护_护理次数") =   nSCount
        DtEmployee.DataCols("面护_护理次数").AllowEdit = False
    Next
End If

 

如果还是不行,可以看看:

http://www.foxtable.com/help/topics/2225.htm

 


 回到顶部