Update Method (ShiftPattern)
- Last UpdatedNov 06, 2025
- 2 minute read
The Update() method updates all columns for the specified shift pattern record in the Shift_Pattern table.
'Declaration
Public Shared Sub Update( _
ByVal sessionId As Integer, _
ByVal patternId As Integer, _
ByVal patternName As String, _
ByVal startEffLocal As Date, _
ByVal endEffLocal As Nullable(Of Date), _
ByVal recurring As Boolean, _
ByVal additive As Boolean, _
ByVal enabled As Boolean, _
ByVal comments As String, _
ByRef lastEditAt As Date _
)
'Usage
Dim sessionId As Integer
Dim patternId As Integer
Dim patternName As String
Dim startEffLocal As Date
Dim endEffLocal As Nullable(Of Date)
Dim recurring As Boolean
Dim additive As Boolean
Dim enabled As Boolean
Dim comments As String
Dim lastEditAt As Date
ShiftPattern.Update(sessionId, patternId, patternName, startEffLocal, endEffLocal, recurring, additive, enabled, comments, lastEditAt)
public static void Update(
int sessionId,
int patternId,
string patternName,
DateTime startEffLocal,
Nullable<DateTime> endEffLocal,
bool recurring,
bool additive,
bool enabled,
string comments,
ref DateTime lastEditAt
)
Parameters
- sessionId
- Required. Holds the session ID and thus the user who is making this method call.
- patternId
- Required. Holds the shift pattern ID.
- patternName
- Required. Holds the shift pattern name.
- startEffLocal
- Required. Holds effective local start time of the shift pattern.
- endEffLocal
- Required. Holds effective local end time of the shift pattern.
- recurring
- Required. Holds a flag that, if set to true, specifies that the pattern's shift schedule is recurring (a regular or overtime shift) within its effective time period. If set to false, specifies that the pattern is a holiday exception and that it cannot have a shift schedule.
- additive
- Required. Holds a flag that, if set to true, specifies that the shift is additive (Overtime). If set to false, specifies that the shift is a regular shift. Only used when recurring is true.
- enabled
- Required. Holds a flag that, if set to true, specifies that the shift pattern is enabled.
- comments
- Required. Holds comments about the shift pattern.
- lastEditAt
Required. Holds the datetime 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 datetime value when this record was updated by this called method.