-
Notifications
You must be signed in to change notification settings - Fork 0
/
CompLeaveSummary.asp
86 lines (58 loc) · 2.54 KB
/
CompLeaveSummary.asp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<!--#include virtual="/eVacation_DEV2/common/appglobal.asp" -->
<%
strCurrentPageName = "Comp Leave Summary"
'**** INITIALISE CURRENT USER AND EE TO VIEW OBJECTS ****
mInitialiseCurrentUser
mInitialiseEEtoView
If Request.Form("update") = "yes" Then
updateEmployees objEEtoView
End if
mWriteHMTLTop strCurrentPageName
mWriteNavBar strCurrentPageName
Dim compTime
'**** GRANT COMPENSATORY TIME TO EE ****
If request.Form("formname") = "frmGrantCompTime" Then
' Load details from form (Grant Comp. Time Form)
Set compTime = new cObjCompTime
compTime.LoadFromGrantForm
' TO DO: Validate the form
' TO DO: Check if user's total comp days will not go over CONST_MAX_ANNUAL_COMP_DAYS limit if this request is processed
'response.Write "Status = " & compTime.Status & "<br>"
' TO DO: Send an email to the employee notifying them about the comp. time
' TO DO: Add a new "Comp. Time" leave request to the DB
compTime.Save
response.write "<center>"
response.write "<br>"
response.write "<b>You have successfully granted " & CompTime.EE.FirstNm & compTime.EE.LastNm & " (" & strRequestEEWWID & ") " & request("fldlngCompDays") & " day"
If 1 <> request("fldlngCompDays") then
response.Write "s"
End If
response.write " Compensatory Leave</b><br>"
response.write "<br>"
response.write "</center>"
End If
'**** GRANT COMPENSATORY TIME TO EE ****
If request.Form("formname") = "frmRevokeCompTime" Then
' Load details from form (Grant Comp. Time Form)
Set compTime = new cObjCompTime
' compTime.LoadFromGrantForm
' TO DO: Validate the form
' TO DO: Check if user's total comp days will not go over CONST_MAX_ANNUAL_COMP_DAYS limit if this request is processed
'response.Write "Status = " & compTime.Status & "<br>"
' TO DO: Send an email to the employee notifying them about the comp. time
' TO DO: Add a new "Comp. Time" leave request to the DB
'compTime.Delete
response.write "<center>"
response.write "<br>"
response.write "<b>You have successfully revoked " & CompTime.EE.FirstNm & compTime.EE.LastNm & " (" & strRequestEEWWID & ") " & request("fldlngCompDays") & " day"
If 1 <> request("fldlngCompDays") then
response.Write "s"
End If
response.write " Compensatory Leave</b><br>"
response.write "<br>"
response.write "</center>"
End If
mWriteTeamLeaveSummary objEEtoView
mWritePageFooter
%>
<!--#include virtual="/eVacation_DEV2/common/appglobalend.asp" -->