Update(Int32,Int32,String,Int32,Int32,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,DBString,Int32,Int32,DBInt,DBInt,DBDouble,DBDouble,DBDouble,Boolean,DBString,DBString,DBString,DBString,DBString,DateTime) Method
- Last UpdatedNov 06, 2025
- 4 minute read
The Update() method updates all columns for the specified utilization reason record in the Util_Reas table.
'Declaration
Public Overloads Shared Sub Update( _
ByVal sessionId As Integer, _
ByVal reasCd As Integer, _
ByVal reasDesc As String, _
ByVal reasGrpId As Integer, _
ByVal stateCd As Integer, _
ByVal runtime As Boolean, _
ByVal downtime As Boolean, _
ByVal setuptime As Boolean, _
ByVal teardownTime As Boolean, _
ByVal fixedtime As Boolean, _
ByVal vartime As Boolean, _
ByVal failure As Boolean, _
ByVal defLabCd As DBString, _
ByVal displaySeq As Integer, _
ByVal priority As Integer, _
ByVal maxDuration As DBInt, _
ByVal newReasonCode As DBInt, _
ByVal standardTime As DBDouble, _
ByVal minTime As DBDouble, _
ByVal maxTime As DBDouble, _
ByVal entityEnabled As Boolean, _
ByVal category1 As DBString, _
ByVal category2 As DBString, _
ByVal category3 As DBString, _
ByVal category4 As DBString, _
ByVal lastEditComment As DBString, _
ByRef lastEditAt As Date _
)
'Usage
Dim sessionId As Integer
Dim reasCd As Integer
Dim reasDesc As String
Dim reasGrpId As Integer
Dim stateCd As Integer
Dim runtime As Boolean
Dim downtime As Boolean
Dim setuptime As Boolean
Dim teardownTime As Boolean
Dim fixedtime As Boolean
Dim vartime As Boolean
Dim failure As Boolean
Dim defLabCd As DBString
Dim displaySeq As Integer
Dim priority As Integer
Dim maxDuration As DBInt
Dim newReasonCode As DBInt
Dim standardTime As DBDouble
Dim minTime As DBDouble
Dim maxTime As DBDouble
Dim entityEnabled As Boolean
Dim category1 As DBString
Dim category2 As DBString
Dim category3 As DBString
Dim category4 As DBString
Dim lastEditComment As DBString
Dim lastEditAt As Date
UtilReas.Update(sessionId, reasCd, reasDesc, reasGrpId, stateCd, runtime, downtime, setuptime, teardownTime, fixedtime, vartime, failure, defLabCd, displaySeq, priority, maxDuration, newReasonCode, standardTime, minTime, maxTime, entityEnabled, category1, category2, category3, category4, lastEditComment, lastEditAt)
public static void Update(
int sessionId,
int reasCd,
string reasDesc,
int reasGrpId,
int stateCd,
bool runtime,
bool downtime,
bool setuptime,
bool teardownTime,
bool fixedtime,
bool vartime,
bool failure,
DBString defLabCd,
int displaySeq,
int priority,
DBInt maxDuration,
DBInt newReasonCode,
DBDouble standardTime,
DBDouble minTime,
DBDouble maxTime,
bool entityEnabled,
DBString category1,
DBString category2,
DBString category3,
DBString category4,
DBString lastEditComment,
ref DateTime lastEditAt
)
Parameters
- sessionId
- Required. Holds the session ID and thus the user who is calling this method.
- reasCd
- Required. Holds the code for the utilization reason that is being updated.
- reasDesc
- Required. Holds the description for the utilization reason.
- reasGrpId
- Required. Holds the ID of the reason group to which the utilization reason is linked.
- stateCd
- Required. Holds the state code for the utilization reason.
- runtime
- Required. Holds a flag that, if set to true, specifies that the utilization reason counts toward runtime events.
- downtime
- Required. Holds a flag that, if set to true, specifies that the utilization reason counts toward downtime events.
- setuptime
- Required. Holds a flag that, if set to true, specifies that the utilization reason counts toward setup time events.
- teardownTime
- Required. Holds a flag that, if set to true, specifies that the utilization reason counts toward teardown time events.
- fixedtime
- Required. Holds a flag that, if set to true, specifies that the utilization reason counts toward fixed time events.
- vartime
- Required. Holds a flag that, if set to true, specifies that the utilization reason counts toward variable time events.
- failure
- Required. Holds a flag that, if set to true, specifies that any time that the entity spends in this utilization reason code is considered failure time.
- defLabCd
- Optional. Holds the default labor code to be used for the utilization reason when it is manually selected.
- displaySeq
- Required. Holds the utilization reason's display sequence number. This number determines the order of utilization reasons when they are listed under their utilization reason group in the user interface.
- priority
- Required. Holds the utilization reason's priority, which is used to determine the reason for a line that has two or more bottleneck entities with differing reasons.
- maxDuration
Required. Holds the maximum duration, in seconds, that is used with setting a Severe flag or with the newReasonCode parameter.
- If the newReasonCode parameter is not being used (that is, it is null) and the maximum duration is exceeded, the reason is marked as being Severe and the event is considered to be in a severe condition. The Severe flag is typically used with downtime events.
- If the newReasonCode parameter is being used and the maximum duration is exceeded, the utilization reason for the entity is changed to the new reason specified in the newReasonCode parameter.
- newReasonCode
- Required. Holds the utilization reason to which the reason should change when the maximum duration is exceeded.
- standardTime
- Required. Holds the standard amount of time, in minutes, that an entity is expected to be in this utilization reason.
- minTime
- Required. Holds the minimum amount of time, in minutes, that an entity is expected to be in this utilization reason.
- maxTime
- Required. Holds the maximum amount of time, in minutes, that an entity is expected to be in this utilization reason.
- entityEnabled
- Required. Holds the flag that, if set to true, indicates that an entity in this utilization reason is considered to be enabled.
- category1
- Optional. Holds a user-defined field that describes a category1.
- category2
- Optional. Holds a user-defined field that describes a category2.
- category3
- Optional. Holds a user-defined field that describes a category3.
- category4
- Optional. Holds a user-defined field that describes a category4.
- lastEditComment
- Optional. Holds comments that describes why this record is being updated.
- lastEditAt
Required. Holds the date/time when this record was added or last updated, 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 the record was updated by this called method.