diff --git a/SanPinPLM/相关操作/4.0-other/999.Delphi脚本记录.md b/SanPinPLM/相关操作/4.0-other/999.Delphi脚本记录.md index 55fb5e27..4ed12f69 100644 --- a/SanPinPLM/相关操作/4.0-other/999.Delphi脚本记录.md +++ b/SanPinPLM/相关操作/4.0-other/999.Delphi脚本记录.md @@ -622,6 +622,8 @@ end. ## 根据输入内容在数据库中查询,获取查询结果作为下拉列表以供选择 +根据在 `fedtusr_sqlmj` 控件中输入的内容, + ```delphi uses MyClass,Variables,BaseUtil,CommonFunc,DataConst,CFFrm,CFSimplePropFrm,Forms,StdCtrls,Variants,SysUtils,Classes,Controls,Dialogs, CHostIntf,ProductClas,DocClas,LoginClas,VirtualTrees,CEntClas,PathClas; @@ -635,13 +637,12 @@ begin 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); + chiFillComboBox('select distinct top 10 usr_sqlmj from pdmitem where usr_sqlmj like ''%' + str + '%''',fedtusr_sqlmj); end else begin - chiFillComboBox('select ''''',fedtusr_sqlzc); + chiFillComboBox('select ''''',fedtusr_sqlmj); end; end; end. - ``` \ No newline at end of file