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