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

Comparing ibx/trunk/examples/dbcontrolgrid/unit1.pas (file contents):
Revision 23 by tony, Fri Mar 13 10:26:52 2015 UTC vs.
Revision 143 by tony, Fri Feb 23 12:11:21 2018 UTC

# Line 1 | Line 1
1 + (*
2 + *  IBX For Lazarus (Firebird Express)
3 + *
4 + *  The contents of this file are subject to the Initial Developer's
5 + *  Public License Version 1.0 (the "License"); you may not use this
6 + *  file except in compliance with the License. You may obtain a copy
7 + *  of the License here:
8 + *
9 + *    http://www.firebirdsql.org/index.php?op=doc&id=idpl
10 + *
11 + *  Software distributed under the License is distributed on an "AS
12 + *  IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
13 + *  implied. See the License for the specific language governing rights
14 + *  and limitations under the License.
15 + *
16 + *  The Initial Developer of the Original Code is Tony Whyman.
17 + *
18 + *  The Original Code is (C) 2015 Tony Whyman, MWA Software
19 + *  (http://www.mwasoftware.co.uk).
20 + *
21 + *  All Rights Reserved.
22 + *
23 + *  Contributor(s): ______________________________________.
24 + *
25 + *)
26 +            
27   unit Unit1;
28  
29   {$mode objfpc}{$H+}
# Line 128 | Line 154 | implementation
154  
155   uses IB, Unit2, Unit4, Unit5;
156  
157 + const sNoName = '<no name>';
158 +
159   function ExtractDBException(msg: string): string;
160   var Lines: TStringList;
161   begin
# Line 294 | Line 322 | begin
322    EmployeesJOB_CODE.AsString := 'SRep';
323    EmployeesJOB_GRADE.AsInteger := 4;
324    EmployeesSALARY.AsCurrency := 20000;
325 <  EmployeesFIRST_NAME.AsString := '<no name>';
326 <  EmployeesLAST_NAME.AsString := '<no name>';
325 >  EmployeesFIRST_NAME.AsString := sNoName;
326 >  EmployeesLAST_NAME.AsString := sNoName;
327    EmployeesHIRE_DATE.AsDateTime := now;
328    EmployeesDEPT_NO.AsString := '000';
329    FDirty := true;
# Line 309 | Line 337 | end;
337  
338   procedure TForm1.EmployeesBeforeClose(DataSet: TDataSet);
339   begin
312  with DataSet do
313    if State in [dsInsert,dsEdit] then
314    try
315     Post;
316    except
317      Cancel;
318      raise;
319    end;
340    TotalsQuery.Active := false
341   end;
342  
# Line 368 | Line 388 | begin
388       MessageDlg(E.Message,mtError,[mbOK],0);
389      end;
390    until IBDatabase1.Connected;
391 <  Reopen(0);
391 >  Application.QueueAsyncCall(@Reopen,0);
392   end;
393  
394   procedure TForm1.EmployeesAfterDelete(DataSet: TDataSet);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines