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

Comparing ibx/trunk/design/ibmodifysqleditor.pas (file contents):
Revision 80 by tony, Mon Jan 1 11:31:07 2018 UTC vs.
Revision 209 by tony, Wed Mar 14 12:48:51 2018 UTC

# Line 32 | Line 32 | interface
32  
33   uses
34    Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
35 <  StdCtrls, ComCtrls, ibselectsqleditor, IBSQLEditFrame, IBLookupComboEditBox,
35 >  StdCtrls, ComCtrls, ibselectsqleditor, IBSQLEditFrame,
36    IBDynamicGrid, IBDatabase, IBCustomDataset;
37  
38   type
# Line 41 | Line 41 | type
41  
42    TIBModifySQLEditorForm = class(TIBSelectSQLEditorForm)
43      IncludePrimaryKeys: TCheckBox;
44 +    Label5: TLabel;
45 +    ReadOnlyGrid: TIBDynamicGrid;
46      procedure GenerateBtnClick(Sender: TObject);
45    procedure IncludePrimaryKeysChange(Sender: TObject);
47    private
48  
49 +  protected
50 +    procedure Loaded; override;
51 +
52    public
53  
54    end;
# Line 77 | Line 81 | begin
81      end;
82      with IBSQLEditFrame1 do
83      begin
80      IncludePrimaryKeys := false;
84        IncludeReadOnlyFields := false;
85        ExecuteOnlyProcs := true;
86        SQLText.Lines.Assign(SelectSQL);
# Line 97 | Line 100 | end;
100  
101   { TIBModifySQLEditorForm }
102  
103 < procedure TIBModifySQLEditorForm.IncludePrimaryKeysChange(Sender: TObject);
103 > procedure TIBModifySQLEditorForm.Loaded;
104   begin
105 <  IBSQLEditFrame1.IncludePrimaryKeys := IncludePrimaryKeys.Checked;
105 >  inherited Loaded;
106 >  if IBSQLEditFrame1 <> nil then
107 >  begin
108 >   if ReadOnlyGrid <> nil then
109 >     ReadOnlyGrid.DataSource := IBSQLEditFrame1.ReadOnlyFieldsSource;
110 >  end;
111   end;
112  
113   procedure TIBModifySQLEditorForm.GenerateBtnClick(Sender: TObject);
# Line 107 | Line 115 | begin
115    if PageControl.ActivePage = ExecutePage then
116      IBSQLEditFrame1.GenerateExecuteSQL(QuoteFields.Checked)
117    else
118 <    IBSQLEditFrame1.GenerateModifySQL(QuoteFields.Checked);
118 >    IBSQLEditFrame1.GenerateModifySQL(QuoteFields.Checked,IncludePrimaryKeys.Checked);
119   end;
120  
121  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines