Foxtable(狐表)用户栏目专家坐堂 → substring


  共有2100人关注过本帖平板打印复制链接

主题:substring

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


加好友 发短信
等级:三尾狐 帖子:705 积分:4897 威望:0 精华:0 注册:2016/5/17 12:03:00
substring  发帖心情 Post By:2016/8/15 11:12:00 [只看该作者]

 窗口在下面是库存表,上面有两个文本框,是大于门幅和小于门幅,用于筛选,门幅列是字符型的,第一个是字母如:Y122,Q233,文本框只输入如122,233这样的字符筛选,下面的代码应该怎么改

Dim mf As String = e.datarows("门幅").substring(1)
Dim dyts As WinForm.TextBox = e.Form.Controls("TextBox5")
Dim xyts As WinForm.TextBox = e.Form.Controls("TextBox6")
If dyts.value Is Nothing AndAlso xyts.value Is Nothing Then
    MessageBox.Show("请输入天数筛选","提示",MessageBoxButtons.OK,MessageBoxIcon.Error)
    Return
Else
    If dyts.value Is Nothing Then
        DataTables("库存表").loadfilter = "mf <= '" & xyts.value & "'"
        DataTables("库存表").load
    End If
    If xyts.value Is Nothing Then
        DataTables("库存表").loadfilter = "mf >= '" & dyts.value & "'"
        DataTables("库存表").load
    End If
    If dyts.value IsNot Nothing AndAlso xyts.value IsNot Nothing Then
        DataTables("库存表").loadfilter = "mf >= '" & dyts.value & "' and mf <= '" & xyts.value & "'"
        DataTables("库存表").load
    End If
End If


 回到顶部