extractEmployeeSchedulesByFilekey() Method

Table of Contents

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

Function

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

Syntax

  • AeScheduleAry = AeXMLBridge.extractEmployeeSchedulesByFilekey(Filekey, DateRangeEnum, MinDate, MaxDate);

Parameters

  • Integer - employee filekey
  • 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
int filekey = 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
{
TAeSchedule[] scheds = ws.extractEmployeeSchedulesByFilekey(filekey, 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
Dim filekey As Integer = 1234
' using employee 1234

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

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

Try
Dim scheds As TAeSchedule() = ws.extractEmployeeSchedulesByFilekey(filekey, 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 filekey
  • invalid date format

Preferred Method

extractEmployeeSchedules2ByIDNum

Alternate Method

extractEmployeeSchedulesByIDNum

appendEmployeeSchedule2ByIDNum
extractEmployeePeriodShiftSchedulesByIDNum
extractRangedSchedules2UsingHyperQuery
removeEmployeeScheduleByUniqueID
removeEmployeeSchedulesInRangeByIDNum

Back to Top