Click or drag to resize

MPInterfacebUserLogin Method

User Login as a MARIProject User into the initialized Interface

Namespace:  MARIInterface
Assembly:  MARIInterface (in MARIInterface.dll) Version: 8.1.0.108
Syntax
public bool bUserLogin(
	string sUserName,
	string sPasswd
)

Parameters

sUserName
Type: SystemString
User name and not the four-digit initial of the user (compare Table MPBenutzer)

Linked Field: View: MARIUser.Name: :Table: MPBenutzer.Name

sPasswd
Type: SystemString
Password (case sensitivity)

Return Value

Type: Boolean
True if sucessfull
Remarks
The user under whose name the transfer is effected, will be transferred with the password to the function bUserLogin. Please refere to the oErrors class to read the error messages
Examples
Initialization Example
//Make sure, that the file MARIProjectConnection.xml is in the same folder as MARIEngine.dll. The first link to a MARIProject database will be used
MARIInterface.MPInterface MPInterface;
MPInterface = new MARIInterface.MPInterface();
//Initialize the interface
if (MPInterface.bInitInterface()) {
    // MARIProject user and password
    if (MPInterface.bUserLogin("MARINGO", "")) {

        // Start your code here...
        this.oMPInterface = MPInterface;

        //Add an Application.Idle Handler to call
        oMPInterface.ClearBusinessLogicBusyCash(); // when you are idle. This will allow to reload changes from other users in your Interface.

    } else {
        //                                           Read results from oError Object
        throw new SystemException("Login failed: " + MPInterface.oErrors.PrintErrors());
    }
} else {
    //                                           Read results from oError Object
    throw new SystemException("Login failed: " + MPInterface.oErrors.PrintErrors());
}
See Also