Dim nr As WinForm.TextBox = e.Form.Controls("查询内容")
Dim xzl As WinForm.ComboBox = e.Form.Controls("选择列")
Dim je As WinForm.TextBox = e.Form.Controls("金额")
Dim d As WinForm.Label = e.Form.Controls("Label1")
Dim f As Table = Tables("主窗口_子窗体")
Dim b As Table = Tables("主窗口_子窗口2")
Dim shcx As WinForm.ComboBox = e.Form.Controls("审核查询")
f.DataTable.Load
If e.Sender.Text > "" Then
If xzl.Value = "全部" And shcx.Value = "全部" Then
f.Filter =""
Else If xzl.Value = "全部" And shcx.Value = "已审核" Then
f.Filter = " 审核状态 = true "
Else If xzl.Value = "全部" And shcx.Value = "未审核" Then
f.Filter = " 审核状态 = false "
Else If xzl.Value <> "全部" And xzl.Value <> "日期" And shcx.Value = "全部" Then
f.Filter = "" & xzl.Value & " Like '*" & nr.Value & "*'"
Else If xzl.Value <> "全部" And xzl.Value <> "日期" And shcx.Value = "已审核" Then
f.Filter = "" & xzl.Value & " Like '*" & nr.Value & "*' and 审核状态 = True "
Else If xzl.Value <> "全部" And xzl.Value <> "日期" And shcx.Value = "未审核" Then
f.Filter = "" & xzl.Value & " Like '*" & nr.Value & "*' and 审核状态 = false "
Else If xzl.Value = "日期" And shcx.Value = "未审核" Then
f.Filter = "Convert(" & xzl.Value & ",'System.String') like '%" & nr.Value & "%' And 审核状态 = False "
Else If xzl.Value = "日期" And shcx.Value = "已审核" Then
f.Filter = "Convert(" & xzl.Value & ",'System.String') like '%" & nr.Value & "%' And 审核状态 = True "
Else If xzl.Value = "日期" And shcx.Value = "全部" Then
f.Filter = "Convert(" & xzl.Value & ",'System.String') like '%" & nr.Value & "%'"
End If
Tables("主窗口_子窗体").AutoSizeCols()
End If