-- 作者:yankunhao
-- 发布时间:2012/7/7 8:48:00
-- 关于查询表的动态加载问题
在查询表中设计一个查询订单的窗口,其中有个按钮的代码如下:
Dim s As String =e.Form.Controls("TextBox1").Value If s = "" Then MessageBox.Show("你还未输入任何关于订单号的相关字符,请重新输入!","提示",MessageBoxButtons.OK) Else Dim Values() As String Dim ids As String Values = s.split(",") If Values.Length=1 Then ids = "%" & s & "%" DataTables("销售订单查询").LoadFilter = "sheet_no like \'" & ids & "\'" DataTables("销售订单查询").Load() e.Form.Close Else For Index As Integer = 0 To Values.Length - 1 ids=ids & "," & values(Index) Next ids= ids.Trim(",") DataTables("销售订单查询").LoadFilter = "{osal_ord1}.[sheet_no] In (" & ids & ")" DataTables("销售订单查询").Load() e.Form.Close End If End If
|