我有一个问题,想请给与帮助,谢谢!
该窗口中,左侧为加载树定义的客户列表, 中间上方为客户订单,下方则为订单明细, 根据需要定义中间 PN的下拉列表:
enter 事件:
e.Sender.ComboList = "(All)|" & DataTables("INI_MasterSales").sqlGetComboListString("PartNumber", "ISOLine In (S elect ISOLine From {CustomerPO})","PartNumber")
运行后发现中间的客户订单虽然加载树仅显示需要的订单行, 但PN的下拉列表实际却显示了隐藏的所有订单的PartNumber, 而我实际只想用 被显示出来的订单行对应的零件号.
我用datatables("CustomerPO").LoadFilter = "" ; datatables("CustomerPO").Load 验证了确实被隐藏了, 而不是仅加载了加载树点击的客户名称
我将语句改为下面的方式进行:
Dim SOs As String = DataTables("CustomerPO").GetComboListString("ISOLine")
If SOs > "" Then
SOs = "('" & SOs & "')"
End If
MessageBox.Show(SOs)
e.Sender.ComboList = "(All)|" & DataTables("INI_MasterSales").sqlGetComboListString("PartNumber", "ISOLine In " & SOs , "PartNumber")
运行能正常, 但在点击PN 下拉列表后却很慢
所以想了解一下如何处理, 谢谢!
[此贴子已经被作者于2024/11/3 9:29:37编辑过]
enter 事件:
Dim f as string = "ISOLine In (Select ISOLine From {CustomerPO} 【0】)"
if DataTables("CustomerPO").LoadFilter > "" then
f = f.replace("【0】"," where " & DataTables("CustomerPO").LoadFilter)
else
f = f.replace("【0】","")
end if
e.Sender.ComboList = "(All)|" & DataTables("INI_MasterSales").sqlGetComboListString("PartNumber",f ,"PartNumber")
学会调试
Dim f As String = DataTables("CustomerPO").LoadFilter
msgbox(f)
FL = "ISOLine in (seLect ISOLine from {CustomerPO} where " & f & ")"
msgbox(FL)