ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/trunk/examples/local-employeedb/unit1.lfm
Revision: 37
Committed: Mon Feb 15 14:44:25 2016 UTC (8 years, 9 months ago) by tony
File size: 27495 byte(s)
Log Message:
Committing updates for Release R1-4-0

File Contents

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