--
Dim sd As WinForm.TextBox = e.Form.Controls("商品编码")
Dim ed As WinForm.TextBox = e.Form.Controls("预定数量")
If sd.Value Is Nothing OrElse ed.Value Is Nothing Then
MessageBox.Show("商品编码或预定数量不可为空!", "提示", MessageBoxButtons.OK)
e.Cancel = True
Else
If ed.Value <= 0
MessageBox.Show("兄弟:预定不可为\'0\'或负数!!!", "提示", MessageBoxButtons.OK)
Else
DataTables("预定表").Save
e.Form.Close()
End If
End If
这是“提交”按钮的代码!