/// <summary>
        /// Metodo para abrir la reserva a traves de comando
        /// </summary>
        /// <param name="str_Record">record</param>
        /// <returns>Respuesta del Command para verificacion</returns>
        /// <remarks>
        /// Autor:  Faustino Posas
        /// Fecha:  2011-10-07
        /// -- Control de cambios --
        /// Descripcion:
        /// Fecha:
        /// Responsable:
        /// </remarks>
        public string Abrir_ReservaCommand(String str_Record)
        {
            string sReponse = "Error";

            try
            {
                string sComando = "*" + str_Record;
                sReponse = Negocios_WebServiceSabreCommand._EjecutarComando(sComando);
            }
            catch { }
            return(sReponse);
        }
        public static void setFechaLimiteTiquete()
        {
            Negocios_WebServiceSabreCommand._EjecutarComandoSinRetorno("WP");
            string   ComandoPQ_ = Negocios_WebServiceSabreCommand._EjecutarComando("PQ");
            DateTime FechaPQ_   = new DateTime();

            ComandoPQ_ = clsValidaciones._Seleccionar_FechaExpedicionTickete(ComandoPQ_);

            if (ComandoPQ_ == null)
            {
                FechaPQ_ = DateTime.Today.AddDays(1);
                FechaPQ_ = FechaPQ_.AddMinutes(-1);
            }
            else
            {
                if (ComandoPQ_.Contains("/"))
                {
                    string[] sDate = ComandoPQ_.Split('/');
                    ComandoPQ_  = sDate[0] + DateTime.Now.Year;
                    ComandoPQ_ += " " + sDate[1].Insert(2, ":");
                }
                DateTime.TryParse(ComandoPQ_, out FechaPQ_);
            }
            int iHoras = 8;

            try
            {
                iHoras = clsSesiones.getCredentials().TimeLimit;
            }
            catch { }
            try
            {
                FechaPQ_ = FechaPQ_.AddHours(-iHoras);
            }
            catch
            {
                FechaPQ_ = DateTime.Today.AddDays(1);
                FechaPQ_ = FechaPQ_.AddMinutes(-1);
            }
            Ssoft.Utils.clsSesiones.SET_TICKETE(FechaPQ_);
        }
Esempio n. 3
0
    /// <summary>
    /// Metodo para incluir el registro de Ssoft
    /// </summary>
    /// <param name="sPNR">Record</param>
    /// <remarks>
    /// Autor:          José Faustino Posas
    /// Company:        Ssoft Colombia
    /// Fecha:          2012-02-06
    /// -------------------
    /// Control de Cambios
    /// -------------------
    /// Autor:
    /// Fecha:
    /// Descripción:
    /// </remarks>
    public static void _ADDRemarkSsoftOpen(string sPNR)
    {
        try
        {
            string sCommand   = "I";
            string sRespuesta = Negocios_WebServiceSabreCommand._EjecutarComando(sCommand);

            sCommand   = "*" + sPNR;
            sRespuesta = Negocios_WebServiceSabreCommand._EjecutarComando(sCommand);

            sCommand = "ASD/SS/" + sPNR + "/" + DateTime.Now.Year.ToString();
            _ADD(Enum_TipoRemark.Historico, sCommand);

            sCommand   = "6WEB";
            sRespuesta = Negocios_WebServiceSabreCommand._EjecutarComando(sCommand);

            sCommand   = "E";
            sRespuesta = Negocios_WebServiceSabreCommand._EjecutarComando(sCommand);
        }
        catch
        {
        }
    }
        public static string setResultComado(string sComand, string sSearch, int iPosIni, int iLength)
        {
            string sDato = string.Empty;

            try
            {
                string sComando = Negocios_WebServiceSabreCommand._EjecutarComando(sComand);
                if (sComando.Contains("\n"))
                {
                    string[] strResponse = sComando.Split('\n');
                    int      iPosGen     = 0;
                    try
                    {
                        iPosGen = strResponse.Length;
                    }
                    catch { }
                    for (int i = 0; i < iPosGen; i++)
                    {
                        if (strResponse[i].ToString().Contains(sSearch))
                        {
                            if (iLength.Equals(0))
                            {
                                sDato = strResponse[i].Trim();
                            }
                            else
                            {
                                sDato = strResponse[i].Substring(iPosIni, iLength).Trim();
                            }
                            break;
                        }
                    }
                }
            }
            catch { }
            return(sDato);
        }
Esempio n. 5
0
    /// <summary>
    /// Metodo para incluir el segmento futuro despues de cerrada la reserva
    /// Se debe tener en el web.config, la llave SegmentoFuturo, dentro del espacio de credenciales de sabre, si esta en 0, no lo toma
    /// </summary>
    /// <param name="sPNR">Record</param>
    /// <remarks>
    /// Autor:          José Faustino Posas
    /// Company:        Ssoft Colombia
    /// Fecha:          2012-02-14
    /// -------------------
    /// Control de Cambios
    /// -------------------
    /// Autor:
    /// Fecha:
    /// Descripción:
    /// </remarks>
    public static void _ADDSegmentoFuturo(string sPNR)
    {
        clsParametros objParametros = new clsParametros();

        try
        {
            int iDias = 280;
            try
            {
                iDias = clsSesiones.getCredentials().SegmentoFuturo;
            }
            catch { }
            if (iDias.Equals(0))
            {
                objParametros.Id       = 0;
                objParametros.Code     = "0";
                objParametros.Info     = "Segmento no incluido por ser valor 0";
                objParametros.Message  = "No icluye OTH";
                objParametros.Severity = clsSeveridad.Baja;
                objParametros.Metodo   = "clsRulesFromPrice.getRulesSegment()";
                objParametros.Tipo     = clsTipoError.WebServices;
                Ssoft.ManejadorExcepciones.ExceptionHandled.Publicar(objParametros);
            }
            else
            {
                string sCommand   = "I";
                string sRespuesta = Negocios_WebServiceSabreCommand._EjecutarComando(sCommand);

                sCommand   = "*" + sPNR;
                sRespuesta = Negocios_WebServiceSabreCommand._EjecutarComando(sCommand);

                DateTime dtm_Fecha_Segmento = DateTime.Now;
                /*SE SUMAN LOS 330 DIAS*/
                dtm_Fecha_Segmento = dtm_Fecha_Segmento.AddDays(iDias);
                /*OBTENEMOS EL MES EN LETRAS, EN INGLES*/
                string str_Mes_Letras = clsValidaciones.RetornaMesLetrasCorto(dtm_Fecha_Segmento.Month.ToString(), "en");
                String str_Dia        = dtm_Fecha_Segmento.Day.ToString();
                if (str_Dia.Length == 1)
                {
                    str_Dia = "0" + str_Dia;
                }

                sCommand   = "0OTHAAGK1BOG" + str_Dia + str_Mes_Letras.ToUpper();
                sRespuesta = Negocios_WebServiceSabreCommand._EjecutarComando(sCommand);

                sCommand   = "6WEB";
                sRespuesta = Negocios_WebServiceSabreCommand._EjecutarComando(sCommand);

                sCommand   = "ET";
                sRespuesta = Negocios_WebServiceSabreCommand._EjecutarComando(sCommand);
            }
        }
        catch (Exception Ex)
        {
            objParametros.Id          = 0;
            objParametros.Code        = "0";
            objParametros.Info        = "Segmento no incluido por ser error al ejecutar comando";
            objParametros.Message     = Ex.Message.ToString();
            objParametros.Complemento = "No icluye OTH";
            objParametros.Severity    = clsSeveridad.Baja;
            objParametros.Metodo      = "clsRulesFromPrice.getRulesSegment()";
            objParametros.Tipo        = clsTipoError.WebServices;
            Ssoft.ManejadorExcepciones.ExceptionHandled.Publicar(objParametros);
        }
    }