Dim bjf() As String = {" ="," = "," like "," = "," = "," = ",">=","<=",">=","<="}
Dim fds() As String = {"仓库名称","入库原因","配件名称","配件代码","供应商名称","送货单号","入库日期","入库日期","数量","数量"}
Dim tpf() As String = {"","","%","","","","","","",""}
Dim filter As String
For i As Integer = 0 To nms.Length - 1
If e.Form.Controls(nms(i)).text <> Nothing Then
If filter > "" Then
filter = filter & " And "
End If
If fds(i) = "入库日期" AndAlso bjf(i) = "<=" Then
filter = filter & fds(i) & bjf(i) & sps(i) & tpf(i) & e.Form.Controls(nms(i)).value.adddays(1) &tpf(i) & sps(i)
Else
filter = filter & fds(i) & bjf(i) & sps(i) & tpf(i) & e.Form.Controls(nms(i)).value &tpf(i) & sps(i)
End If
MessageBox.show(filter)
End If
Next
DataTables("配件入库明细").LoadFilter = filter
DataTables("配件入库明细").Load()