extractEmployeeSchedules2ByIDNum() 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

  • Returns an employee’s schedule data for a specified date range

Syntax

  • AeSchedule2Ary = AeXMLBridge.extractEmployeeSchedules2ByIDNum(IDNum, DateRangeEnum, MinDate, MaxDate);

Parameters

  • String - employee ID
  • Enumeration - TDateRangeEnum
  • String - begin date (yyyy-mm-dd format)
  • String - end date (yyyy-mm-dd format)

Return Value

Sample Code

C#

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
string empID = "1234";                                                     
// using employee "1234"

TDateRangeEnum dateRange = TDateRangeEnum.drNextMonth;
// want next months schedules

string beginDate = string.Empty;
string endDate = string.Empty;
// not using drCustom as the TDateRangeEnum value means we set the date parameters to nothing

try
{
TAeSchedule2[] sched2 = ws.extractEmployeeSchedules2ByIDNum(empID, dateRange, beginDate, endDate);
}
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
Dim empID As String = "1234"
' using employee "1234"

Dim dateRange As TDateRangeEnum = TDateRangeEnum.drNextMonth
' want next months schedules

Dim beginDate As String = String.Empty
' not using drCustom as the TDateRangeEnum value means we set the
Dim endDate As String = String.Empty
' date parameters to nothing

Try
Dim sched2 As TAeSchedule2() = ws.extractEmployeeSchedules2ByIDNum(empID, dateRange, beginDate, endDate)
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try

Remarks

  • When using drCustom as the TDateRangeEnum value, we must set the begin and end date parameters. Otherwise set to nothing

Possible Errors

  • Unable to locate employee with identifier
  • invalid date format

Alternate Methods

extractEmployeeSchedules2ByFilekey

appendEmployeeSchedule2ByIDNum
extractEmployeePeriodShiftSchedulesByIDNum
extractRangedSchedules2UsingHyperQuery
removeEmployeeScheduleByUniqueID
removeEmployeeSchedulesInRangeByIDNum

Back to Top