Exemplo n.º 1
0
        //Recuperar Sesion.
        public int RecoverSession(UserModel user, string pIp)
        {
            Random randNum = new Random();
            int sessionID = 111111111;
            int connectionType = 3;
            int pSesionCaida = Engine.SesionCaida;

            return Engine.p4bEstablecerSesion
                (
                user.username,
                user.password,
                user.domain.name,
                sessionID,
                pIp,
                connectionType,
                pSesionCaida
                );
        }
Exemplo n.º 2
0
        //Destruit Sesion
        public int DestroySession(UserModel user, string pIp)
        {
            Random randNum = new Random();
            EnvironmentFactory environmentFactory = new EnvironmentFactory();
            Domain domain = environmentFactory.GetDomain(user.domain);
            int pSesionCaida = Engine.SesionCaida;

            return Engine.p4bEstablecerSesion
                (
                user.username,
                user.password,
                user.domain.name,
                randNum.Next(999999999),
                pIp,
                domain.connectionType,
                pSesionCaida
                );
        }
Exemplo n.º 3
0
        //Manejo de sesion.

        //Establecer sesion.
        public int EstablishSession(UserModel user, string pIp)
        {
            Random randNum = new Random();
            int sessionID = 111111111;
            int pSesionCaida = 0;

            EnvironmentFactory environmentFactory = new EnvironmentFactory();
            Domain domain = environmentFactory.GetDomain(user.domain);
            environmentFactory.Release();


            return Engine.p4bEstablecerSesion
                (
                user.username,
                user.password,
                user.domain.name,
                sessionID,
                pIp,
                domain.connectionType,
                pSesionCaida
                );
        }