ClientSession Class Members
- Last UpdatedNov 06, 2025
- 12 minute read
The following tables list the members exposed by ClientSession.
| Name | Description | |
|---|---|---|
![]() | _topLevelFont | The font of the parent form from which the Login is being performed. |
| Name | Description | |
|---|---|---|
![]() | ApplicationName | The ApplicationName property contains the name of the application creating the session. The application name is passed to the Logon dialog for display. |
![]() | ClientType | The ClientType property is a read-only property that contains the client type as an enumerated value. The client type is one of the types from the ClientTypes enumeration that signifies the client that is currently using the session. Examples of client types include Operator and DataEditor. |
![]() | curUser | The curUser property is a read/write property that contains a reference to the current user object. Setting this property will cause a UserChanged event to be fired. |
![]() | DBMSName | The DBMSName property is a read-only property that contains the name of the database management system to which this instance is connected. |
![]() | EntitiesRequired | The EntitiesRequired property contains a flag that indicates whether or not an application requires entities. If the flag is true, an entity logon (or job-based logon) dialog is presented when a user logs on through the Switch User dialog. |
![]() | IsHostedByInTouch | The IsHostedByInTouch property is a read-only property that contains a flag that indicates whether or not InTouch is the host for the controls. |
![]() | IsHostedByOMI | The IsHostedByOMI property is a read-only property that contains a flag that indicates whether or not OMI is the host for the controls. |
![]() | IsInTouchUserLoggedIn | The IsIntouchUserLoggedIn property is a read-only property that contains a flag that indicates whether or not a user is logged onto InTouch. |
![]() | IsOMIUserLoggedIn | The IsOMIUserLoggedIn property is a read-only property that contains a flag that indicates whether or not a user is logged onto OMI. |
![]() | IsSingleSignOnEnabled | The IsSingleSignOnEnabled property is a read-only property that contains a flag that indicates if single sign-on in InTouch or OMI is enabled. If InTouch or OMI security is turned on, then MES attempts to use the InTouch/OMI user for signing on to MES. |
![]() | LicenseInfo | The LicenseInfo property is a read-only property that contains a reference to the current LicenseInfo object. |
![]() | MainForm | The MainFormproperty is a read-only property that contains the value of the Main form of the application. If the top level application is not a .NET program (such as InTouch), the property contains a null value. |
![]() | MESVersion | The MESVersion property is a read-only property that contains the MES version to which this instance is connected. |
![]() ![]() | MiddlewareAccess | The MiddlewareAccess property is a class-level property that contains the Middleware access method. |
![]() ![]() | ObjectCounter | The ObjectCounter property is a read/write property that contains the count of deployed objects under an engine. |
![]() | SelectForm | The SelectForm property is a read-only property that contains an object that implements the ISelectForm. This can be passed to the button bar to allow forms to be selected for the OpenForm button. |
![]() | SessionId | The SessionId property is a read-only property that contains the current session ID. If a session has not been started, the property returns a value of -1. |
![]() | ShowLanguageIDs | The ShowLanguageIDs property contains a flag that indicates whether language IDs are shown for translatable strings. This can be helpful when trying to translate to a new language, as you see the string IDs in context. This property is used when creating a new LangStrings object, which is done when a user is added to the system. Changing this property does not affect the LangStrings objects of any user already logged onto the system. It is best to set this property at startup. |
![]() | SystemAttrs | The SystemAttrs property is a read-only property that contains a reference to the current SystemAttr object. This object is used to check the values of the system attributes. |
![]() | TopLevelFont | The TopLevelFont property is a read-only property that contains the font of the parent dialog from which the logon occurred. |
![]() ![]() | UIPlatform | The UIPlatform property is a class-level property that contains the Middleware access method. |
![]() | UserList | The UserList property is a read-only property that contains a list of all users who are currently logged onto this session. |
| Name | Description | |
|---|---|---|
![]() | ChangePassword | The ChangePassword() method opens the Change Password dialog to allow the user to change their password. If the user does not cancel the dialog, the user's password is changed to the new password. |
![]() | CheckSessionHealth | The CheckSessionHealth() method checks for the session and creates it if it does not exist. |
![]() | ClearFormLoginStatus | The ClearFormLoginStatus() method removes the dialog's name from the Form Login Status collection. The dialog name is used when there are multiple controls on a dialog that might request a logon. If the user cancels one logon request, the user should not be presented with logon requests from the rest of the controls on the dialog. This method should be called when the dialog is being destroyed. |
![]() | CloseChildForms | The CloseChildForms() method recursively calls itself to close all open dialogs. This method does not work inside of InTouch. |
![]() | EndSession | The EndSession() method ends the current session with the Middleware. |
![]() ![]() | GetAllGeneralParameters | The GetAllGeneralParameters() method retrieves all system parameters. |
![]() | GetCurUserCurEntInfo | Overloaded. This overload of the GetCurUserCurEntInfo() method retrieves a DataRow from the current user's entity status DataSet for the specified entity and job position. The DataRow contains the information about the job currently running on the entity. |
![]() | GetDS | The GetDS() method retrieves a DataSet based on the XML containing a call to the Middleware. |
![]() | GetDSbySQL | The GetDSbySQL() method retrieves a new DataSet based on the SQL statement passed as a parameter. The SQL statement must be a single SELECT statement. |
![]() ![]() | GetInstance | The GetInstance() method is a class-level method that returns a client session object. The first time this method is called, it creates the ClientSession object. Thereafter, it returns the ClientSession object created by the first call. The ClientSession object is the main entry point into the Client API. It holds the list of logged in users and the current user. |
![]() | GetLangStringsObject | The GetLangStringsObject() method retrieves a LangStrings object for the specified language. The LangStrings object contains the language strings used by MES for UI and error messages. |
![]() | GetServerTime | The GetServerTime() method retrieves the time from the Database server. |
![]() | GetVersion | The GetVersion() method gets the version of the assembly that is currently executing. |
![]() | Login | The Login() method attempts to log the specified user onto the session without prompting the user for a user ID or password. The user's ID and password are passed to the session as parameters. The session must exist or the logon attempt fails. |
![]() | LoginWithDialog | Overloaded. The LoginWithDialog() method opens the Login dialog to allow a user name and password to be entered. The dialog then attempts to log the user on using the information entered. If the Login dialog is canceled or errors, it records that fact along with the name of the dialog that called for the logon. This prevents the Login dialog from being opened for any other controls on the same dialog. |
![]() | LogOffAllUsers | The LogOffAllUsers() method logs off all users without any prompts. |
![]() | LogOffCurrentUser | The LogOffCurrentUser() method logs off the current user from the session and opens the Switch User dialog to log on another user. |
![]() | LogOffUser | Overloaded. The LogOffUser() method logs off the specified user from the session. This overload of the method includes a flag that determines whether to display a confirmation dialog after the user attempts to log off. |
![]() | OnRefreshControls | The OnRefreshControls() method causes the current user's entity status to be refreshed and causes a RefreshControls event to be fired. |
![]() | PopupSwitchUserDialog | Overloaded. The PopupSwitchUserDialog() method opens the Switch User dialog. If called and no users are currently logged onto the session, the normal logon is processed. Otherwise, the Switch User dialog is loaded. If a new user is logged on, the logon ent dialog automatically displays. |
![]() | RefreshCurUserStatusDataSet | The RefreshCurUserStatusDataSet() method updates the current user's entity status. It creates a record set that contains the job information for all entities to which the user is logged on. This record set can be retrieved by calling the GetCurUserCurEntInfo() method. |
![]() | RefreshSystemAttributes | The RefreshSystemAttributes() method refreshes the in-memory system attribute by re-reading the system attributes from the database. |
![]() | RemoveControlFromOMISingleSignOn |
The RemoveControlFromOMISingleSignOn() method removes the control from the list of controls using OMI single sign-on. |
![]() | RemoveControlFromSingleSignOn |
The RemoveControlFromSingleSignOn() method removes the control from the list of controls using a single sign-on. |
![]() | SendXMLCmd | Overloaded. The SendXMLCmd() method submits an XML command to the Middleware. This overload of the method simply returns the XML response to the caller as a string, whether the command was executed successfully or not. No analysis or decoding is performed on the result. |
![]() | SetupSingleSignOn | Overloaded. The SetupSingleSignOn() method is called by a control when the control is running inside OMI or InTouch. It allows for MES controls to use the logged-on OMI or InTouch user as the MES user. It also registers the control as using single sign-on. |
![]() | StartLoggingXMLMsgs | The StartLoggingXMLMsgs() method starts a message logging session. This logs all XML commands sent to the Middleware through the ClientSession object's SendXMLCmd() methods. |
![]() | StartSession | The StartSession() method starts a session with the Middleware for the specified client type or joins the caller to the current session if a session has already been started. The client type is one of the types from the ClientTypes enumeration, which signifies the client that is currently using the session. Examples of client types include Operator and DataEditor. The Middleware checks that sufficient licenses of this client type are available before allowing the session. If successful, the session ID is saved as a private variable and exposed as a read-only property. |
![]() | StopLoggingXMLMsgs | The StopLoggingXMLMsgs() method terminates a message logging session. This method also saves the cached logs to the file specified in the StartLoggingXMLMsgs() method. |
![]() | SwitchUser | The SwitchUser() method switches between users already logged onto the current session. This method sets the curUser property and causes a UserChanged event to fire. This method also changes the name of user associated with the session in the database. Setting the curUser property updates the current user on the client side, but it does not change the database. |
![]() | UpdateSystemParameter | The UpdateSystemParameter() method updates the value of the specified system parameter. |
![]() | VerifyUser | The VerifyUser() method verifies that the user ID matches an existing user and that the password is correct for the user. |
| Name | Description | |
|---|---|---|
![]() | OnUserChanged | Function to raise the UserChanged event by invoking the relevant delegates. "sender" is always the current instance of the class, "eventargs" are specified by relevant delegate |
| Name | Description | |
|---|---|---|
![]() | DataLogChanged | Delegate for the Job Status Changed event, which is fired when the status of a job running on one of the user's entities changes. |
![]() | EntChanged | Event fired when the current entity is changed. |
![]() | EntListChanged | Event fired when the list of logged in entities is changed. |
![]() | JobQtyChanged | Delegate for the Job Quantity Changed event, which is fired when the quantity or produced or consumed material of a job running on one of the user's entities changes. |
![]() | JobStatusChanged | Delegate for the Job Status Changed event, which is fired when the status of a job running on one of the user's entities changes. |
![]() | OEEChanged | Delegate definition for the OEEChanged event. |
![]() | RefreshControls | Event fired to force a refresh of all (visible) MES controls. |
![]() | UserChanged | Event fired when the current user is changed. |
![]() | UtilReasonChanged | Delegate definition for the UtilReasonChanged event. |
![]() | UtilReasonReqd | Delegate definition for the UtilReasonReqd event. |
![]() | UtilStateChanged | Delegate definition for the UtilStateChanged event. |





