更新rt_func

This commit is contained in:
sgwp 2024-10-30 15:34:13 +08:00
parent cdf2c75fd0
commit b0393d0a3b
2 changed files with 40 additions and 13 deletions

View File

@ -237,7 +237,7 @@ var
implementation
uses
U_DataLink;
U_DataLink,U_globalVar;
/// /////////////////////////////////////////
@ -2639,13 +2639,19 @@ var
mGridName: string;
mfromName: string;
mcxGridDbColumn1: TcxGridDbColumn;
mDir:stromg'
i: integer;
begin
// mFileName := ExtractFilePath(application.ExeName) + 'Layout\' + filePack + '\' + Trim(fileName) + '.dbg';
if gGridNativeSet then
begin
mDir:= ExtractFilePath(application.ExeName) + 'Layout\' + filePack ;
mFileName := mDir + '\' + Trim(fileName) + '.dbg';
//从布局文件中恢复
//if FileExists(mFileName) then
// cxGrid.RestoreFromIniFile(mFileName, false, false);
//mfromName:=GetParentForm(TControl(cxGrid.GetParentComponent),true).Name;
if FileExists(mFileName) then
cxGrid.RestoreFromIniFile(mFileName, false, false);
exit;
end ;
mGridName := cxGrid.GetParentComponent.Name + '.' + cxGrid.name;
try
@ -2720,11 +2726,16 @@ var
mfromName: string;
mcxGridDbColumn1: TcxGridDbBandedColumn;
i: integer;
begin
if gGridNativeSet then
begin
mFileName := ExtractFilePath(application.ExeName) + 'Layout\' + filePack + '\' + Trim(fileName) + '.dbg';
// 从布局文件中恢复
//if FileExists(mFileName) then
// cxGrid.RestoreFromIniFile(mFileName);
if FileExists(mFileName) then
cxGrid.RestoreFromIniFile(mFileName);
exit;
end;
mGridName := cxGrid.GetParentComponent.Name + '.' + cxGrid.name;
@ -2827,14 +2838,22 @@ var
mADOCmd: TADOQuery;
mGridName: string;
mfromName: string;
mDir:string;
i: integer;
mcurdate: Tdatetime;
begin
{ mFileName := ExtractFilePath(application.ExeName) + 'Layout\' + filePack + '\' + Trim(fileName) + '.dbg';
mDir:= ExtractFilePath(application.ExeName) + 'Layout\' ;
if not DirectoryExists( mDir) then
begin
CreateDir(pwidechar(mDir));
end;
// mFileName := mDir + '\' + Trim(fileName) + '.dbg';
mFileName := ExtractFilePath(application.ExeName) + 'Layout\' + filePack + '\' + Trim(fileName) + '.dbg';
if not DirectoryExists(ExtractFileDir(mFileName)) then
CreateDir(ExtractFileDir(mFileName));
// 保存为布局文件
cxGrid.StoreToIniFile(mFileName); }
cxGrid.StoreToIniFile(mFileName);
mfromName := GetParentForm(TControl(cxGrid.GetParentComponent), true).Name;
mGridName := cxGrid.GetParentComponent.Name + '.' + cxGrid.name;

View File

@ -545,7 +545,15 @@ begin
begin
Result := Result + ',@' + mControl.Name + '=' + quotedStr(Trim(TcxComboBox(mControl).Text)) ;
end;
end
else if mControl is TcxCheckBox then
begin
if TcxCheckBox(mControl).Checked then
Result := Result + ',@' + mControl.Name + '=1'
else
Result := Result + ',@' + mControl.Name + '=0' ;
end
end;
end;
if Trim(Result) <> '' then