Select Case e.DataCol.Name
Case "到货数量"
If e.DataRow("到货数量") = 0 Then
DataTables("物资库存台帐").DeleteFor("编号='" & e.DataRow("编号") & "'")
Else
If e.DataRow("物资说明") = "消耗品" Then
DataTables("物资库存台帐").DeleteFor("编号='" & e.DataRow("编号") & "'")
Dim ndr As DataRow = DataTables("物资库存台帐").AddNew
ndr("编号") = e.DataRow("编号")
ndr("预算编号") = e.DataRow("预算编号")
ndr("生产令号") = "/"
ndr("项目名称") = "/"
ndr("物资说明") = e.DataRow("物资说明")
ndr("物资名称") = e.DataRow("物资名称")
ndr("规格") = e.DataRow("规格")
ndr("材质") = e.DataRow("材质")
ndr("单位") = e.DataRow("单位")
ndr("到货数量") = e.DataRow("到货数量")
End If
End If
End Select
“物资采购明细表”中有更改的话,“物资库存台帐中”无法自动更改,我已经设了关联,也在
afterload事件中设置DataTables("物资采购明细表").LoadChildren("物资库存台帐", "编号", "编号")
什么原因啊?