Foxtable(狐表)用户栏目专家坐堂 → [求助] 加总问题


  共有1809人关注过本帖平板打印复制链接

主题:[求助] 加总问题

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


加好友 发短信
等级:三尾狐 帖子:795 积分:5880 威望:0 精华:0 注册:2018/11/3 8:24:00
[求助] 加总问题  发帖心情 Post By:2018/11/17 15:48:00 [只看该作者]

老师,请帮忙解答一下,图中的两个加总为什么不对,并附实列。非常谢谢帮忙。

 

shipment表属性的代码如下

If e.DataCol.Name = "ShippingNo" Then
    Dim Arys As List(Of String())  = DataTables("GSSInvoice").GetValues("shippingno|Totalprice","ShippingNo='" & e.NewValue & "'")
    Dim sum As Double= 0
    For Each s As String() In arys
        sum += val(s(1))
    Next
    e.DataRow("GSS_totalprice") = sum
End If

If e.DataCol.Name = "ShippingNo" Then
    Dim Arys As List(Of String())  = DataTables("CustomsInvoice").GetValues("shippingno|Totalprice","ShippingNo='" & e.NewValue & "'")
    Dim sum As Double= 0
    For Each s As String() In arys
        sum += val(s(1))
    Next
    e.DataRow("CUSTOMS_totalprice") = sum
End If

 

 

 

customsinvocie 表属性的代码如下

If e.DataCol.Name <> "Totalprice" Then '发生变化的是产品列.
   Dim pr As DataRow
   pr = DataTables("Shipment").Find("ShippingNo = '" & e.DataRow("ShippingNo") & "'")
   If pr IsNot Nothing Then
     DataTables("Shipment").DataCols("ShippingNo").RaiseDataColChanged(pr)
  End If
End  If

 

gssinvocie 表属性的代码如下

 

If e.DataCol.Name <> "Totalprice" Then '发生变化的是产品列.
   Dim pr As DataRow
   pr = DataTables("Shipment").Find("ShippingNo = '" & e.DataRow("ShippingNo") & "'")
   If pr IsNot Nothing Then
     DataTables("Shipment").DataCols("ShippingNo").RaiseDataColChanged(pr)
  End If
End  If

 

 


 回到顶部
总数 11 1 2 下一页