Update Method (ShiftSchedule)
- Last UpdatedMar 17, 2026
- 4 minute read
The Update() method updates all columns for the specified shift schedule record in the Shift_Schedule table. The record to be updated is identified by the patternId, startTime, endTime, and shiftId parameters.
'Declaration
Public Shared Sub Update( _
ByVal sessionId As Integer, _
ByVal patternId As Integer, _
ByVal startTime As Date, _
ByVal endTime As Date, _
ByVal endDaySpan As Integer, _
ByVal shiftId As Integer, _
ByVal sunday As Boolean, _
ByVal monday As Boolean, _
ByVal tuesday As Boolean, _
ByVal wednesday As Boolean, _
ByVal thursday As Boolean, _
ByVal friday As Boolean, _
ByVal saturday As Boolean, _
ByVal break1Start As Nullable(Of Date), _
ByVal break1End As Nullable(Of Date), _
ByVal break2Start As Nullable(Of Date), _
ByVal break2End As Nullable(Of Date), _
ByVal break3Start As Nullable(Of Date), _
ByVal break3End As Nullable(Of Date), _
ByVal spare1 As String, _
ByVal spare2 As String, _
ByVal spare3 As String, _
ByVal spare4 As String, _
ByVal spare5 As String, _
ByVal spare6 As String, _
ByRef lastEditAt As Date _
)
'Usage
Dim sessionId As Integer
Dim patternId As Integer
Dim startTime As Date
Dim endTime As Date
Dim endDaySpan As Integer
Dim shiftId As Integer
Dim sunday As Boolean
Dim monday As Boolean
Dim tuesday As Boolean
Dim wednesday As Boolean
Dim thursday As Boolean
Dim friday As Boolean
Dim saturday As Boolean
Dim break1Start As Nullable(Of Date)
Dim break1End As Nullable(Of Date)
Dim break2Start As Nullable(Of Date)
Dim break2End As Nullable(Of Date)
Dim break3Start As Nullable(Of Date)
Dim break3End As Nullable(Of Date)
Dim spare1 As String
Dim spare2 As String
Dim spare3 As String
Dim spare4 As String
Dim spare5 As String
Dim spare6 As String
Dim lastEditAt As Date
ShiftSchedule.Update(sessionId, patternId, startTime, endTime, endDaySpan, shiftId, sunday, monday, tuesday, wednesday, thursday, friday, saturday, break1Start, break1End, break2Start, break2End, break3Start, break3End, spare1, spare2, spare3, spare4, spare5, spare6, lastEditAt)
public static void Update(
int sessionId,
int patternId,
DateTime startTime,
DateTime endTime,
int endDaySpan,
int shiftId,
bool sunday,
bool monday,
bool tuesday,
bool wednesday,
bool thursday,
bool friday,
bool saturday,
Nullable<DateTime> break1Start,
Nullable<DateTime> break1End,
Nullable<DateTime> break2Start,
Nullable<DateTime> break2End,
Nullable<DateTime> break3Start,
Nullable<DateTime> break3End,
string spare1,
string spare2,
string spare3,
string spare4,
string spare5,
string spare6,
ref DateTime lastEditAt
)
Parameters
- sessionId
- Required. Holds the session ID and thus the user who is making this method call.
- patternId
- Required. Holds the ID of the shift pattern to which the shift is assigned.
- startTime
- Required. Holds the shift's start time (the date portion of the parameter is ignored). When the shift pattern for this shift schedule is assigned to entities, this time is considered to be in the local time specific to each entity.
- endTime
- Required. Holds the shift's end time (the date portion of the parameter is ignored). When the shift pattern for this shift schedule is assigned to entities, this time is considered to be in the local time specific to each entity.
- endDaySpan
Required. Holds the shift's end day span.
For a shift that spans one or more days, this property specifies the number of days beyond the start day of the day the shift ends. A shift can span up to 6 additional days. If the shift does not span into another day, set the value to 0.
- shiftId
- Required. Holds the ID of the shift to which the schedule applies.
- sunday
- Required. Holds a flag that, if set to true, specifies that the shift is enabled on Sunday.
- monday
- Required. Holds a flag that, if set to true, specifies that the shift is enabled on Monday.
- tuesday
- Required. Holds a flag that, if set to true, specifies that the shift is enabled on Tuesday.
- wednesday
- Required. Holds a flag that, if set to true, specifies that the shift is enabled on Wednesday.
- thursday
- Required. Holds a flag that, if set to true, specifies that the shift is enabled on Thursday.
- friday
- Required. Holds a flag that, if set to true, specifies that the shift is enabled on Friday.
- saturday
- Required. Holds a flag that, if set to true, specifies that the shift is enabled on Saturday.
- break1Start
- Required. Holds the shift's break1 start time (the date portion of the parameter is ignored).
- break1End
- Required. Holds the shift's break1 end time (the date portion of the parameter is ignored).
- break2Start
- Required. Holds the shift's break2 start time (the date portion of the parameter is ignored).
- break2End
- Required. Holds the shift's break2 end time (the date portion of the parameter is ignored).
- break3Start
- Required. Holds the shift's break3 start time (the date portion of the parameter is ignored).
- break3End
- Required. Holds the shift's break3 end time (the date portion of the parameter is ignored).
- spare1
- Required. Holds new content for the spare1 field.
- spare2
- Required. Holds new content for the spare2 field.
- spare3
- Required. Holds new content for the spare3 field.
- spare4
- Required. Holds new content for the spare4 field.
- spare5
- Required. Holds new content for the spare5 field.
- spare6
- Required. Holds new content for the spare6 field.
- lastEditAt
Required. Holds the date/time when this record was added or last edited, for optimistic concurrency control. The passed value must match the lastEditAt value in the record for the update to succeed.
Output. Holds the date/time value when this record was updated by this called method.