Foxtable(狐表)用户栏目专家坐堂 → 多值字段的引用统计


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

主题:多值字段的引用统计

帅哥,在线噢!
有点蓝
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:106809 积分:543246 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2020/6/24 17:35:00 [显示全部帖子]

表B,datacolchanged事件
If e.DataCol.Name = "工序" Then
    If e.DataRow.IsNull("工序") Then
        e.DataRow("单价") = Nothing
    Else
        Dim dj As Integer = 0
        For Each s As String In e.DataRow("工序").split(",")
            Dim dr As DataRow = DataTables("表A").find("工序='" & s & "'")
            If dr IsNot Nothing Then
                dj = dj + dr("单价")
            End If
        Next
        e.DataRow("单价") = dj
    End If
End If

 回到顶部