-- 作者:xvkewen
-- 发布时间:2012/9/18 9:28:00
-- 库存量的判断
以下代码是在Datacolchanged事件中执行的。是哪里错了?为何总是总得不到库存不足的提示呢?
Dim po As String = e.DataRow("PO") Dim ty As String = e.DataRow("material_type") Dim name As String = e.DataRow("material_name") Dim size As String = e.DataRow("material_size") Dim color As String = e.DataRow("color") Dim pdr As DataRow = DataTables("库存表").Find("PO = \'" & po & "\' And material_type = \'" & ty & "\' And material_name = \'" & name & "\' And material_size = \'" & size & "\' And material_color = \'" & color & "\'")
If e.DataCol.name = "quantity" And pdr Is Nothing Then
If pdr("stocking_qty") < e.NewValue Then
MessageBox.Show("库存不足")
End If
End If
|