西裤订单明细尺码表datacolchanged事件
Dim ro As DataRow = DataTables("订单明细表").find("[订单号] = '"& e.datarow("订单号") &"'and [项次] = '"& e.datarow("项次") &"'and [腰围] = '数量'")
Dim ro1 As DataRow = DataTables("订单表").find("[订单号] = '"& ro("订单号") &"'")
Dim drs As List(Of DataRow)
Dim count As Integer = 0
drs = DataTables("西裤订单明细尺码表").Select("[订单号] = '"& ro("订单号") &"'and [项次] = '"& ro("项次") &"'and [腰围] = '数量'" )
For Each dr As DataRow In drs
For i As Integer = 1 To Cols1.Length -1
count = count + dr(Cols1(i))
Next
Next
ro("数量") = count
ro.Save
ro1("数量_西裤") = count
ro1.Save