以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  [求助] 按钮可以调用点击效果  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=90151)

--  作者:2900819580
--  发布时间:2016/9/6 16:18:00
--  [求助] 按钮可以调用点击效果
按钮可以调用点击效果,ComboBox 控件,怎么调用它的Click Doubleclick 和textchange命令

Dim btn As WinForm.Button = e.Form.Controls("But明细筛选")
Dim dd As WinForm.ComboBox = e.Form.Controls("订单编号")
btn.PerformClick



--  作者:狐狸爸爸
--  发布时间:2016/9/6 17:02:00
--  
只有click事件可以直接调用,其他不可以。
你可以考虑做成自定义函数:
http://www.foxtable.com/webhelp/scr/1486.htm


--  作者:2900819580
--  发布时间:2016/9/6 17:25:00
--  
这样的代码怎么改自定义函数。。。。。。。

Dim dt As DataTable = DataTables("订单明细")
Dim dd As WinForm.ComboBox = e.Form.Controls("订单编号")
Dim bp As WinForm.ComboBox = e.Form.Controls("客户品牌")
Dim cb As WinForm.ComboBox = e.Form.Controls("产品型号")
Dim gg As WinForm.ComboBox = e.Form.Controls("产品规格")

Dim gb As WinForm.CheckBox = e.Form.Controls("ChK关闭")
Dim cs As WinForm.CheckBox = e.Form.Controls("ChK取消")
Dim wc As WinForm.CheckBox = e.Form.Controls("ChK完成")
Dim fi As String = "完成 = " & wc.Checked & " and 关闭 = " & gb.Checked & " and 取消 = " & cs.Checked
Dim tb As Table = Tables("排产汇总_Tab订单明细")

\'If dd.Text > "" Then fi = fi & " and " & "订单编号 like \'%" & dd.Text & "%\'"
If bp.Text > "" Then fi = fi & " and " & "客户品牌 like \'%" & bp.Text & "%\'"
If cb.text > "" Then fi = fi & " and " & "产品名称 like \'%" & cb.text & "%\'"
If gg.Text > "" Then fi = fi & " and " & "产品规格 like \'%" & gg.text & "%\'"

dd.ComboList = dt.GetComboListString("订单编号",fi)

--  作者:有点蓝
--  发布时间:2016/9/6 17:43:00
--  
dim e = Args(0)
Dim dt As DataTable = DataTables("订单明细")
Dim dd As WinForm.ComboBox = e.Form.Controls("订单编号")
Dim bp As WinForm.ComboBox = e.Form.Controls("客户品牌")
Dim cb As WinForm.ComboBox = e.Form.Controls("产品型号")
Dim gg As WinForm.ComboBox = e.Form.Controls("产品规格")

Dim gb As WinForm.CheckBox = e.Form.Controls("ChK关闭")
Dim cs As WinForm.CheckBox = e.Form.Controls("ChK取消")
Dim wc As WinForm.CheckBox = e.Form.Controls("ChK完成")
Dim fi As String = "完成 = " & wc.Checked & " and 关闭 = " & gb.Checked & " and 取消 = " & cs.Checked
Dim tb As Table = Tables("排产汇总_Tab订单明细")

\'If dd.Text > "" Then fi = fi & " and " & "订单编号 like \'%" & dd.Text & "%\'"
If bp.Text > "" Then fi = fi & " and " & "客户品牌 like \'%" & bp.Text & "%\'"
If cb.text > "" Then fi = fi & " and " & "产品名称 like \'%" & cb.text & "%\'"
If gg.Text > "" Then fi = fi & " and " & "产品规格 like \'%" & gg.text & "%\'"

dd.ComboList = dt.GetComboListString("订单编号",fi)

调用
Functions.Execute("xx函数名",e)