Add(Int32,Int32,Int32,DBString,Double,Double,DBString,DBString,DBString,DBString,DBString,Int32,DateTime) Method
- Last UpdatedNov 06, 2025
- 3 minute read
The Add() method adds a new uom conversion record to the Uom_Conv table.
This overload of the method includes spare field parameters for adding user-defined content to the record.
'Declaration
Public Overloads Shared Sub Add( _
ByVal sessionId As Integer, _
ByVal fromUomId As Integer, _
ByVal toUomId As Integer, _
ByVal itemId As DBString, _
ByVal factor As Double, _
ByVal offset As Double, _
ByVal spare1 As DBString, _
ByVal spare2 As DBString, _
ByVal spare3 As DBString, _
ByVal spare4 As DBString, _
ByVal lastEditComment As DBString, _
ByRef rowId As Integer, _
ByRef lastEditAt As Date _
)
'Usage
Dim sessionId As Integer
Dim fromUomId As Integer
Dim toUomId As Integer
Dim itemId As DBString
Dim factor As Double
Dim offset As Double
Dim spare1 As DBString
Dim spare2 As DBString
Dim spare3 As DBString
Dim spare4 As DBString
Dim lastEditComment As DBString
Dim rowId As Integer
Dim lastEditAt As Date
UomConv.Add(sessionId, fromUomId, toUomId, itemId, factor, offset, spare1, spare2, spare3, spare4, lastEditComment, rowId, lastEditAt)
public static void Add(
int sessionId,
int fromUomId,
int toUomId,
DBString itemId,
double factor,
double offset,
DBString spare1,
DBString spare2,
DBString spare3,
DBString spare4,
DBString lastEditComment,
out int rowId,
out DateTime lastEditAt
)
Parameters
- sessionId
- Required. Holds the session ID and thus the user who is making this method call.
- fromUomId
- Required. Holds the ID of the starting unit of measure.
- toUomId
- Required. Holds the ID of the resulting unit of measure.
- itemId
- Optional. Holds the ID of the item for which the conversion is valid. A null indicates that the conversion is valid for all items.
- factor
- Required. Holds the factor by which the quantity is multiplied. This value cannot be 0.
- offset
- Required. Holds the offset added to the multiplied quantity to obtain the final result.
- spare1
- Optional. Holds user-defined content for the spare1 field. The default is null.
- spare2
- Optional. Holds user-defined content for the spare2 field. The default is null.
- spare3
- Optional. Holds user-defined content for the spare3 field. The default is null.
- spare4
- Optional. Holds user-defined content for the spare4 field. The default is null.
- lastEditComment
- Optional. Holds comments that describe why this record is being added.
- rowId
- Output. Holds the ID of the row.
- lastEditAt
- Output. Holds the returned date and 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.