Foxtable(狐表)用户栏目专家坐堂 → 判断与添空值


  共有5125人关注过本帖树形打印复制链接

主题:判断与添空值

帅哥哟,离线,有人找我吗?
狐狸爸爸
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:管理员 帖子:47448 积分:251054 威望:0 精华:91 注册:2008/6/17 17:14:00
  发帖心情 Post By:2013/5/23 18:00:00 [显示全部帖子]

1、判断输入框内容是否为空:

Dim rq As WinForm.DateTimePicker = e.Form.Controls("DateTimePicker1")
Dim jz As WinForm.NumericComboBox = e.Form.Controls("NumericComboBox1")
Dim sl As WinForm.TextBox = e.Form.Controls("TextBox1")
If rq.value Is Nothing OrElse jz.value Is Nothing OrElse sl.value Is Nothing
   messagebox.show("日期价格数量能为空")
End If

 

 

2、其实你不用判断输入框,因为你已经绑定了,这样更简单:

 

Dim r As Row = Tables("表A").current
If r.IsNull("第一列") OrElse r.IsNull("第二列") OrElse  r.IsNull("第三列") Then
   messagebox.show("日期价格数量能为空")
End If

 

 

 


 回到顶部