AddUtilReason(String,Int32,Int32,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,String,Int32,DateTime) Method
- Last UpdatedNov 06, 2025
- 2 minute read
The AddUtilReason() method adds a utilization reason.
For this overload of the method, the time-related parameters being passed are required. Also, this overload of the method includes a lastEditAt DateTime parameter that can be used for optimistic concurrency control.
'Declaration
Public Overloads Shared Function AddUtilReason( _
ByVal reasDesc As String, _
ByVal reasonGrpID 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 defLabCD As String, _
ByVal displaySeq As Integer, _
ByRef LastEditAt As Date _
) As Integer
public static int AddUtilReason(
string reasDesc,
int reasonGrpID,
int stateCD,
bool runTime,
bool downTime,
bool setupTime,
bool teardownTime,
bool fixedTime,
bool varTime,
string defLabCD,
int displaySeq,
out DateTime LastEditAt
)
Parameters
- reasDesc
- Required. Holds the description string.
- reasonGrpID
- Required. Holds the group ID integer.
- stateCD
- Required. Holds the state code integer.
- runTime
- Required. Holds a flag that, if set to true, specifies that the utilization reason counts toward run time.
- downTime
- Required. Holds a flag that, if set to true, specifies that the utilization reason counts toward down time.
- setupTime
- Required. Holds a flag that, if set to true, specifies that the utilization reason counts toward setup time.
- teardownTime
- Required. Holds a flag that, if set to true, specifies that the utilization reason counts toward teardown time.
- fixedTime
- Required. Holds a flag that, if set to true, specifies that the utilization reason counts toward fixed time.
- varTime
- Required. Holds a flag that, if set to true, specifies that the utilization reason counts toward var time.
- defLabCD
- Required. Holds the default labor code to be used for the utilization reason being added.
- displaySeq
- Required. Holds the utilization reason's display sequence number.
- LastEditAt
Output. Holds a returned DateTime that is the lastEditAt date/time value for the utilization reason record being added. Can be used in other methods for optimistic concurrency control.
Return Value
Returns an integer that is the new reason's code.