增加新方法

This commit is contained in:
sgwp 2025-02-10 10:14:42 +08:00
parent 790aa62240
commit 30244b7dcd

View File

@ -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.