ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/trunk/design/IBDBReg.pas
(Generate patch)

Comparing ibx/trunk/design/IBDBReg.pas (file contents):
Revision 125 by tony, Thu Jan 18 14:37:40 2018 UTC vs.
Revision 126 by tony, Mon Jan 22 16:21:31 2018 UTC

# Line 322 | Line 322 | type
322      procedure Edit; override;
323    end;
324  
325 +  { TIBUpdateRefreshSQLProperty }
326 +
327 +  TIBUpdateRefreshSQLProperty = class(TSQLPropertyEditor)
328 +  protected
329 +    FIBUpdate: TIBUpdate;
330 +    FDatabase: TIBDatabase;
331 +    function GetObjects: boolean;
332 +  public
333 +    procedure Edit; override;
334 +  end;
335 +
336 +
337   { TIBEventListProperty }
338  
339    TIBEventListProperty = class(TClassProperty)
# Line 461 | Line 473 | begin
473    RegisterPropertyEditor(TypeInfo(TStrings), TIBUpdateSQL, 'ModifySQL', TIBUpdateSQLUpdateProperty); {do not localize}
474    RegisterPropertyEditor(TypeInfo(TStrings), TIBUpdateSQL, 'InsertSQL', TIBUpdateSQLInsertSQLProperty); {do not localize}
475    RegisterPropertyEditor(TypeInfo(TStrings), TIBUpdateSQL, 'DeleteSQL', TIBUpdateSQLDeleteProperty); {do not localize}
476 +  RegisterPropertyEditor(TypeInfo(TStrings), TIBUpdate, 'RefreshSQL', TIBUpdateRefreshSQLProperty); {do not localize}
477    RegisterPropertyEditor(TypeInfo(TStrings), TIBEvents, 'Events', TIBEventListProperty); {do not localize}
478    RegisterPropertyEditor(TypeInfo(TPersistent), TIBDataSet, 'GeneratorField', TIBGeneratorProperty);  {do not localize}
479    RegisterPropertyEditor(TypeInfo(TPersistent), TIBQuery, 'GeneratorField', TIBGeneratorProperty);  {do not localize}
# Line 512 | Line 525 | begin
525    end;
526   end;
527  
528 + { TIBUpdateRefreshSQLProperty }
529 +
530 + function TIBUpdateRefreshSQLProperty.GetObjects: boolean;
531 + begin
532 +  Result := false;
533 +  FIBUpdate := GetComponent(0) as TIBUpdate;
534 +  if not assigned(FIBUpdate) or not assigned(FIBUpdate.DataSet) then
535 +    Exit;
536 +  FDatabase := nil;
537 +  if FIBUpdate.DataSet is TIBQuery then
538 +  begin
539 +    FDatabase := (FIBUpdate.DataSet as TIBQuery).Database;
540 +    Result := true
541 +  end;
542 + end;
543 +
544 + procedure TIBUpdateRefreshSQLProperty.Edit;
545 + begin
546 +  GetObjects;
547 +  if IBRefreshSQLEditor.EditSQL(FIBUpdate.DataSet,FIBUpdate.RefreshSQL) then Modified;
548 + end;
549 +
550   { TIBPackageNameProperty }
551  
552   procedure TIBPackageNameProperty.GetValues(Proc: TGetStrProc);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines