vault backup: 2025-07-10 10:36:55
This commit is contained in:
@ -622,3 +622,26 @@ end.
|
||||
|
||||
## 根据输入内容在数据库中查询,获取查询结果作为下拉列表以供选择
|
||||
|
||||
```delphi
|
||||
uses MyClass,Variables,BaseUtil,CommonFunc,DataConst,CFFrm,CFSimplePropFrm,Forms,StdCtrls,Variants,SysUtils,Classes,Controls,Dialogs,
|
||||
CHostIntf,ProductClas,DocClas,LoginClas,VirtualTrees,CEntClas,PathClas;
|
||||
var
|
||||
str:string;
|
||||
begin
|
||||
|
||||
//注释:在下面添加您的脚本代码
|
||||
str := fedtusr_sqlmj.Text;
|
||||
if Length(str) > 0 then
|
||||
begin
|
||||
if Length(chiGetFieldValueBySql('select top 1 usr_sqlmj from pdmitem where usr_sqlmj like ''%' + str + '%''')) > 0 then
|
||||
begin
|
||||
chiFillComboBox('select distinct top 10 usr_sqlmj from pdmitem where usr_sqlmj like ''%' + str + '%''',fedtusr_sqlzc);
|
||||
end
|
||||
else
|
||||
begin
|
||||
chiFillComboBox('select ''''',fedtusr_sqlzc);
|
||||
end;
|
||||
end;
|
||||
end.
|
||||
|
||||
```
|
Reference in New Issue
Block a user