submitTimeOffRequest() Method

Table of Contents

  1. Function
  2. Syntax
  3. Parameters
  4. Return Value
  5. Sample Code
  6. Remarks
  7. Possible Errors
  8. Alternate Methods
  9. Related Methods

Function

  • Submits an employee’s time off request

Syntax

  • AeXMLBridge.submitTimeOffRequest(AeTimeOffRequest);

Parameters

Return Value

  • None

Sample Code

C#

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
TAeTimeOffRequest tor = new TAeTimeOffRequest();

tor.BenefitID = 1;
// use getBenefitsSimple() method if you do not know the Benefit ID

tor.EmpID = "1234";
// using employee with ID 1234

tor.RequestTimeOffTypeEnum = TRequestTimeOffTypeEnum.rtoOneDay;
tor.Hours = 480;
// this field contains total minutes (hours * 60)

tor.StartDate = DateTime.Now.AddDays(7).ToString("yyyy-MM-dd");
// hard code date if known

try
{
ws.submitTimeOffRequest(tor);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}

VB.Net

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Dim tor As New TAeTimeOffRequest()

tor.BenefitID = 1
' use getBenefitsSimple() method if you do not know the Benefit ID

tor.EmpID = "1234"
' using employee with ID 1234

tor.RequestTimeOffTypeEnum = TRequestTimeOffTypeEnum.rtoOneDay
tor.Hours = 480
' this field contains total minutes (hours * 60)

tor.StartDate = DateTime.Now.AddDays(7).ToString("yyyy-MM-dd")
' hard code date if known

Try
ws.submitTimeOffRequest(tor)
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try

Remarks

  • Use getBenefitsSimple to retrieve a list of benefit values if needed
  • Need to set either EmpID or Filekey value within the TAeTimeOffRequest structure
  • Not supplying a StartDate will default it to 12/30/99
  • Not supplying a BenefitID will default it to zero

Possible Errors

  • Invalid filekey and/or employee ID

Alternate Methods

submitTimeOffRequestEx
submitTimeOffRequestMess

approveCancelLeaveRequestEntry
approveCancelLeaveRequestEntryMess
approveLeaveRequestEntry
approveLeaveRequestEntryEx
approveLeaveRequestEntryMess
denyCancelLeaveRequestEntry
denyCancelLeaveRequestEntryMess
denyLeaveRequestEntryEx
denyLeaveRequestEntryMess
describeLeaveRequestEntry
empCancelLeaveRequestEntry
empCancelLeaveRequestEntryMess
empRemoveLeaveRequestEntry
empRemoveLeaveRequestEntryMess
extractEmployeeLeaveRequest
extractEmployeeLeaveRequestsByIDNum
extractEmployeeLeaveRequestHist
extractLeaveRequestsByState
extractTimeOffRequestStates
leaveRequestIsCancelable
leaveRequestIsRemovable
removeLeaveRequestEntry

Back to Top