Dim filter As String = "1=1"
If scddhm <> "" Then
Filter &= " and 生产订单号码 = '" & scddhm & "' "
Else
End If
If gdhh <> "" Then
Filter &= " and 工单行号 = '" & gdhh & "'"
End If
If wlbm <> "" Then
Filter &= " and 物料编码 = '" & wlbm & "'"
End If
If kwlb <> "" Then
Filter &= " and 库位类别 = '" & kwlb & "'"
End If
If startdate <> "" Then
Filter &= " and 入库时间 >= '" & startdate & "'"
End If
If enddate <> "" Then
Filter &= " and 入库时间 <= '" & enddate & "'"
End If
Dim adapter As New SqlClient.SqlDataAdapter("s elect * from [可用数量表] where " & filter, cn)