ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/trunk/examples/employee/unit1.lfm
Revision: 68
Committed: Tue Oct 17 10:07:58 2017 UTC (6 years, 5 months ago) by tony
File size: 25715 byte(s)
Log Message:
IBX: Editor Positioning tidy up
FBINTF: Trap uninitialised SQL parameters on SQL Exec. Avoids Unknown SQL Type errors.
Consistent setting of Modified (SQLParam).

File Contents

# Content
1 object Form1: TForm1
2 Left = 1736
3 Height = 482
4 Top = 445
5 Width = 932
6 Caption = 'Employee List'
7 ClientHeight = 482
8 ClientWidth = 932
9 DefaultMonitor = dmPrimary
10 OnClose = FormClose
11 OnShow = FormShow
12 LCLVersion = '1.8.0.4'
13 object Button1: TButton
14 Left = 845
15 Height = 25
16 Top = 48
17 Width = 75
18 Action = AddEmployee
19 Anchors = [akTop, akRight]
20 TabOrder = 0
21 end
22 object Button2: TButton
23 Left = 845
24 Height = 25
25 Top = 86
26 Width = 75
27 Action = EditEmployee
28 Anchors = [akTop, akRight]
29 TabOrder = 1
30 end
31 object Button3: TButton
32 Left = 845
33 Height = 25
34 Top = 125
35 Width = 75
36 Action = DeleteEmployee
37 Anchors = [akTop, akRight]
38 TabOrder = 2
39 end
40 object Label1: TLabel
41 Left = 17
42 Height = 14
43 Top = 14
44 Width = 87
45 Caption = 'Started Before'
46 ParentColor = False
47 end
48 object BeforeDate: TDateEdit
49 Left = 112
50 Height = 24
51 Top = 8
52 Width = 80
53 CalendarDisplaySettings = [dsShowHeadings, dsShowDayNames]
54 DateOrder = doNone
55 ButtonWidth = 23
56 NumGlyphs = 1
57 MaxLength = 0
58 OnChange = BeforeDateChange
59 TabOrder = 3
60 end
61 object Label2: TLabel
62 Left = 241
63 Height = 14
64 Top = 14
65 Width = 78
66 Caption = 'Started After'
67 ParentColor = False
68 end
69 object AfterDate: TDateEdit
70 Left = 333
71 Height = 24
72 Top = 8
73 Width = 80
74 CalendarDisplaySettings = [dsShowHeadings, dsShowDayNames]
75 DateOrder = doNone
76 ButtonWidth = 23
77 NumGlyphs = 1
78 MaxLength = 0
79 OnChange = BeforeDateChange
80 TabOrder = 4
81 end
82 object Panel1: TPanel
83 Left = 12
84 Height = 434
85 Top = 42
86 Width = 810
87 Anchors = [akTop, akLeft, akRight, akBottom]
88 BevelOuter = bvNone
89 ClientHeight = 434
90 ClientWidth = 810
91 Color = clBackground
92 ParentColor = False
93 TabOrder = 5
94 object IBDynamicGrid1: TIBDynamicGrid
95 Left = 0
96 Height = 384
97 Top = 0
98 Width = 810
99 Align = alClient
100 Color = clWindow
101 Columns = <
102 item
103 Title.Alignment = taCenter
104 Title.Caption = 'Last Name'
105 Width = 100
106 FieldName = 'LAST_NAME'
107 AutoSizeColumn = False
108 InitialSortColumn = False
109 DBLookupProperties.ItemHeight = 0
110 DBLookupProperties.ItemWidth = 0
111 DBLookupProperties.AutoCompleteText = [cbactEnabled, cbactEndOfLineComplete, cbactSearchAscending]
112 end
113 item
114 Title.Alignment = taCenter
115 Title.Caption = 'First Name'
116 Width = 100
117 FieldName = 'FIRST_NAME'
118 AutoSizeColumn = False
119 InitialSortColumn = False
120 DBLookupProperties.ItemHeight = 0
121 DBLookupProperties.ItemWidth = 0
122 DBLookupProperties.AutoCompleteText = [cbactEnabled, cbactEndOfLineComplete, cbactSearchAscending]
123 end
124 item
125 Alignment = taCenter
126 Title.Alignment = taCenter
127 Title.Caption = 'Emp No.'
128 Width = 60
129 FieldName = 'EMP_NO'
130 AutoSizeColumn = False
131 InitialSortColumn = False
132 DBLookupProperties.ItemHeight = 0
133 DBLookupProperties.ItemWidth = 0
134 DBLookupProperties.AutoCompleteText = [cbactEnabled, cbactEndOfLineComplete, cbactSearchAscending]
135 end
136 item
137 ReadOnly = True
138 Title.Alignment = taCenter
139 Title.Caption = 'Dept'
140 Width = 200
141 FieldName = 'DEPT_PATH'
142 AutoSizeColumn = True
143 InitialSortColumn = False
144 DBLookupProperties.ItemHeight = 0
145 DBLookupProperties.ItemWidth = 0
146 DBLookupProperties.AutoCompleteText = [cbactEnabled, cbactEndOfLineComplete, cbactSearchAscending]
147 end
148 item
149 ButtonStyle = cbsPickList
150 Title.Alignment = taCenter
151 Title.Caption = 'Located'
152 Width = 100
153 FieldName = 'JOB_COUNTRY'
154 AutoSizeColumn = False
155 InitialSortColumn = False
156 DBLookupProperties.ItemHeight = 0
157 DBLookupProperties.ItemWidth = 0
158 DBLookupProperties.ListSource = CountrySource
159 DBLookupProperties.ListField = 'COUNTRY'
160 DBLookupProperties.AutoInsert = False
161 DBLookupProperties.AutoComplete = False
162 end
163 item
164 Title.Alignment = taCenter
165 Title.Caption = 'Started'
166 Width = 80
167 FieldName = 'HIRE_DATE'
168 AutoSizeColumn = False
169 InitialSortColumn = False
170 DBLookupProperties.ItemHeight = 0
171 DBLookupProperties.ItemWidth = 0
172 DBLookupProperties.AutoCompleteText = [cbactEnabled, cbactEndOfLineComplete, cbactSearchAscending]
173 end
174 item
175 Title.Alignment = taCenter
176 Title.Caption = 'Salary'
177 Width = 120
178 FieldName = 'SALARY'
179 ColumnTotalsControl = DBText1
180 AutoSizeColumn = False
181 InitialSortColumn = False
182 DBLookupProperties.ItemHeight = 0
183 DBLookupProperties.ItemWidth = 0
184 DBLookupProperties.AutoCompleteText = [cbactEnabled, cbactEndOfLineComplete, cbactSearchAscending]
185 end>
186 DataSource = EmployeeSource
187 Scrollbars = ssAutoBoth
188 TabOrder = 0
189 EditorPanel = EmployeeEditorPanel
190 ExpandEditorPanelBelowRow = False
191 Descending = False
192 EditorBorderStyle = bsSingle
193 DefaultPositionAtEnd = False
194 IndexFieldNames = 'EMP_NO'
195 end
196 object Panel2: TPanel
197 Left = 0
198 Height = 50
199 Top = 384
200 Width = 810
201 Align = alBottom
202 BevelOuter = bvNone
203 ClientHeight = 50
204 ClientWidth = 810
205 ParentColor = False
206 TabOrder = 1
207 object Button5: TButton
208 Left = 80
209 Height = 25
210 Top = 16
211 Width = 75
212 Action = CancelChanges
213 Anchors = [akLeft, akBottom]
214 TabOrder = 0
215 end
216 object Button4: TButton
217 Left = 1
218 Height = 25
219 Top = 16
220 Width = 75
221 Action = SaveChanges
222 Anchors = [akLeft, akBottom]
223 TabOrder = 1
224 end
225 object DBText1: TDBText
226 Left = 688
227 Height = 27
228 Top = 16
229 Width = 49
230 Alignment = taRightJustify
231 Anchors = [akTop, akLeft, akBottom]
232 DataField = 'TOTALSALARIES'
233 DataSource = TotalsSource
234 ParentColor = False
235 end
236 end
237 object EmployeeEditorPanel: TPanel
238 Left = 8
239 Height = 80
240 Top = 112
241 Width = 784
242 BevelOuter = bvNone
243 BorderWidth = 2
244 BorderStyle = bsSingle
245 ClientHeight = 78
246 ClientWidth = 782
247 Color = clWindow
248 ParentColor = False
249 TabOrder = 2
250 Visible = False
251 object Label3: TLabel
252 Left = 0
253 Height = 14
254 Top = 7
255 Width = 83
256 Caption = 'Employee No.'
257 ParentColor = False
258 end
259 object DBEdit1: TDBEdit
260 Left = 90
261 Height = 24
262 Top = 2
263 Width = 120
264 DataField = 'EMP_NO'
265 DataSource = EmployeeSource
266 CharCase = ecNormal
267 MaxLength = 0
268 TabOrder = 0
269 end
270 object Label4: TLabel
271 Left = 12
272 Height = 14
273 Top = 32
274 Width = 64
275 Caption = 'First Name'
276 ParentColor = False
277 end
278 object DBEdit2: TDBEdit
279 Left = 90
280 Height = 24
281 Top = 24
282 Width = 120
283 DataField = 'FIRST_NAME'
284 DataSource = EmployeeSource
285 CharCase = ecNormal
286 MaxLength = 0
287 TabOrder = 1
288 end
289 object Label5: TLabel
290 Left = 12
291 Height = 14
292 Top = 56
293 Width = 64
294 Caption = 'Last Name'
295 ParentColor = False
296 end
297 object DBEdit3: TDBEdit
298 Left = 90
299 Height = 24
300 Top = 46
301 Width = 120
302 DataField = 'LAST_NAME'
303 DataSource = EmployeeSource
304 CharCase = ecNormal
305 MaxLength = 0
306 TabOrder = 2
307 end
308 object Label6: TLabel
309 Left = 216
310 Height = 14
311 Top = 7
312 Width = 77
313 Caption = 'Date Started'
314 ParentColor = False
315 end
316 object IBDateEdit1: TDBDateEdit
317 Left = 300
318 Height = 24
319 Top = 2
320 Width = 104
321 CalendarDisplaySettings = [dsShowHeadings, dsShowDayNames]
322 DateOrder = doNone
323 ButtonWidth = 23
324 AutoSelect = False
325 NumGlyphs = 1
326 MaxLength = 0
327 TabOrder = 3
328 DataField = 'HIRE_DATE'
329 DataSource = EmployeeSource
330 end
331 object Label7: TLabel
332 Left = 252
333 Height = 14
334 Top = 32
335 Width = 37
336 Caption = 'Salary'
337 ParentColor = False
338 end
339 object DBEdit4: TDBEdit
340 Left = 300
341 Height = 24
342 Top = 24
343 Width = 104
344 DataField = 'SALARY'
345 DataSource = EmployeeSource
346 CharCase = ecNormal
347 MaxLength = 0
348 TabOrder = 5
349 end
350 object Label8: TLabel
351 Left = 708
352 Height = 14
353 Top = 54
354 Width = 24
355 Anchors = [akTop, akRight]
356 Caption = 'Ext.'
357 ParentColor = False
358 end
359 object DBEdit5: TDBEdit
360 Left = 732
361 Height = 24
362 Top = 48
363 Width = 40
364 DataField = 'PHONE_EXT'
365 DataSource = EmployeeSource
366 Anchors = [akTop, akRight]
367 CharCase = ecNormal
368 MaxLength = 0
369 TabOrder = 4
370 end
371 object Label9: TLabel
372 Left = 536
373 Height = 14
374 Top = 7
375 Width = 51
376 Caption = 'Location'
377 ParentColor = False
378 end
379 object Label10: TLabel
380 Left = 413
381 Height = 14
382 Top = 9
383 Width = 59
384 Caption = 'Job Grade'
385 ParentColor = False
386 end
387 object JobGradeDBComboBox: TDBComboBox
388 Left = 480
389 Height = 23
390 Top = 2
391 Width = 48
392 AutoSize = False
393 DataField = 'JOB_GRADE'
394 DataSource = EmployeeSource
395 ItemHeight = 0
396 Items.Strings = (
397 '1'
398 '2'
399 '3'
400 '4'
401 '5'
402 )
403 MaxLength = 0
404 OnCloseUp = JobGradeDBComboBoxCloseUp
405 Style = csDropDownList
406 TabOrder = 6
407 end
408 object Label11: TLabel
409 Left = 536
410 Height = 14
411 Top = 32
412 Width = 48
413 Caption = 'Job Title'
414 ParentColor = False
415 end
416 object Label12: TLabel
417 Left = 256
418 Height = 14
419 Top = 54
420 Width = 33
421 Caption = 'Dept.'
422 ParentColor = False
423 end
424 object SpeedButton1: TSpeedButton
425 Left = 680
426 Height = 25
427 Top = 48
428 Width = 23
429 Action = SelectDept
430 Anchors = [akTop, akRight]
431 end
432 object DBEdit6: TDBEdit
433 Left = 300
434 Height = 24
435 Top = 48
436 Width = 372
437 DataField = 'DEPT_PATH'
438 DataSource = EmployeeSource
439 ReadOnly = True
440 Anchors = [akTop, akLeft, akRight]
441 CharCase = ecNormal
442 MaxLength = 0
443 TabOrder = 7
444 end
445 object IBLookupComboEditBox2: TIBLookupComboEditBox
446 Left = 600
447 Height = 23
448 Top = 0
449 Width = 172
450 Anchors = [akTop, akLeft, akRight]
451 AutoSize = False
452 DataField = 'JOB_COUNTRY'
453 DataSource = EmployeeSource
454 KeyField = 'COUNTRY'
455 ListField = 'COUNTRY'
456 ListFieldIndex = 0
457 ListSource = CountrySource
458 LookupCache = False
459 Style = csDropDownList
460 TabOrder = 8
461 AutoInsert = False
462 AutoCompleteText = [cbactEnabled, cbactEndOfLineComplete, cbactSearchAscending]
463 ItemHeight = 0
464 end
465 object IBLookupComboEditBox1: TIBLookupComboEditBox
466 Left = 600
467 Height = 23
468 Top = 24
469 Width = 172
470 Anchors = [akTop, akLeft, akRight]
471 AutoSize = False
472 DataField = 'JOB_CODE'
473 DataSource = EmployeeSource
474 KeyField = 'JOB_CODE'
475 ListField = 'JOB_TITLE'
476 ListFieldIndex = 0
477 ListSource = JobCodeSource
478 LookupCache = False
479 Style = csDropDownList
480 TabOrder = 9
481 AutoInsert = False
482 AutoCompleteText = [cbactEnabled, cbactEndOfLineComplete, cbactSearchAscending]
483 ItemHeight = 0
484 end
485 end
486 end
487 object Label13: TLabel
488 Left = 456
489 Height = 14
490 Top = 14
491 Width = 79
492 Caption = 'Salary Range'
493 ParentColor = False
494 end
495 object SalaryRange: TComboBox
496 Left = 544
497 Height = 25
498 Top = 8
499 Width = 272
500 ItemHeight = 0
501 ItemIndex = 0
502 Items.Strings = (
503 'None Specified'
504 'Below $40,000'
505 'Between $40,000 and $100,000'
506 'Above $100,000'
507 )
508 OnCloseUp = BeforeDateChange
509 Style = csDropDownList
510 TabOrder = 6
511 Text = 'None Specified'
512 end
513 object IBDatabase1: TIBDatabase
514 Connected = False
515 CreateIfNotExists = False
516 AllowStreamedConnected = False
517 DatabaseName = 'localhost:employee'
518 Params.Strings = (
519 'user_name=SYSDBA'
520 'lc_ctype=UTF8'
521 )
522 DefaultTransaction = IBTransaction1
523 IdleTimer = 0
524 TraceFlags = []
525 UseDefaultSystemCodePage = False
526 left = 832
527 top = 168
528 end
529 object IBTransaction1: TIBTransaction
530 Active = False
531 DefaultDatabase = IBDatabase1
532 Params.Strings = (
533 'read_committed'
534 'rec_version'
535 'nowait'
536 )
537 left = 872
538 top = 168
539 end
540 object EmployeeSource: TDataSource
541 DataSet = Employees
542 left = 832
543 top = 336
544 end
545 object ActionList1: TActionList
546 left = 832
547 top = 416
548 object AddEmployee: TAction
549 Caption = 'Add'
550 OnExecute = AddEmployeeExecute
551 end
552 object EditEmployee: TAction
553 Caption = 'Edit'
554 OnExecute = EditEmployeeExecute
555 OnUpdate = EditEmployeeUpdate
556 end
557 object DeleteEmployee: TAction
558 Caption = 'Delete'
559 OnExecute = DeleteEmployeeExecute
560 OnUpdate = EditEmployeeUpdate
561 end
562 object SaveChanges: TAction
563 Caption = 'Save'
564 OnExecute = SaveChangesExecute
565 OnUpdate = SaveChangesUpdate
566 end
567 object CancelChanges: TAction
568 Caption = 'Cancel'
569 OnExecute = CancelChangesExecute
570 OnUpdate = SaveChangesUpdate
571 end
572 object SelectDept: TAction
573 Caption = '...'
574 OnExecute = SelectDeptExecute
575 end
576 end
577 object CountrySource: TDataSource
578 DataSet = Countries
579 left = 832
580 top = 296
581 end
582 object TotalsQuery: TIBQuery
583 AllowAutoActivateTransaction = False
584 Database = IBDatabase1
585 Transaction = IBTransaction1
586 BeforeOpen = EmployeesBeforeOpen
587 BufferChunks = 1000
588 CachedUpdates = False
589 GenerateParamNames = False
590 GeneratorField.ApplyOnEvent = gaeOnNewRecord
591 SQL.Strings = (
592 'Select sum(Salary) as TotalSalaries'
593 'From EMPLOYEE'
594 )
595 Params = <>
596 DataSetCloseAction = dcDiscardChanges
597 left = 872
598 top = 376
599 object TotalsQueryTOTALSALARIES: TIBBCDField
600 DisplayWidth = 18
601 FieldKind = fkData
602 FieldName = 'TOTALSALARIES'
603 Index = 0
604 LookupCache = False
605 ProviderFlags = [pfInUpdate, pfInWhere]
606 ReadOnly = False
607 Required = False
608 OnGetText = EmployeesSALARYGetText
609 Precision = 18
610 Currency = False
611 MaxValue = 0
612 MinValue = 0
613 Size = 2
614 end
615 end
616 object TotalsSource: TDataSource
617 DataSet = TotalsQuery
618 left = 832
619 top = 376
620 end
621 object Employees: TIBDataSet
622 AllowAutoActivateTransaction = False
623 Database = IBDatabase1
624 Transaction = IBTransaction1
625 AfterDelete = EmployeesAfterDelete
626 AfterEdit = EmployeesAfterDelete
627 AfterInsert = EmployeesAfterInsert
628 AfterOpen = EmployeesAfterOpen
629 AfterPost = EmployeesAfterPost
630 AfterScroll = EmployeesAfterScroll
631 BeforeClose = EmployeesBeforeClose
632 BeforeOpen = EmployeesBeforeOpen
633 BufferChunks = 5000
634 CachedUpdates = False
635 DeleteSQL.Strings = (
636 'Delete From EMPLOYEE A'
637 'Where A.EMP_NO = :EMP_NO'
638 )
639 InsertSQL.Strings = (
640 'Insert Into EMPLOYEE(EMP_NO, FIRST_NAME, LAST_NAME, PHONE_EXT, HIRE_DATE, DEPT_NO, JOB_CODE, JOB_GRADE, JOB_COUNTRY, SALARY)'
641 'Values(:EMP_NO, :FIRST_NAME, :LAST_NAME, :PHONE_EXT, :HIRE_DATE, :DEPT_NO, :JOB_CODE, :JOB_GRADE, :JOB_COUNTRY, :SALARY)'
642 )
643 RefreshSQL.Strings = (
644 'with recursive Depts As ('
645 'Select DEPT_NO, DEPARTMENT, HEAD_DEPT, cast(DEPARTMENT as VarChar(256)) as DEPT_PATH,'
646 'cast(DEPT_NO as VarChar(64)) as DEPT_KEY_PATH'
647 'From DEPARTMENT Where HEAD_DEPT is NULL '
648 'UNION ALL'
649 'Select D.DEPT_NO, D.DEPARTMENT, D.HEAD_DEPT, Depts.DEPT_PATH || '' / '' || D.DEPARTMENT as DEPT_PATH,'
650 'Depts.DEPT_KEY_PATH || '';'' || D.DEPT_NO as DEPT_KEY_PATH'
651 'From DEPARTMENT D'
652 'JOIN Depts On D.HEAD_DEPT = Depts.DEPT_NO'
653 ')'
654 ''
655 'Select A.EMP_NO, A.FIRST_NAME, A.LAST_NAME, A.PHONE_EXT, A.HIRE_DATE, A.DEPT_NO, A.JOB_CODE, '
656 'A.JOB_GRADE, A.JOB_COUNTRY, A.SALARY, A.FULL_NAME, D.DEPT_PATH, D.DEPT_KEY_PATH'
657 'From EMPLOYEE A'
658 'JOIN Depts D On D.DEPT_NO = A.DEPT_NO'
659 ''
660 'Where A.EMP_NO = :EMP_NO'
661 )
662 SelectSQL.Strings = (
663 'with recursive Depts As ('
664 'Select DEPT_NO, DEPARTMENT, HEAD_DEPT, cast(DEPARTMENT as VarChar(256)) as DEPT_PATH,'
665 'cast(DEPT_NO as VarChar(64)) as DEPT_KEY_PATH'
666 'From DEPARTMENT Where HEAD_DEPT is NULL '
667 'UNION ALL'
668 'Select D.DEPT_NO, D.DEPARTMENT, D.HEAD_DEPT, Depts.DEPT_PATH || '' / '' || D.DEPARTMENT as DEPT_PATH,'
669 'Depts.DEPT_KEY_PATH || '';'' || D.DEPT_NO as DEPT_KEY_PATH'
670 'From DEPARTMENT D'
671 'JOIN Depts On D.HEAD_DEPT = Depts.DEPT_NO'
672 ')'
673 ''
674 'Select distinct A.EMP_NO, A.FIRST_NAME, A.LAST_NAME, A.PHONE_EXT, A.HIRE_DATE, A.DEPT_NO, A.JOB_CODE, '
675 'A.JOB_GRADE, A.JOB_COUNTRY, A.SALARY, A.FULL_NAME, D.DEPT_PATH, D.DEPT_KEY_PATH'
676 'From EMPLOYEE A'
677 'JOIN Depts D On D.DEPT_NO = A.DEPT_NO'
678 )
679 ModifySQL.Strings = (
680 'Update EMPLOYEE A Set '#13#10' A.DEPT_NO = :DEPT_NO,'#13#10' A.FIRST_NAME = :FIRST_NAME,'#13#10' A.HIRE_DATE = :HIRE_DATE,'#13#10' A.JOB_CODE = :JOB_CODE,'#13#10' A.JOB_COUNTRY = :JOB_COUNTRY,'#13#10' A.JOB_GRADE = :JOB_GRADE,'#13#10' A.LAST_NAME = :LAST_NAME,'#13#10' A.PHONE_EXT = :PHONE_EXT,'#13#10' A.SALARY = :SALARY'
681 'Where A.EMP_NO = :OLD_EMP_NO'
682 )
683 GeneratorField.Generator = 'EMP_NO_GEN'
684 GeneratorField.Field = 'EMP_NO'
685 GeneratorField.ApplyOnEvent = gaeOnNewRecord
686 GenerateParamNames = False
687 DataSetCloseAction = dcSaveChanges
688 AfterTransactionEnd = EmployeesAfterTransactionEnd
689 OnValidatePost = EmployeesValidatePost
690 left = 872
691 top = 336
692 object EmployeesEMP_NO: TSmallintField
693 DisplayWidth = 10
694 FieldKind = fkData
695 FieldName = 'EMP_NO'
696 Index = 0
697 LookupCache = False
698 ProviderFlags = [pfInUpdate, pfInWhere]
699 ReadOnly = False
700 Required = True
701 end
702 object EmployeesFIRST_NAME: TIBStringField
703 DisplayWidth = 15
704 FieldKind = fkData
705 FieldName = 'FIRST_NAME'
706 Index = 1
707 LookupCache = False
708 ProviderFlags = [pfInUpdate, pfInWhere]
709 ReadOnly = False
710 Required = True
711 Size = 15
712 end
713 object EmployeesLAST_NAME: TIBStringField
714 DisplayWidth = 20
715 FieldKind = fkData
716 FieldName = 'LAST_NAME'
717 Index = 2
718 LookupCache = False
719 ProviderFlags = [pfInUpdate, pfInWhere]
720 ReadOnly = False
721 Required = True
722 end
723 object EmployeesPHONE_EXT: TIBStringField
724 Alignment = taRightJustify
725 DisplayWidth = 4
726 FieldKind = fkData
727 FieldName = 'PHONE_EXT'
728 Index = 3
729 LookupCache = False
730 ProviderFlags = [pfInUpdate, pfInWhere]
731 ReadOnly = False
732 Required = False
733 Size = 4
734 end
735 object EmployeesHIRE_DATE: TDateTimeField
736 DisplayWidth = 10
737 FieldKind = fkData
738 FieldName = 'HIRE_DATE'
739 Index = 4
740 LookupCache = False
741 ProviderFlags = [pfInUpdate, pfInWhere]
742 ReadOnly = False
743 Required = True
744 end
745 object EmployeesDEPT_NO: TIBStringField
746 DisplayWidth = 3
747 FieldKind = fkData
748 FieldName = 'DEPT_NO'
749 Index = 5
750 LookupCache = False
751 ProviderFlags = [pfInUpdate, pfInWhere]
752 ReadOnly = False
753 Required = True
754 Size = 3
755 end
756 object EmployeesJOB_CODE: TIBStringField
757 DisplayWidth = 5
758 FieldKind = fkData
759 FieldName = 'JOB_CODE'
760 Index = 6
761 LookupCache = False
762 ProviderFlags = [pfInUpdate, pfInWhere]
763 ReadOnly = False
764 Required = True
765 OnChange = EmployeesJOB_CODEChange
766 Size = 5
767 end
768 object EmployeesJOB_GRADE: TSmallintField
769 DisplayWidth = 10
770 FieldKind = fkData
771 FieldName = 'JOB_GRADE'
772 Index = 7
773 LookupCache = False
774 ProviderFlags = [pfInUpdate, pfInWhere]
775 ReadOnly = False
776 Required = True
777 OnChange = EmployeesJOB_GRADEChange
778 end
779 object EmployeesJOB_COUNTRY: TIBStringField
780 DisplayWidth = 15
781 FieldKind = fkData
782 FieldName = 'JOB_COUNTRY'
783 Index = 8
784 LookupCache = False
785 ProviderFlags = [pfInUpdate, pfInWhere]
786 ReadOnly = False
787 Required = True
788 Size = 15
789 end
790 object EmployeesSALARY: TIBBCDField
791 DisplayWidth = 18
792 FieldKind = fkData
793 FieldName = 'SALARY'
794 Index = 9
795 LookupCache = False
796 ProviderFlags = [pfInUpdate, pfInWhere]
797 ReadOnly = False
798 Required = True
799 OnGetText = EmployeesSALARYGetText
800 Precision = 18
801 Currency = False
802 MaxValue = 0
803 MinValue = 0
804 Size = 2
805 end
806 object EmployeesFULL_NAME: TIBStringField
807 DisplayWidth = 37
808 FieldKind = fkData
809 FieldName = 'FULL_NAME'
810 Index = 10
811 LookupCache = False
812 ProviderFlags = [pfInUpdate, pfInWhere]
813 ReadOnly = True
814 Required = False
815 Size = 37
816 end
817 object EmployeesDEPT_PATH: TIBStringField
818 DisplayWidth = 256
819 FieldKind = fkData
820 FieldName = 'DEPT_PATH'
821 Index = 11
822 LookupCache = False
823 ProviderFlags = [pfInUpdate, pfInWhere]
824 ReadOnly = False
825 Required = True
826 Size = 256
827 end
828 object EmployeesDEPT_KEY_PATH: TIBStringField
829 DisplayWidth = 64
830 FieldKind = fkData
831 FieldName = 'DEPT_KEY_PATH'
832 Index = 12
833 LookupCache = False
834 ProviderFlags = [pfInUpdate, pfInWhere]
835 ReadOnly = False
836 Required = True
837 Size = 64
838 end
839 end
840 object Countries: TIBQuery
841 AllowAutoActivateTransaction = False
842 Database = IBDatabase1
843 Transaction = IBTransaction1
844 BeforeOpen = CountriesBeforeOpen
845 BufferChunks = 1000
846 CachedUpdates = False
847 GenerateParamNames = False
848 GeneratorField.ApplyOnEvent = gaeOnNewRecord
849 SQL.Strings = (
850 'Select A.COUNTRY, A.CURRENCY From COUNTRY A'
851 'JOIN JOB J On J.JOB_COUNTRY = A.COUNTRY'
852 'Where J.JOB_CODE = :JOB_CODE and J.JOB_GRADE = :JOB_GRADE'
853 'Order by 1'
854 )
855 Params = <
856 item
857 DataType = ftUnknown
858 Name = 'JOB_CODE'
859 ParamType = ptInput
860 end
861 item
862 DataType = ftUnknown
863 Name = 'JOB_GRADE'
864 ParamType = ptInput
865 end>
866 DataSetCloseAction = dcDiscardChanges
867 left = 872
868 top = 296
869 ParamData = <
870 item
871 DataType = ftUnknown
872 Name = 'JOB_CODE'
873 ParamType = ptInput
874 end
875 item
876 DataType = ftUnknown
877 Name = 'JOB_GRADE'
878 ParamType = ptInput
879 end>
880 end
881 object JobCodeSource: TDataSource
882 DataSet = JobCodes
883 left = 832
884 top = 256
885 end
886 object JobCodes: TIBQuery
887 AllowAutoActivateTransaction = False
888 Database = IBDatabase1
889 Transaction = IBTransaction1
890 BeforeOpen = JobCodesBeforeOpen
891 BufferChunks = 1000
892 CachedUpdates = False
893 GenerateParamNames = False
894 GeneratorField.ApplyOnEvent = gaeOnNewRecord
895 SQL.Strings = (
896 'Select A.JOB_CODE, A.JOB_TITLE From JOB A'
897 'Where JOB_COUNTRY = :JOB_COUNTRY and JOB_GRADE = :JOB_GRADE'
898 'Order by Upper(JOB_TITLE)'
899 )
900 Params = <
901 item
902 DataType = ftUnknown
903 Name = 'JOB_COUNTRY'
904 ParamType = ptInput
905 end
906 item
907 DataType = ftUnknown
908 Name = 'JOB_GRADE'
909 ParamType = ptInput
910 end>
911 DataSetCloseAction = dcDiscardChanges
912 left = 872
913 top = 256
914 ParamData = <
915 item
916 DataType = ftUnknown
917 Name = 'JOB_COUNTRY'
918 ParamType = ptInput
919 end
920 item
921 DataType = ftUnknown
922 Name = 'JOB_GRADE'
923 ParamType = ptInput
924 end>
925 end
926 object Depts: TIBQuery
927 AllowAutoActivateTransaction = False
928 Database = IBDatabase1
929 Transaction = IBTransaction1
930 BufferChunks = 1000
931 CachedUpdates = False
932 GenerateParamNames = False
933 GeneratorField.ApplyOnEvent = gaeOnNewRecord
934 SQL.Strings = (
935 'Select A.DEPT_NO, A.DEPARTMENT From DEPARTMENT A'
936 ''
937 'Order by Upper(Department)'
938 )
939 Params = <>
940 DataSetCloseAction = dcDiscardChanges
941 left = 872
942 top = 210
943 end
944 object DeptsSource: TDataSource
945 DataSet = Depts
946 left = 832
947 top = 208
948 end
949 object JobGradeChangeTimer: TTimer
950 Interval = 0
951 OnTimer = JobGradeChangeTimerTimer
952 left = 777
953 top = 304
954 end
955 object JobCodeChangeTimer: TTimer
956 Interval = 0
957 OnTimer = JobCodeChangeTimerTimer
958 left = 776
959 top = 353
960 end
961 end