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) |
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} |
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); |