83 |
|
procedure GetValues(Proc: TGetStrProc); override; |
84 |
|
end; |
85 |
|
|
86 |
+ |
{ TIBPackageNameProperty |
87 |
+ |
Editor for the TIBStoredProc.PackageName property. Displays a drop-down list of all |
88 |
+ |
the StoredProcedures in the Database.} |
89 |
+ |
TIBPackageNameProperty = class(TIBNameProperty) |
90 |
+ |
public |
91 |
+ |
procedure GetValues(Proc: TGetStrProc); override; |
92 |
+ |
end; |
93 |
+ |
|
94 |
|
{ TIBTableNameProperty |
95 |
|
Editor for the TIBTable.TableName property. Displays a drop-down list of all |
96 |
|
the Tables in the Database.} |
204 |
|
end; |
205 |
|
|
206 |
|
TIBStoredProcParamsProperty = class(TCollectionPropertyEditor) |
199 |
– |
public |
200 |
– |
procedure Edit; override; |
207 |
|
end; |
208 |
|
|
209 |
|
{ TIBTableFieldLinkProperty } |
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) |
454 |
|
RegisterComponents(IBPalette3,[TIBLookupComboEditBox,TIBDynamicGrid,TIBTreeView,TDBControlGrid, TIBArrayGrid]); |
455 |
|
RegisterPropertyEditor(TypeInfo(TIBFileName), TIBDatabase, 'DatabaseName', TIBFileNameProperty); {do not localize} |
456 |
|
RegisterPropertyEditor(TypeInfo(string), TIBStoredProc, 'StoredProcName', TIBStoredProcNameProperty); {do not localize} |
457 |
+ |
RegisterPropertyEditor(TypeInfo(string), TIBStoredProc, 'PackageName', TIBPackageNameProperty); {do not localize} |
458 |
|
RegisterPropertyEditor(TypeInfo(TParams), TIBStoredProc, 'Params', TIBStoredProcParamsProperty); |
459 |
|
RegisterPropertyEditor(TypeInfo(string), TIBTable, 'TableName', TIBTableNameProperty); {do not localize} |
460 |
|
RegisterPropertyEditor(TypeInfo(string), TIBTable, 'IndexName', TIBIndexNameProperty); {do not localize} |
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} |
480 |
+ |
RegisterPropertyEditor(TypeInfo(TPersistent), TIBTable, 'GeneratorField', TIBGeneratorProperty); {do not localize} |
481 |
|
|
482 |
|
RegisterComponentEditor(TIBDatabase, TIBDatabaseEditor); |
483 |
|
RegisterComponentEditor(TIBTransaction, TIBTransactionEditor); |
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); |
553 |
+ |
var |
554 |
+ |
StoredProc : TIBStoredProc; |
555 |
+ |
i : integer; |
556 |
+ |
begin |
557 |
+ |
StoredProc := GetComponent(0) as TIBStoredProc; |
558 |
+ |
if StoredProc.Database = nil then |
559 |
+ |
Exit; |
560 |
+ |
|
561 |
+ |
with StoredProc do |
562 |
+ |
try |
563 |
+ |
for I := 0 to PackageNames.Count - 1 do |
564 |
+ |
Proc (PackageNames[i]); |
565 |
+ |
except on E: Exception do |
566 |
+ |
MessageDlg(E.Message,mtError,[mbOK],0) |
567 |
+ |
end; |
568 |
+ |
end; |
569 |
+ |
|
570 |
|
{ TIBIndexDefsProperty } |
571 |
|
|
572 |
|
procedure TIBIndexDefsProperty.Edit; |
1104 |
|
Result := inherited GetVerbCount + 2; |
1105 |
|
end; |
1106 |
|
|
1044 |
– |
{ TIBStoredProcParamsProperty } |
1045 |
– |
|
1046 |
– |
procedure TIBStoredProcParamsProperty.Edit; |
1047 |
– |
var |
1048 |
– |
StoredProc: TIBStoredProc; |
1049 |
– |
Params: TParams; |
1050 |
– |
begin |
1051 |
– |
StoredProc := (GetComponent(0) as TIBStoredProc); |
1052 |
– |
Params := TParams.Create(nil); |
1053 |
– |
try |
1054 |
– |
StoredProc.CopyParams(Params); |
1055 |
– |
finally |
1056 |
– |
Params.Free; |
1057 |
– |
end; |
1058 |
– |
inherited Edit; |
1059 |
– |
end; |
1060 |
– |
|
1107 |
|
{ TIBTableFieldLinkProperty } |
1108 |
|
|
1109 |
|
procedure TIBTableFieldLinkProperty.Edit; |