参考:http://www.foxtable.com/webhelp/topics/2649.htm
报销单,datacolchanged
If e.DataCol.name = "结清" andalso e.datarow("结清") = true Then
datatables("明细单").replace("锁",true,“报销单号='" & e.datarow("报销单号") & "'”)
end if
明细单,datacolchanged
If e.DataCol.name = "锁" Then
Dim pr As DataRow = e.DataRow.GetParentRow("报销单")
If pr IsNot Nothing Then
Dim crs As List(of DataRow) = pr.GetChildRows("明细单")
Dim cnt As Integer
For Each cr As DataRow In crs
If cr("锁") = True
cnt = cnt + 1
End If
Next
pr("结清") = (crs.Count = cnt)
End If
End If