Foxtable(狐表)用户栏目专家坐堂 → [求助]关于日和月计算


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

主题:[求助]关于日和月计算

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


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2019/4/18 18:12:00 [显示全部帖子]

Select Case e.DataCol.name
    Case "销售","数量","赠品"
        For Each xm As String In e.DataRow("销售").split("|")
            Dim dr As DataRow = DataTables("月统计").find("销售 = '" & xm & "' and 年月  = '" & e.DataRow("年月") & "'")
            If dr IsNot Nothing Then
                dr("数量") = DataTables("记录").Compute("sum(数量)","销售 like '*" & xm & "*' and 年月  = '" & e.DataRow("年月") & "'")
                dr("赠品") = DataTables("记录").Compute("sum(赠品)","销售 like '*" & xm & "*' and 年月  = '" & e.DataRow("年月") & "'")
               
            End If
        Next
       
        For Each xm1 As String In e.DataRow("销售").split("|")
            Dim dr1 As DataRow = DataTables("日统计").find("销售 = '" & xm1 & "' and 日期  = '" & e.DataRow("日期") & "'")
            If dr1 IsNot Nothing Then
                dr1("数量") = DataTables("记录").Compute("sum(数量)","销售 like '*" & xm1 & "*' and 日期  = '" & e.DataRow("日期") & "'")
                dr1("赠品") = DataTables("记录").Compute("sum(赠品)","销售 like '*" & xm1 & "*' and 日期  = '" & e.DataRow("日期") & "'")
            End If
        Next              
End Select

 回到顶部