EPolWS
EPolConsole Main
Home
Account
ep_test.txt
SerializableBase
DbConnectionBase
EPolESForm
DbSTable
EmailFactory.cs
epmain
EPolES
DbVariableView.cs
ProfileView
EPolLOcal Main
Page Main Example
EPolWS EPolWS.asmx
EPolWS EPolWS.cs
CommandManager
CommandFactory
CommandFactoryBase
OrganisationView
EPolConsole Main
DbEPBase.cs
DbRecordArray
DbTable

Enter subhead content here

using System;

using EPol;

using System.IO;

namespace EPolConsole

{

/// <summary>

/// Summary description for Class1.

/// </summary>

class EPolConsole

{

/// <summary>

/// The main entry point for the application.

/// </summary>

[STAThread]

static void Main(string[] args)

{

EPolWebService oEPolWebService = new EPolWebService();

Console.WriteLine( LOGIN_MESSAGE );

string strLoginID= Console.ReadLine();

string strPassword= null;

if ( oEPolWebService.bCheckLogin(strLoginID) )

{

do

{

if ( oEPolWebService.bIsLocked(strLoginID) )

{

Console.WriteLine(EXCEED_NUMBER_OF_LOGIN_TRY);

return;

}

Console.WriteLine( ENTER_PASSWORD_MESSAGE);

strPassword= Console.ReadLine();

} while( oEPolWebService.bCheckPassword(strLoginID, strPassword, LANGUAGE_ID));

}

else

{

Console.WriteLine( LOGIN_UNKNOWN_MESSAGE );

strPassword= Console.ReadLine();

if ( strPassword == "no")

{

return;

}

else

{

Console.WriteLine( REENTER_PASSWORD_MESSAGE);

string strPassword2= Console.ReadLine();

if (oEPolWebService.bSetPassword(strLoginID, strPassword,strPassword2, LANGUAGE_ID)== false)

{

Console.WriteLine(PASSWORD_UNMATCH);

}

}

}

Console.WriteLine( LOGIN_UNKNOWN_MESSAGE );

string strEmail= Console.ReadLine();

oEPolWebService.bSetAttribute("Email", strEmail);

/*

string strPublicID = strLoginID + ".0";

Console.WriteLine( strPublicID );

Console.WriteLine( CHANGE_PUBLIC_PROFILE_NAME );

string strNewPublicProfile = Console.ReadLine();

if ( strNewPublicProfile != "" && strNewPublicProfile != "no" )

{

oEPolWebService.AddAvatar(strPublicID, nDefaultLanguage);

}

*/

// Console.Write( strInput);

}

 

const string LOGIN_MESSAGE = "Type your login ID. If you are not registered, a new one will be created";

const string ENTER_PASSWORD_MESSAGE = "Enter your password";

const string REENTER_PASSWORD_MESSAGE = "Reenter your password";

const string LOGIN_UNKNOWN_MESSAGE = "This login does not exist. Please, type a password to register the login. Otherwise, type no";

const string EXCEED_NUMBER_OF_LOGIN_TRY= "You have exceed the number of login tried";

const string PASSWORD_UNMATCH= "Your password does not match";

const string ENTER_AN_EMAIL_ADRESS_TO_RECOVER_YOUR_PASSWORD= "Please, enter an email adress to recover your password";

const string CHANGE_PUBLIC_PROFILE_NAME= "Do you want to change your public profile name. If no, type no ? ";

 

const int LANGUAGE_ID =0;

}

}

Enter supporting content here