Add Method (Site)
- Last UpdatedNov 06, 2025
- 2 minute read
The Add() method adds a new site information record to the site table in the database.
'Declaration
Public Shared Sub Add( _
ByVal sessionId As Integer, _
ByVal entId As Integer, _
ByVal siteName As DBString, _
ByVal corporation As DBString, _
ByVal division As DBString, _
ByVal subDivision As DBString, _
ByVal regionId As String, _
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 entId As Integer
Dim siteName As DBString
Dim corporation As DBString
Dim division As DBString
Dim subDivision As DBString
Dim regionId As String
Dim spare1 As DBString
Dim spare2 As DBString
Dim spare3 As DBString
Dim spare4 As DBString
Dim lastEditComment As DBString
Dim lastEditAt As Date
Site.Add(sessionId, entId, siteName, corporation, division, subDivision, regionId, spare1, spare2, spare3, spare4, lastEditComment, lastEditAt)
public static void Add(
int sessionId,
int entId,
DBString siteName,
DBString corporation,
DBString division,
DBString subDivision,
string regionId,
DBString spare1,
DBString spare2,
DBString spare3,
DBString spare4,
DBString lastEditComment,
out DateTime lastEditAt
)
Parameters
- sessionId
- Required. Holds the session ID and thus the user who is making this method call.
- entId
- Required. An integer value holds the entity id
- siteName
- Optional. A string value holds the site at which this entity is located. If null, sites are not being used.
- corporation
- Optional.A string value holds the corporation to which this site belongs
- division
- Optional. A string value holds the division within the corporation to which this site belongs.
- subDivision
- Optional. A string value holds the sub-division within this division of the corporation to which this site belongs.
- regionId
- Required. A string value holds region id associated with this site. This is the Id value obtained from the .Net TimeZoneInfo class.
- spare1
- Optional. A string value holds Spare1 field
- spare2
- Optional. A string value holds Spare2 field
- spare3
- Optional. A string value holds Spare3 field
- spare4
- Optional. A string value holds Spare4 field
- lastEditComment
- Optional. A string value holds comments about why this record is being added.
- lastEditAt
- Output. Holds the returned date/time when this record was created. The lastEditAt parameter is used in other methods that modify or delete this type of record for optimistic concurrency control.