窗口在下面是库存表,上面有两个文本框,是大于门幅和小于门幅,用于筛选,门幅列是字符型的,第一个是字母如: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