Add Method (LaborCat)
- Last UpdatedNov 06, 2025
- 2 minute read
The Add() method adds a new labor category record to the Labor_Cat table.
'Declaration
Public Shared Sub Add( _
ByVal sessionId As Integer, _
ByVal labCd As String, _
ByVal labDesc As String, _
ByVal fixedtime As Boolean, _
ByVal vartime As Boolean, _
ByVal color As Integer, _
ByVal stdCrew As DBDouble, _
ByVal lastEditComment As DBString, _
ByRef lastEditAt As Date _
)
'Usage
Dim sessionId As Integer
Dim labCd As String
Dim labDesc As String
Dim fixedtime As Boolean
Dim vartime As Boolean
Dim color As Integer
Dim stdCrew As DBDouble
Dim lastEditComment As DBString
Dim lastEditAt As Date
LaborCat.Add(sessionId, labCd, labDesc, fixedtime, vartime, color, stdCrew, lastEditComment, lastEditAt)
public static void Add(
int sessionId,
string labCd,
string labDesc,
bool fixedtime,
bool vartime,
int color,
DBDouble stdCrew,
DBString lastEditComment,
out DateTime lastEditAt
)
Parameters
- sessionId
- Required. Holds the session ID and thus the user who is making this method call.
- labCd
- Required. Holds the code for this labor category.
- labDesc
- Required. Holds the description for this labor category.
- fixedtime
- Required. Holds a flag that, if set to true, specifies that this labor is a fixed-time category. If this flag is set to true, the varTime flag must be set to false.
- vartime
- Required. Holds a flag that, if set to true, specifies that this labor is a variable-time category. If this flag is set to true, the fixedTime flag must be set to false.
- color
- Required. Holds an integer that identifies the background color for this labor category when displayed in the user interface.
- stdCrew
- Optional. Holds the default standard number of workers for this labor category.
- lastEditComment
- Optional. Holds comments that describes why this record is being added.
- lastEditAt
- Output. Holds the returned date/time when this record was added. The lastEditAt parameter is used by other methods that modify or delete this type of record for optimistic concurrency control.
Observe the following input parameter rules:
- Required non-DB* parameters: Must pass a value. Cannot be empty or null.
- Optional non-DB* parameters: Either enter a value or pass a null. If passing a null and a default value has been defined, the default value will be used for the parameter.
- Required DB* parameters: Must pass a value. To enter an empty value for the parameter, pass DB*.null (e.g., DBInt.null).
- Optional DB* parameters: To enter no value for the parameter, pass DB*.null (e.g., DBInt.null). To use the default value for the parameter if one has been defined for the object being added, pass a null.