Esempio n. 1
0
			public static bool DoLogin(
				string login_in,
				string password_in,
				ErrorType.hasErrors_errorFound errorFound_in
			) {
				int[] _errors;
				return dologin(
					login_in,
					password_in,
					errorFound_in,
					out _errors
				);
			}
Esempio n. 2
0
			private static bool dologin(
				string login_in, 
				string password_in,
				ErrorType.hasErrors_errorFound errorFound_in, 
				out int[] errors_out
			) {
				long _iduser;
				long[] _idpermitions;
				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,

						utils.IDApplication,

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

						_sessionguid,
						ClientIPAddress,

						utils.IDApplication,

						out _iduser,
						out _idpermitions,
						out errors_out
					);
				}

				if (OGen.NTier.Kick.lib.businesslayer.shared.ErrorType.hasErrors(
					errors_out,
					errorFound_in
				)) {
					Logout();

					return false;
				} else {
					SessionGuid = _sessionguid;
					IDUser = _iduser;
					IDPermitions = _idpermitions;
					Login = login_in;

					return true;
				}
			}