If e.DataCol.Name = "审核" Then
If e.NewValue = True Then
e.DataRow("审核员") = user.name
e.DataRow("审核日期") = Date.Today
e.DataRow.Locked = True
For Each dr As DataRow In e.DataRow.GetChildRows("采购订单详细")
dr.Locked = e.DataRow.Locked
Dim dr2 As DataRow
dr2 = DataTables("采购完成情况表").SQLfind("[采购PO] = '" & dr("采购PO") & "'And [物料代码] = '" & dr("物料代码") & "'")
If dr2 IsNot Nothing Then
dr2("采购数量") = dr("采购数量")
Else
Dim nr As DataRow = DataTables("采购完成情况表").AddNew()
nr("采购PO") = dr("采购PO")
nr("供应商") = dr("供应商")
nr("物料代码") = dr("物料代码")
nr("物料名称") = dr("名称")
nr("规格型号") = dr("规格型号")
nr("采购数量") = dr("采购数量")
End If
Next
End If
End If
我这个是多重表处理,就是表达式那里处理不正确, 不知道是不是SQL的问题