Example #1
0
 public Afiliado()
 {
     this._nAF_Id                    = (long)0;
     this._sAF_NombreUsuario         = string.Empty;
     this._sAF_Password              = string.Empty;
     this._nTI_Id                    = 10;
     this._nES_Id                    = (long)2;
     this._nCO_Id                    = (long)0;
     this._sAF_PasswordTransacciones = "";
     this._sAF_PreguntaDesafio       = "";
     this._sAF_RespuestaPD           = "";
     this._sCedula                   = "";
     this._sTarjeta                  = "9999999999999999";
     this._sClPhoenix                = string.Empty;
     this._nST_Id                    = (long)2;
     this._sAF_Rif                   = string.Empty;
     this._nFI_Id                    = 21;
     this._nAF_Tipo                  = 2;
     this._nAF_IniciaTr              = 2;
     this._nAF_ApruebaTr             = 2;
     this._nST_PassTransacciones     = (long)2;
     this._AF_CodCliente             = (long)0;
     this._CO_Email                  = string.Empty;
     this._CO_Celular                = string.Empty;
     SessionAfiliado sessionAfiliado = new SessionAfiliado();
 }
Example #2
0
 public static IBBAV.Entidades.SessionAfiliado SA_CreateSession(long AF_Id)
 {
     IBBAV.Entidades.SessionAfiliado sessionAfiliado = new IBBAV.Entidades.SessionAfiliado();
     try
     {
         DataSet dataSet = HelperSession.ws.SA_CreateSession(AF_Id);
         if (dataSet.Tables.Count > 0)
         {
             DataTable item = dataSet.Tables[0];
             if ((item.TableName == "SqlException" ? true : item.TableName == "Exception"))
             {
                 throw new IBException(int.Parse(item.Rows[0]["NumeroError"].ToString().Trim()), "SQLIB");
             }
             DataRow dataRow = item.Rows[0];
             sessionAfiliado.AF_Id         = long.Parse(dataRow["AF_ID"].ToString());
             sessionAfiliado.Sesion        = dataRow["sesion"].ToString();
             sessionAfiliado.SES_CodStatus = dataRow["SES_CodStatus"].ToString();
         }
     }
     catch (WebException webException)
     {
         IBException bException = new IBException(webException.Message, "SQLIB");
     }
     catch (SoapException soapException)
     {
         IBException bException1 = new IBException(soapException.Message);
     }
     return(sessionAfiliado);
 }
Example #3
0
        public static bool SA_UpdateSession(IBBAV.Entidades.SessionAfiliado sa)
        {
            bool flag = false;

            try
            {
                flag = HelperSession.ws.SA_UpdateSession(IBBAV.Entidades.SessionAfiliado.getNewWSSessionAfiliado(sa));
            }
            catch (WebException webException)
            {
                throw new IBException(webException.Message, "SQLIB");
            }
            return(flag);
        }
Example #4
0
 public static IBBAV.Entidades.SessionAfiliado SA_GetSession(string sesion)
 {
     IBBAV.Entidades.SessionAfiliado sessionAfiliado = null;
     try
     {
         IBBAV.WsSession.SessionAfiliado sessionAfiliado1 = HelperSession.ws.SA_GetSession(sesion);
         if (sessionAfiliado1 != null)
         {
             sessionAfiliado = new IBBAV.Entidades.SessionAfiliado(sessionAfiliado1);
         }
     }
     catch (WebException webException)
     {
         throw new IBException(webException.Message, "SQLIB");
     }
     return(sessionAfiliado);
 }
Example #5
0
        public static string ValidateSession(string sesion)
        {
            string sESCodStatus = "I";

            if (IBBAVConfiguration.ValidarSesion)
            {
                try
                {
                    IBBAV.Entidades.SessionAfiliado now = HelperSession.SA_GetSession(sesion);
                    if (now != null)
                    {
                        sESCodStatus = now.SES_CodStatus;
                        if (sESCodStatus == "A")
                        {
                            long     num       = DateAndTime.DateDiff(DateInterval.Second, now.TiempoInicio, DateTime.Now);
                            string[] strArrays = IBBAVConfiguration.SessionTimeOut.Split(new char[] { ':' });
                            if (num > long.Parse(strArrays[0]) * (long)60 + long.Parse(strArrays[1]))
                            {
                                now.SES_CodStatus = "I";
                                now.TiempoFin     = DateTime.Now;
                            }
                            else
                            {
                                now.TiempoInicio = DateTime.Now;
                            }
                            HelperSession.SA_UpdateSession(now);
                        }
                    }
                }
                catch (WebException webException)
                {
                    throw new IBException(webException.Message, "SQLIB");
                }
            }
            else
            {
                sESCodStatus = "A";
            }
            return(sESCodStatus);
        }
Example #6
0
 public Afiliado(long nAF_IdIn, string sAF_NombreUsuarioIn, string sAF_PasswordIn, int nTI_IdIn, long nES_IdIn, long nCO_IdIn, string sAF_PasswordTransaccionesIn, string sAF_PreguntaDesafioIn, string sAF_RespuestaPDIn, long nST_IdIn, string sAF_RifIn)
 {
     this._nAF_Id                    = nAF_IdIn;
     this._sAF_NombreUsuario         = sAF_NombreUsuarioIn;
     this._sAF_Password              = sAF_PasswordIn;
     this._nTI_Id                    = nTI_IdIn;
     this._nES_Id                    = nES_IdIn;
     this._nCO_Id                    = nCO_IdIn;
     this._sAF_PasswordTransacciones = sAF_PasswordTransaccionesIn;
     this._sAF_PreguntaDesafio       = sAF_PreguntaDesafioIn;
     this._sAF_RespuestaPD           = sAF_RespuestaPDIn;
     this._nST_Id                    = nST_IdIn;
     this._sAF_Rif                   = sAF_RifIn;
     this._nFI_Id                    = this.nFI_Id;
     this._nAF_IniciaTr              = 2;
     this._nAF_ApruebaTr             = 2;
     this._nST_PassTransacciones     = (long)2;
     this._AF_CodCliente             = (long)0;
     this._sCO_Nombres               = string.Empty;
     this._sCO_Apellidos             = string.Empty;
     this._CO_Email                  = string.Empty;
     SessionAfiliado sessionAfiliado = new SessionAfiliado();
 }