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

Comparing ibx/trunk/examples/employee/unit2.lfm (file contents):
Revision 20 by tony, Sun Aug 5 18:28:19 2012 UTC vs.
Revision 21 by tony, Thu Feb 26 10:33:34 2015 UTC

# Line 1 | Line 1
1 < object EditEmployeeDlg: TEditEmployeeDlg
2 <  Left = 1325
3 <  Height = 397
4 <  Top = 347
5 <  Width = 395
6 <  Caption = 'Edit Employee Details'
7 <  ClientHeight = 397
8 <  ClientWidth = 395
1 > object SelectDeptDlg: TSelectDeptDlg
2 >  Left = 677
3 >  Height = 449
4 >  Top = 296
5 >  Width = 485
6 >  BorderStyle = bsDialog
7 >  Caption = 'Select Department'
8 >  ClientHeight = 449
9 >  ClientWidth = 485
10    OnClose = FormClose
11    OnShow = FormShow
12 <  LCLVersion = '0.9.30'
12 >  LCLVersion = '1.2.6.0'
13    object Label1: TLabel
14 <    Left = 20
15 <    Height = 18
16 <    Top = 25
16 <    Width = 72
17 <    Caption = 'First Name'
18 <    ParentColor = False
19 <  end
20 <  object DBEdit1: TDBEdit
21 <    Left = 20
22 <    Height = 27
23 <    Top = 45
24 <    Width = 194
25 <    DataField = 'FIRST_NAME'
26 <    DataSource = Datasource1
27 <    CharCase = ecNormal
28 <    MaxLength = 0
29 <    TabOrder = 0
30 <  end
31 <  object Label2: TLabel
32 <    Left = 20
33 <    Height = 18
34 <    Top = 96
35 <    Width = 71
36 <    Caption = 'Last Name'
37 <    ParentColor = False
38 <  end
39 <  object Label3: TLabel
40 <    Left = 248
41 <    Height = 18
42 <    Top = 25
43 <    Width = 92
44 <    Caption = 'Employee No.'
45 <    ParentColor = False
46 <  end
47 <  object Label4: TLabel
48 <    Left = 20
49 <    Height = 18
50 <    Top = 168
51 <    Width = 83
52 <    Caption = 'Date Started'
53 <    ParentColor = False
54 <  end
55 <  object Label5: TLabel
56 <    Left = 248
57 <    Height = 18
58 <    Top = 168
59 <    Width = 42
60 <    Caption = 'Salary'
61 <    ParentColor = False
62 <  end
63 <  object Label6: TLabel
64 <    Left = 20
65 <    Height = 18
66 <    Top = 240
14 >    Left = 16
15 >    Height = 15
16 >    Top = 16
17      Width = 79
18 <    Caption = 'Department'
18 >    Caption = 'Departments'
19      ParentColor = False
20    end
21 <  object DBEdit2: TDBEdit
22 <    Left = 20
23 <    Height = 27
24 <    Top = 120
25 <    Width = 194
26 <    DataField = 'LAST_NAME'
27 <    DataSource = Datasource1
28 <    CharCase = ecNormal
29 <    MaxLength = 0
80 <    TabOrder = 1
81 <  end
82 <  object DBEdit4: TDBEdit
83 <    Left = 248
84 <    Height = 27
85 <    Top = 45
86 <    Width = 80
87 <    DataField = 'EMP_NO'
88 <    DataSource = Datasource1
89 <    CharCase = ecNormal
90 <    MaxLength = 0
91 <    TabOrder = 2
92 <  end
93 <  object DBLookupComboBox1: TDBLookupComboBox
94 <    Left = 20
95 <    Height = 29
96 <    Top = 259
97 <    Width = 189
98 <    DataField = 'DEPT_NO'
99 <    DataSource = Datasource1
21 >  object DeptsTreeView: TIBTreeView
22 >    Left = 19
23 >    Height = 399
24 >    Top = 37
25 >    Width = 359
26 >    TextField = 'DEPARTMENT'
27 >    DataSource = DataSource1
28 >    DefaultItemHeight = 18
29 >    HasChildField = 'CHILDCOUNT'
30      KeyField = 'DEPT_NO'
31 <    ListField = 'DEPARTMENT'
32 <    ListFieldIndex = 0
33 <    ListSource = Datasource2
34 <    LookupCache = False
35 <    NullValueKey = 16430
36 <    TabOrder = 3
107 <  end
108 <  object DBEdit5: TDBEdit
109 <    Left = 248
110 <    Height = 27
111 <    Top = 188
112 <    Width = 96
113 <    DataField = 'SALARY'
114 <    DataSource = Datasource1
115 <    CharCase = ecNormal
116 <    MaxLength = 0
117 <    TabOrder = 4
118 <  end
119 <  object DateEdit1: TDateEdit
120 <    Left = 20
121 <    Height = 27
122 <    Top = 188
123 <    Width = 104
124 <    CalendarDisplaySettings = [dsShowHeadings, dsShowDayNames]
125 <    OKCaption = 'OK'
126 <    CancelCaption = 'Cancel'
127 <    DateOrder = doNone
128 <    ButtonWidth = 23
129 <    CharCase = ecNormal
130 <    Glyph.Data = {
131 <      36040000424D3604000000000000360000002800000010000000100000000100
132 <      2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
133 <      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
134 <      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00D69E
135 <      72C4D3996EF4D19668FFCE9263FFCB8E5EFFC98A5BFFC78756FFC38452FFC384
136 <      52FFC38452FFC38452FFC38452FFC38452FFBB7742B0FFFFFF00FFFFFF00D7A1
137 <      75FFF8F2EDFFF7F0EAFFF6EDE6FFF4EAE2FFF3E7DEFFF1E4DBFFF0E2D8FFEAD6
138 <      C8FFF2E5DCFFFAF4F1FFF9F3F0FFFAF5F2FFC58A5DFDFFFFFF00FFFFFF00D9A4
139 <      7AFFF9F3EEFFEBD2BEFFFFFFFFFFEBD3BFFFFFFFFFFFEBD3C0FFFFFFFFFFEAC7
140 <      ADFFECD9CDFFF1E4DBFFF9F3F0FFF9F2EFFFC68C5FFFFFFFFF00FFFFFF00DDA8
141 <      7EFFF9F3EFFFEBD0BAFFEBD0BBFF75B57AFF75B57AFF75B57AFFEBD1BDFFEACD
142 <      B5FFFAF4F0FFEBD9CCFFF1E4DBFFFAF4F1FFC68A5CFFFFFFFF00FFFFFF00DFAA
143 <      82FFF9F3EFFFEACEB7FFFFFFFFFF75B57AFF94D49BFF74B579FFFFFFFFFFEACF
144 <      BAFFFBF6F2FFFAF3F0FFEBD8CBFFF2E6DDFFC88D5FFFFFFFFF00FFFFFF00E1AE
145 <      87FFFAF4F0FFEACBB2FFEACCB3FF75B57AFF74B579FF73B478FFEACEB7FF70B3
146 <      75FF6FB274FF6EB172FFE8C8AEFFEAD7C9FFC48654FFFFFFFF00FFFFFF00E3B1
147 <      8CFFFAF6F1FFEAC9AEFFFFFFFFFFEAC9B0FFFFFFFFFFE9CBB3FFFFFFFFFF6FB1
148 <      73FF8ED295FF6BAF6FFFFFFFFFFFF1E5DBFFC68655FFFFFFFF00FFFFFF00E5B4
149 <      8FFFFAF6F2FFE9C6AAFFE9C6ACFFEAC7ACFFE9C7ADFFE9C9AEFFE9C9B0FF6CB0
150 <      71FF6AAF6EFF68AD6DFFE8CCB5FFF2E7DEFFC88A59FFFFFFFF00FFFFFF00E7B7
151 <      94FFFBF7F4FFE9C3A6FFFFFFFFFFE8C4A9FFFFFFFFFFE9C6AAFFFFFFFFFFE8C7
152 <      ACFFFFFFFFFFE8C8B0FFFFFFFFFFF7F1EBFFCB8F5FFFFFFFFF00FFFFFF00E9BA
153 <      98FFFBF7F4FF65A4FFFF64A3FFFF62A2FFFF61A1FFFF5F9FFFFF5C9DFFFF5A9A
154 <      FFFF5798FFFF5495FFFF5294FFFFFBF7F4FFCE9364FFFFFFFF00FFFFFF00EBBD
155 <      9BFFFBF7F4FF64A4FFFF79BDFFFF75BBFFFF71B9FFFF6DB8FFFF68B3FFFF61B0
156 <      FFFF5AABFFFF54A7FFFF3B7DFFFFFBF7F4FFD1976AFFFFFFFF00FFFFFF00ECBF
157 <      9EFFFBF7F4FF65A4FFFF64A3FFFF60A0FFFF5D9EFFFF5899FFFF5496FFFF4D90
158 <      FFFF478BFFFF4284FFFF3D7FFFFFFBF7F4FFD49B6FFFFFFFFF00FFFFFF00EEC1
159 <      A1EBFBF7F4FFFBF7F4FFFBF7F4FFFBF7F4FFFBF7F4FFFBF7F4FFFBF7F4FFFBF7
160 <      F4FFFBF7F4FFFBF7F4FFFBF7F4FFFBF7F4FFD7A074F8FFFFFF00FFFFFF00EFC2
161 <      A37EEFC1A2E3EDC09FFFEBBE9DFFEBBC9AFFE9BA96FFE7B793FFE6B590FFE4B2
162 <      8CFFE2AF88FFE0AC84FFDDA980FFDCA57DFFDAA37ACAFFFFFF00FFFFFF00FFFF
163 <      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
164 <      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
165 <    }
166 <    NumGlyphs = 0
167 <    MaxLength = 0
168 <    OnChange = DateEdit1Change
169 <    TabOrder = 5
31 >    ParentField = 'HEAD_DEPT'
32 >    ReadOnly = True
33 >    RelationName = 'A'
34 >    TabOrder = 0
35 >    OnDblClick = DeptsTreeViewDblClick
36 >    Options = [tvoAutoItemHeight, tvoHideSelection, tvoKeepCollapsedNodes, tvoReadOnly, tvoShowButtons, tvoShowLines, tvoShowRoot, tvoToolTips, tvoThemedDraw]
37    end
38    object Button1: TButton
39 <    Left = 113
40 <    Height = 25
41 <    Top = 368
39 >    Left = 394
40 >    Height = 30
41 >    Top = 37
42      Width = 75
43      Caption = 'OK'
44      Default = True
45      ModalResult = 1
46 <    TabOrder = 6
46 >    TabOrder = 1
47    end
48    object Button2: TButton
49 <    Left = 208
50 <    Height = 25
51 <    Top = 368
49 >    Left = 394
50 >    Height = 30
51 >    Top = 72
52      Width = 75
53      Cancel = True
54      Caption = 'Cancel'
55      ModalResult = 2
56 <    TabOrder = 7
190 <  end
191 <  object Label8: TLabel
192 <    Left = 20
193 <    Height = 18
194 <    Top = 304
195 <    Width = 52
196 <    Caption = 'Country'
197 <    ParentColor = False
198 <  end
199 <  object DBLookupComboBox3: TDBLookupComboBox
200 <    Left = 21
201 <    Height = 29
202 <    Top = 321
203 <    Width = 188
204 <    DataField = 'JOB_COUNTRY'
205 <    DataSource = Datasource1
206 <    KeyField = 'COUNTRY'
207 <    ListField = 'COUNTRY'
208 <    ListFieldIndex = 0
209 <    ListSource = Datasource4
210 <    LookupCache = False
211 <    TabOrder = 8
212 <  end
213 <  object IBDataSet1: TIBDataSet
214 <    Database = Form1.IBDatabase1
215 <    Transaction = Form1.IBTransaction1
216 <    AfterClose = IBDataSet1AfterClose
217 <    AfterInsert = IBDataSet1AfterInsert
218 <    AfterRefresh = IBDataSet1AfterScroll
219 <    AfterScroll = IBDataSet1AfterScroll
220 <    BeforeOpen = IBDataSet1BeforeOpen
221 <    BeforePost = IBDataSet1BeforePost
222 <    BufferChunks = 1000
223 <    CachedUpdates = False
224 <    DeleteSQL.Strings = (
225 <      'Delete From EMPLOYEE A'
226 <      'Where A.EMP_NO = :EMP_NO'
227 <    )
228 <    InsertSQL.Strings = (
229 <      'Insert Into EMPLOYEE(EMP_NO, FIRST_NAME, LAST_NAME, PHONE_EXT, HIRE_DATE, DEPT_NO, JOB_CODE, JOB_GRADE, JOB_COUNTRY, SALARY)'
230 <      'Values(:EMP_NO, :FIRST_NAME, :LAST_NAME, :PHONE_EXT, :HIRE_DATE, :DEPT_NO, :JOB_CODE, :JOB_GRADE, :JOB_COUNTRY, :SALARY)'
231 <    )
232 <    RefreshSQL.Strings = (
233 <      'Select A.EMP_NO, A.FIRST_NAME, A.LAST_NAME, A.PHONE_EXT, A.HIRE_DATE, A.DEPT_NO, A.JOB_CODE, A.JOB_GRADE, A.JOB_COUNTRY, A.SALARY, A.FULL_NAME From EMPLOYEE A'
234 <      'Where A.EMP_NO = :EMP_NO'
235 <    )
236 <    SelectSQL.Strings = (
237 <      'Select A.EMP_NO, A.FIRST_NAME, A.LAST_NAME, A.PHONE_EXT, A.HIRE_DATE, A.DEPT_NO, A.JOB_CODE, A.JOB_GRADE, A.JOB_COUNTRY, A.SALARY, A.FULL_NAME From EMPLOYEE A'
238 <      'Where EMP_NO = :EMP_NO'
239 <    )
240 <    ModifySQL.Strings = (
241 <      'Update EMPLOYEE A Set '
242 <      '  A.EMP_NO = :EMP_NO,'
243 <      '  A.FIRST_NAME = :FIRST_NAME,'
244 <      '  A.LAST_NAME = :LAST_NAME,'
245 <      '  A.PHONE_EXT = :PHONE_EXT,'
246 <      '  A.HIRE_DATE = :HIRE_DATE,'
247 <      '  A.DEPT_NO = :DEPT_NO,'
248 <      '  A.JOB_CODE = :JOB_CODE,'
249 <      '  A.JOB_GRADE = :JOB_GRADE,'
250 <      '  A.JOB_COUNTRY = :JOB_COUNTRY,'
251 <      '  A.SALARY = :SALARY'
252 <      'Where A.EMP_NO = :OLD_EMP_NO'
253 <    )
254 <    GeneratorField.Generator = 'EMP_NO_GEN'
255 <    GeneratorField.Field = 'EMP_NO'
256 <    GeneratorField.ApplyOnEvent = gaeOnNewRecord
257 <    left = 288
258 <    top = 80
259 <    object IBDataSet1EMP_NO: TSmallintField
260 <      DisplayWidth = 10
261 <      FieldKind = fkData
262 <      FieldName = 'EMP_NO'
263 <      Index = 0
264 <      LookupCache = False
265 <      ProviderFlags = [pfInUpdate, pfInWhere]
266 <      ReadOnly = False
267 <      Required = True
268 <    end
269 <    object IBDataSet1FIRST_NAME: TIBStringField
270 <      DisplayWidth = 15
271 <      FieldKind = fkData
272 <      FieldName = 'FIRST_NAME'
273 <      Index = 1
274 <      LookupCache = False
275 <      ProviderFlags = [pfInUpdate, pfInWhere]
276 <      ReadOnly = False
277 <      Required = True
278 <      Size = 15
279 <    end
280 <    object IBDataSet1LAST_NAME: TIBStringField
281 <      DisplayWidth = 20
282 <      FieldKind = fkData
283 <      FieldName = 'LAST_NAME'
284 <      Index = 2
285 <      LookupCache = False
286 <      ProviderFlags = [pfInUpdate, pfInWhere]
287 <      ReadOnly = False
288 <      Required = True
289 <    end
290 <    object IBDataSet1PHONE_EXT: TIBStringField
291 <      DisplayWidth = 4
292 <      FieldKind = fkData
293 <      FieldName = 'PHONE_EXT'
294 <      Index = 3
295 <      LookupCache = False
296 <      ProviderFlags = [pfInUpdate, pfInWhere]
297 <      ReadOnly = False
298 <      Required = False
299 <      Size = 4
300 <    end
301 <    object IBDataSet1HIRE_DATE: TDateTimeField
302 <      DisplayWidth = 10
303 <      FieldKind = fkData
304 <      FieldName = 'HIRE_DATE'
305 <      Index = 4
306 <      LookupCache = False
307 <      ProviderFlags = [pfInUpdate, pfInWhere]
308 <      ReadOnly = False
309 <      Required = True
310 <    end
311 <    object IBDataSet1DEPT_NO: TIBStringField
312 <      DisplayWidth = 3
313 <      FieldKind = fkData
314 <      FieldName = 'DEPT_NO'
315 <      Index = 5
316 <      LookupCache = False
317 <      ProviderFlags = [pfInUpdate, pfInWhere]
318 <      ReadOnly = False
319 <      Required = True
320 <      Size = 3
321 <    end
322 <    object IBDataSet1JOB_CODE: TIBStringField
323 <      DisplayWidth = 5
324 <      FieldKind = fkData
325 <      FieldName = 'JOB_CODE'
326 <      Index = 6
327 <      LookupCache = False
328 <      ProviderFlags = [pfInUpdate, pfInWhere]
329 <      ReadOnly = False
330 <      Required = True
331 <      Size = 5
332 <    end
333 <    object IBDataSet1JOB_GRADE: TSmallintField
334 <      DisplayWidth = 10
335 <      FieldKind = fkData
336 <      FieldName = 'JOB_GRADE'
337 <      Index = 7
338 <      LookupCache = False
339 <      ProviderFlags = [pfInUpdate, pfInWhere]
340 <      ReadOnly = False
341 <      Required = True
342 <    end
343 <    object IBDataSet1JOB_COUNTRY: TIBStringField
344 <      DisplayWidth = 15
345 <      FieldKind = fkData
346 <      FieldName = 'JOB_COUNTRY'
347 <      Index = 8
348 <      LookupCache = False
349 <      ProviderFlags = [pfInUpdate, pfInWhere]
350 <      ReadOnly = False
351 <      Required = True
352 <      Size = 15
353 <    end
354 <    object IBDataSet1SALARY: TIBBCDField
355 <      DisplayWidth = 18
356 <      FieldKind = fkData
357 <      FieldName = 'SALARY'
358 <      Index = 9
359 <      LookupCache = False
360 <      ProviderFlags = [pfInUpdate, pfInWhere]
361 <      ReadOnly = False
362 <      Required = True
363 <      Precision = 18
364 <      Currency = False
365 <      MaxValue = 0
366 <      MinValue = 0
367 <      Size = 2
368 <    end
369 <    object IBDataSet1FULL_NAME: TIBStringField
370 <      DisplayWidth = 37
371 <      FieldKind = fkData
372 <      FieldName = 'FULL_NAME'
373 <      Index = 10
374 <      LookupCache = False
375 <      ProviderFlags = [pfInUpdate, pfInWhere]
376 <      ReadOnly = True
377 <      Required = False
378 <      Size = 37
379 <    end
380 <  end
381 <  object Datasource1: TDatasource
382 <    DataSet = IBDataSet1
383 <    left = 248
384 <    top = 80
56 >    TabOrder = 2
57    end
58    object Depts: TIBQuery
59      Database = Form1.IBDatabase1
60      Transaction = Form1.IBTransaction1
61      BufferChunks = 1000
62      CachedUpdates = False
63 +    GenerateParamNames = False
64      GeneratorField.ApplyOnEvent = gaeOnNewRecord
65      SQL.Strings = (
66 <      'Select A.DEPT_NO, A.DEPARTMENT, A.HEAD_DEPT, A.MNGR_NO, A.BUDGET, A.LOCATION, A.PHONE_NO From DEPARTMENT A'
67 <      'Order by DEPARTMENT asc'
66 >      'Select A.DEPT_NO, A.DEPARTMENT, A.HEAD_DEPT,count(B.DEPT_NO)'
67 >      'as ChildCount '
68 >      'From DEPARTMENT A'
69 >      'Left Outer JOIN DEPARTMENT B '
70 >      '  On B.HEAD_DEPT = A.DEPT_NO'
71 >      'Group By A.DEPT_NO, A.DEPARTMENT, A.HEAD_DEPT'
72      )
73      Params = <>
74 <    left = 288
75 <    top = 120
74 >    left = 432
75 >    top = 125
76    end
77 <  object Datasource2: TDatasource
77 >  object DataSource1: TDataSource
78      DataSet = Depts
79 <    left = 248
80 <    top = 120
404 <  end
405 <  object Countries: TIBQuery
406 <    Database = Form1.IBDatabase1
407 <    Transaction = Form1.IBTransaction1
408 <    BufferChunks = 1000
409 <    CachedUpdates = False
410 <    GeneratorField.ApplyOnEvent = gaeOnNewRecord
411 <    SQL.Strings = (
412 <      'Select A.COUNTRY, A.CURRENCY From COUNTRY A'
413 <      'Order by Country Asc'
414 <    )
415 <    Params = <>
416 <    left = 367
417 <    top = 120
418 <    object CountriesCOUNTRY: TIBStringField
419 <      DisplayWidth = 15
420 <      FieldKind = fkData
421 <      FieldName = 'COUNTRY'
422 <      Index = 0
423 <      LookupCache = False
424 <      ProviderFlags = [pfInUpdate, pfInWhere]
425 <      ReadOnly = False
426 <      Required = True
427 <      Size = 15
428 <    end
429 <    object CountriesCURRENCY: TIBStringField
430 <      DisplayWidth = 10
431 <      FieldKind = fkData
432 <      FieldName = 'CURRENCY'
433 <      Index = 1
434 <      LookupCache = False
435 <      ProviderFlags = [pfInUpdate, pfInWhere]
436 <      ReadOnly = False
437 <      Required = True
438 <      Size = 10
439 <    end
440 <  end
441 <  object Datasource4: TDatasource
442 <    DataSet = Countries
443 <    left = 328
444 <    top = 120
79 >    left = 392
80 >    top = 125
81    end
82   end

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines