Add Method (ShiftSched)
- Last UpdatedMar 17, 2026
- 3 minute read
The Add() method adds a shift schedule record to the Shift_Sched table.
Note: This method is no longer supported. Instead, use the corresponding method in the ShiftSchedule class.
'Declaration
<ObsoleteAttribute("ShiftSched.Add method is no longer supported. Please call the corresponding updated method.")>
Public Shared Sub Add( _
ByVal sessionId As Integer, _
ByVal entId As Integer, _
ByVal startDay As Integer, _
ByVal shiftId As Integer, _
ByVal startTime As Date, _
ByVal endTime As Date, _
ByVal break1Start As DBDateTime, _
ByVal break1End As DBDateTime, _
ByVal break2Start As DBDateTime, _
ByVal break2End As DBDateTime, _
ByVal break3Start As DBDateTime, _
ByVal break3End As DBDateTime, _
ByVal lastEditComment As DBString, _
ByRef lastEditAt As Date _
)
'Usage
Dim sessionId As Integer
Dim entId As Integer
Dim startDay As Integer
Dim shiftId As Integer
Dim startTime As Date
Dim endTime As Date
Dim break1Start As DBDateTime
Dim break1End As DBDateTime
Dim break2Start As DBDateTime
Dim break2End As DBDateTime
Dim break3Start As DBDateTime
Dim break3End As DBDateTime
Dim lastEditComment As DBString
Dim lastEditAt As Date
ShiftSched.Add(sessionId, entId, startDay, shiftId, startTime, endTime, break1Start, break1End, break2Start, break2End, break3Start, break3End, lastEditComment, lastEditAt)
[Obsolete("ShiftSched.Add method is no longer supported. Please call the corresponding updated method.")]
public static void Add(
int sessionId,
int entId,
int startDay,
int shiftId,
DateTime startTime,
DateTime endTime,
DBDateTime break1Start,
DBDateTime break1End,
DBDateTime break2Start,
DBDateTime break2End,
DBDateTime break3Start,
DBDateTime break3End,
DBString lastEditComment,
out DateTime lastEditAt
)
Parameters
- sessionId
- Required. Holds the session ID and thus the user who is making this method call.
- entId
Required. Holds the ID of the entity to which the shift schedule applies.
- startDay
- Required. Holds an integer that indicates the shift's start day of the week. The value 0 = Sunday and 6 = Saturday.
- shiftId
- Required. Holds the ID of the shift to which the schedule applies.
- startTime
- Required. Holds the shift's start time (the date is ignored).
- endTime
- Required. Holds the shift's end time (the date is ignored).
- break1Start
- Required. Holds the shift's break1 start time (the date is ignored).
- break1End
- Required. Holds the shift's break1 end time (the date is ignored).
- break2Start
- Required. Holds the shift's break2 start time (the date is ignored).
- break2End
- Required. Holds the shift's break2 end time (the date is ignored).
- break3Start
- Required. Holds the shift's break3 start time (the date is ignored).
- break3End
- Required. Holds the shift's break3 end time (the date is ignored).
- lastEditComment
- Optional. Holds comments that describes why this record is being added.
- lastEditAt
- Output. Holds the returned date/time when this record was added. The lastEditAt parameter is used by other methods that modify or delete this type of record for optimistic concurrency control.
Observe the following input parameter rules:
- Required non-DB* parameters: Must pass a value. Cannot be empty or null.
- Optional non-DB* parameters: Either enter a value or use the default, if one has been defined for the object being added, by passing a null.
- Required DB* parameters: Must pass a value. To enter an empty value for the parameter, pass DB*.null (e.g., DBInt.null).
- Optional DB* parameters: To enter no value for the parameter, pass DB*.null (e.g., DBInt.null). To use the default value for the parameter if one has been defined for the object being added, pass a null.