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

Comparing ibx/trunk/design/ibdataseteditor.pas (file contents):
Revision 80 by tony, Mon Jan 1 11:31:07 2018 UTC vs.
Revision 380 by tony, Mon Jan 10 10:13:17 2022 UTC

# Line 33 | Line 33 | interface
33   uses
34    Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls,
35    StdCtrls, ExtCtrls, IBSQLEditFrame, IBCustomDataSet,
36 <  IBDatabase, IBLookupComboEditBox, IBDynamicGrid, Types;
36 >  IBDatabase, IBLookupComboEditBox, IBDynamicGrid;
37  
38   type
39  
# Line 44 | Line 44 | type
44      GenerateParams: TCheckBox;
45      IBSQLEditFrame1: TIBSQLEditFrame;
46      IncludeSysTables: TCheckBox;
47 +    Label5: TLabel;
48 +    Label6: TLabel;
49      PrimaryKeysGrid: TIBDynamicGrid;
50 +    IdentityGrid: TIBDynamicGrid;
51 +    ReadOnlyGrid: TIBDynamicGrid;
52      SelectSelectAll: TCheckBox;
53      SelectTableNames: TIBLookupComboEditBox;
54      TestBtn: TButton;
# Line 118 | Line 122 | begin
122        GenerateParams.Checked := DataSet.GenerateParamNames;
123      end;
124      FDataSet := DataSet;
125 +    with IBSQLEditFrame1 do
126 +    begin
127 +      IncludeReadOnlyFields := false;
128 +    end;
129      Result := ShowModal = mrOK;
130      if Result and assigned(DataSet) then
131        DataSet.GenerateParamNames := GenerateParams.Checked
# Line 130 | Line 138 | end;
138   { TIBDataSetEditorForm }
139  
140   procedure TIBDataSetEditorForm.FormShow(Sender: TObject);
133 var TableName: string;
141   begin
142    PageControl.ActivePage := FieldsPage;
143    FModifySQL.Assign(FDataSet.ModifySQL);
# Line 141 | Line 148 | begin
148    GenerateButton.Enabled := (IBSQLEditFrame1.Database <> nil) and IBSQLEditFrame1.Database.Connected;
149    TestBtn.Enabled := (IBSQLEditFrame1.Database <> nil) and IBSQLEditFrame1.Database.Connected;
150    FCurrentStatement := -1;
151 <  IBSQLEditFrame1.UserTables.Active := true;
152 <  IBSQLEditFrame1.SyncQueryBuilder(FSelectSQL);
151 >  if (IBSQLEditFrame1.Database <> nil) and IBSQLEditFrame1.Database.Connected then
152 >  begin
153 >    IBSQLEditFrame1.UserTables.Active := true;
154 >    IBSQLEditFrame1.SyncQueryBuilder(FSelectSQL);
155 >  end;
156   end;
157  
158   procedure TIBDataSetEditorForm.FormClose(Sender: TObject;
# Line 176 | Line 186 | end;
186  
187   procedure TIBDataSetEditorForm.GenerateButtonClick(Sender: TObject);
188   begin
189 <  IBSQLEditFrame1.GenerateSelectSQL(QuoteFields.Checked,FSelectSQL);
190 <  IBSQLEditFrame1.GenerateRefreshSQL(QuoteFields.Checked,FRefreshSQL);
189 >  IBSQLEditFrame1.GenerateSelectSQL(QuoteFields.Checked,FSelectSQL,true);
190 >  IBSQLEditFrame1.GenerateRefreshSQL(QuoteFields.Checked,FRefreshSQL,true);
191    IBSQLEditFrame1.GenerateDeleteSQL(QuoteFields.Checked,FDeleteSQL);
192    IBSQLEditFrame1.GenerateInsertSQL(QuoteFields.Checked,FInsertSQL);
193 <  IBSQLEditFrame1.GenerateModifySQL(QuoteFields.Checked,FModifySQL, not IncludePrimaryKeys.Checked);
193 >  IBSQLEditFrame1.GenerateModifySQL(QuoteFields.Checked,FModifySQL, IncludePrimaryKeys.Checked);
194    FDirty := false;
195    PageControl.ActivePage := SQLPage;
196   end;
# Line 248 | Line 258 | begin
258        FieldNamesGrid.DataSource := IBSQLEditFrame1.FieldsSource;
259      if PrimaryKeysGrid <> nil then
260        PrimaryKeysGrid.DataSource := IBSQLEditFrame1.PrimaryKeySource;
261 +    if IdentityGrid <> nil then
262 +      IdentityGrid.DataSource := IBSQLEditFrame1.IdentityColsSource;
263 +    if ReadOnlyGrid <> nil then
264 +      ReadOnlyGrid.DataSource := IBSQLEditFrame1.ReadOnlyFieldsSource;
265    end;
266   end;
267  

Comparing ibx/trunk/design/ibdataseteditor.pas (property svn:eol-style):
Revision 80 by tony, Mon Jan 1 11:31:07 2018 UTC vs.
Revision 380 by tony, Mon Jan 10 10:13:17 2022 UTC

# Line 0 | Line 1
1 + native

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines