Dim Filter As String With e.Form.Controls("DateTimePicker1") If .Value IsNot Nothing Then Filter = "日期 >= '" & .Value & "' " End If End With
With e.Form.Controls("DateTimePicker2") If .Value IsNot Nothing Then If Filter > "" Then Filter = Filter & " And " '相\在原条件基础上添加 and End If Filter = Filter & "日期 <= '" & .Value & "' " '添加下一个条件 End If End With
Dim drs1 As List(Of DataRow) Dim drs2 As List(Of DataRow) Dim day_delay As Integer = e.Form.Controls("NumericComboBox1").Value
Dim number_delay As Integer = e.Form.Controls("NumericComboBox2").Value
drs1 = DataTables("故障报告").Select("" & Filter & "")
请大神们帮忙看下,上面标红的代码是不是有问题,不会报错,但筛选出来的不大对,谢谢!
|