更新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 implementation
uses uses
U_DataLink; U_DataLink,U_globalVar;
/// ///////////////////////////////////////// /// /////////////////////////////////////////
@ -2639,13 +2639,19 @@ var
mGridName: string; mGridName: string;
mfromName: string; mfromName: string;
mcxGridDbColumn1: TcxGridDbColumn; mcxGridDbColumn1: TcxGridDbColumn;
mDir:stromg'
i: integer; i: integer;
begin begin
// mFileName := ExtractFilePath(application.ExeName) + 'Layout\' + filePack + '\' + Trim(fileName) + '.dbg'; if gGridNativeSet then
// 从布局文件中恢复 begin
//if FileExists(mFileName) then mDir:= ExtractFilePath(application.ExeName) + 'Layout\' + filePack ;
// cxGrid.RestoreFromIniFile(mFileName, false, false); mFileName := mDir + '\' + Trim(fileName) + '.dbg';
//mfromName:=GetParentForm(TControl(cxGrid.GetParentComponent),true).Name; //从布局文件中恢复
if FileExists(mFileName) then
cxGrid.RestoreFromIniFile(mFileName, false, false);
exit;
end ;
mGridName := cxGrid.GetParentComponent.Name + '.' + cxGrid.name; mGridName := cxGrid.GetParentComponent.Name + '.' + cxGrid.name;
try try
@ -2721,10 +2727,15 @@ var
mcxGridDbColumn1: TcxGridDbBandedColumn; mcxGridDbColumn1: TcxGridDbBandedColumn;
i: integer; i: integer;
begin begin
mFileName := ExtractFilePath(application.ExeName) + 'Layout\' + filePack + '\' + Trim(fileName) + '.dbg'; if gGridNativeSet then
// 从布局文件中恢复 begin
//if FileExists(mFileName) then mFileName := ExtractFilePath(application.ExeName) + 'Layout\' + filePack + '\' + Trim(fileName) + '.dbg';
// cxGrid.RestoreFromIniFile(mFileName); // 从布局文件中恢复
if FileExists(mFileName) then
cxGrid.RestoreFromIniFile(mFileName);
exit;
end;
mGridName := cxGrid.GetParentComponent.Name + '.' + cxGrid.name; mGridName := cxGrid.GetParentComponent.Name + '.' + cxGrid.name;
@ -2827,14 +2838,22 @@ var
mADOCmd: TADOQuery; mADOCmd: TADOQuery;
mGridName: string; mGridName: string;
mfromName: string; mfromName: string;
mDir:string;
i: integer; i: integer;
mcurdate: Tdatetime; mcurdate: Tdatetime;
begin 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 if not DirectoryExists(ExtractFileDir(mFileName)) then
CreateDir(ExtractFileDir(mFileName)); CreateDir(ExtractFileDir(mFileName));
// ±£´æΪ²¼¾ÖÎļþ // ±£´æΪ²¼¾ÖÎļþ
cxGrid.StoreToIniFile(mFileName); } cxGrid.StoreToIniFile(mFileName);
mfromName := GetParentForm(TControl(cxGrid.GetParentComponent), true).Name; mfromName := GetParentForm(TControl(cxGrid.GetParentComponent), true).Name;
mGridName := cxGrid.GetParentComponent.Name + '.' + cxGrid.name; mGridName := cxGrid.GetParentComponent.Name + '.' + cxGrid.name;

View File

@ -545,7 +545,15 @@ begin
begin begin
Result := Result + ',@' + mControl.Name + '=' + quotedStr(Trim(TcxComboBox(mControl).Text)) ; 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;
end; end;
if Trim(Result) <> '' then if Trim(Result) <> '' then