Dim yh1 As String = e.Cookies("yh") '从cookie中获取用户名并解密
Dim yh As String = DecryptText(yh1,"bc2","op2")
'合成条件
Dim flt As String
If e.GetValues.ContainsKey("unfilter") Then '如果有unfilter参数,则清除cookie
wb.ClearCookie()
ElseIf e.PostValues.Count > 0 Then '如果是filter.htm访问,则根据用户输入合成条件表达式
If e.PostValues.ContainsKey("kxtj") Then
Dim txt As String
txt = "'%" & e.PostValues("kxtj") & "%'"
flt = "客户名称 Like " & txt
wb.AppendCookie("kxtj", e.PostValues("kxtj")) '将值写入cookie中
Else
wb.DeleteCookie("kxtj") '删除cookie
End If
If flt > "" Then
flt = flt & " and 经办人 = '" & yh & "'"
End If
Else '否则根据Cookie合成条件表达式
If e.Cookies.ContainsKey("kxtj") Then
Dim txt As String
txt = "'%" & e.Cookies("kxtj") & "%'"
flt = "客户名称 Like " & txt
End If
If flt > "" Then
flt = flt & " and 经办人 = '" & yh & "'"
End If
End If