Login to database. This replaces the direct call to BusinessPrincipal.Login which has been deprecated to allow for consolidated connnection settings. This is a breaking change for v3.x api users

Namespace: GZTW.AyaNova.BLL
Assembly: GZTW.AyaNova.BLL (in GZTW.AyaNova.BLL.dll) Version: 7.0.0.0 (7.0.0.0)

Syntax

C#
public static void Login(
	string Username,
	string Password
)
Visual Basic
Public Shared Sub Login ( _
	Username As String, _
	Password As String _
)
Visual C++
public:
static void Login(
	String^ Username, 
	String^ Password
)

Parameters

Username
Type: System..::..String
AyaNova login name
Password
Type: System..::..String
AyaNova login password

Examples

After the call to Initialize() you're ready to login as follows:
CopyC#
//This is the default AyaNova trial login and password
   //and this is how you login to AyaNova
   AyaBizUtils.Login("manager","letmein");

   //confirm the user is logged in:
   if(Thread.CurrentPrincipal.Identity.IsAuthenticated==false)
   {
       //Nope, they are not authenticated so 
       //show an error and bail out
       MessageBox.Show("Login failed");
       return;
   }  

//At this point we're logged in an have access to the entire API within the rights of the logged in user

See Also