Exemple #1
0
 public static bool LogOn(
     string login_in,
     string password_in,
     OGen.NTier.Kick.Libraries.BusinessLayer.Shared.hasErrors_errorFound errorFound_in
     )
 {
     int[] _errors;
     return(logon(
                login_in,
                password_in,
                errorFound_in,
                out _errors
                ));
 }
Exemple #2
0
            private static bool logon(
                string login_in,
                string password_in,
                OGen.NTier.Kick.Libraries.BusinessLayer.Shared.hasErrors_errorFound errorFound_in,
                out int[] errors_out
                )
            {
                long _iduser;

                long[] _idpermissions;
                string _login       = login_in;
                string _sessionguid = Guid.NewGuid().ToString("N");

                if (login_in.IndexOf('@') >= 0)
                {
                    BusinessInstances.WEB_User.InstanceClient.Login(
                        login_in,
                        password_in,

                        _sessionguid,
                        ClientIPAddress,

                        Utilities.IDApplication,

                        out _iduser,
                        out _login,
                        out _idpermissions,
                        out errors_out
                        );
                }
                else
                {
                    BusinessInstances.CRD_Authentication.InstanceClient.Login(
                        login_in,
                        password_in,

                        _sessionguid,
                        ClientIPAddress,

                        Utilities.IDApplication,

                        out _iduser,
                        out _idpermissions,
                        out errors_out
                        );
                }

                if (OGen.NTier.Kick.Libraries.BusinessLayer.Shared.ErrorType.hasErrors(
                        errors_out,
                        errorFound_in
                        ))
                {
                    LogOff();

                    return(false);
                }
                else
                {
                    SessionGuid   = _sessionguid;
                    IDUser        = _iduser;
                    IDPermissions = _idpermissions;
                    Login         = login_in;

                    return(true);
                }
            }