If e.DataCol.Name = "组合数量" Then
Dim cnt As Integer = e.DataTable.Compute("min(组合数量)","长=\'" & e.DataRow("长") & "\' and 宽=\'" & e.DataRow("宽") & "\'")
If cnt < e.NewValue Then
msgbox("无法生产这么多组合产品,请检查")
e.Cancel = True
End If
End If
If e.DataCol.Name = "组合数量" Then
SystemReady = False
e.DataTable.ReplaceFor("组合数量",e.NewValue,"长=\'" & e.DataRow("长") & "\' and 宽=\'" & e.DataRow("宽") & "\'")
SystemReady = True
End If