老师,请帮忙解答一下,图中的两个加总为什么不对,并附实列。非常谢谢帮忙。
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