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

  • Removes schedules for an employee that fall within the desired date range

Syntax

  • AeXMLBridge.removeEmployeeSchedulesInRangeByIDNum(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

  • None

Sample Code

C#

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

TDateRangeEnum dateRange = TDateRangeEnum.drCustom;
string minDate = DateTime.Now.ToString("yyyy-MM-dd");
string maxDate = DateTime.Now.AddDays(60).ToString("yyyy-MM-dd");
// since we are using drCustom as the TDateRangeEnum value, we set the date parameters

try
{
ws.removeEmployeeSchedulesInRangeByIDNum(empID, dateRange, minDate, maxDate);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}

VB.Net

1
2
3
4
5
6
7
8
9
10
11
12
13
Dim empID As String = "1234"
' using employee with ID 1234

Dim dateRange As TDateRangeEnum = TDateRangeEnum.drCustom
Dim minDate As String = DateTime.Now.ToString("yyyy-MM-dd")
' since we are using drCustom as the TDateRangeEnum value, we set the date parameters
Dim maxDate As String = DateTime.Now.AddDays(60).ToString("yyyy-MM-dd")

Try
ws.removeEmployeeSchedulesInRangeByIDNum(empID, dateRange, minDate, maxDate)
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try

Remarks

  • None

Possible Errors

  • Unable to locate employee with identifier
  • yyyy-mm-dd is required [Date supplied in invalid format]

Alternate Methods

removeEmployeeSchedulesInRangeByFilekey

appendEmployeeSchedule2ByIDNum
extractEmployeePeriodShiftSchedulesByIDNum
extractEmployeeSchedules2ByIDNum
extractRangedSchedules2UsingHyperQuery
removeEmployeeScheduleByUniqueID

Back to Top