From 30244b7dcd4c587fd533b38694d0ee98b0e0f418 Mon Sep 17 00:00:00 2001 From: sgwp <63001967@qq.com> Date: Mon, 10 Feb 2025 10:14:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=96=B0=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Dp10RepoV1/public10/ThreeFun/Fun/U_RTFun.pas | 35 +++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/Delphi10/开发档案/Dp10RepoV1/public10/ThreeFun/Fun/U_RTFun.pas b/Delphi10/开发档案/Dp10RepoV1/public10/ThreeFun/Fun/U_RTFun.pas index d3f6193..59ad2c6 100644 --- a/Delphi10/开发档案/Dp10RepoV1/public10/ThreeFun/Fun/U_RTFun.pas +++ b/Delphi10/开发档案/Dp10RepoV1/public10/ThreeFun/Fun/U_RTFun.pas @@ -206,8 +206,7 @@ procedure HiddenTVColumn(Tv1: TcxGridDBTableView; FieldName: string); // procedure CopyTVFocusValue(Tv1: TcxGridDBTableView); // TV - - +function getConfigValue(DllName: string; ConfigName: string; ADOQueryTmp: TADOQuery):Variant; // **************** ҳ *****************// procedure GetHTTP(FUrl: string); @@ -3887,6 +3886,38 @@ begin end; end; +////////////////////////////////// +function getConfigValue(DllName: string; ConfigName: string; ADOQueryTmp: TADOQuery):Variant; +begin + Result:=null; + with ADOQueryTmp do + begin + Close; + sql.Clear; + sql.Add('select item_value,data_type from sy_module_param_set where dll_name=''' + + Trim(DllName) + ''' and config_name=''' + Trim(ConfigName) + ''''); + Open; + if RecordCount > 0 then + begin + if Trim(FieldByName('data_type').AsString)='' then + begin + Result:=StrToFloatDef(Trim(FieldByName('item_value').AsString),0); + end + else if Trim(FieldByName('data_type').AsString)='' then + begin + Result:=False; + if lowercase(Trim(FieldByName('item_value').AsString))='true' then + begin + Result:=True; + end; + end + else + begin + Result:=Trim(FieldByName('item_value').AsString); + end; + end; + end; +end; end.