UpdateSpecific(Int32,Int32,String,Nullable<Int32>,Nullable<Int32>,Nullable<Boolean>,Nullable<Boolean>,Nullable<Boolean>,Nullable<Boolean>,Nullable<Boolean>,Nullable<Boolean>,Nullable<Boolean>,DBString,Nullable<Int32>,Nullable<Int32>,DBInt,DBInt,DBDouble,DBDouble,DBDouble,Nullable<Boolean>,DBString,DBString,DBString,DBString,DBString,DBString,DBString,DBString,DBString,DateTime) Method
- Last UpdatedNov 06, 2025
- 5 minute read
The UpdateSpecific() method updates selected columns for the specified utilization reason record in the Util_Reas table.
'Declaration
Public Overloads Shared Sub UpdateSpecific( _
ByVal sessionId As Integer, _
ByVal reasCd As Integer, _
ByVal reasDesc As String, _
ByVal reasGrpId As Nullable(Of Integer), _
ByVal stateCd As Nullable(Of Integer), _
ByVal runtime As Nullable(Of Boolean), _
ByVal downtime As Nullable(Of Boolean), _
ByVal setuptime As Nullable(Of Boolean), _
ByVal teardownTime As Nullable(Of Boolean), _
ByVal fixedtime As Nullable(Of Boolean), _
ByVal vartime As Nullable(Of Boolean), _
ByVal failure As Nullable(Of Boolean), _
ByVal defLabCd As DBString, _
ByVal displaySeq As Nullable(Of Integer), _
ByVal priority As Nullable(Of Integer), _
ByVal maxDuration As DBInt, _
ByVal newReasonCode As DBInt, _
ByVal standardTime As DBDouble, _
ByVal minTime As DBDouble, _
ByVal maxTime As DBDouble, _
ByVal entityEnabled As Nullable(Of Boolean), _
ByVal category1 As DBString, _
ByVal category2 As DBString, _
ByVal category3 As DBString, _
ByVal category4 As DBString, _
ByVal spare1 As DBString, _
ByVal spare2 As DBString, _
ByVal spare3 As DBString, _
ByVal spare4 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 Nullable(Of Integer)
Dim stateCd As Nullable(Of Integer)
Dim runtime As Nullable(Of Boolean)
Dim downtime As Nullable(Of Boolean)
Dim setuptime As Nullable(Of Boolean)
Dim teardownTime As Nullable(Of Boolean)
Dim fixedtime As Nullable(Of Boolean)
Dim vartime As Nullable(Of Boolean)
Dim failure As Nullable(Of Boolean)
Dim defLabCd As DBString
Dim displaySeq As Nullable(Of Integer)
Dim priority As Nullable(Of Integer)
Dim maxDuration As DBInt
Dim newReasonCode As DBInt
Dim standardTime As DBDouble
Dim minTime As DBDouble
Dim maxTime As DBDouble
Dim entityEnabled As Nullable(Of Boolean)
Dim category1 As DBString
Dim category2 As DBString
Dim category3 As DBString
Dim category4 As DBString
Dim spare1 As DBString
Dim spare2 As DBString
Dim spare3 As DBString
Dim spare4 As DBString
Dim lastEditComment As DBString
Dim lastEditAt As Date
UtilReas.UpdateSpecific(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, spare1, spare2, spare3, spare4, lastEditComment, lastEditAt)
public static void UpdateSpecific(
int sessionId,
int reasCd,
string reasDesc,
Nullable<int> reasGrpId,
Nullable<int> stateCd,
Nullable<bool> runtime,
Nullable<bool> downtime,
Nullable<bool> setuptime,
Nullable<bool> teardownTime,
Nullable<bool> fixedtime,
Nullable<bool> vartime,
Nullable<bool> failure,
DBString defLabCd,
Nullable<int> displaySeq,
Nullable<int> priority,
DBInt maxDuration,
DBInt newReasonCode,
DBDouble standardTime,
DBDouble minTime,
DBDouble maxTime,
Nullable<bool> entityEnabled,
DBString category1,
DBString category2,
DBString category3,
DBString category4,
DBString spare1,
DBString spare2,
DBString spare3,
DBString spare4,
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
- Optional. Holds the description for the utilization reason.
- reasGrpId
- Optional. Holds the ID of the reason group to which the utilization reason is linked.
- stateCd
- Optional. Holds the state code for the utilization reason.
- runtime
- Optional. Holds a flag that, if set to true, specifies that the utilization reason counts toward runtime events.
- downtime
- Optional. Holds a flag that, if set to true, specifies that the utilization reason counts toward downtime events.
- setuptime
- Optional. Holds a flag that, if set to true, specifies that the utilization reason counts toward setup time events.
- teardownTime
- Optional. Holds a flag that, if set to true, specifies that the utilization reason counts toward teardown time events.
- fixedtime
- Optional. Holds a flag that, if set to true, specifies that the utilization reason counts toward fixed time events.
- vartime
- Optional. Holds a flag that, if set to true, specifies that the utilization reason counts toward variable time events.
- failure
- Optional. 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
- Optional. 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
- Optional. 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
Optional. 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
- Optional. Holds the utilization reason to which the reason should change when the maximum duration is exceeded.
- standardTime
- Optional. Holds the standard amount of time, in minutes, that an entity is expected to be in this utilization reason.
- minTime
- Optional. Holds the minimum amount of time, in minutes, that an entity is expected to be in this utilization reason.
- maxTime
- Optional. 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.
- spare1
- Optional. Holds user-defined content for the spare1 field. Defaults to null.
- spare2
- Optional. Holds user-defined content for the spare2 field. Defaults to null.
- spare3
- Optional. Holds user-defined content for the spare3 field. Defaults to null.
- spare4
- Optional. Holds user-defined content for the spare4 field. Defaults to null.
- lastEditComment
- Optional. Holds comments that describes why this record is being updated.
- lastEditAt
Optional input. Holds the date/time when this record was added or last edited, for optimistic concurrency control. If it is specified, 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.
Observe the following input parameter rules:
- Optional non-DB* parameters: Either enter a new value or leave the existing value unchanged by passing a null.
- Optional DB* parameters: To clear the existing value and enter an empty value, pass DB*.null (e.g., DBInt.null). To leave the existing value unchanged, pass a null.