物料信息表
Select Case e.DataCol.Name
Case "库存数量","补充数量","物料描述","规格型号","单位","物料属性","采购在途","单价"
Dim Filter As String = "[物料代码] = \'" & e.DataRow("物料代码") & "\'"
Dim drs As List(Of DataRow) = DataTables("采购订单").sqlSelect(Filter)
For Each dr As DataRow In drs
dr(e.DataCol.Name) = e.NewValue
Next
DataTables("采购订单").SQLUpdate(drs)
DataTables("采购订单").RemoveFor(Filter)
DataTables("采购订单").AppendLoad(Filter)
End Select
采购订单表
If e.DataCol.Name = "物料代码" Then
If e.NewValue Is Nothing Then
e.DataRow("物料描述") = Nothing
e.DataRow("规格型号") = Nothing
e.DataRow("单位") = Nothing
e.DataRow("库存数量") = Nothing
e.DataRow("补充数量") = Nothing
e.DataRow("物料属性") = Nothing
e.DataRow("采购在途") = Nothing
Else
Dim dr As DataRow
dr = DataTables("物料信息").Find("[物料代码] = \'" & e.NewValue & "\'")
If dr Is Nothing Then
dr = DataTables("物料信息").SQLFind("[物料代码] = \'" & e.NewValue & "\'")
End If
If dr IsNot Nothing
e.DataRow("物料描述") = dr("物料描述")
e.DataRow("规格型号") = dr("规格型号")
e.DataRow("单位") = dr("单位")
e.DataRow("库存数量") = dr("库存数量")
e.DataRow("补充数量") = dr("补充数量")
e.DataRow("物料属性") = dr("物料属性")
e.DataRow("采购在途") = dr("采购在途")
End If
End If
End If
我是修改黄色标示这段代码,执行过程出现那个对话框。未修改前是数据修改后无法引用,修改后就是对话框出现错误