1 |
|
object Form1: TForm1 |
2 |
< |
Left = 310 |
2 |
> |
Left = 495 |
3 |
|
Height = 575 |
4 |
< |
Top = 404 |
4 |
> |
Top = 399 |
5 |
|
Width = 1026 |
6 |
|
Caption = 'Employee List' |
7 |
|
ClientHeight = 575 |
8 |
|
ClientWidth = 1026 |
9 |
|
OnClose = FormClose |
10 |
|
OnShow = FormShow |
11 |
< |
LCLVersion = '1.4.0.4' |
11 |
> |
LCLVersion = '1.6.2.0' |
12 |
|
object Button1: TButton |
13 |
|
Left = 939 |
14 |
|
Height = 25 |
29 |
|
end |
30 |
|
object Label1: TLabel |
31 |
|
Left = 17 |
32 |
< |
Height = 15 |
32 |
> |
Height = 17 |
33 |
|
Top = 14 |
34 |
< |
Width = 87 |
34 |
> |
Width = 82 |
35 |
|
Caption = 'Started Before' |
36 |
|
ParentColor = False |
37 |
|
end |
38 |
|
object BeforeDate: TDateEdit |
39 |
|
Left = 112 |
40 |
< |
Height = 25 |
40 |
> |
Height = 27 |
41 |
|
Top = 8 |
42 |
< |
Width = 80 |
42 |
> |
Width = 96 |
43 |
|
CalendarDisplaySettings = [dsShowHeadings, dsShowDayNames] |
44 |
– |
OKCaption = 'OK' |
45 |
– |
CancelCaption = 'Cancel' |
44 |
|
DateOrder = doNone |
45 |
|
ButtonWidth = 23 |
46 |
|
NumGlyphs = 1 |
50 |
|
end |
51 |
|
object Label2: TLabel |
52 |
|
Left = 241 |
53 |
< |
Height = 15 |
53 |
> |
Height = 17 |
54 |
|
Top = 14 |
55 |
< |
Width = 78 |
55 |
> |
Width = 72 |
56 |
|
Caption = 'Started After' |
57 |
|
ParentColor = False |
58 |
|
end |
59 |
|
object AfterDate: TDateEdit |
60 |
|
Left = 333 |
61 |
< |
Height = 25 |
61 |
> |
Height = 27 |
62 |
|
Top = 8 |
63 |
< |
Width = 80 |
63 |
> |
Width = 91 |
64 |
|
CalendarDisplaySettings = [dsShowHeadings, dsShowDayNames] |
67 |
– |
OKCaption = 'OK' |
68 |
– |
CancelCaption = 'Cancel' |
65 |
|
DateOrder = doNone |
66 |
|
ButtonWidth = 23 |
67 |
|
NumGlyphs = 1 |
100 |
|
) |
101 |
|
object EmployeeEditorPanel: TPanel |
102 |
|
Left = 12 |
103 |
< |
Height = 80 |
103 |
> |
Height = 84 |
104 |
|
Top = 0 |
105 |
|
Width = 890 |
106 |
|
Anchors = [] |
107 |
|
BevelOuter = bvNone |
108 |
|
BorderWidth = 2 |
109 |
|
BorderStyle = bsSingle |
110 |
< |
ClientHeight = 78 |
110 |
> |
ClientHeight = 82 |
111 |
|
ClientWidth = 888 |
112 |
|
Color = clWhite |
113 |
|
ParentColor = False |
115 |
|
Visible = False |
116 |
|
object Label3: TLabel |
117 |
|
Left = 0 |
118 |
< |
Height = 15 |
118 |
> |
Height = 17 |
119 |
|
Top = 7 |
120 |
< |
Width = 83 |
120 |
> |
Width = 77 |
121 |
|
Caption = 'Employee No.' |
122 |
|
ParentColor = False |
123 |
|
end |
124 |
|
object DBEdit1: TDBEdit |
125 |
|
Left = 90 |
126 |
< |
Height = 25 |
126 |
> |
Height = 27 |
127 |
|
Top = 2 |
128 |
|
Width = 120 |
129 |
|
DataField = 'EMP_NO' |
134 |
|
end |
135 |
|
object Label4: TLabel |
136 |
|
Left = 12 |
137 |
< |
Height = 15 |
137 |
> |
Height = 17 |
138 |
|
Top = 32 |
139 |
< |
Width = 64 |
139 |
> |
Width = 61 |
140 |
|
Caption = 'First Name' |
141 |
|
ParentColor = False |
142 |
|
end |
143 |
|
object DBEdit2: TDBEdit |
144 |
|
Left = 90 |
145 |
< |
Height = 25 |
146 |
< |
Top = 24 |
145 |
> |
Height = 27 |
146 |
> |
Top = 28 |
147 |
|
Width = 120 |
148 |
|
DataField = 'FIRST_NAME' |
149 |
|
DataSource = EmployeeSource |
153 |
|
end |
154 |
|
object Label5: TLabel |
155 |
|
Left = 12 |
156 |
< |
Height = 15 |
156 |
> |
Height = 17 |
157 |
|
Top = 56 |
158 |
< |
Width = 64 |
158 |
> |
Width = 60 |
159 |
|
Caption = 'Last Name' |
160 |
|
ParentColor = False |
161 |
|
end |
162 |
|
object DBEdit3: TDBEdit |
163 |
|
Left = 90 |
164 |
< |
Height = 25 |
165 |
< |
Top = 46 |
164 |
> |
Height = 27 |
165 |
> |
Top = 54 |
166 |
|
Width = 120 |
167 |
|
DataField = 'LAST_NAME' |
168 |
|
DataSource = EmployeeSource |
172 |
|
end |
173 |
|
object Label6: TLabel |
174 |
|
Left = 216 |
175 |
< |
Height = 15 |
175 |
> |
Height = 17 |
176 |
|
Top = 7 |
177 |
< |
Width = 77 |
177 |
> |
Width = 71 |
178 |
|
Caption = 'Date Started' |
179 |
|
ParentColor = False |
180 |
|
end |
181 |
|
object IBDateEdit1: TDBDateEdit |
182 |
|
Left = 300 |
183 |
< |
Height = 25 |
183 |
> |
Height = 27 |
184 |
|
Top = 2 |
185 |
< |
Width = 80 |
185 |
> |
Width = 100 |
186 |
|
CalendarDisplaySettings = [dsShowHeadings, dsShowDayNames] |
191 |
– |
OKCaption = 'OK' |
192 |
– |
CancelCaption = 'Cancel' |
187 |
|
DateOrder = doNone |
188 |
|
ButtonWidth = 23 |
189 |
|
AutoSelect = False |
195 |
|
end |
196 |
|
object Label7: TLabel |
197 |
|
Left = 252 |
198 |
< |
Height = 15 |
198 |
> |
Height = 17 |
199 |
|
Top = 32 |
200 |
< |
Width = 37 |
200 |
> |
Width = 35 |
201 |
|
Caption = 'Salary' |
202 |
|
ParentColor = False |
203 |
|
end |
204 |
|
object DBEdit4: TDBEdit |
205 |
|
Left = 300 |
206 |
< |
Height = 25 |
207 |
< |
Top = 24 |
206 |
> |
Height = 27 |
207 |
> |
Top = 28 |
208 |
|
Width = 104 |
209 |
|
DataField = 'SALARY' |
210 |
|
DataSource = EmployeeSource |
213 |
|
TabOrder = 5 |
214 |
|
end |
215 |
|
object Label8: TLabel |
216 |
< |
Left = 814 |
217 |
< |
Height = 15 |
218 |
< |
Top = 54 |
219 |
< |
Width = 24 |
216 |
> |
Left = 818 |
217 |
> |
Height = 17 |
218 |
> |
Top = 58 |
219 |
> |
Width = 20 |
220 |
|
Anchors = [akTop, akRight] |
221 |
|
Caption = 'Ext.' |
222 |
|
ParentColor = False |
223 |
|
end |
224 |
|
object DBEdit5: TDBEdit |
225 |
|
Left = 838 |
226 |
< |
Height = 25 |
227 |
< |
Top = 48 |
226 |
> |
Height = 27 |
227 |
> |
Top = 54 |
228 |
|
Width = 40 |
229 |
|
DataField = 'PHONE_EXT' |
230 |
|
DataSource = EmployeeSource |
235 |
|
end |
236 |
|
object Label9: TLabel |
237 |
|
Left = 536 |
238 |
< |
Height = 15 |
238 |
> |
Height = 17 |
239 |
|
Top = 7 |
240 |
< |
Width = 51 |
240 |
> |
Width = 47 |
241 |
|
Caption = 'Location' |
242 |
|
ParentColor = False |
243 |
|
end |
244 |
|
object Label10: TLabel |
245 |
|
Left = 413 |
246 |
< |
Height = 15 |
246 |
> |
Height = 17 |
247 |
|
Top = 9 |
248 |
< |
Width = 59 |
248 |
> |
Width = 55 |
249 |
|
Caption = 'Job Grade' |
250 |
|
ParentColor = False |
251 |
|
end |
252 |
|
object JobGradeDBComboBox: TDBComboBox |
253 |
|
Left = 480 |
254 |
< |
Height = 25 |
255 |
< |
Top = 2 |
254 |
> |
Height = 23 |
255 |
> |
Top = 0 |
256 |
|
Width = 48 |
257 |
|
AutoSize = False |
258 |
|
DataField = 'JOB_GRADE' |
272 |
|
end |
273 |
|
object Label11: TLabel |
274 |
|
Left = 536 |
275 |
< |
Height = 15 |
275 |
> |
Height = 17 |
276 |
|
Top = 32 |
277 |
< |
Width = 48 |
277 |
> |
Width = 44 |
278 |
|
Caption = 'Job Title' |
279 |
|
ParentColor = False |
280 |
|
end |
281 |
|
object Label12: TLabel |
282 |
|
Left = 256 |
283 |
< |
Height = 15 |
284 |
< |
Top = 54 |
285 |
< |
Width = 33 |
283 |
> |
Height = 17 |
284 |
> |
Top = 58 |
285 |
> |
Width = 30 |
286 |
|
Caption = 'Dept.' |
287 |
|
ParentColor = False |
288 |
|
end |
289 |
|
object SpeedButton1: TSpeedButton |
290 |
|
Left = 786 |
291 |
|
Height = 25 |
292 |
< |
Top = 48 |
292 |
> |
Top = 54 |
293 |
|
Width = 23 |
294 |
|
Action = SelectDept |
295 |
|
Anchors = [akTop, akRight] |
296 |
|
end |
297 |
|
object DBEdit6: TDBEdit |
298 |
|
Left = 300 |
299 |
< |
Height = 25 |
300 |
< |
Top = 48 |
299 |
> |
Height = 27 |
300 |
> |
Top = 54 |
301 |
|
Width = 478 |
302 |
|
DataField = 'DEPT_PATH' |
303 |
|
DataSource = EmployeeSource |
309 |
|
end |
310 |
|
object DBEdit7: TDBEdit |
311 |
|
Left = 592 |
312 |
< |
Height = 25 |
312 |
> |
Height = 27 |
313 |
|
Top = 0 |
314 |
|
Width = 246 |
315 |
|
DataField = 'JOB_COUNTRY' |
321 |
|
end |
322 |
|
object DBEdit8: TDBEdit |
323 |
|
Left = 592 |
324 |
< |
Height = 25 |
325 |
< |
Top = 24 |
324 |
> |
Height = 27 |
325 |
> |
Top = 28 |
326 |
|
Width = 246 |
327 |
|
DataField = 'JOB_TITLE' |
328 |
|
DataSource = EmployeeSource |
333 |
|
object SpeedButton2: TSpeedButton |
334 |
|
Left = 847 |
335 |
|
Height = 22 |
336 |
< |
Top = 0 |
336 |
> |
Top = 3 |
337 |
|
Width = 23 |
338 |
|
Action = EditLocationAction |
339 |
|
end |
340 |
|
object SpeedButton3: TSpeedButton |
341 |
|
Left = 847 |
342 |
|
Height = 22 |
343 |
< |
Top = 24 |
343 |
> |
Top = 30 |
344 |
|
Width = 23 |
345 |
|
Action = EditJobCodeAction |
346 |
|
end |
376 |
|
TabOrder = 1 |
377 |
|
end |
378 |
|
object DBText1: TDBText |
379 |
< |
Left = 832 |
379 |
> |
Left = 833 |
380 |
|
Height = 27 |
381 |
|
Top = 16 |
382 |
< |
Width = 49 |
382 |
> |
Width = 48 |
383 |
|
Alignment = taRightJustify |
384 |
|
Anchors = [akTop, akRight, akBottom] |
385 |
|
DataField = 'TOTALSALARIES' |
390 |
|
end |
391 |
|
object Label13: TLabel |
392 |
|
Left = 456 |
393 |
< |
Height = 15 |
393 |
> |
Height = 17 |
394 |
|
Top = 14 |
395 |
< |
Width = 79 |
395 |
> |
Width = 73 |
396 |
|
Caption = 'Salary Range' |
397 |
|
ParentColor = False |
398 |
|
end |
416 |
|
end |
417 |
|
object IBDatabase1: TIBDatabase |
418 |
|
Connected = False |
419 |
+ |
CreateIfNotExists = False |
420 |
|
AllowStreamedConnected = False |
421 |
|
DatabaseName = 'localhost:employee' |
422 |
|
Params.Strings = ( |
423 |
|
'user_name=SYSDBA' |
424 |
< |
'lc_ctype=UTF-8' |
424 |
> |
'lc_ctype=UTF8' |
425 |
> |
'user_name=SYSDBA' |
426 |
> |
'user_name=SYSDBA' |
427 |
|
) |
428 |
|
DefaultTransaction = IBTransaction1 |
429 |
|
IdleTimer = 0 |
433 |
– |
SQLHourGlass = False |
430 |
|
TraceFlags = [] |
431 |
+ |
UseDefaultSystemCodePage = False |
432 |
|
left = 832 |
433 |
|
top = 168 |
434 |
|
end |
490 |
|
end |
491 |
|
end |
492 |
|
object TotalsQuery: TIBQuery |
493 |
+ |
AllowAutoActivateTransaction = False |
494 |
|
Database = IBDatabase1 |
495 |
|
Transaction = IBTransaction1 |
496 |
|
BeforeOpen = EmployeesBeforeOpen |
529 |
|
top = 376 |
530 |
|
end |
531 |
|
object Employees: TIBDataSet |
532 |
+ |
AllowAutoActivateTransaction = False |
533 |
|
Database = IBDatabase1 |
534 |
|
Transaction = IBTransaction1 |
535 |
|
AfterDelete = EmployeesAfterDelete |
551 |
|
) |
552 |
|
RefreshSQL.Strings = ( |
553 |
|
'with recursive Depts As (' |
554 |
< |
'Select DEPT_NO, DEPARTMENT, HEAD_DEPT, cast(DEPARTMENT as VarChar(256)) as DEPT_PATH,' |
554 |
> |
'Select DEPT_NO, DEPARTMENT, HEAD_DEPT, cast(DEPARTMENT as ' |
555 |
> |
'VarChar(256)) as DEPT_PATH,' |
556 |
|
'cast(DEPT_NO as VarChar(64)) as DEPT_KEY_PATH' |
557 |
|
'From DEPARTMENT Where HEAD_DEPT is NULL ' |
558 |
|
'UNION ALL' |
559 |
< |
'Select DEPT_NO, DEPARTMENT, HEAD_DEPT, Depts.DEPT_PATH || '' / '' || DEPARTMENT as DEPT_PATH,' |
560 |
< |
'Depts.DEPT_KEY_PATH || '';'' || DEPT_NO as DEPT_KEY_PATH' |
561 |
< |
'From DEPARTMENT ' |
562 |
< |
'JOIN Depts On HEAD_DEPT = Depts.DEPT_NO' |
559 |
> |
'Select D.DEPT_NO, D.DEPARTMENT,D. HEAD_DEPT, Depts.DEPT_PATH || '' / '' ' |
560 |
> |
'|| D.DEPARTMENT as DEPT_PATH,' |
561 |
> |
'Depts.DEPT_KEY_PATH || '';'' || D.DEPT_NO as DEPT_KEY_PATH' |
562 |
> |
'From DEPARTMENT D' |
563 |
> |
'JOIN Depts On D.HEAD_DEPT = Depts.DEPT_NO' |
564 |
|
')' |
565 |
|
'' |
566 |
< |
'Select distinct A.EMP_NO, A.FIRST_NAME, A.LAST_NAME, A.PHONE_EXT, A.HIRE_DATE, A.DEPT_NO, A.JOB_CODE, ' |
567 |
< |
'A.JOB_GRADE, A.JOB_COUNTRY, A.SALARY, A.FULL_NAME, D.DEPT_PATH, D.DEPT_KEY_PATH, J.JOB_TITLE' |
566 |
> |
'Select A.EMP_NO, A.FIRST_NAME, A.LAST_NAME, A.PHONE_EXT, ' |
567 |
> |
'A.HIRE_DATE, A.DEPT_NO, A.JOB_CODE, ' |
568 |
> |
'A.JOB_GRADE, A.JOB_COUNTRY, A.SALARY, A.FULL_NAME, D.DEPT_PATH, ' |
569 |
> |
'D.DEPT_KEY_PATH, J.JOB_TITLE' |
570 |
|
'From EMPLOYEE A' |
571 |
|
'JOIN Depts D On D.DEPT_NO = A.DEPT_NO' |
572 |
|
'JOIN JOB J on J.JOB_CODE = A.JOB_CODE' |
573 |
+ |
'' |
574 |
|
'Where A.EMP_NO = :EMP_NO' |
575 |
|
) |
576 |
|
SelectSQL.Strings = ( |
577 |
|
'with recursive Depts As (' |
578 |
< |
'Select DEPT_NO, DEPARTMENT, HEAD_DEPT, cast(DEPARTMENT as VarChar(256)) as DEPT_PATH,' |
578 |
> |
'Select DEPT_NO, DEPARTMENT, HEAD_DEPT, cast(DEPARTMENT as ' |
579 |
> |
'VarChar(256)) as DEPT_PATH,' |
580 |
|
'cast(DEPT_NO as VarChar(64)) as DEPT_KEY_PATH' |
581 |
|
'From DEPARTMENT Where HEAD_DEPT is NULL ' |
582 |
|
'UNION ALL' |
583 |
< |
'Select DEPT_NO, DEPARTMENT, HEAD_DEPT, Depts.DEPT_PATH || '' / '' || DEPARTMENT as DEPT_PATH,' |
584 |
< |
'Depts.DEPT_KEY_PATH || '';'' || DEPT_NO as DEPT_KEY_PATH' |
585 |
< |
'From DEPARTMENT ' |
586 |
< |
'JOIN Depts On HEAD_DEPT = Depts.DEPT_NO' |
583 |
> |
'Select D.DEPT_NO, D.DEPARTMENT,D. HEAD_DEPT, Depts.DEPT_PATH || '' / '' ' |
584 |
> |
'|| D.DEPARTMENT as DEPT_PATH,' |
585 |
> |
'Depts.DEPT_KEY_PATH || '';'' || D.DEPT_NO as DEPT_KEY_PATH' |
586 |
> |
'From DEPARTMENT D' |
587 |
> |
'JOIN Depts On D.HEAD_DEPT = Depts.DEPT_NO' |
588 |
|
')' |
589 |
|
'' |
590 |
< |
'Select distinct A.EMP_NO, A.FIRST_NAME, A.LAST_NAME, A.PHONE_EXT, A.HIRE_DATE, A.DEPT_NO, A.JOB_CODE, ' |
591 |
< |
'A.JOB_GRADE, A.JOB_COUNTRY, A.SALARY, A.FULL_NAME, D.DEPT_PATH, D.DEPT_KEY_PATH, J.JOB_TITLE' |
590 |
> |
'Select distinct A.EMP_NO, A.FIRST_NAME, A.LAST_NAME, A.PHONE_EXT, ' |
591 |
> |
'A.HIRE_DATE, A.DEPT_NO, A.JOB_CODE, ' |
592 |
> |
'A.JOB_GRADE, A.JOB_COUNTRY, A.SALARY, A.FULL_NAME, D.DEPT_PATH, ' |
593 |
> |
'D.DEPT_KEY_PATH, J.JOB_TITLE' |
594 |
|
'From EMPLOYEE A' |
595 |
|
'JOIN Depts D On D.DEPT_NO = A.DEPT_NO' |
596 |
|
'JOIN JOB J on J.JOB_CODE = A.JOB_CODE' |
597 |
+ |
'' |
598 |
|
'Order by A.LAST_NAME' |
599 |
|
) |
600 |
|
ModifySQL.Strings = ( |