Dim drs As List(of DataRow) = DataTables("销售单").Select("商品ID is not null and 数量 is null")
For Each drc As DataRow In drs
drc.SetError("数量", "数量必须大于0!")
Next
Dim drd As List(of DataRow) = DataTables("销售单").Select("商品ID is not null and 单价 is null")
For Each dre As DataRow In drd
dre.SetError("单价", "单价必须大于0!")
Next
If drs.count>0 OrElse drd.count>0 Then
MessageBox.show("当前数据填写不规范,请检查")
Else
'可以执行的代码
End If