GetAll Method (UserName)
- Last UpdatedNov 06, 2025
- 4 minute read
The GetAll() method retrieves one or more user name records from the User_Name table, as specified by the filter parameters. Passing no filter parameters will retrieve all user name records from the table.
'Declaration
Public Shared Function GetAll( _
ByVal userId As String, _
ByVal userDesc As String, _
ByVal active As Nullable(Of Boolean), _
ByVal hourlyCost As Nullable(Of Double), _
ByVal langId As Nullable(Of Integer), _
ByVal defaultDeptId As String, _
ByVal lastLogIn As Nullable(Of Date), _
ByVal lastPasswordChange As Nullable(Of Date), _
ByVal authMethod As Nullable(Of Integer), _
ByVal defaultLabCd As String, _
ByVal spare1 As String, _
ByVal spare2 As String, _
ByVal spare3 As String, _
ByVal spare4 As String, _
ByVal lastEditBy As String, _
ByVal lastEditAt As Nullable(Of Date) _
) As DataSet
'Usage
Dim userId As String
Dim userDesc As String
Dim active As Nullable(Of Boolean)
Dim hourlyCost As Nullable(Of Double)
Dim langId As Nullable(Of Integer)
Dim defaultDeptId As String
Dim lastLogIn As Nullable(Of Date)
Dim lastPasswordChange As Nullable(Of Date)
Dim authMethod As Nullable(Of Integer)
Dim defaultLabCd As String
Dim spare1 As String
Dim spare2 As String
Dim spare3 As String
Dim spare4 As String
Dim lastEditBy As String
Dim lastEditAt As Nullable(Of Date)
Dim value As DataSet
value = UserName.GetAll(userId, userDesc, active, hourlyCost, langId, defaultDeptId, lastLogIn, lastPasswordChange, authMethod, defaultLabCd, spare1, spare2, spare3, spare4, lastEditBy, lastEditAt)
public static DataSet GetAll(
string userId,
string userDesc,
Nullable<bool> active,
Nullable<double> hourlyCost,
Nullable<int> langId,
string defaultDeptId,
Nullable<DateTime> lastLogIn,
Nullable<DateTime> lastPasswordChange,
Nullable<int> authMethod,
string defaultLabCd,
string spare1,
string spare2,
string spare3,
string spare4,
string lastEditBy,
Nullable<DateTime> lastEditAt
)
Parameters
- userId
Optional filter parameter. Holds the ID of a user. For example, an employee number or name of an employee.
- userDesc
- Optional filter parameter. Holds the description for a user. For example, name of an employee.
- active
- Optional filter parameter. Holds a flag that specifies whether the state of the user is active in the MES system.
- hourlyCost
- Optional filter parameter. Holds the cost of a labor per hour.
- langId
- Optional filter parameter. Holds the ID of a user's preferred language.
- defaultDeptId
- Optional filter parameter. Holds the default department ID of a user.
- lastLogIn
Optional filter parameter. Holds the date and time when a user last logged on to the system, in local time (stored in UTC).
- lastPasswordChange
- Optional filter parameter. Holds the date and time when a user last changed the password, in local time (stored in UTC).
- authMethod
- Optional filter parameter. Holds an authentication method. The value 0 indicates "Internal" and 1 indicates "Windows (future)".
- defaultLabCd
Optional filter parameter. Holds the default labor code of a user.
- spare1
- Optional filter parameter. Holds the contents of a user-defined spare1 field.
- spare2
- Optional filter parameter. Holds the contents of a user-defined spare2 field.
- spare3
- Optional filter parameter. Holds the contents of a user-defined spare3 field.
- spare4
- Optional filter parameter. Holds the contents of a user-defined spare4 field.
- lastEditBy
- Optional filter parameter. A string which contains the ID of the user who created or last modified this record.
- lastEditAt
- Optional filter parameter. Holds the date/time when a user name record was added or last updated.
Return Value
Returns a DataSet that contains all the records in the User_Name table that satisfy the specified filters. If no matching records are found, an empty DataSet is returned.
The columns of the returned DataSet are described below.
| ColumnName | Description |
|---|---|
| user_id | A string that is the user ID. |
| user_desc | A string that is the user description. |
| active | A Boolean that indicates whether the user account is active in the MES system. |
| hourly_cost | A double that is the user's hourly labor cost. |
| email_address | A string that is the user's email address. |
| lang_id | An integer that is the ID of the user's preferred language. |
| def_dept_id | A string that is the ID of the user's default department. |
| dept_desc | A string that is the description of the user's department. |
| last_login | A string that is the date and time when the user last logged in to the system in the local time of the MES Middleware server where the login was processed. |
| last_pw_change | A string that is the date and time when the user last changed their password in the local time of the MES Middleware server where the password change was processed. |
| auth_method |
An integer that is the enumeration that indicates the authentication method. 0 = internal 1 = Windows (future) |
| def_lab_cd | A string that is the user's default labor code. |
| smtp_server | A string that is the SMTP email server for the user's email address. |
| pop3_server | A string that is the POP3 email server for the user's email address. |
| email_account | A string that is the user's email account name. |
| email_pw | A string that is the password for the user's email account. |
| spare1 | A string that is the user-defined content of the spare1 field. |
| spare2 | A string that is the user-defined content of the spare2 field. |
| spare3 | A string that is the user-defined content of the spare3 field. |
| spare4 | A string that is the user-defined content of the spare4 field. |
| last_edit_comment | A string that is the comments about why the record was added or updated. |
| last_edit_by | A string that is the ID of the user who added or last updated this record. |
| last_edit_at | A datetime that is the date and time, in UTC, when the record was created or last updated. |
| mod_id | A string that is the current modification ID of the attribute record in the User_Name table. This ID is binary number that increments each time the record's table row is modified. Optionally used for optimistic concurrency control when performing updates or deletes. |