//Envía las instrucciones a MySabre
        private void CommandsSend()
        {
            int    row   = 0;
            int    col   = 0;
            string send  = string.Empty;
            string res   = string.Empty;
            string sabre = "QS/";


            send = string.Concat(sabre, txtPCC.Text, txtQueue.Text, "/A-", txtAgentCode.Text);
            using (CommandsAPI objCommand = new CommandsAPI())
            {
                res = objCommand.SendReceive(send);
            }
            CommandsQik.searchResponse(res, string.Concat("UPDATE PROCESSED"), ref row, ref col);
            if (row != 0 || col != 0)
            {
                User userData = UserBL.GetUser(txtFirm.Text, txtPCC.Text);

                if (AssignQueueFirmBL.AssignQueueFirm(txtQueue.Text, txtAgentCode.Text, txtPCC.Text))
                {
                    UpdateStatusAllFirmModulesBL.UpdateStatusQueue(txtQueue.Text);
                    UpdateStatusAllFirmModulesBL.UpdateUnassignStatusQueue(userData.Queue);
                    MessageBox.Show("QUEUE ASIGNADA CORRECTAMENTE", Resources.Constants.MYCTS, MessageBoxButtons.OK,
                                    MessageBoxIcon.Information);
                }
                else
                {
                    MessageBox.Show("HA OCURRIDO UN ERROR EN LA ACTUALIZACIÓN", Resources.Constants.MYCTS, MessageBoxButtons.OK,
                                    MessageBoxIcon.Information);
                }
            }
            else
            {
                MessageBox.Show("ERROR EN LA CONEXIÓN CON MySABRE", Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
示例#2
0
        /// <summary>
        /// Armado del comando que se envia a sabre
        /// </summary>
        private void BuildCommand()
        {
            string send = string.Concat("FT", txtLine.Text);

            if (!string.IsNullOrEmpty(txtAirline.Text))
            {
                send = string.Concat(send, "-", txtAirline.Text);
            }
            string sabreAnswer = string.Empty;

            using (CommandsAPI objCommand = new CommandsAPI())
            {
                sabreAnswer = objCommand.SendReceive(send);
            }
            int row = 0;
            int col = 0;

            CommandsQik.searchResponse(sabreAnswer, "REPEAT FQ ENTRY", ref row, ref col);
            if (row > 0)
            {
                MessageBox.Show("RE-DESPLIEGA CONSULTA DE TARIFAS", Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
        }
示例#3
0
        /// <summary>
        /// Obtiene el PCC en el que se trabaja
        /// </summary>
        public void GetPCC()
        {
            send        = string.Empty;
            sabreAnswer = string.Empty;
            row         = 0;
            col         = 0;
            //locatorrecord = RecordLocalizer.GetRecordLocalizer();
            //LogProductivity.PNR = locatorrecord;
            send = Resources.TicketEmission.Constants.COMMANDS_AST_S;
            using (CommandsAPI objCommand = new CommandsAPI())
            {
                sabreAnswer = objCommand.SendReceive(send);
            }

            CommandsQik.searchResponse(sabreAnswer, Resources.TicketEmission.ValitationLabels.PCC_0AUC, ref row, ref col);
            if (row > 0 || col > 0)
            {
                PCC = Resources.TicketEmission.ValitationLabels.PCC_0AUC;
            }
            else
            {
                PCC = string.Empty;
            }
        }
示例#4
0
        /// <summary>
        /// Vefirica el Record
        /// </summary>
        private void VerifyYieldedRecord()
        {
            string send        = string.Empty;
            string sabreAnswer = string.Empty;
            int    row         = 0;
            int    col         = 0;

            send = Resources.TicketEmission.Constants.COMMANDS_AST_P6;
            using (CommandsAPI objCommand = new CommandsAPI())
            {
                sabreAnswer = objCommand.SendReceive(send);
            }
            CommandsQik.searchResponse(sabreAnswer, Resources.TicketEmission.ValitationLabels.TA_SLASH, ref row, ref col, 1, 1, 15, 22);
            if (row != 0 || col != 0)
            {
                send = Resources.TicketEmission.Constants.COMMANDS_XPG;
                using (CommandsAPI objCommand = new CommandsAPI())
                {
                    objCommand.SendReceive(send);
                }
                MessageBox.Show(Resources.TicketEmission.Tickets.RECORD_CEDIDO_CERRAR_CERRAR_ANTES_BOLETEAR, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
        }
        /// <summary>
        /// Se envia el comando de acuerdo a los campos ingresados
        /// </summary>
        private void CommandsSend()
        {
            int    row         = 0;
            int    col         = 0;
            int    flag        = 0;
            bool   notcontinue = false;
            string result      = string.Empty;
            string sabre       = string.Empty;
            string change      = string.Empty;

            string send = string.Concat("HB", txtNumberFirm.Text);

            using (CommandsAPI objCommand = new CommandsAPI())
            {
                result = objCommand.SendReceive(send);
            }
            CommandsQik.searchResponse(result, "NEW EMPLOYEE", ref row, ref col);
            if (row != 0 || col != 0)
            {
                row = 0;
                col = 0;
                using (CommandsAPI objCommand = new CommandsAPI())
                {
                    objCommand.SendReceive("I");
                }
                MessageBox.Show(Resources.Reservations.LA_FIRMA_NO_EXISTE, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                txtNumberFirm.Focus();
                notcontinue = true;
            }
            if (!notcontinue)
            {
                sabre = string.Concat("H/AUTH BY ", txtAuthorization.Text);
                if (rdoAdd.Checked)
                {
                    change = string.Concat("H/UAT/A-");
                }
                else
                {
                    change = string.Concat("H/UAT/D-");
                }

                if (!string.IsNullOrEmpty(Keyword1))
                {
                    change = string.Concat(change, Keyword1);
                    flag   = 1;
                }
                if (!string.IsNullOrEmpty(Keyword2))
                {
                    if (flag == 1)
                    {
                        change = string.Concat(change, ",", Keyword2);
                    }
                    else
                    {
                        change = string.Concat(change, Keyword2);
                        flag   = 1;
                    }
                }
                if (!string.IsNullOrEmpty(Keyword3))
                {
                    if (flag == 1)
                    {
                        change = string.Concat(change, ",", Keyword3);
                    }
                    else
                    {
                        change = string.Concat(change, Keyword3);
                        flag   = 1;
                    }
                }
                if (!string.IsNullOrEmpty(Keyword4))
                {
                    if (flag == 1)
                    {
                        change = string.Concat(change, ",", Keyword4);
                    }
                    else
                    {
                        change = string.Concat(change, Keyword4);
                        flag   = 1;
                    }
                }
                if (!string.IsNullOrEmpty(Keyword5))
                {
                    if (flag == 1)
                    {
                        change = string.Concat(change, ",", Keyword5);
                    }
                    else
                    {
                        change = string.Concat(change, Keyword5);
                        flag   = 1;
                    }
                }

                using (CommandsAPI objCommand = new CommandsAPI())
                {
                    objCommand.SendReceive(sabre);
                    result = objCommand.SendReceive(change);
                }
                CommandsQik.searchResponse(result, "*", ref row, ref col);
                if (row != 0 || col != 0)
                {
                    row = 0;
                    col = 0;
                    using (CommandsAPI objCommand = new CommandsAPI())
                    {
                        result = objCommand.SendReceive("HE");
                        objCommand.SendReceive("I");
                    }
                    CommandsQik.searchResponse(result, "DONE", ref row, ref col);
                    if (row != 0 || col != 0)
                    {
                        row = 0;
                        col = 0;
                        CommandsAPI2.send_MessageToEmulator(string.Concat(Resources.Reservations.KEYWORDS_MODIFICADOS_EXITO));
                        MessageBox.Show(Resources.Reservations.FIRMA_MODIFICADA_EXITO, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }
                    else
                    {
                        MessageBox.Show(Resources.Reservations.PRESENTO_ERROR, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                        using (CommandsAPI objCommand = new CommandsAPI())
                        {
                            objCommand.SendReceive("I");
                        }
                    }
                }
                else
                {
                    MessageBox.Show(Resources.Reservations.PRESENTO_ERROR, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                    using (CommandsAPI objCommand = new CommandsAPI())
                    {
                        objCommand.SendReceive("I");
                    }
                }
            }
        }
        /// <summary>
        /// Verfifica los impuestos aplicables a la emision de boleto en curso, paso 6
        /// </summary>
        private void Taxes_StepSix()
        {
            int row = 0;
            int col = 0;

            send = Resources.TicketEmission.Constants.COMMANDS_TXN_AST_MX;
            using (CommandsAPI objCommands = new CommandsAPI())
            {
                result = objCommands.SendReceive(send);
            }
            //TaxCode1
            CommandsQik.searchResponse(result, Resources.TicketEmission.ValitationLabels.ONE, ref row, ref col);
            if (row != 0 || col != 0)
            {
                CommandsQik.CopyResponse(result, ref TaxCode1, row, 7, 2);
                txtTax1.Text = TaxCode1;
                row++;
                col = 0;
                //TaxCode2
                CommandsQik.searchResponse(result, Resources.TicketEmission.ValitationLabels.TWO, ref row, ref col);
                if (row != row - 1 || col != 0)
                {
                    CommandsQik.CopyResponse(result, ref TaxCode2, row, 7, 2);
                    txtTax2.Text = TaxCode2;
                    row++;
                    col = 0;
                    //TaxCode3
                    CommandsQik.searchResponse(result, Resources.TicketEmission.ValitationLabels.THREE, ref row, ref col);
                    if (row != row - 1 || col != 0)
                    {
                        CommandsQik.CopyResponse(result, ref TaxCode3, row, 7, 2);
                        txtTax3.Text = TaxCode3;
                        row++;
                        col = 0;
                        //TaxCode4
                        CommandsQik.searchResponse(result, Resources.TicketEmission.ValitationLabels.FOUR, ref row, ref col);
                        if (row != row - 1 || col != 0)
                        {
                            CommandsQik.CopyResponse(result, ref TaxCode4, row, 7, 2);
                            txtTax4.Text = TaxCode4;
                            row++;
                            col = 0;
                            //TaxCode5
                            CommandsQik.searchResponse(result, Resources.TicketEmission.ValitationLabels.FIVE, ref row, ref col);
                            if (row != row - 1 || col != 0)
                            {
                                CommandsQik.CopyResponse(result, ref TaxCode5, row, 7, 2);
                                txtTax5.Text = TaxCode5;
                                row++;
                                col = 0;
                                //TaxCode6
                                CommandsQik.searchResponse(result, Resources.TicketEmission.ValitationLabels.SIX, ref row, ref col);
                                if (row != row - 1 || col != 0)
                                {
                                    CommandsQik.CopyResponse(result, ref TaxCode6, row, 7, 2);
                                    txtTax6.Text = TaxCode6;
                                }
                            }
                        }
                    }
                }
            }
        }
        public static void err_phaseIVErrors(string result)
        {
            customusermsg = string.Empty;
            status        = false;
            int row = 0;
            int col = 0;

            //1
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.UNABLE_PAST_DATE_SEGMENT, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.UNABLE_PAST_DATE_SEGMENT, 19);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //2
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.CODE_HX_SEG_STATUS_NOT_ALLOWED, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.CODE_HX_SEG_STATUS_NOT_ALLOWED, 19);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //3
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.UNABLE_TO_ISSUE_PARTIAL_CONNECTION_TKT, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.UNABLE_TO_ISSUE_PARTIAL_CONNECTION_TKT, 19);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //4
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.NEED_PNR, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.NEED_PNR, 19);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //5
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.FORMAT, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.FORMAT, 19);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //6
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.XT_IN_TX_BOX, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.XT_IN_TX_BOX, 19);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //7
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.XF, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.XF, 19);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }
        }
        /// <summary>
        /// Generación de código de autorización a remark contable
        /// </summary>
        private void GeneratingAccountableRemark()
        {
            string active = activeStepsCorporativeQC.CorporativeQualityControls[0].RemarkContableAuthorization;

            if (active.Equals(Resources.TicketEmission.Constants.ACTIVE))
            {
                string send        = string.Empty;
                string sabreAnswer = string.Empty;
                string tempChar    = string.Empty;
                int    row         = 0;
                int    col         = 0;
                send = Resources.TicketEmission.Constants.COMMANDS_AST_P5;
                using (CommandsAPI objCommand = new CommandsAPI())
                {
                    sabreAnswer = objCommand.SendReceive(send);
                }
                CommandsQik.searchResponse(sabreAnswer, Resources.TicketEmission.ValitationLabels.DOT_W, ref row, ref col, 1, 18, 4, 7);
                if (row != 0 || col != 0)
                {
                    tempChar = string.Empty;
                    CommandsQik.CopyResponse(sabreAnswer, ref tempChar, row, 5, 10);
                }
                else
                {
                    using (CommandsAPI objCommand = new CommandsAPI())
                    {
                        send        = Resources.TicketEmission.Constants.COMMANDS_MD;
                        sabreAnswer = objCommand.SendReceive(send);
                    }
                    row = 0;
                    col = 0;
                    CommandsQik.searchResponse(sabreAnswer, Resources.TicketEmission.ValitationLabels.NOTHING_TO_SCROLL, ref row, ref col);
                    if (row != 0 || col != 0)
                    {
                    }
                    else
                    {
                        CommandsQik.searchResponse(sabreAnswer, Resources.TicketEmission.ValitationLabels.DOT_W, ref row, ref col, 1, 18, 4, 5);
                        if (row != 0 || col != 0)
                        {
                            tempChar = string.Empty;
                            CommandsQik.CopyResponse(sabreAnswer, ref tempChar, row, 5, 10);
                        }
                    }
                }
                if (!string.IsNullOrEmpty(tempChar))
                {
                    tempChar.Trim();
                    send = string.Concat(Resources.TicketEmission.Constants.COMMANDS_5_DOT,
                                         tempChar);
                    using (CommandsAPI objCommand = new CommandsAPI())
                    {
                        objCommand.SendReceive(send);
                    }
                }
                //UC = "billigAddress";//
                Loader.AddToPanel(Loader.Zone.Middle, this, Resources.TicketEmission.Constants.UCBILLINGADRESS);
            }
            else
            {
                //UC = "billigAddress";//
                Loader.AddToPanel(Loader.Zone.Middle, this, Resources.TicketEmission.Constants.UCBILLINGADRESS);
            }
        }
        /// <summary>
        /// Se envia el comando de acuerdo a los campos ingresados
        /// </summary>
        private void CommandsSend()
        {
            send = Resources.Constants.COMMANDS_WV + txtNumberLine.Text;

            using (CommandsAPI objCommand = new CommandsAPI())
            {
                result = objCommand.SendReceive(send);
            }
            CommandsQik.searchResponse(result, Resources.ErrorMessages.VOID_MSG_SENT_WITHIN_BSP_APPROVED, ref row, ref col);
            if (row != 0 || col != 0)
            {
                cancelTicket = true;
                sendInfo     = tktvoid;
                CancelTicket = true;

                if (!string.IsNullOrEmpty(tktvoid))
                {
                    existTKT = true;
                }

                row = 0;
                col = 0;
            }
            CommandsQik.searchResponse(result, Resources.ErrorMessages.VOID_MESSAGE_SENT, ref row, ref col);
            if (row != 0 || col != 0)
            {
                cancelTicket = true;
                sendInfo     = tktvoid;
                CancelTicket = true;

                if (!string.IsNullOrEmpty(tktvoid))
                {
                    existTKT = true;
                }

                row = 0;
                col = 0;
            }
            CommandsQik.searchResponse(result, Resources.ErrorMessages.NUMBER_PREVIOUSLY_VOIDED, ref row, ref col);
            if (row != 0 || col != 0)
            {
                cont         = cont - 1;
                cancelTicket = true;
                MessageBox.Show(Resources.Reservations.BOLETO_CANCELADO, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                cancelTKT          = true;
                txtNumberLine.Text = string.Empty;
                txtNumberLine.Focus();
                row = 0;
                col = 0;
            }
            CommandsQik.searchResponse(result, Resources.ErrorMessages.REENT_IF, ref row, ref col);
            if (row != 0 || col != 0)
            {
                cancelTicket = true;
                if (ValidateVICACancelTicket())
                {
                    string body = Resources.BodyMailCancelTicketResources.BODY;
                    body = body.Replace("[*usuario*]", Login.NombreCompleto);
                    body = body.Replace("[*boleto*]", tickets[countTicket]);
                    countTicket++;
                    //SendEmail("*****@*****.**", "mirera01", "MyCTS", Login.Mail, "", "Cancelación de Boleto", body, "", true);
                }
                row = 0;
                col = 0;
            }
            CommandsQik.searchResponse(result, Resources.ErrorMessages.VOID_EXCHANGE_RESTRICTED_BYCARRIER, ref row, ref col);
            if (row != 0 || col != 0)
            {
                MessageBox.Show(Resources.Reservations.BOLETO_NO_PUEDE_SER_CANCELADO, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                invalidCommand = false;
                Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
            }
            else if (!cancelTicket)
            {
                cont      = cont - 1;
                cancelTKT = true;
                MessageBox.Show(Resources.Reservations.OCURRIO_ERROR_CANCELAR_BOLETO, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                ShowInformation(false);
                txtNumberLine.Focus();
            }
            if (invalidCommand)
            {
                CommandsAPI2.send_MessageToEmulator(string.Concat("CANCELADO"));
            }

            cancelTicket = false;
        }
示例#10
0
        /// <summary>
        /// Elimina los remarks contables dentro del record menos .S*MX
        /// </summary>
        private void RemoveRemarks()
        {
            string line = string.Empty;

            row         = 0;
            col         = 0;
            sabreAnswer = sabreAnswer.Replace(" ‡ ", " \n ");
            string[] sabreAnswerInfo = sabreAnswer.Split(new char[] { '\n' });

            List <string> temp = new List <string>();

            for (int i = 1; i < sabreAnswerInfo.Length; i++)
            {
                int lastItem = i + 1;
                if (!lastItem.Equals(sabreAnswerInfo.Length))
                {
                    if (!string.IsNullOrEmpty(sabreAnswerInfo[i]) && !sabreAnswerInfo[i].StartsWith("    ") && sabreAnswerInfo[i + 1].StartsWith("    "))
                    {
                        if (sabreAnswerInfo[lastItem].StartsWith("    "))
                        {
                            string clearSpaces = sabreAnswerInfo[lastItem].TrimStart(new char[] { ' ' });
                            string fullRemark  = string.Concat(sabreAnswerInfo[i],
                                                               clearSpaces);
                            temp.Add(fullRemark);
                        }
                    }
                    else
                    {
                        if (!string.IsNullOrEmpty(sabreAnswerInfo[i]) && !sabreAnswerInfo[i].StartsWith("    "))
                        {
                            temp.Add(sabreAnswerInfo[i]);
                        }
                    }
                }
                else
                {
                    if (!string.IsNullOrEmpty(sabreAnswerInfo[i]) && !sabreAnswerInfo[i].StartsWith("    "))
                    {
                        temp.Add(sabreAnswerInfo[i]);
                    }
                }
            }

            foreach (string lines in temp)//Inicio linea1
            {
                CommandsQik.searchResponse(lines, ".</C30", ref row, ref col, 1, 1, 1, 20);
                if (row > 0)
                {
                    //Encontro valor
                    C30Flag = 1;
                    row     = 0;
                    col     = 0;
                }

                CommandsQik.searchResponse(lines, ".</C44", ref row, ref col, 1, 1, 1, 20);
                if (row > 0)
                {
                    //Encontro valor
                    C44Flag = 1;
                    row     = 0;
                    col     = 0;
                }

                CommandsQik.searchResponse(lines, ".S*MX", ref row, ref col, 1, 1, 1, 20);
                if (row > 0)
                {
                    //Encontro valor
                    SMXFlag = 1;
                    row     = 0;
                    col     = 0;
                }

                CommandsQik.searchResponse(lines, ".CC-", ref row, ref col, 1, 1, 1, 20);
                if (row > 0)
                {
                    //Encontro valor
                    //Asignacion de valores CC-
                    CCLine = string.Empty;
                    CommandsQik.CopyResponse(lines, ref CCLine, 1, 1, lines.Length);
                    CCLine = CCLine.Trim();

                    char[]   sep = { '-' };
                    string[] arr = CCLine.Split(sep);

                    //C3 = arr[1];
                    //C2 = arr[2];
                    //C1 = arr[3];
                    //C24 = arr[4];
                    CCLine = string.Empty;
                    //Fin asignacion de valores CC-

                    CCFlag = 1;
                    row    = 0;
                    col    = 0;
                }


                CommandsQik.searchResponse(lines, ".CD-", ref row, ref col, 1, 1, 1, 20);
                if (row > 0)
                {
                    //Encontro valor

                    //Asignacion de valores CD-
                    CDLine = string.Empty;
                    CommandsQik.CopyResponse(lines, ref CDLine, 1, 1, lines.Length);
                    CDLine = CDLine.Trim();

                    char[]   sep1 = { '-' };
                    string[] arr1 = CDLine.Split(sep1);

                    //C9 = arr1[1];
                    //C31 = arr1[2];
                    //C4 = arr1[3];
                    //C32 = arr1[4];
                    CDLine = string.Empty;
                    //Fin asignacion de valores CD-

                    CDFlag = 1;
                    row    = 0;
                    col    = 0;
                }

                CommandsQik.searchResponse(lines, ".CE-", ref row, ref col, 1, 1, 1, lines.Length);
                if (row > 0)
                {
                    //Encontro valor

                    //Asignacion de valores CE-
                    CELine = string.Empty;
                    CommandsQik.CopyResponse(lines, ref CELine, 1, 1, lines.Length);
                    CELine = CELine.Trim();

                    char[]   sep2 = { '-' };
                    string[] arr2 = CELine.Split(sep2);

                    //C5 = arr2[1];
                    //C6 = arr2[2];
                    //C7 = arr2[3];
                    //C8 = arr2[4];
                    CELine = string.Empty;
                    //Fin asignacion de valores CD-

                    CEFlag = 1;
                    row    = 0;
                    col    = 0;
                }

                CommandsQik.searchResponse(lines, ".CF-", ref row, ref col, 1, 1, 1, 20);
                if (row > 0)
                {
                    //Encontro valor

                    //Asignacion de valores CF-
                    CFLine = string.Empty;
                    CommandsQik.CopyResponse(lines, ref CFLine, 1, 1, lines.Length);
                    CFLine = CFLine.Trim();

                    char[]   sep3 = { '-' };
                    string[] arr3 = CFLine.Split(sep3);

                    //C33 = arr3[1];
                    //C34 = arr3[2];
                    //C35 = arr3[3];
                    //C36 = arr3[4];
                    CFLine = string.Empty;
                    //Fin asignacion de valores CF-

                    CFFlag = 1;
                    row    = 0;
                    col    = 0;
                }

                CommandsQik.searchResponse(lines, ".CG-", ref row, ref col, 1, 1, 1, 20);
                if (row > 0)
                {
                    //Encontro valor

                    //Asignacion de valores CG-
                    CGLine = string.Empty;
                    CommandsQik.CopyResponse(lines, ref CGLine, 1, 1, lines.Length);
                    CGLine = CGLine.Trim();

                    char[]   sep4 = { '-' };
                    string[] arr4 = CGLine.Split(sep4);

                    //C37 = arr4[1];
                    //C38 = arr4[2];
                    //C39 = arr4[3];
                    //C40 = arr4[4];
                    CGLine = string.Empty;
                    //Fin asignacion de valores CG-

                    CGFlag = 1;
                    row    = 0;
                    col    = 0;
                }

                CommandsQik.searchResponse(lines, ".CH-", ref row, ref col, 1, 1, 1, 20);
                if (row > 0)
                {
                    //Encontro valor

                    //Asignacion de valores CH-
                    CHLine = string.Empty;
                    CommandsQik.CopyResponse(lines, ref CHLine, 1, 1, lines.Length);
                    CHLine = CHLine.Trim();

                    char[]   sep5 = { '-' };
                    string[] arr5 = CHLine.Split(sep5);

                    //C41 = arr5[1];
                    //C42 = arr5[2];
                    //C45 = arr5[3];
                    //C46 = arr5[4];
                    CHLine = string.Empty;
                    //Fin asignacion de valores CH-

                    CHFlag = 1;
                    row    = 0;
                    col    = 0;
                }

                RecoverRemarksValues(lines);

                if (C30Flag == 0 && C44Flag == 0 && SMXFlag == 0 && CCFlag == 1 && CDFlag == 0 && CEFlag == 0 && CFFlag == 0 && CGFlag == 0 && CHFlag == 0)
                {
                    line = string.Empty;
                    CommandsQik.CopyResponse(lines, ref line, 1, 1, 3);
                    line = line.Trim();
                    remarkNumber.Add(line);
                    row = 0;
                    col = 0;
                }
                else if (C30Flag == 0 && C44Flag == 0 && SMXFlag == 0 && CCFlag == 0 && CDFlag == 1 && CEFlag == 0 && CFFlag == 0 && CGFlag == 0 && CHFlag == 0)
                {
                    line = string.Empty;
                    CommandsQik.CopyResponse(lines, ref line, 1, 1, 3);
                    line = line.Trim();
                    remarkNumber.Add(line);
                    row = 0;
                    col = 0;
                }
                else if (C30Flag == 0 && C44Flag == 0 && SMXFlag == 0 && CCFlag == 0 && CDFlag == 0 && CEFlag == 1 && CFFlag == 0 && CGFlag == 0 && CHFlag == 0)
                {
                    line = string.Empty;
                    CommandsQik.CopyResponse(lines, ref line, 1, 1, 3);
                    line = line.Trim();
                    remarkNumber.Add(line);
                    row = 0;
                    col = 0;
                }
                else if (C30Flag == 0 && C44Flag == 0 && SMXFlag == 0 && CCFlag == 0 && CDFlag == 0 && CEFlag == 0 && CFFlag == 1 && CGFlag == 0 && CHFlag == 0)
                {
                    line = string.Empty;
                    CommandsQik.CopyResponse(lines, ref line, 1, 1, 3);
                    line = line.Trim();
                    remarkNumber.Add(line);
                    row = 0;
                    col = 0;
                }

                else if (C30Flag == 0 && C44Flag == 0 && SMXFlag == 0 && CCFlag == 0 && CDFlag == 0 && CEFlag == 0 && CFFlag == 0 && CGFlag == 1 && CHFlag == 0)
                {
                    line = string.Empty;
                    CommandsQik.CopyResponse(lines, ref line, 1, 1, 3);
                    line = line.Trim();
                    remarkNumber.Add(line);
                    row = 0;
                    col = 0;
                }

                else if (C30Flag == 0 && C44Flag == 0 && SMXFlag == 0 && CCFlag == 0 && CDFlag == 0 && CEFlag == 0 && CFFlag == 0 && CGFlag == 0 && CHFlag == 1)
                {
                    line = string.Empty;
                    CommandsQik.CopyResponse(lines, ref line, 1, 1, 3);
                    line = line.Trim();
                    remarkNumber.Add(line);
                    row = 0;
                    col = 0;
                }
                else if (C30Flag == 0 && C44Flag == 0 && SMXFlag == 0 && CCFlag == 0 && CDFlag == 0 && CEFlag == 0 && CFFlag == 0 && CGFlag == 0 && CHFlag == 0)
                {
                    CommandsQik.searchResponse(lines, "..", ref row, ref col, 1, 1, 1, 6);
                    if (row > 0)
                    {
                        row  = 0;
                        col  = 0;
                        line = string.Empty;
                        CommandsQik.CopyResponse(lines, ref line, 1, 1, 3);
                        line = line.Trim();
                        remarkNumber.Add(line);
                        row = 0;
                        col = 0;
                    }
                }
                C30Flag = 0;
                C44Flag = 0;
                SMXFlag = 0;
                CCFlag  = 0;
                CDFlag  = 0;
                CEFlag  = 0;
                CFFlag  = 0;
                CGFlag  = 0;
                CHFlag  = 0;
                CDFlag  = 0;
            }
        }
        /// <summary>
        /// Validación de posibles errores en la respuesta de mySabre
        /// </summary>
        /// <param name="result">Respuesta de mySabre</param>
        public static void err_AirRateMenu(string result)
        {
            Answer        = result;
            CustomUserMsg = string.Empty;
            Status        = false;
            int row = 0;
            int col = 0;

            //al evaluar la respuesta del comando WPRQ de la mascarilla de cotizacion aera se recibe una cadena
            //que no coincide con la mostrada en MySabre por lo tanto entra a este error.
            //CommandsQik.searchResponse(result, Resources.ErrorMessages.NO_NAMES, ref row, ref col);
            //if (row == 1 || col != 0)
            //{
            //    row = 0;
            //    col = 0;
            //    CommandsQik.searchResponse(result, Resources.Constants.E_TICKET, ref row, ref col);
            //    if (row != 0 || col != 0)
            //    {
            //        return;
            //    }
            //    else if (row == 0)
            //    {
            //        SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.NO_NAMES, 3);
            //        CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
            //        Status = true;
            //        row = 0;
            //        col = 0;
            //        return;
            //    }
            //}

            CommandsQik.searchResponse(result, Resources.ErrorMessages.INVALID_FLIGHT_NUMBER, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.INVALID_FLIGHT_NUMBER, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.NO_ITINERARY, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.NO_ITINERARY, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.INVALID_HOST, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.INVALID_HOST, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.INVALID_FLT, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.INVALID_FLT, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.SEG_NR, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.SEG_NR, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.TIME, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.TIME, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.FLT_CHK_DATE_CONTINUITY, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.FLT_CHK_DATE_CONTINUITY, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.AVAIL_EXPIRED, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.AVAIL_EXPIRED, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.SERVICE_NOT_FOUND, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.SERVICE_NOT_FOUND, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.REQUIRES_PAYMENT_WITH_BOOKING, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.REQUIRES_PAYMENT_WITH_BOOKING, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.CARRIER_CODE_REQUIRED, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.CARRIER_CODE_REQUIRED, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.CK_ACTION_STATUS_CODE, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.CK_ACTION_STATUS_CODE, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.SEGS_SOLD_ORDER, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.SEGS_SOLD_ORDER, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //CommandsQik.searchResponse(result, Resources.ErrorMessages.RESPONSE, ref row, ref col);
            //if (row != 0 || col != 0)
            //{
            //    SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.RESPONSE, 3);
            //    CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
            //    Status = true;
            //    row = 0;
            //    col = 0;
            //    return;
            //}

            CommandsQik.searchResponse(result, Resources.ErrorMessages.FORMAT_UNEQUAL_NAMES, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.FORMAT_UNEQUAL_NAMES, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.FORMAT_CHECK_SEGMENT_NUMBER, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.FORMAT_CHECK_SEGMENT_NUMBER, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.FORMAT_NEED_PSGR_TYPES_SELECT, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.FORMAT_NEED_PSGR_TYPES_SELECT, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.FORMAT_USE_SEGMENT_SELECT, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.FORMAT_USE_SEGMENT_SELECT, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.CURRENCY, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.CURRENCY, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.MAXIMUM_6_SEGMENTS, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.MAXIMUM_6_SEGMENTS, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.TKT_DESIGNATOR_NOT_FOUND, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.TKT_DESIGNATOR_NOT_FOUND, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.TKT_DES_REQUIRES_FARE_BASIS, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.TKT_DES_REQUIRES_FARE_BASIS, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.FARE_BASIS_NOT_FOUND, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.FARE_BASIS_NOT_FOUND, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.TKT_DES_INVALID_FOR_CARRIER, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.TKT_DES_INVALID_FOR_CARRIER, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.NO_FARE_CLASS_USED, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.NO_FARE_CLASS_USED, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.INVALID_FARE_BASIS_TKT, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.INVALID_FARE_BASIS_TKT, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.TKT_DES_FAILED_RULES_CHECK, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.TKT_DES_FAILED_RULES_CHECK, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.FARE_BASIS_NOT_AVAILABLE, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.FARE_BASIS_NOT_AVAILABLE, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.NO_COMBINABLE_FARES_CLASS, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.NO_COMBINABLE_FARES_CLASS, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.AUX_SVC, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.AUX_SVC, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.NO_TKT_REC_EXISTS, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.NO_TKT_REC_EXISTS, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.NO_PSGR_DATA, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.NO_PSGR_DATA, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.NO_PREVIOUS_WPNI_ENTRY, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.NO_PREVIOUS_WPNI_ENTRY, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.NO_RETAINED_FARE_EXISTS, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.NO_RETAINED_FARE_EXISTS, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.CHECK_SEGMENT_CONTINUITY, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.CHECK_SEGMENT_CONTINUITY, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.CHK_DATE_TIME_CONTINUITY, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.CHK_DATE_TIME_CONTINUITY, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.WITH_FARE_BASIS_CODE_AFTER_Q, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.WITH_FARE_BASIS_CODE_AFTER_Q, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.NO_DIRECT_NONSTOPS, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.NO_DIRECT_NONSTOPS, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.ALL_RECORDS_DELETED, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.ALL_RECORDS_DELETED, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.NEED_COMMISSION_DOLLAR, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.NEED_COMMISSION_DOLLAR, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.NO_APPL_FARE_SPECIFIED, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.NO_APPL_FARE_SPECIFIED, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.FLT_CHK_DATE_CONTINUITY, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.FLT_CHK_DATE_CONTINUITY, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.INVALID_SEG_STATUS, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.INVALID_SEG_STATUS, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.BARGAIN_FINDER_PLUS, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.BARGAIN_FINDER_PLUS, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.UTP_VERIFY_NUMBER_PARTY, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.UTP_VERIFY_NUMBER_PARTY, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.NEED_EPR_KEYWORD_PVTDIS, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.NEED_EPR_KEYWORD_PVTDIS, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.UNABLE_TO_CALCULATE_RATE, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.UNABLE_TO_CALCULATE_RATE, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.UNABLE_PRICE, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.UNABLE_PRICE, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.NEED_COMMISSION, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.NEED_COMMISSION, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.CURRENCY_CODE_DECIMAL_ERROR, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.CURRENCY_CODE_DECIMAL_ERROR, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.INVALID_CURRENCY_CODE_ENTRY, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.INVALID_CURRENCY_CODE_ENTRY, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.CODE_UC_SEG_STATUS, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.CODE_UC_SEG_STATUS, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.NEED_WP_BEFORE_PQ, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.NEED_WP_BEFORE_PQ, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.UNABLE_SELL_SEGMENTS, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.UNABLE_SELL_SEGMENTS, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.INCORRECT_LINE_NUMBER, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.INCORRECT_LINE_NUMBER, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.INVALID_DISCOUNT_CODE, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.INVALID_DISCOUNT_CODE, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.FARE_BASIS_LIMITED, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.FARE_BASIS_LIMITED, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.FARE_BASIS_EXCEEDS, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.FARE_BASIS_EXCEEDS, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.NO_PRIVATE_FARES, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.NO_PRIVATE_FARES, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.INVALID_CORPORATE_ID, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.INVALID_CORPORATE_ID, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.UNABLE_TO_DISPLAY, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.UNABLE_TO_DISPLAY, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.NO_PUBLIC_FARES, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.NO_PUBLIC_FARES, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.FORMAT, ref row, ref col);
            if (row == 1 || col == 1)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.FORMAT, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.NO_NAMES, ref row, ref col);
            if (row == 1 || col == 1)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.NO_NAMES, 3);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }
        }
示例#12
0
        /// <summary>
        /// Se extrae la etiqueta que va aser usada
        /// tambien extraemos los comparativos de la clase bussines
        /// Se manda un commando y se busca una etiqueta y se sique mandando el comando pero con
        /// los diferentes comparativos de clases bussines hasta encontrar esa etiqueta
        /// Cuando la encuentra se arma el commando
        /// </summary>
        private void Validation_wpoc_bussines()
        {
            string remarkcbnsf    = activeStepsCorporativeQC.CorporativeQualityControls[0].RemarkCBnsF;
            string result         = string.Empty;
            string sabre          = remarkcbnsf;
            string temp_WPOCB_CI  = string.Empty;
            string temp_WPOCB_SI  = string.Empty;
            string book_fare_busi = string.Empty;

            Answer   = result;
            BaseFare = false;
            int    row                       = 0;
            int    col                       = 0;
            int    attemptsClass             = 0;
            string send                      = string.Empty;
            string classComparativeBusiness1 = ucFirstValidations.CorporativeQualityControls[0].ClassComparativeBusiness1;
            string classComparativeBusiness2 = ucFirstValidations.CorporativeQualityControls[0].ClassComparativeBusiness2;
            string classComparativeBusiness3 = ucFirstValidations.CorporativeQualityControls[0].ClassComparativeBusiness3;
            string classComparativeBusiness4 = ucFirstValidations.CorporativeQualityControls[0].ClassComparativeBusiness4;

            while (attemptsClass < 5)
            {
                CommandsQik.searchResponse(result, Resources.TicketEmission.ValitationLabels.BASE_FARE, ref row, ref col);
                if (row != 0 || col != 0)
                {
                    BaseFare = true;
                    row      = 0;
                    col      = 0;
                    break;
                }
                attemptsClass += 1;

                if (!BaseFare && attemptsClass == 1)
                {
                    send = Resources.TicketEmission.Constants.COMMANDS_WPOC_B + classComparativeBusiness1;
                    MyCTS.Presentation.Parameters.TimeExtendedAPI = true;
                    try
                    {
                        using (CommandsAPI objCommands = new CommandsAPI())
                        {
                            result = objCommands.SendReceive(send);
                        }
                    }
                    catch { }
                    MyCTS.Presentation.Parameters.TimeExtendedAPI = false;
                }
                if (!BaseFare && attemptsClass == 2)
                {
                    send = Resources.TicketEmission.Constants.COMMANDS_WPOC_B + classComparativeBusiness2;
                    MyCTS.Presentation.Parameters.TimeExtendedAPI = true;
                    try
                    {
                        using (CommandsAPI objCommands = new CommandsAPI())
                        {
                            result = objCommands.SendReceive(send);
                        }
                    }
                    catch { }
                    MyCTS.Presentation.Parameters.TimeExtendedAPI = false;
                }
                else if (!BaseFare && attemptsClass == 3)
                {
                    send = Resources.TicketEmission.Constants.COMMANDS_WPOC_B + classComparativeBusiness3;
                    MyCTS.Presentation.Parameters.TimeExtendedAPI = true;
                    try
                    {
                        using (CommandsAPI objCommands = new CommandsAPI())
                        {
                            result = objCommands.SendReceive(send);
                        }
                    }
                    catch { }
                    MyCTS.Presentation.Parameters.TimeExtendedAPI = false;
                }
                else if (!BaseFare && attemptsClass == 4)
                {
                    send = Resources.TicketEmission.Constants.COMMANDS_WPOC_B + classComparativeBusiness4;
                    MyCTS.Presentation.Parameters.TimeExtendedAPI = true;
                    try
                    {
                        using (CommandsAPI objCommands = new CommandsAPI())
                        {
                            result = objCommands.SendReceive(send);
                        }
                    }
                    catch { }
                    MyCTS.Presentation.Parameters.TimeExtendedAPI = false;
                }
            }
            if (BaseFare)
            {
                CommandsQik.searchResponse(result, Resources.TicketEmission.ValitationLabels.TOTAL, ref row, ref col, 1, 4, 30, 64);
                if (row != 0 || col != 0)
                {
                    row = row + 1;
                    CommandsQik.CopyResponse(result, ref temp_WPOCB_CI, row, 47, 14);
                    temp_WPOCB_CI    = temp_WPOCB_CI.Replace(Resources.TicketEmission.Constants.MXN, Resources.TicketEmission.Constants.SPACE);
                    temp_WPOCB_CI    = temp_WPOCB_CI.Trim();
                    rate_ConImp_Busi = temp_WPOCB_CI;
                    col = 0;
                    row = 0;
                }
                CommandsQik.searchResponse(result, Resources.TicketEmission.ValitationLabels.EQUIV_AMT, ref row, ref col);
                if (row != 0 || col != 0)
                {
                    row = row + 1;
                    CommandsQik.CopyResponse(result, ref temp_WPOCB_SI, row, 19, 14);
                    temp_WPOCB_SI    = temp_WPOCB_SI.Replace(Resources.TicketEmission.Constants.MXN, Resources.TicketEmission.Constants.SPACE);
                    temp_WPOCB_SI    = temp_WPOCB_SI.Trim();
                    rate_SinImp_Busi = temp_WPOCB_SI;
                    col      = 0;
                    row      = 0;
                    BaseFare = false;
                }
                if (BaseFare)
                {
                    CommandsQik.searchResponse(result, Resources.TicketEmission.ValitationLabels.BASE_FARE, ref row, ref col, 1, 4, 1, 20);
                    if (row != 0 || col != 0)
                    {
                        row = row + 1;
                        CommandsQik.CopyResponse(result, ref temp_WPOCB_SI, row, 5, 14);
                        temp_WPOCB_SI    = temp_WPOCB_SI.Replace(Resources.TicketEmission.Constants.MXN, Resources.TicketEmission.Constants.SPACE);
                        temp_WPOCB_SI    = temp_WPOCB_SI.Trim();
                        rate_SinImp_Busi = temp_WPOCB_SI;
                        col = 0;
                        row = 0;
                    }
                }
                CommandsQik.searchResponse(result, Resources.TicketEmission.ValitationLabels.ADT, ref row, ref col, 5, 7, 1, 4);
                if (row != 0 || col != 0)
                {
                    CommandsQik.CopyResponse(result, ref book_fare_busi, row, 9, 30);
                    col = 0;
                    row = 0;
                    //sabre 5.S*FB
                    send = sabre + rate_ConImp_Busi + Resources.TicketEmission.Constants.INDENT +
                           rate_SinImp_Busi + Resources.TicketEmission.Constants.INDENT +
                           book_fare_busi + Resources.TicketEmission.Constants.COMMANDS_TARIFA_BASE_BUSINESS;
                    //using (CommandsAPI objCommands = new CommandsAPI())
                    //{
                    //    objCommands.SendReceive(send);
                    //}
                }
            }
            else if (!BaseFare && attemptsClass == 5)
            {
                string   hourscad;
                string   hour;
                string   day;
                string   month;
                DateTime time = DateTime.Now;
                hour     = time.ToString("hh:mm");
                hourscad = Convert.ToString(hour);
                hour     = Regex.Replace(hourscad, @"[^\w\.@¥-]", "");
                day      = time.ToString("dd");
                month    = time.ToString("MMM", new System.Globalization.CultureInfo("en-US")).ToUpper();
                send     = Resources.TicketEmission.Constants.COMMANDS_5H_NO_DETERMINO_TARIFA_BUSINESS_AST +
                           hour + Resources.TicketEmission.Constants.AST + day + month;
                rate_ConImp_Busi = "0";
                rate_SinImp_Busi = "0";
                using (CommandsAPI objCommands = new CommandsAPI())
                {
                    objCommands.SendReceive(send);
                }
            }
        }
示例#13
0
        /// <summary>
        /// Se manda un commando y se busca la Base fare y si se encontro
        /// se empiza a copiar los datos necesarios para armar el comando
        /// de la tárifa más económica disponible
        /// </summary>
        private void Validation_wpnc()
        {
            string remarkcmefa    = activeStepsCorporativeQC.CorporativeQualityControls[0].RemarkCMEFA;
            string remarkcmefna   = activeStepsCorporativeQC.CorporativeQualityControls[0].RemarkCMEFNA;
            string result         = string.Empty;
            string sabre          = remarkcmefna;
            string contactSabrecs = string.Empty;
            string contactSabrec  = string.Empty;

            Answer   = result;
            BaseFare = false;
            int    row  = 0;
            int    col  = 0;
            string send = string.Empty;

            send = Resources.TicketEmission.Constants.COMMANDS_WPNC;
            MyCTS.Presentation.Parameters.TimeExtendedAPI = true;
            try
            {
                using (CommandsAPI objCommands = new CommandsAPI())
                {
                    result = objCommands.SendReceive(send);
                }
            }
            catch { }
            MyCTS.Presentation.Parameters.TimeExtendedAPI = false;
            CommandsQik.searchResponse(result, Resources.TicketEmission.ValitationLabels.BASE_FARE, ref row, ref col);
            if (row != 0 || col != 0)
            {
                BaseFare = true;
                row      = 0;
                col      = 0;
            }
            if (BaseFare)
            {
                CommandsQik.searchResponse(result, Resources.TicketEmission.ValitationLabels.TOTAL, ref row, ref col, 1, 4, 30, 64);
                if (row != 0 || col != 0)
                {
                    row = row + 1;
                    CommandsQik.CopyResponse(result, ref temp_WPNC_CI, row, 47, 14);
                    temp_WPNC_CI      = temp_WPNC_CI.Replace(Resources.TicketEmission.Constants.MXN, Resources.TicketEmission.Constants.SPACE);
                    temp_WPNC_CI      = temp_WPNC_CI.Trim();
                    rate_ConImp_Low_D = temp_WPNC_CI;
                    col = 0;
                    row = 0;
                }
                CommandsQik.searchResponse(result, Resources.TicketEmission.ValitationLabels.EQUIV_AMT, ref row, ref col);
                if (row != 0 || col != 0)
                {
                    row = row + 1;
                    CommandsQik.CopyResponse(result, ref temp_WPNC_SI, row, 19, 14);
                    temp_WPNC_SI      = temp_WPNC_SI.Replace(Resources.TicketEmission.Constants.MXN, Resources.TicketEmission.Constants.SPACE);
                    temp_WPNC_SI      = temp_WPNC_SI.Trim();
                    rate_SinImp_Low_D = temp_WPNC_SI;
                    col      = 0;
                    row      = 0;
                    BaseFare = false;
                }
                if (BaseFare)
                {
                    CommandsQik.searchResponse(result, Resources.TicketEmission.ValitationLabels.BASE_FARE, ref row, ref col, 1, 4, 1, 20);
                    if (row != 0 || col != 0)
                    {
                        row = row + 1;
                        CommandsQik.CopyResponse(result, ref temp_WPNC_SI, row, 5, 14);
                        temp_WPNC_SI      = temp_WPNC_SI.Replace(Resources.TicketEmission.Constants.MXN, Resources.TicketEmission.Constants.SPACE);
                        temp_WPNC_SI      = temp_WPNC_SI.Trim();
                        rate_SinImp_Low_D = temp_WPNC_SI;
                        col = 0;
                        row = 0;
                    }
                }
                CommandsQik.searchResponse(result, Resources.TicketEmission.ValitationLabels.ADT, ref row, ref col, 5, 7, 1, 4);
                if (row != 0 || col != 0)
                {
                    CommandsQik.CopyResponse(result, ref book_fare_Low_D, row, 9, 30);
                    col = 0;
                    row = 0;
                }
            }
            else
            {
                string   hourscad;
                string   hour;
                string   day;
                string   month;
                DateTime time = DateTime.Now;
                hour     = time.ToString("hh:mm");
                hourscad = Convert.ToString(hour);
                hour     = Regex.Replace(hourscad, @"[^\w\.@¥-]", "");
                day      = time.ToString("dd");
                month    = time.ToString("MMM", new System.Globalization.CultureInfo("en-US")).ToUpper();
                send     = Resources.TicketEmission.Constants.COMMANDS_5H_NO_DETERMINO_TARIFA_MAS_BAJA_DISPONIBLE_WPNC_AST +
                           hour + Resources.TicketEmission.Constants.AST + day + month;
                rate_ConImp_Low_D = "0";
                rate_SinImp_Low_D = "0";
                using (CommandsAPI objCommands = new CommandsAPI())
                {
                    objCommands.SendReceive(send);
                }
            }
            if (!string.IsNullOrEmpty(rate_ConImp_Low_ND))
            {
                //5.S*LF
                contactSabrecs = rate_ConImp_Low_ND + Resources.TicketEmission.Constants.INDENT +
                                 rate_SinImp_Low_ND + Resources.TicketEmission.Constants.INDENT +
                                 book_fare_Low_ND + Resources.TicketEmission.Constants.COMMANDS_TARIFA_MAS_ECONOMICA_NO_DISPONIBLE;
            }
            if (!string.IsNullOrEmpty(rate_ConImp_Low_D))
            {
                //5.S*LC
                contactSabrec = remarkcmefa + rate_ConImp_Low_D +
                                Resources.TicketEmission.Constants.INDENT + rate_SinImp_Low_D +
                                Resources.TicketEmission.Constants.INDENT + book_fare_Low_D +
                                Resources.TicketEmission.Constants.COMMANDS_TARIFA_MAS_ECONOMICA_DISPONIBLE;
            }

            #region ===== Se manejaba con ICAVV ======
            //if ((!string.IsNullOrEmpty(contactSabrecs)) && (!string.IsNullOrEmpty(contactSabrec)))
            //{
            //    send = sabre + contactSabrecs + Resources.TicketEmission.Constants.END_ITEM + contactSabrec;
            //    using (CommandsAPI objCommands = new CommandsAPI())
            //    {
            //        objCommands.SendReceive(send);
            //    }
            //}

            //if (string.IsNullOrEmpty(contactSabrecs) && (!string.IsNullOrEmpty(contactSabrec)))
            //{
            //    send = sabre + contactSabrec;
            //    using (CommandsAPI objCommands = new CommandsAPI())
            //    {
            //        objCommands.SendReceive(send);
            //    }
            //}

            //if ((!string.IsNullOrEmpty(contactSabrecs)) && (string.IsNullOrEmpty(contactSabrec)))
            //{
            //    send = contactSabrecs;
            //    using (CommandsAPI objCommands = new CommandsAPI())
            //    {
            //        objCommands.SendReceive(send);
            //    }
            //}
            #endregion
        }
示例#14
0
        /// <summary>
        /// Se manda un commando y se busca la Base fare y si se encontro
        /// se empiza a copiar los datos necesarios para armar el comando
        /// de la tárifa más baja no disponible
        /// </summary>
        private void Validation_wpncs()
        {
            Answer   = result;
            BaseFare = false;
            int row = 0;
            int col = 0;

            send = Resources.TicketEmission.Constants.COMMANDS_WPNCS;
            MyCTS.Presentation.Parameters.TimeExtendedAPI = true;
            try
            {
                using (CommandsAPI objCommands = new CommandsAPI())
                {
                    result = objCommands.SendReceive(send);
                }
            }
            catch { }
            MyCTS.Presentation.Parameters.TimeExtendedAPI = false;
            CommandsQik.searchResponse(result, Resources.TicketEmission.ValitationLabels.BASE_FARE, ref row, ref col);
            if (row != 0 || col != 0)
            {
                BaseFare = true;
                row      = 0;
                col      = 0;
            }
            if (BaseFare)
            {
                CommandsQik.searchResponse(result, Resources.TicketEmission.ValitationLabels.TOTAL, ref row, ref col, 1, 4, 30, 64);
                if (row != 0 || col != 0)
                {
                    row = row + 1;
                    CommandsQik.CopyResponse(result, ref temp_WPNCS_CI, row, 47, 14);
                    temp_WPNCS_CI      = temp_WPNCS_CI.Replace(Resources.TicketEmission.Constants.MXN, Resources.TicketEmission.Constants.SPACE);
                    temp_WPNCS_CI      = temp_WPNCS_CI.Trim();
                    rate_ConImp_Low_ND = temp_WPNCS_CI;
                    col = 0;
                    row = 0;
                }
                CommandsQik.searchResponse(result, Resources.TicketEmission.ValitationLabels.EQUIV_AMT, ref row, ref col);
                if (row != 0 || col != 0)
                {
                    row = row + 1;
                    CommandsQik.CopyResponse(result, ref temp_WPNCS_SI, row, 19, 14);
                    temp_WPNCS_SI      = temp_WPNCS_SI.Replace(Resources.TicketEmission.Constants.MXN, Resources.TicketEmission.Constants.SPACE);
                    temp_WPNCS_SI      = temp_WPNCS_SI.Trim();
                    rate_SinImp_Low_ND = temp_WPNCS_SI;
                    col      = 0;
                    row      = 0;
                    BaseFare = false;
                }
                if (BaseFare)
                {
                    CommandsQik.searchResponse(result, Resources.TicketEmission.ValitationLabels.BASE_FARE, ref row, ref col, 1, 4, 1, 20);
                    if (row != 0 || col != 0)
                    {
                        row = row + 1;
                        CommandsQik.CopyResponse(result, ref temp_WPNCS_SI, row, 5, 14);
                        temp_WPNCS_SI      = temp_WPNCS_SI.Replace(Resources.TicketEmission.Constants.MXN, Resources.TicketEmission.Constants.SPACE);
                        temp_WPNCS_SI      = temp_WPNCS_SI.Trim();
                        rate_SinImp_Low_ND = temp_WPNCS_SI;
                        col = 0;
                        row = 0;
                    }
                }
                CommandsQik.searchResponse(result, Resources.TicketEmission.ValitationLabels.ADT, ref row, ref col, 5, 7, 1, 4);
                if (row != 0 || col != 0)
                {
                    CommandsQik.CopyResponse(result, ref book_fare_Low_ND, row, 9, 30);
                    col = 0;
                    row = 0;
                }
            }
            else
            {
                string   hourscad;
                string   hour;
                string   day;
                string   month;
                DateTime time = DateTime.Now;
                hour     = time.ToString("hh:mm");
                hourscad = Convert.ToString(hour);
                hour     = Regex.Replace(hourscad, @"[^\w\.@¥-]", "");
                day      = time.ToString("dd");
                month    = time.ToString("MMM", new System.Globalization.CultureInfo("en-US")).ToUpper();
                send     = Resources.TicketEmission.Constants.COMMANDS_5H_NO_DETERMINO_TARIFA_MAS_BAJA_NO_DISPONIBLE_WPNCS_AST +
                           hour + Resources.TicketEmission.Constants.AST + day + month;
                rate_ConImp_Low_ND = "0";
                rate_SinImp_Low_ND = "0";
                using (CommandsAPI objCommands = new CommandsAPI())
                {
                    objCommands.SendReceive(send);
                }
            }
        }
        /// <summary>
        /// Se envia el comando de acuerdo a los campos ingresados
        /// </summary>
        private void CommandsSend()
        {
            int    row    = 0;
            int    col    = 0;
            string result = string.Empty;
            string sabre  = string.Empty;
            string change = string.Empty;
            string name   = string.Empty;

            string send = string.Concat("HB", txtNumberFirm.Text);

            using (CommandsAPI objCommand = new CommandsAPI())
            {
                result = objCommand.SendReceive(send);
            }
            CommandsQik.searchResponse(result, "STATUS", ref row, ref col);
            if (row != 0 || col != 0)
            {
                row   = 0;
                col   = 0;
                send  = string.Empty;
                sabre = string.Concat("H/PASS", txtPasswordTemp.Text);
                send  = string.Concat("H/AUTH BY ", txtAuthorization.Text);

                using (CommandsAPI objCommand = new CommandsAPI())
                {
                    objCommand.SendReceive(sabre);
                    objCommand.SendReceive(send);
                }

                if (rdoEnable.Checked)
                {
                    using (CommandsAPI objCommand = new CommandsAPI())
                    {
                        result = objCommand.SendReceive("HX ACTIVE");
                    }
                    CommandsQik.searchResponse(result, Resources.Reservations.STATUS_ALREADY_ACTIVE, ref row, ref col);
                    if (row != 0 || col != 0)
                    {
                        MessageBox.Show(Resources.Reservations.FIRMA_YA_ESTABA_ACTIVA, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                        using (CommandsAPI objCommand = new CommandsAPI())
                        {
                            result = objCommand.SendReceive("I");
                        }
                    }
                    CommandsQik.searchResponse(result, "DONE", ref row, ref col);
                    if (row != 0 || col != 0)
                    {
                        MessageBox.Show(Resources.Reservations.FIRMA_HA_QUEDADO_ACTIVA, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                        EnableDisableFirmBL.EnableDisableFirm(txtNumberFirm.Text + "_IN", txtPCC.Text, 1);
                    }
                }
                else if (rdoDisable.Checked)
                {
                    using (CommandsAPI objCommand = new CommandsAPI())
                    {
                        result = objCommand.SendReceive("HX INACTIVE");
                    }
                    CommandsQik.searchResponse(result, Resources.Reservations.STATUS_ALREADY_INACTIVE, ref row, ref col);
                    if (row != 0 || col != 0)
                    {
                        MessageBox.Show(Resources.Reservations.FIRMA_YA_ESTABA_INACTIVA, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                        using (CommandsAPI objCommand = new CommandsAPI())
                        {
                            result = objCommand.SendReceive("I");
                        }
                    }
                    CommandsQik.searchResponse(result, "DONE", ref row, ref col);
                    if (row != 0 || col != 0)
                    {
                        MessageBox.Show(Resources.Reservations.FIRMA_HA_QUEDADO_ACTIVA, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                        EnableDisableFirmBL.EnableDisableFirm(txtNumberFirm.Text, txtPCC.Text, 2);
                    }
                }
            }
            else
            {
                MessageBox.Show(Resources.Reservations.LA_FIRMA_NO_EXISTE, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                using (CommandsAPI objCommand = new CommandsAPI())
                {
                    result = objCommand.SendReceive("I");
                }
            }
        }
        /// <summary>
        /// >Obtención de la tarifa vendida con o sin impuestos y
        /// asignacion de valores a variables estaticas
        /// </summary>
        private void RatingActualFare()
        {
            farewithtaxessold    = string.Empty;
            farewithouttaxessold = string.Empty;
            string active      = activeStepsCorporativeQC.CorporativeQualityControls[0].CuotingActualFare;
            string send        = string.Empty;
            string sabreAnswer = string.Empty;
            int    row         = 0;
            int    col         = 0;

            if (active.Equals(Resources.TicketEmission.Constants.ACTIVE))
            {
                send = Resources.TicketEmission.Constants.COMMANDS_WP;
                MyCTS.Presentation.Parameters.TimeExtendedAPI = true;
                try
                {
                    using (CommandsAPI objCommand = new CommandsAPI())
                    {
                        sabreAnswer = objCommand.SendReceive(send);
                    }
                }
                catch { }
                MyCTS.Presentation.Parameters.TimeExtendedAPI = false;
                CommandsQik.searchResponse(sabreAnswer, Resources.TicketEmission.ValitationLabels.BASE_FARE, ref row, ref col);
                if (row != 0 || col != 0)
                {
                    CommandsQik.searchResponse(sabreAnswer, Resources.TicketEmission.ValitationLabels.TOTAL, ref row, ref col, 1, 4, 30, 64);
                    if (row != 0 || col != 0)
                    {
                        row = row + 1;
                        tempFareWithTaxes = string.Empty;
                        CommandsQik.CopyResponse(sabreAnswer, ref tempFareWithTaxes, row, 47, 14);
                        tempFareWithTaxes = tempFareWithTaxes.Replace(Resources.TicketEmission.Constants.MXN, Resources.TicketEmission.Constants.SPACE);
                        tempFareWithTaxes = tempFareWithTaxes.Trim();
                        farewithtaxessold = tempFareWithTaxes;

                        row = 0;
                        col = 0;
                        CommandsQik.searchResponse(sabreAnswer, Resources.TicketEmission.ValitationLabels.EQUIV_AMT, ref row, ref col, 1, 4, 15, 40);
                        if (row != 0 || col != 0)
                        {
                            row = row + 1;
                            tempFareWithoutTaxes = string.Empty;
                            CommandsQik.CopyResponse(sabreAnswer, ref tempFareWithoutTaxes, row, 19, 14);
                            tempFareWithoutTaxes = tempFareWithoutTaxes.Replace(Resources.TicketEmission.Constants.MXN, Resources.TicketEmission.Constants.SPACE);
                            tempFareWithoutTaxes = tempFareWithoutTaxes.Trim();
                            farewithouttaxessold = tempFareWithoutTaxes;
                            internationalflight  = true;
                        }
                        else
                        {
                            CommandsQik.searchResponse(sabreAnswer, Resources.TicketEmission.ValitationLabels.BASE_FARE, ref row, ref col, 1, 4, 1, 20);
                            if (row != 0 || col != 0)
                            {
                                row = row + 1;
                                tempFareWithoutTaxes = string.Empty;
                                CommandsQik.CopyResponse(sabreAnswer, ref tempFareWithoutTaxes, row, 5, 14);
                                tempFareWithoutTaxes = tempFareWithoutTaxes.Replace(Resources.TicketEmission.Constants.MXN, Resources.TicketEmission.Constants.SPACE);
                                tempFareWithoutTaxes = tempFareWithoutTaxes.Trim();
                                farewithouttaxessold = tempFareWithoutTaxes;
                                internationalflight  = false;
                            }
                        }
                        row = 0;
                        col = 0;
                        CommandsQik.searchResponse(sabreAnswer, Resources.TicketEmission.ValitationLabels.ADT, ref row, ref col, 5, 7, 1, 4);
                        if (row != 0 || col != 0)
                        {
                            farebasissold = string.Empty;
                            CommandsQik.CopyResponse(sabreAnswer, ref farebasissold, row, 9, 30);
                        }
                    }
                    //UC = "comparisonRates";//
                    Loader.AddToPanel(Loader.Zone.Middle, this, Resources.TicketEmission.Constants.UC_COMPARISON_RATES);
                }
                else
                {
                    send = Resources.TicketEmission.Constants.COMMANDS_AST_PQ;
                    using (CommandsAPI objCommand = new CommandsAPI())
                    {
                        sabreAnswer = objCommand.SendReceive(send);
                    }
                    row = 0;
                    col = 0;
                    CommandsQik.searchResponse(sabreAnswer, Resources.TicketEmission.ValitationLabels.PRICE_QUOTE_RECORD_DETAILS, ref row, ref col);
                    if (row != 0 || col != 0)
                    {
                        send = Resources.TicketEmission.Constants.COMMANDS_5H_NO_SE_PUDO_CALC_TARIFA_AUTO;
                        using (CommandsAPI objCommand = new CommandsAPI())
                        {
                            sabreAnswer = objCommand.SendReceive(send);
                        }
                        //UC = "comparisonRates";//
                        Loader.AddToPanel(Loader.Zone.Middle, this, Resources.TicketEmission.Constants.UC_COMPARISON_RATES);
                    }
                    else
                    {
                        MessageBox.Show(Resources.TicketEmission.Tickets.NO_CALC_TARIFA_VENDIDA_RECOTIZA, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        //UC = "welcome";//
                        Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
                    }
                }
            }
            else
            {
                //UC = "comparisonRates";//
                Loader.AddToPanel(Loader.Zone.Middle, this, Resources.TicketEmission.Constants.UC_COMPARISON_RATES);
            }
        }
示例#17
0
        public static void err_SellAirSegment(string result)
        {
            Answer          = result;
            status          = false;
            showusercontrol = false;
            int row = 0;
            int col = 0;



            CommandsQik.searchResponse(result, Resources.ErrorMessages.NO_AVAIL, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.NO_AVAIL, 2);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.CLASS, ref row, ref col);
            if (row == 1 && col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.CLASS, 2);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.CROSS_CLASS_NOT_AVAILABLE, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.CROSS_CLASS_NOT_AVAILABLE, 2);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.CLASS_NOT_OFFERED, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.CLASS_NOT_OFFERED, 2);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.UNABLE_LOCATE_SEGMENT, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.UNABLE_LOCATE_SEGMENT, 2);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.UNABLE, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.UNABLE, 2);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.LN_NR, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.LN_NR, 2);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.NR_IN_PTY, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.NR_IN_PTY, 2);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.CALL_DIRECT, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.CALL_DIRECT, 2);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.MUST_SEPARATE_PNR, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.MUST_SEPARATE_PNR, 2);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.MAXIMUM_NUMBER_SEATS_CARRIER, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.MAXIMUM_NUMBER_SEATS_CARRIER, 2);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.OPEN_SEGMENT_SOLD_SEPERATE_PNR, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.OPEN_SEGMENT_SOLD_SEPERATE_PNR, 2);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.OPEN_SEGMENT_ALLOWED_CARRIER, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.OPEN_SEGMENT_ALLOWED_CARRIER, 2);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.CROSS_CTY, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.CROSS_CTY, 2);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.CARRIER_REQUESTS_SELL_NN, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.CARRIER_REQUESTS_SELL_NN, 2);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.DATA_BEYOND_180_DAYS, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.DATA_BEYOND_180_DAYS, 2);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.SCHEDULES_NOT_YET_AVAILABLE, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.SCHEDULES_NOT_YET_AVAILABLE, 2);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.CODE, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.CODE, 2);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.INACTIVE_AIRLINE, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.INACTIVE_AIRLINE, 2);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.INVALID_FLIGHT_NUMBER, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.INVALID_FLIGHT_NUMBER, 2);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.NO_ITINERARY, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.NO_ITINERARY, 2);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.INVALID_HOST, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.INVALID_HOST, 2);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.INVALID_FLT, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.INVALID_FLT, 2);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.SEG_NR, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.SEG_NR, 2);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.TIME, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.TIME, 2);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.FLT, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.FLT, 2);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.CROSS_FORMAT, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.CROSS_FORMAT, 2);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.AVAIL_EXPIRED, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.AVAIL_EXPIRED, 2);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.SERVICE_NOT_FOUND, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.SERVICE_NOT_FOUND, 2);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.REQUIRES_PAYMENT_WITH_BOOKING, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.REQUIRES_PAYMENT_WITH_BOOKING, 2);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.CARRIER_CODE_REQUIRED, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.CARRIER_CODE_REQUIRED, 2);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.CK_ACTION_STATUS_CODE, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.CK_ACTION_STATUS_CODE, 2);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.SEGS_SOLD_ORDER, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.SEGS_SOLD_ORDER, 2);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.FORMAT_UNEQUAL_NAMES, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.FORMAT_UNEQUAL_NAMES, 2);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.FORMAT_USE_SEGMENT_SELECT, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.FORMAT_USE_SEGMENT_SELECT, 2);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }
        }
示例#18
0
        public static void validation_wpncs(string result)
        {
            Answer   = result;
            BaseFare = false;
            int row = 0;
            int col = 0;

            string send = string.Empty;

            send = Resources.TicketEmission.Constants.COMMANDS_WPNCS;
            using (CommandsAPI objCommands = new CommandsAPI())
            {
                objCommands.SendReceive(send);
            }

            CommandsQik.searchResponse(result, Resources.TicketEmission.ValitationLabels.BASE_FARE, ref row, ref col);
            if (row != 0 || col != 0)
            {
                BaseFare = true;
                row      = 0;
                col      = 0;
            }


            if (BaseFare)
            {
                CommandsQik.searchResponse(result, Resources.TicketEmission.ValitationLabels.TOTAL, ref row, ref col, 1, 4, 30, 64);
                if (row != 0 || col != 0)
                {
                    string temp_WPNCS_CI      = string.Empty;
                    string rate_ConImp_Low_ND = string.Empty;

                    row = row + 1;
                    CommandsQik.CopyResponse(result, ref temp_WPNCS_CI, row, 47, 14);
                    rate_ConImp_Low_ND = (temp_WPNCS_CI.Substring(0, 4));//verificar que quite MXN

                    col = 0;
                    row = 0;
                }


                CommandsQik.searchResponse(result, Resources.TicketEmission.ValitationLabels.EQUIV_AMT, ref row, ref col, 1, 4, 30, 64);
                if (row != 0 || col != 0)
                {
                    string temp_WPNCS_SI      = string.Empty;
                    string rate_SinImp_Low_ND = string.Empty;

                    row = row + 1;
                    CommandsQik.CopyResponse(result, ref temp_WPNCS_SI, row, 19, 14);
                    rate_SinImp_Low_ND = (temp_WPNCS_SI.Substring(0, 4));//verificar que quite MXN

                    col      = 0;
                    row      = 0;
                    BaseFare = false;
                }

                if (BaseFare)
                {
                    CommandsQik.searchResponse(result, Resources.TicketEmission.ValitationLabels.BASE_FARE, ref row, ref col, 1, 4, 1, 20);
                    if (row != 0 || col != 0)
                    {
                        string temp_WPNCS_SI      = string.Empty;
                        string rate_SinImp_Low_ND = string.Empty;

                        row = row + 1;
                        CommandsQik.CopyResponse(result, ref temp_WPNCS_SI, row, 5, 14);
                        rate_SinImp_Low_ND = (temp_WPNCS_SI.Substring(0, 4));//verificar que quite MXN

                        col = 0;
                        row = 0;
                    }
                }

                CommandsQik.searchResponse(result, Resources.TicketEmission.ValitationLabels.ADT, ref row, ref col, 5, 7, 1, 4);
                if (row != 0 || col != 0)
                {
                    string book_fare_Low_ND = string.Empty;
                    row = row + 1;
                    CommandsQik.CopyResponse(result, ref book_fare_Low_ND, row, 9, 30);
                    col = 0;
                    row = 0;
                }
            }

            else
            {
                int      hours;
                string   hourscad;
                string   hour;
                string   day;
                string   month;
                DateTime time = DateTime.Now;
                hours    = time.Hour;
                hourscad = Convert.ToString(hours);
                hour     = Regex.Replace(hourscad, @"[^\w\.@¥-]", "");

                day   = time.ToString("dd", new System.Globalization.CultureInfo("en-US")).ToUpper();
                month = time.ToString("MMM", new System.Globalization.CultureInfo("en-US")).ToUpper();

                send = Resources.TicketEmission.Constants.COMMANDS_5H_NO_DETERMINO_TARIFA_MAS_BAJA_NO_DISPONIBLE_WPNCS_AST +
                       hours + Resources.TicketEmission.Constants.AST + day + Resources.TicketEmission.Constants.SLASH +
                       month;


                using (CommandsAPI objCommands = new CommandsAPI())
                {
                    objCommands.SendReceive(send);
                }
            }
        }
        /// <summary>
        /// Regenera el boleto cuando no fue encontrado en la BD
        /// </summary>
        private void RegenarateInvoice()
        {
            string        ticket         = string.Empty;
            string        paxName        = string.Empty;
            string        linkVT         = string.Empty;
            List <string> listNewTickets = null;
            string        emitedPCC      = string.Empty;

            sabreAnswer = string.Empty;
            sabreConcat = string.Empty;
            string command = string.Concat("*TKT", txtNumberTicket.Text.Substring(3, 10));

            using (CommandsAPI objCommands = new CommandsAPI())
            {
                sabreAnswer = objCommands.SendReceive(command);
            }
            string[] sabreAnswerInfo = sabreAnswer.Split(new char[] { '\n' });
            int      row             = 0;
            int      col             = 0;

            CommandsQik.searchResponse(sabreAnswer, "UNABLE TO FIND TICKET NUMBER", ref row, ref col);
            if (row != 0 && col >= 0)
            {
                MessageBox.Show("EL NÚMERO DE BOLETO NO FUE ENCONTRADO", Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
            }
            else if (sabreAnswerInfo.Length > 0 && sabreAnswerInfo[0].Length == 6 && ValidateRegularExpression.ValidatePNR(sabreAnswerInfo[0]))
            {
                command = "*T";
                using (CommandsAPI objCommands = new CommandsAPI())
                {
                    sabreAnswer = objCommands.SendReceive(command);
                }
                sabreConcat = sabreAnswer;
                SearchTKT();

                command = "*PDK";
                using (CommandsAPI objCommands = new CommandsAPI())
                {
                    sabreAnswer = objCommands.SendReceive(command);
                }
                DK = sabreAnswer.Substring(18, 6);
                using (CommandsAPI objCommands = new CommandsAPI())
                {
                    objCommands.SendReceive("I");
                }
                sabreConcat = sabreConcat.Replace('‡', '\n');
                string[] numbersOfTkt = sabreConcat.Split(new char[] { '\n' });
                foreach (string tkt in numbersOfTkt)
                {
                    emitedPCC = recoverEmitedPCC(tkt);
                    int index = tkt.IndexOf(txtNumberTicket.Text);
                    if (index >= 0)
                    {
                        if (tkt.Length > 30 &&
                            ValidateRegularExpression.ValidateThirteenNumbers(tkt.Substring(index, 13)) &&
                            !tkt.Contains("TV")
                            )
                        //&& tkt.Substring(index, 13) == txtNumberTicket.Text)
                        {
                            ticket = tkt.Substring(index, 13);
                            string   value = tkt.Substring(index, tkt.Length - index);
                            string[] data  = value.Split(new char[] { ' ' });

                            if (data[1].Contains("/"))
                            {
                                paxName = data[1];
                                // else
                                //    paxName = tkt.Substring(24, 7).Trim();
                            }
                            else
                            {
                                paxName = string.Format("{0} {1}", data[1], data[2]);
                            }
                            break;
                        }
                    }
                }
                if (!string.IsNullOrEmpty(ticket) && !string.IsNullOrEmpty(paxName))
                {
                    string airline = GetAirlineCodeByNumIDBL.GetAirlineCode(ticket.Substring(0, 3));
                    if (string.IsNullOrEmpty(airline) || airline.Equals("NOTHING"))
                    {
                        MessageBox.Show("ERROR EN CÓDIGO DE AEROLÍNEA, FAVOR DE REPORTARLO A SISTEMAS", Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                        Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
                    }
                    else
                    {
                        string[] names = paxName.Split(new char[] { '/' });
                        linkVT = string.Concat("https://services.tripcase.com/new/eticketPrint.html?pnr=", sabreAnswerInfo[0], "&hostID=1W&ETTOT=1&ETNBR1=", ticket, "&pcc=", emitedPCC, "&action=printEticket");

                        //linkVT = string.Concat("https://www.virtuallythere.com/new/eTicketReceiptPrint.html?pnr=", sabreAnswerInfo[0], "&pcc=3L64&language=1&name=",
                        //    names[0], "&host=1W&agent=AFM&ETNBR1=", ticket, "&ETNME1=", names[0], "/", names[1].Substring(0, 1), " &ETDTE1=4DEC&ETISS1=3L64*AJV&ETTOT=1");
                        if (addTicketInBD)
                        {
                            AddDetailsTktsLinksBL.AddDetailsTktsLinks(Login.Agent, sabreAnswerInfo[0], ticket.Substring(3, 10), paxName, linkVT, DateTime.Now);
                        }
                        ucTicketsEmissionInstructions.Airline = airline;
                        listNewTickets = new List <string>();
                        listNewTickets.Add(txtNumberTicket.Text);
                        if (!string.IsNullOrEmpty(txtCCMail.Text))
                        {
                            tempccmail = txtCCMail.Text.ToLower();
                        }
                        GetInfoTicketDelegate(listNewTickets);
                        MessageBox.Show("SU SOLICITUD FUE ENVIADA CON ÉXITO", Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                        Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
                    }
                }
                else
                {
                    MessageBox.Show("EL BOLETO NO PUDO SER ENCONTRADO, FAVOR DE REPORTARLO A SISTEMAS", Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                    Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
                }
            }
            else
            {
                MessageBox.Show("NO SE PUEDE ACCESAR AL NÚMERO DE BOLETO", Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
            }
        }
示例#20
0
        //Envía las instrucciones a MySabre
        private void CommandsSend()
        {
            int    row  = 0;
            int    col  = 0;
            string send = string.Empty;
            string res  = string.Empty;

            send = "I";
            using (CommandsAPI objCommand = new CommandsAPI())
            {
                res = objCommand.SendReceive(send);
            }

            send = "QS*Q";
            using (CommandsAPI objCommand = new CommandsAPI())
            {
                res = objCommand.SendReceive(send);
                res = res.Replace('‡', '\n');
            }

            if (txtQueue.Text.Length > 0)
            {
                while (row <= 1)
                {
                    CommandsQik.searchResponse(res, txtQueue.Text, ref row, ref col);
                    if (row != 0)
                    {
                        break;
                    }
                    else
                    {
                        send = "MD";
                        using (CommandsAPI objCommand = new CommandsAPI())
                        {
                            res = objCommand.SendReceive(send);
                            res = res.Replace('‡', '\n');
                        }
                        CommandsQik.searchResponse(res, "END OF SCROLL", ref row, ref col);
                        if (row != 0)
                        {
                            MessageBox.Show("NÚMERO DE QUEUE NO ENCONTRADO", Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                            break;
                        }
                    }
                }
            }

            else if (txtAgentCode.Text.Length > 0)
            {
                while (row <= 1)
                {
                    CommandsQik.searchResponse(res, txtAgentCode.Text, ref row, ref col);
                    if (row != 0)
                    {
                        break;
                    }
                    else
                    {
                        send = "MD";
                        using (CommandsAPI objCommand = new CommandsAPI())
                        {
                            res = objCommand.SendReceive(send);
                            res = res.Replace('‡', '\n');
                        }
                        CommandsQik.searchResponse(res, "END OF SCROLL", ref row, ref col);
                        if (row != 0)
                        {
                            MessageBox.Show("NÚMERO DE AGENTE NO ENCONTRADO", Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                            break;
                        }
                    }
                }
            }
        }
示例#21
0
        /// <summary>
        /// Se envia el comando de acuerdo a los campos ingresados
        /// </summary>
        private void CommandsSend()
        {
            int    row    = 0;
            int    col    = 0;
            string result = string.Empty;
            string sabre  = string.Empty;
            string change = string.Empty;
            string name   = string.Empty;

            string send = string.Concat("HB", txtNumberFirm.Text);

            using (CommandsAPI objCommand = new CommandsAPI())
            {
                result = objCommand.SendReceive(send);
            }
            CommandsQik.searchResponse(result, "NOT ALLOWED IN", ref row, ref col);
            if (row != 0 || col != 0)
            {
                using (CommandsAPI objCommand = new CommandsAPI())
                {
                    objCommand.SendReceive("I");
                    result = objCommand.SendReceive(send);
                }
                CommandsQik.searchResponse(result, "NEW EMPLOYEE", ref row, ref col);
                if (row != 0 || col != 0)
                {
                    MessageBox.Show(Resources.Reservations.LA_FIRMA_NO_EXISTE, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
            CommandsQik.searchResponse(result, "NEW EMPLOYEE", ref row, ref col);
            if (row != 0 || col != 0)
            {
                using (CommandsAPI objCommand = new CommandsAPI())
                {
                    objCommand.SendReceive("I");
                }
                MessageBox.Show(Resources.Reservations.LA_FIRMA_NO_EXISTE, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                row    = 0;
                col    = 0;
                send   = string.Empty;
                send   = string.Concat("H/AUTH BY ", txtAuthorization.Text);
                sabre  = string.Concat("H/NAM@", txtLastName.Text, "/", txtInitial.Text);
                change = string.Concat("HE");

                using (CommandsAPI objCommand = new CommandsAPI())
                {
                    objCommand.SendReceive(send);
                    objCommand.SendReceive(sabre);
                    objCommand.SendReceive(change);
                    objCommand.SendReceive("I");
                }
                CommandsAPI2.send_MessageToEmulator(string.Concat(Resources.Reservations.CAMBIO_NOMBRE_SABRE_EXITOSO));
                name = string.Concat(txtInitial.Text, " ", txtLastName.Text);
                UpdateUsersBL.UpdateUsers(txtNumberFirm.Text, txtPCC.Text, null, name, name.ToLower());
                MessageBox.Show(Resources.Reservations.CAMBIO_NOMBRE_EXITOSO, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
            }
        }
示例#22
0
        public static void err_ticketsEmission(string result)
        {
            Answer                = result;
            status                = false;
            statussendcommand     = false;
            statusshowusercontrol = false;
            int row = 0;
            int col = 0;

            //1
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.MANDATORY_EDITS, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.MANDATORY_EDITS, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //2
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.SIMULTANEOUS_CHANGES_TO_PNR, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.SIMULTANEOUS_CHANGES_TO_PNR, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //3
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.PNR_HAS_BEEN_UPDATED, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.PNR_HAS_BEEN_UPDATED, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //4
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.TKT_PTR_NOT_ASSIGNED, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.TKT_PTR_NOT_ASSIGNED, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //5
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.END_OR_IGNORE_PNR, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.END_OR_IGNORE_PNR, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }


            //6
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.VENDOR_PROCESSING_ERROR_SLASH_CALL, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.VENDOR_PROCESSING_ERROR_SLASH_CALL, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //7
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.EXCEEDS_FBL_LIMIT, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.EXCEEDS_FBL_LIMIT, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //8
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.NEED_FOP, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.NEED_FOP, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                //statusshowusercontrol = true;
                row = 0;
                col = 0;
                return;
            }

            //9
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.IATA_NUMBER_NOT_VALID, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.IATA_NUMBER_NOT_VALID, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                //statusshowusercontrol = true;
                row = 0;
                col = 0;
                return;
            }

            //10
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets._ASTERIKS_PAC_VERIFY_CORRECT_NBR, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets._ASTERIKS_PAC_VERIFY_CORRECT_NBR, 15);
                CustomUserMsg     = userErrorMessage.CusErrMsgUserMsg;
                Status            = true;
                statussendcommand = true;
                row = 0;
                col = 0;
                return;
            }

            //11
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.NOT_ENOUGH_STOCK_IN_PNR, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.NOT_ENOUGH_STOCK_IN_PNR, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //12
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.TKT_RECORD_DOES_NOT_EXIST, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.TKT_RECORD_DOES_NOT_EXIST, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //13
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.ND_T_FIELD_OR_DELETE_TKT, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.ND_T_FIELD_OR_DELETE_TKT, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //14
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.NEED_MORE_PSGR_TYPES_OR_NAMES, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.NEED_MORE_PSGR_TYPES_OR_NAMES, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //15
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.AUX_SVC, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.AUX_SVC, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //16
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.TOO_MANY_PSGR_TYPES, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.TOO_MANY_PSGR_TYPES, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //17
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.CROSSLORAINE_AUTH_CARRIER_INVLD, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.CROSSLORAINE_AUTH_CARRIER_INVLD, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                //statusshowusercontrol = true;
                row = 0;
                col = 0;
                return;
            }

            //18
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.INVALID_COUPON_NUMBER, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.INVALID_COUPON_NUMBER, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //19
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.NO_PSGR_DATA, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.NO_PSGR_DATA, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //20
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.NO_RETAINED_FARE_EXISTS, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.NO_RETAINED_FARE_EXISTS, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //21
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.NO_PRICE_RETENTION, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.NO_PRICE_RETENTION, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //22
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.MINI_ITIN_PRINTER_NO_ASSIGNED, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.MINI_ITIN_PRINTER_NO_ASSIGNED, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //23
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.UNABLE_TO_TICKET, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.UNABLE_TO_TICKET, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //24
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.NO_TKT_REC_EXIST, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.NO_TKT_REC_EXIST, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //25
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.ITEM_NR, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.ITEM_NR, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //26
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.CONTINUITY_OF_FLATS, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.CONTINUITY_OF_FLATS, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //27
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.ASSIGN_ETR_PRINTER_FIRST, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.ASSIGN_ETR_PRINTER_FIRST, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //28
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.ELECTRONIC_TICKETING_HOST_UNAVAILABLE, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.ELECTRONIC_TICKETING_HOST_UNAVAILABLE, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //29
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.INCORRECT_ENTRY_VERIFY_AND_REENTER, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.INCORRECT_ENTRY_VERIFY_AND_REENTER, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //30
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.CHECK_ITIN, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.CHECK_ITIN, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //31
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.CHECK_ITINERARY_SEGMENTS_NOT_VALID, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.CHECK_ITINERARY_SEGMENTS_NOT_VALID, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //32
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.CHECK_ITINERARY_MORE_SEGMENTS_NOT_VALID, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.CHECK_ITINERARY_MORE_SEGMENTS_NOT_VALID, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //33
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.VERIFY_CITY_PAIR_AUTHORIZED_FOR_ET, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.VERIFY_CITY_PAIR_AUTHORIZED_FOR_ET, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //34
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.ETR_RESTRICTED, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.ETR_RESTRICTED, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //35
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.ELECTRONIC_TICKETING_NOT_ALLOWED, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.ELECTRONIC_TICKETING_NOT_ALLOWED, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //36
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.INFANT_PSGR_TYPE_NOT_VALID, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.INFANT_PSGR_TYPE_NOT_VALID, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //37
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.MULTIPLE_NAMES_NOT_ALLOWED, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.MULTIPLE_NAMES_NOT_ALLOWED, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //38
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.MAXIMUM_TWO_PASSENGER_TYPES, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.MAXIMUM_TWO_PASSENGER_TYPES, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }


            //40
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.ALL_PASSENGERS_MUST_BE_TICKETED_TOGETHER, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.ALL_PASSENGERS_MUST_BE_TICKETED_TOGETHER, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //41
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.SEGMENT_SELECT_NOT_ALLOWED, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.SEGMENT_SELECT_NOT_ALLOWED, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //42
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.MAXIMUM_FOUR_SEGMENTS_EXCEEDED, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.MAXIMUM_FOUR_SEGMENTS_EXCEEDED, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //43
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.MAXIMUM_SEGMENTS_EXCEED, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.MAXIMUM_SEGMENTS_EXCEED, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //44
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.ETR_NOT_ALLOWED_WITHIN_ONE_HOUR, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.ETR_NOT_ALLOWED_WITHIN_ONE_HOUR, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //45
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.ELECTRONIC_TICKET_MUST_BE_ISSUED, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.ELECTRONIC_TICKET_MUST_BE_ISSUED, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                //statusshowusercontrol = true;
                row = 0;
                col = 0;
                return;
            }

            //46
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.ENTRY_REQUIRES_PNR, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.ENTRY_REQUIRES_PNR, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //47
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.VOID_RESTRICTED, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.VOID_RESTRICTED, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //48
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.ONE_OR_MORE_COUPONS_UNABLE_TO_VOID, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.ONE_OR_MORE_COUPONS_UNABLE_TO_VOID, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //49
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.CARRIER_REQUIRES_CREDIT_CARD_PAYMENT, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.CARRIER_REQUIRES_CREDIT_CARD_PAYMENT, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //50
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.AUTHORIZATION_CODE_REQUIRED, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.AUTHORIZATION_CODE_REQUIRED, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //51
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.CARDHOLDER_NAME_REQUIRED, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.CARDHOLDER_NAME_REQUIRED, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //52
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.CARRIER_NOT_ALLOW_MULTIPLE_FORM_PAYMENT, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.CARRIER_NOT_ALLOW_MULTIPLE_FORM_PAYMENT, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //53
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.UNABLE_TO_VOID, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.UNABLE_TO_VOID, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //54
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.VOID_ENTRY_BY_PSEUDO_CITY, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.VOID_ENTRY_BY_PSEUDO_CITY, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.PASSENGER_SECURITY_IDENTIFICATION, ref row, ref col);
            if (row != 0 || col != 0)
            {
                //SabreErrorMsg userErrorMessage = "FALTA INGRESAR DATOS DEL SECURE FLIGHT PASSENGER,\n EL BOLETO AUN NO SE HA EMITIDO ,\n   INGRESA INFORMACIÓN FALTANTE Y CIERRA LA RESERVACIÓN, \n POSTERIOR A ESTE PASO PROCEDE NUEVAMENTE CON LA EMISIÓN";
                CustomUserMsg = "FALTA INGRESAR DATOS DEL SECURE FLIGHT PASSENGER,\nEL BOLETO AUN NO SE HA EMITIDO, INGRESA \nINFORMACIÓN FALTANTE Y CIERRA LA RESERVACIÓN,\nPOSTERIOR A ESTE PASO PROCEDE NUEVAMENTE CON LA EMISIÓN";
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }


            //55
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.UNABLE_TO_PROCESS_ETR, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.UNABLE_TO_PROCESS_ETR, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //56
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.CHECK_ENTRY_COMMENCING_WITH, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.CHECK_ENTRY_COMMENCING_WITH, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //57
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.ETR_NOT_ALLOWED, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.ETR_NOT_ALLOWED, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //58
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.VERIFY_NAME_SELECTION, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.VERIFY_NAME_SELECTION, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //59
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.CHECK_ITIN_ADVANCE_BOARDING, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.CHECK_ITIN_ADVANCE_BOARDING, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //60
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.ONE_OR_MORE_SEGMENTS_NOT_VALID, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.ONE_OR_MORE_SEGMENTS_NOT_VALID, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //61
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.CROSSLORAINE_NEED_COMMISSION, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.CROSSLORAINE_NEED_COMMISSION, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                //statusshowusercontrol = true;
                row = 0;
                col = 0;
                return;
            }

            //62
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.CROSSLORAINE_NO_FARES, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.CROSSLORAINE_NO_FARES, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //63
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.UNABLE_TO_PROCESS_ETR_CORRECT, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.UNABLE_TO_PROCESS_ETR_CORRECT, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //64
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.FORMAT, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.FORMAT, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //65
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.PNR_UPDATED, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.PNR_UPDATED, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //66
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.EQUIVALENT_AMOUNT_TOO_LARGE, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.EQUIVALENT_AMOUNT_TOO_LARGE, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //67
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.ONE_CONFIRMED_AIR_SEGMENT_FOR_ETR, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.ONE_CONFIRMED_AIR_SEGMENT_FOR_ETR, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //68
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.PASSENGER_MUST_HAVE_SSR_FOID, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.PASSENGER_MUST_HAVE_SSR_FOID, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //69
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.CARRIER_NOT_ALLOWED, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.CARRIER_NOT_ALLOWED, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //70
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.NO_REPLY_FROM_SERVER, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.NO_REPLY_FROM_SERVER, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //71
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.NO_REPLY_FROM_SERVER, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.NO_REPLY_FROM_SERVER, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //72
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.INVALID_EXPIRATION_DATE, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.INVALID_EXPIRATION_DATE, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //73
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.UPDATE_TKT_RECORD, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.UPDATE_TKT_RECORD, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //74
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.TICKET_HAS_BEEN_ISSUED, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.TICKET_HAS_BEEN_ISSUED, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //75
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.NO_FARE_FOR_CLASS_USED, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.NO_FARE_FOR_CLASS_USED, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //76
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.NEED_AIRLINE_PNR_LOCATOR, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.NEED_AIRLINE_PNR_LOCATOR, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            //77
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.CREDIT_CARD_AUTH_DECLINED, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.CREDIT_CARD_AUTH_DECLINED, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                //statusshowusercontrol = true;
                row = 0;
                col = 0;
                return;
            }

            //78
            CommandsQik.searchResponse(result, Resources.TicketEmission.ErrorMessagesTickets.INCORRECT_CARD_NUMBER, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.TicketEmission.ErrorMessagesTickets.INCORRECT_CARD_NUMBER, 15);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                //statusshowusercontrol = true;
                row = 0;
                col = 0;
                return;
            }
        }
        private void fixDBQReport()
        {
            string pnrBlock     = string.Empty;
            string dqbReportEnd = string.Empty;
            int    row          = 0;
            int    col          = 0;
            int    size         = 1;
            int    counter      = 0;
            string name         = string.Empty;

            sabreConcat = sabreConcat.Replace('‡', '\n');
            string[] DQBLines = sabreConcat.Split(new char[] { '\n' });
            //redimPNRBlock(size);
            if (chkmpd.Checked)
            {
                pnrBlock = string.Concat(DQBLines[1],
                                         "\n",
                                         DQBLines[2]);
            }
            else
            {
                pnrBlock = string.Concat(DQBLines[2],
                                         "\n",
                                         DQBLines[3]);
            }
            pnrBlockArray.Add(pnrBlock);
            size++;
            //pnrBlock = string.Empty;
            int j = 4;

            if (chkmpd.Checked)
            {
                j = 3;
            }
            for (int i = j; i < DQBLines.Length; i++)
            {
                if (!string.IsNullOrEmpty(DQBLines[i]))
                {
                    row = 0;
                    col = 0;
                    CommandsQik.searchResponse(DQBLines[i], Resources.TicketEmission.ValitationLabels.PNR, ref row, ref col, 1, 1, 1, 5);
                    if (row > 0)
                    {
                        if (!string.IsNullOrEmpty(pnrBlock))
                        {
                            counter = 0;
                            //redimPNRBlock(size);
                            //pnrBlockArray.Add(pnrBlock);
                            //name = string.Concat(DQBLines[i], "\n");
                            size++;
                            pnrBlock = string.Empty;
                            pnrBlock = string.Concat(DQBLines[i], "\n");
                        }
                        else
                        {
                            pnrBlock = string.Concat(DQBLines[i],
                                                     "\n");
                        }
                    }
                    else
                    {
                        row = 0;
                        col = 0;
                        CommandsQik.searchResponse(DQBLines[i], Resources.TicketEmission.ValitationLabels.TOTAL_DAILY_SALES, ref row, ref col);
                        if (row > 0)
                        {
                            if (!string.IsNullOrEmpty(pnrBlock))
                            {
                                counter = 0;
                                //redimPNRBlock(size);
                                //pnrBlockArray.Add(pnrBlock);
                                //size++;
                                pnrBlock = string.Empty;
                            }
                            dqbReportEnd = string.Concat(DQBLines[i],
                                                         "\n");
                            if (!string.IsNullOrEmpty(DQBLines[i + 1]))
                            {
                                dqbReportEnd = string.Concat(dqbReportEnd,
                                                             DQBLines[i + 1]);
                            }
                            else
                            {
                                dqbReportEnd = string.Concat(dqbReportEnd,
                                                             DQBLines[i + 2]);
                            }
                            //redimPNRBlock(size);
                            pnrBlockArray.Add(dqbReportEnd);
                            break;
                        }
                        else
                        {
                            counter++;
                            if (counter < 2)
                            {
                                pnrBlock = string.Concat(pnrBlock,
                                                         DQBLines[i]);
                                name = pnrBlock.Remove(pnrBlock.Length - 21);
                                pnrBlockArray.Add(string.Concat(pnrBlock, "\n", " "));
                            }
                            else
                            {
                                if (!DQBLines[i].Contains("                                                  "))
                                {
                                    if (!DQBLines[i].Contains("TOTAL"))
                                    {
                                        pnrBlock = string.Concat(name,
                                                                 DQBLines[i].Trim());
                                        pnrBlockArray.Add(pnrBlock);
                                    }
                                }
                                else
                                {
                                    pnrBlockArray.Add(DQBLines[i]);
                                }
                            }
                        }
                    }
                }
            }
        }
示例#24
0
        /// <summary>
        /// Armado del comando que se envia a sabre
        /// </summary>
        private void BuildCommand()
        {
            bool   status      = false;
            string sabreAnswer = string.Empty;
            string send        = string.Empty;

            using (CommandsAPI objCommand = new CommandsAPI())
            {
                sabreAnswer = objCommand.SendReceive("*I");
            }
            int row = 0;
            int col = 0;

            CommandsQik.searchResponse(sabreAnswer, "NO ITIN", ref row, ref col, 1, 5, 1, 64);
            if (row > 0)
            {
                MessageBox.Show("NO EXISTE ITINERARIO PRESENTE", Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
            }
            else
            {
                send = string.Concat("/", txtInsert.Text);
                if (!string.IsNullOrEmpty(txtSegment1.Text) || !string.IsNullOrEmpty(txtSegment2.Text) ||
                    !string.IsNullOrEmpty(txtSegment3.Text) || !string.IsNullOrEmpty(txtSegment4.Text) ||
                    !string.IsNullOrEmpty(txtSegment5.Text))
                {
                    send = string.Concat(send, "/");
                    if (!string.IsNullOrEmpty(txtSegment1.Text))
                    {
                        send = string.Concat(send, txtSegment1.Text);
                        if (!string.IsNullOrEmpty(txtRange.Text))
                        {
                            send = string.Concat(send, "-", txtRange.Text);
                        }
                        status = true;
                    }
                    if (!string.IsNullOrEmpty(txtSegment2.Text))
                    {
                        if (status)
                        {
                            send = string.Concat(send, Resources.Constants.COMMANDS_COMMA, txtSegment2.Text);
                        }
                        else
                        {
                            send   = string.Concat(send, txtSegment2.Text);
                            status = true;
                        }
                    }
                    if (!string.IsNullOrEmpty(txtSegment3.Text))
                    {
                        if (status)
                        {
                            send = string.Concat(send, Resources.Constants.COMMANDS_COMMA, txtSegment3.Text);
                        }
                        else
                        {
                            send   = string.Concat(send, txtSegment3.Text);
                            status = true;
                        }
                    }
                    if (!string.IsNullOrEmpty(txtSegment4.Text))
                    {
                        if (status)
                        {
                            send = string.Concat(send, Resources.Constants.COMMANDS_COMMA, txtSegment4.Text);
                        }
                        else
                        {
                            send   = string.Concat(send, txtSegment4.Text);
                            status = true;
                        }
                    }
                    if (!string.IsNullOrEmpty(txtSegment5.Text))
                    {
                        if (status)
                        {
                            send = string.Concat(send, Resources.Constants.COMMANDS_COMMA, txtSegment5.Text);
                        }
                        else
                        {
                            send = string.Concat(send, txtSegment5.Text);
                        }
                    }
                }
                else
                {
                    send = string.Concat(send, "a");
                }
                using (CommandsAPI objCommand = new CommandsAPI())
                {
                    objCommand.SendReceive(send);
                }

                Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
            }
        }
        public static void err_definepassengertype(string result)
        {
            Answer = result;

            Status = false;
            Name2  = false;
            Name3  = false;
            Name4  = false;
            Name5  = false;
            Name6  = false;
            Name7  = false;
            Name8  = false;
            Name9  = false;


            int row = 0;
            int col = 0;


            CommandsQik.searchResponse(result, Resources.ErrorMessages.POSITION_ONE, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.NO_LEVEL_ONE, 5);
                Status    = true;
                namesend1 = string.Empty;
                CommandsQik.CopyResponse(result, ref namesend1, row, 1, 100);
                row = 0;
                col = 0;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.POSITION_TWO, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.POSITION_TWO, 5);
                Name2     = true;
                namesend2 = string.Empty;
                CommandsQik.CopyResponse(result, ref namesend2, row, 1, 100);
                row = 0;
                col = 0;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.POSITION_THREE, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.POSITION_THREE, 5);
                Name3     = true;
                namesend3 = string.Empty;
                CommandsQik.CopyResponse(result, ref namesend3, row, 1, 100);
                row = 0;
                col = 0;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.POSITION_FOUR, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.POSITION_FOUR, 5);
                Name4     = true;
                namesend4 = string.Empty;
                CommandsQik.CopyResponse(result, ref namesend4, row, 1, 100);
                row = 0;
                col = 0;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.POSITION_FIVE, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.POSITION_FIVE, 5);
                Name5     = true;
                namesend5 = string.Empty;
                CommandsQik.CopyResponse(result, ref namesend5, row, 1, 100);
                row = 0;
                col = 0;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.POSITION_SIX, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.POSITION_SIX, 5);
                Name6     = true;
                namesend6 = string.Empty;
                CommandsQik.CopyResponse(result, ref namesend6, row, 1, 100);
                row = 0;
                col = 0;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.POSITION_SEVEN, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.POSITION_SEVEN, 5);
                Name7     = true;
                namesend7 = string.Empty;
                CommandsQik.CopyResponse(result, ref namesend7, row, 1, 100);
                row = 0;
                col = 0;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.POSITION_EIGHT, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.POSITION_EIGHT, 5);
                Name8     = true;
                namesend8 = string.Empty;
                CommandsQik.CopyResponse(result, ref namesend8, row, 1, 100);
                row = 0;
                col = 0;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.POSITION_NINE, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.POSITION_NINE, 5);
                Name9     = true;
                namesend9 = string.Empty;
                CommandsQik.CopyResponse(result, ref namesend9, row, 1, 100);
                row = 0;
                col = 0;
            }
        }
示例#26
0
        public static void err_boletagedataandreceived(string result)
        {
            Answer           = result;
            status           = false;
            BoletageReceived = false;
            IA = false;
            int row = 0;
            int col = 0;


            CommandsQik.searchResponse(result, Resources.ErrorMessages.PAC_VEFIFY_CORRECT_NBR, ref row, ref col);
            if (row != 0 || col != 0)
            {
                BoletageReceived = true;
                row = 0;
                col = 0;
                return;
            }


            //********** BoletageDataAndReceived **************** //

            if (ucBoletageDateAndReceived.PQ)
            {
                CommandsQik.searchResponse(result, Resources.ErrorMessages.LAST_DAY_TO_PURCHASE, ref row, ref col);
                if (row != 0 || col != 0)
                {
                    SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.LAST_DAY_TO_PURCHASE, 8);
                    status = true;
                    fecha  = string.Empty;
                    CommandsQik.CopyResponse(result, ref fecha, row, 22, 5);
                    row = 0;
                    col = 0;
                    return;
                }
            }
            else if (ucBoletageDateAndReceived.WP)
            {
                CommandsQik.searchResponse(result, Resources.ErrorMessages.LAST_DAY_TO_PURCHASE, ref row, ref col);
                if (row != 0 || col != 0)
                {
                    SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.LAST_DAY_TO_PURCHASE, 8);
                    status = true;
                    fecha  = string.Empty;
                    CommandsQik.CopyResponse(result, ref fecha, row, 47, 5);
                    row = 0;
                    col = 0;
                    return;
                }
            }


            CommandsQik.searchResponse(result, Resources.ErrorMessages.NO_ITIN, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.NO_ITIN, 8);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                status        = false;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.ONE, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.ONE, 8);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                fecha         = string.Empty;
                CommandsQik.CopyResponse(result, ref fecha, row, 12, 5);
                IA  = true;
                row = 0;
                col = 0;
                return;
            }
        }
示例#27
0
        /// <summary>
        /// Se envia el comando de acuerdo a los campos ingresados
        /// </summary>
        private void CommandsSend()
        {
            int    row      = 0;
            int    col      = 0;
            string sendPCC  = string.Empty;
            string res      = string.Empty;
            bool   conected = false;



            if (rbnBoth.Checked)
            {
                sendPCC = string.Concat(sendPCC, "AAA", txtPCC.Text);
                using (CommandsAPI objCommand = new CommandsAPI())
                {
                    res = objCommand.SendReceive(sendPCC);
                }
                CommandsQik.searchResponse(res, txtPCC.Text, ref row, ref col);
                if (row != 0 || col != 0)
                {
                    conected = true;
                }
                else
                {
                    MessageBox.Show("ERROR EN LA CONEXIÓN CON MySABRE", Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                if (conected)
                {
                    string result        = string.Empty;
                    string send          = string.Empty;
                    string sabre         = string.Empty;
                    string authorization = string.Empty;
                    string keywords      = string.Empty;
                    string pass          = string.Empty;
                    string codeagent     = string.Empty;
                    row = 0;
                    col = 0;

                    if (!onlyagent)
                    {
                        send = string.Concat(send, "HB", txtNumberFirm.Text);
                        using (CommandsAPI objCommand = new CommandsAPI())
                        {
                            result = objCommand.SendReceive(send);
                        }
                        CommandsQik.searchResponse(result, "NEW EMPLOYEE", ref row, ref col);
                        if (row != 0 || col != 0)
                        {
                            row   = 0;
                            col   = 0;
                            send  = string.Empty;
                            send  = string.Concat("H/NAM", txtLastName.Text, "/", txtInitial.Text);
                            sabre = "H/DTY6*/";
                            if (chkDutyCode.Checked)
                            {
                                sabre = string.Concat(sabre, "9");
                            }
                            authorization = string.Concat(authorization, "H/AUTH BY", txtAuthorization.Text);
                            keywords      = "H/UAT/A-24TIME,SUBAAA,PFKAGT,PTRAGT";
                            if (chkMINIOPR.Checked)
                            {
                                keywords = string.Concat(keywords, ",MINOPR");
                            }
                            if (chkCreate.Checked)
                            {
                                keywords = string.Concat(keywords, ",CREATE");
                            }
                            if (chkAccess.Checked)
                            {
                                keywords = string.Concat(keywords, ",ACCESS");
                            }
                            if (chkCIIMGR.Checked)
                            {
                                keywords = string.Concat(keywords, ",CIIMGR");
                            }
                            if (chkSUBMGR.Checked)
                            {
                                keywords = string.Concat(keywords, ",SUBMGR");
                            }
                            if (chkPNRREL.Checked)
                            {
                                keywords = string.Concat(keywords, ",PNRREL");
                            }
                            if (chkSUBACC.Checked)
                            {
                                keywords = string.Concat(keywords, ",SUBACC");
                            }
                            if (cmbKeyWord8.SelectedIndex > 0)
                            {
                                keywords = string.Concat(keywords, ",", cmbKeyWord8.Text);
                            }
                            if (cmbKeyWord9.SelectedIndex > 0)
                            {
                                keywords = string.Concat(keywords, ",", cmbKeyWord9.Text);
                            }
                            if (cmbKeyWord10.SelectedIndex > 0)
                            {
                                keywords = string.Concat(keywords, ",", cmbKeyWord10.Text);
                            }
                            if (cmbKeyWord11.SelectedIndex > 0)
                            {
                                keywords = string.Concat(keywords, ",", cmbKeyWord11.Text);
                            }
                            if (cmbKeyWord12.SelectedIndex > 0)
                            {
                                keywords = string.Concat(keywords, ",", cmbKeyWord12.Text);
                            }

                            pass      = string.Concat(pass, "H/PASS", txtPassCode.Text);
                            codeagent = string.Concat(codeagent, "HH/A", txtCodeAgent.Text);
                            using (CommandsAPI objCommand = new CommandsAPI())
                            {
                                objCommand.SendReceive(send);
                                objCommand.SendReceive(sabre);
                                objCommand.SendReceive("H/ASO240");
                                objCommand.SendReceive(authorization);
                                objCommand.SendReceive(keywords);
                                objCommand.SendReceive(pass);
                                result = objCommand.SendReceive(codeagent);
                            }
                        }
                        else
                        {
                            MessageBox.Show("LA FIRMA YA EXISTE, INGRESE AL MODULO DE MODIFICACIONES PARA CAMBIOS", Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                            using (CommandsAPI objCommand = new CommandsAPI())
                            {
                                result = objCommand.SendReceive("I");
                            }
                            CommandsQik.searchResponse(result, "IGN", ref row, ref col);
                        }
                    }
                    else
                    {
                        codeagent = string.Concat(codeagent, "HH/A", txtCodeAgent.Text);
                        using (CommandsAPI objCommand = new CommandsAPI())
                        {
                            result = objCommand.SendReceive(codeagent);
                        }
                    }
                    CommandsQik.searchResponse(result, "DUP", ref row, ref col);
                    if (row != 0 || col != 0)
                    {
                        MessageBox.Show("EL CODIGO DE AGENTE YA EXISTE, INGRESE OTRO!", Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                        txtCodeAgent.Focus();
                        onlyagent = true;
                        row       = 0;
                        col       = 0;
                    }
                    CommandsQik.searchResponse(result, "DONE", ref row, ref col);
                    if (row != 0 || col != 0)
                    {
                        row   = 0;
                        col   = 0;
                        sabre = string.Empty;
                        sabre = string.Concat("QS/", txtPCC.Text, txtQueue.Text, "/A-", txtCodeAgent.Text);
                        using (CommandsAPI objCommand = new CommandsAPI())
                        {
                            result = objCommand.SendReceive(sabre);
                        }
                        CommandsQik.searchResponse(result, "ITEM ALREADY IN TABLE", ref row, ref col);
                        if (row != 0 || col != 0)
                        {
                            MessageBox.Show("FIRMA CREADA CORRECTAMENTE, ERROR EN LA ASIGNACIÓN DE LA QUEUE", Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                        }
                        else
                        {
                            MessageBox.Show("FIRMA CREADA Y ASIGNACION A LA QUEUE CON EXITO", Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                        }


                        string    username = string.Concat(txtInitial.Text, " ", txtLastName.Text);
                        string    cc       = string.Empty;
                        Parameter copy     = ParameterBL.GetParameterValue("MailToCreateFirm");
                        cc = copy.Values;

                        AddNewUserBL.AddNewUser(username, username.ToLower(), txtEmail.Text.ToLower(), textAgentMail.Text.ToLower(), DateTime.Today.ToString().Substring(0, 10), txtNumberFirm.Text,
                                                txtPassCode.Text, txtName.Text.ToLower(), txtCodeAgent.Text, txtQueue.Text, txtPCC.Text, txtTA.Text, "SA");
                        SendEMail(cc);
                        if (!txtQueue.Text.Equals("152"))
                        {
                            DialogResult yesNo =
                                MessageBox.Show("Este usuario recibirá reporte de productividad semanal?",
                                                Resources.Constants.MYCTS, MessageBoxButtons.YesNo,
                                                MessageBoxIcon.Information);
                            if (yesNo.Equals(DialogResult.Yes))
                            {
                                SetProductivityMailStatusBL setStatus = new SetProductivityMailStatusBL();
                                setStatus.SetProductivityMailStatus(txtNumberFirm.Text, txtPCC.Text);
                            }
                        }

                        UpdateStatusAllFirmModulesBL.UpdateStatusTA(txtTA.Text);
                        UpdateStatusAllFirmModulesBL.UpdateStatusQueue(txtQueue.Text);
                        UpdateStatusAllFirmModulesBL.UpdateStatusAgent(txtCodeAgent.Text);
                        UpdateStatusAllFirmModulesBL.UpdateStatusFirm(txtNumberFirm.Text);
                        MessageBox.Show("CUENTA DE MyCTS CREADA EXITOSAMENTE", Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                        row = 0;
                        col = 0;
                        Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
                    }
                }
            }

            else if (rbnMyCTS.Checked)
            {
                try
                {
                    User usuarioDto     = null;
                    User ValidAgentMail = null;

                    usuarioDto = UserBL.GetUser(txtNumberFirm.Text, txtPCC.Text);

                    ValidAgentMail = UserBL.ValidAgentMail(textAgentMail.Text);



                    if (usuarioDto == null)
                    {
                        if (ValidAgentMail == null)
                        {
                            string username = string.Concat(txtInitial.Text, " ", txtLastName.Text);
                            string cc       = string.Empty;


                            Parameter copy = ParameterBL.GetParameterValue("MailToCreateFirm");
                            cc = copy.Values;



                            AddNewUserBL.AddNewUser(username, username.ToLower(), txtEmail.Text.ToLower(), textAgentMail.Text.ToLower(), DateTime.Today.ToString().Substring(0, 10), txtNumberFirm.Text,
                                                    txtPassCode.Text, txtName.Text.ToLower(), txtCodeAgent.Text, txtQueue.Text, txtPCC.Text, txtTA.Text, "SA");

                            SendEMail(cc);
                            if (!txtQueue.Text.Equals("152"))
                            {
                                DialogResult yesNo =
                                    MessageBox.Show("Este usuario recibirá reporte de productividad semanal?",
                                                    Resources.Constants.MYCTS, MessageBoxButtons.YesNo,
                                                    MessageBoxIcon.Information);
                                if (yesNo.Equals(DialogResult.Yes))
                                {
                                    SetProductivityMailStatusBL setStatus = new SetProductivityMailStatusBL();
                                    setStatus.SetProductivityMailStatus(txtNumberFirm.Text, txtPCC.Text);
                                }
                            }
                            UpdateStatusAllFirmModulesBL.UpdateStatusTA(txtTA.Text);
                            UpdateStatusAllFirmModulesBL.UpdateStatusQueue(txtQueue.Text);
                            UpdateStatusAllFirmModulesBL.UpdateStatusAgent(txtCodeAgent.Text);
                            UpdateStatusAllFirmModulesBL.UpdateStatusFirm(txtNumberFirm.Text);
                            MessageBox.Show("CUENTA DE MyCTS CREADA EXITOSAMENTE", Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                            Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
                        }
                        else
                        {
                            MessageBox.Show("EL AGENTMAIL YA EXISTE EN MyCTS", Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                        }
                    }
                    else
                    {
                        MessageBox.Show("EL USUARIO YA EXISTE EN MyCTS", Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }
                }
                catch { }
            }


            else if (rbnSabre.Checked)
            {
                try
                {
                    string result        = string.Empty;
                    string send          = string.Empty;
                    string sabre         = string.Empty;
                    string authorization = string.Empty;
                    string keywords      = string.Empty;
                    string pass          = string.Empty;
                    string codeagent     = string.Empty;
                    body = string.Empty;
                    row  = 0;
                    col  = 0;

                    sendPCC = string.Concat(sendPCC, "AAA", txtPCC.Text);
                    using (CommandsAPI objCommand = new CommandsAPI())
                    {
                        res = objCommand.SendReceive(sendPCC);
                    }
                    CommandsQik.searchResponse(res, txtPCC.Text, ref row, ref col);
                    if (row != 0 || col != 0)
                    {
                        conected = true;
                    }
                    else
                    {
                        MessageBox.Show("ERROR EN LA CONEXIÓN CON MySABRE", Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }
                    if (conected)
                    {
                        if (!onlyagent)
                        {
                            send = string.Concat(send, "HB", txtNumberFirm.Text);
                            using (CommandsAPI objCommand = new CommandsAPI())
                            {
                                result = objCommand.SendReceive(send);
                            }
                            CommandsQik.searchResponse(result, "NEW EMPLOYEE", ref row, ref col);
                            if (row != 0 || col != 0)
                            {
                                row   = 0;
                                col   = 0;
                                send  = string.Empty;
                                send  = string.Concat("H/NAM", txtLastName.Text, "/", txtInitial.Text);
                                sabre = "H/DTY6*/";
                                if (chkDutyCode.Checked)
                                {
                                    sabre = string.Concat(sabre, "9");
                                }
                                authorization = string.Concat(authorization, "H/AUTH BY", txtAuthorization.Text);
                                keywords      = "H/UAT/A-24TIME,SUBAAA,PFKAGT,PTRAGT";
                                if (chkMINIOPR.Checked)
                                {
                                    keywords = string.Concat(keywords, ",MINOPR");
                                }
                                if (chkCreate.Checked)
                                {
                                    keywords = string.Concat(keywords, ",CREATE");
                                }
                                if (chkAccess.Checked)
                                {
                                    keywords = string.Concat(keywords, ",ACCESS");
                                }
                                if (chkCIIMGR.Checked)
                                {
                                    keywords = string.Concat(keywords, ",CIIMGR");
                                }
                                if (chkSUBMGR.Checked)
                                {
                                    keywords = string.Concat(keywords, ",SUBMGR");
                                }
                                if (chkPNRREL.Checked)
                                {
                                    keywords = string.Concat(keywords, ",PNRREL");
                                }
                                if (chkSUBACC.Checked)
                                {
                                    keywords = string.Concat(keywords, ",SUBACC");
                                }
                                if (cmbKeyWord8.SelectedIndex > 0)
                                {
                                    keywords = string.Concat(keywords, ",", cmbKeyWord8.Text);
                                }
                                if (cmbKeyWord9.SelectedIndex > 0)
                                {
                                    keywords = string.Concat(keywords, ",", cmbKeyWord9.Text);
                                }
                                if (cmbKeyWord10.SelectedIndex > 0)
                                {
                                    keywords = string.Concat(keywords, ",", cmbKeyWord10.Text);
                                }
                                if (cmbKeyWord11.SelectedIndex > 0)
                                {
                                    keywords = string.Concat(keywords, ",", cmbKeyWord11.Text);
                                }
                                if (cmbKeyWord12.SelectedIndex > 0)
                                {
                                    keywords = string.Concat(keywords, ",", cmbKeyWord12.Text);
                                }

                                pass      = string.Concat(pass, "H/PASS", txtPassCode.Text);
                                codeagent = string.Concat(codeagent, "HH/A", txtCodeAgent.Text);
                                using (CommandsAPI objCommand = new CommandsAPI())
                                {
                                    objCommand.SendReceive(send);
                                    objCommand.SendReceive(sabre);
                                    objCommand.SendReceive("H/ASO240");
                                    objCommand.SendReceive(authorization);
                                    objCommand.SendReceive(keywords);
                                    objCommand.SendReceive(pass);
                                    result = objCommand.SendReceive(codeagent);
                                }
                            }
                            else
                            {
                                MessageBox.Show("LA FIRMA YA EXISTE, INGRESE AL MODULO DE MODIFICACIONES PARA CAMBIOS", Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                                using (CommandsAPI objCommand = new CommandsAPI())
                                {
                                    result = objCommand.SendReceive("I");
                                }
                                //CommandsQik.searchResponse(result, "IGN", ref row, ref col);
                            }
                        }
                        else
                        {
                            codeagent = string.Concat(codeagent, "HH/A", txtCodeAgent.Text);
                            using (CommandsAPI objCommand = new CommandsAPI())
                            {
                                result = objCommand.SendReceive(codeagent);
                            }
                        }
                        CommandsQik.searchResponse(result, "DUP", ref row, ref col);
                        if (row != 0 || col != 0)
                        {
                            MessageBox.Show("EL CODIGO DE AGENTE YA EXISTE, INGRESE OTRO!", Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                            txtCodeAgent.Focus();
                            onlyagent = true;
                            row       = 0;
                            col       = 0;
                        }
                        CommandsQik.searchResponse(result, "DONE", ref row, ref col);
                        if (row != 0 || col != 0)
                        {
                            row   = 0;
                            col   = 0;
                            sabre = string.Empty;
                            sabre = string.Concat("QS/", txtPCC.Text, txtQueue.Text, "/A-", txtCodeAgent.Text);
                            using (CommandsAPI objCommand = new CommandsAPI())
                            {
                                result = objCommand.SendReceive(sabre);
                            }
                            CommandsQik.searchResponse(result, "ITEM ALREADY IN TABLE", ref row, ref col);
                            if (row != 0 || col != 0)
                            {
                                MessageBox.Show("FIRMA CREADA CORRECTAMENTE, ERROR EN LA ASIGNACIÓN DE LA QUEUE", Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                            }
                            else
                            {
                                MessageBox.Show("FIRMA CREADA Y ASIGNACION A LA QUEUE CON EXITO", Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                            }
                        }
                    }
                }
                catch { }
            }
        }
示例#28
0
        public static void err_addatapassenger(string result)
        {
            Answer        = result;
            status        = false;
            othershowmask = false;
            int row = 0;
            int col = 0;

            CommandsQik.searchResponse(result, Resources.ErrorMessages.NO_LEVEL_ONE, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.NO_LEVEL_ONE, 4);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.NO_STARS, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.NO_STARS, 4);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.PURGED, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.PURGED, 4);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.NO_LEVEL_2, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.NO_LEVEL_2, 4);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.NO_STAR_2ND_LEVEL, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.NO_STAR_2ND_LEVEL, 4);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.NO_MORE, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.NO_MORE, 4);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.VLD_ITEM_NUMBER, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.VLD_ITEM_NUMBER, 4);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.NAMELIST_TO_DISPLAY, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.NAMELIST_TO_DISPLAY, 4);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.ITEM_NB, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.ITEM_NB, 4);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.ITM_NBR, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.ITM_NBR, 4);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.ITEM_NR, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.ITEM_NR, 4);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.UPDATE_IN_PROGRESS, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.UPDATE_IN_PROGRESS, 4);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.STARIDS, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.STARIDS, 4);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.INGRESE_LISTA_NOMBRES, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.INGRESE_LISTA_NOMBRES, 4);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }


            CommandsQik.searchResponse(result, Resources.ErrorMessages.IN_SA_MODE_UC, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.IN_SA_MODE_UC, 4);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.NOT_IN_SA_MODE_UC, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.NOT_IN_SA_MODE_UC, 4);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.NOT_IN_SA_MODE_RD, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.NOT_IN_SA_MODE_RD, 4);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.USE_NH, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.USE_NH, 4);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.INVLD_STAR_ID, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.INVLD_STAR_ID, 4);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.EXPIRATION_DATE, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.EXPIRATION_DATE, 4);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.INCQT_CARD_NBR, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.INCQT_CARD_NBR, 4);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.CORRUPTED_STAR_RECORD, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.CORRUPTED_STAR_RECORD, 4);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.STAR_EXIST, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.STAR_EXIST, 4);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.NO_LVL_1, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.NO_LVL_1, 4);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.RESTRICTED, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.RESTRICTED, 4);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.STAR, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.STAR, 4);
                Status = false;
                row    = 0;
                col    = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.NX_TO_CLEAR_NLIST, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.NX_TO_CLEAR_NLIST, 4);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.RESTRICTED_INVALID_DUTY_CODE, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.RESTRICTED_INVALID_DUTY_CODE, 4);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.NO_U_STAR, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.NO_U_STAR, 4);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.SNGL_ITEM_FIELD, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.SNGL_ITEM_FIELD, 4);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Othershowmask = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.RANGE, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.RANGE, 4);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }

            CommandsQik.searchResponse(result, Resources.ErrorMessages.NAME_LIST_PRESENT, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.NAME_LIST_PRESENT, 4);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
                return;
            }
        }
        /// <summary>
        /// Valida la respuesta de mySabre cuando aparece la respuesta *PAC
        /// </summary>
        private void APIResponseDIN()
        {
            string result        = string.Empty;
            string recordLocator = string.Empty;

            ERR_TicketsEmission.err_ticketsEmission(sabreAnswer);
            if (ERR_TicketsEmission.Status == false)
            {
                ERR_TicketsEmission.ok_ticketsEmission(sabreAnswer);
                if (ERR_TicketsEmission.StatusOk == true)
                {
                    int row = 0;
                    int col = 0;

                    if (sabreAnswer.Contains(Resources.TicketEmission.ValitationLabels.ETR_MESSAGE_PROCESSED) || sabreAnswer.Contains(Resources.TicketEmission.ValitationLabels.ETR_EXCHANGE_PROCESSED))
                    {
                        CommandsAPI2.send_MessageToEmulator(Resources.TicketEmission.Constants.MESSAGE_ISSUE);
                    }

                    CommandsQik.searchResponse(sabreAnswer, Resources.TicketEmission.ValitationLabels.INVOICED, ref row, ref col);
                    if (row != 0 || col != 0)
                    {
                        int rowMessage = row - 2;
                        recordLocator = string.Empty;
                        CommandsQik.CopyResponse(sabreAnswer, ref recordLocator, rowMessage + 1, 9, 6);
                    }
                    Common.BeginManualCommandsTransactions();

                    try
                    {
                        //CommandsAPI2.send_MessageToEmulator(Resources.TicketEmission.Constants.MESSAGE_ISSUE);

                        AddRecordsContainerBL.AddRecordsContainer(recordLocator, Login.Agent, true);
                        send = string.Empty;
                        send = string.Concat(Resources.TicketEmission.Constants.AST,
                                             recordLocator);
                        using (CommandsAPI objCommand = new CommandsAPI())
                        {
                            objCommand.SendReceive(send);
                        }
                        QueueAgent();

                        send = string.Empty;
                        MyCTSAPI.SendReservationLog(Login.Firm, Login.PCC, recordLocator, 1);
                        send = string.Concat(Resources.TicketEmission.Constants.AST,
                                             recordLocator);
                        using (CommandsAPI objCommand = new CommandsAPI())
                        {
                            objCommand.SendReceive(send);
                        }
                        SendValidationTicketCommand();
                    }
                    catch { }
                    //Common.EndManualCommandsTransactions();
                    ExecEndCommandTransaction();
                    //System.Threading.Thread.Sleep(1000);
                    ClearValues();
                    if (ucTicketEmissionBuildCommand.emiting)
                    {
                        SetCSCLog();
                        ucTicketEmissionBuildCommand.emiting = false;
                    }
                }
                else
                {
                    MessageBox.Show("OCURRIO UN ERROR AL IMPRIMIR FACTURA. VERIFIQUE RESPUESTAS", Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    if (ucTicketEmissionBuildCommand.emiting)
                    {
                        SetCSCLog();
                        ucTicketEmissionBuildCommand.emiting = false;
                    }
                    //UC = "sendTicketInvoice";
                    Loader.AddToPanel(Loader.Zone.Middle, this, Resources.TicketEmission.Constants.UC_SEND_TICKET_INVOICE);
                }
            }
            else if (ERR_TicketsEmission.StatusSendCommand == true)
            {
                sabreAnswer = string.Empty;

                using (CommandsAPI objCommand = new CommandsAPI())
                {
                    sabreAnswer = objCommand.SendReceive(send);
                }


                ERR_TicketsEmission.ok_ticketsEmission(sabreAnswer);
                if (ERR_TicketsEmission.StatusOk == true)
                {
                    int row = 0;
                    int col = 0;

                    if (sabreAnswer.Contains(Resources.TicketEmission.ValitationLabels.ETR_MESSAGE_PROCESSED) || sabreAnswer.Contains(Resources.TicketEmission.ValitationLabels.ETR_EXCHANGE_PROCESSED))
                    {
                        CommandsAPI2.send_MessageToEmulator(Resources.TicketEmission.Constants.MESSAGE_ISSUE);
                    }

                    CommandsQik.searchResponse(sabreAnswer, Resources.TicketEmission.ValitationLabels.INVOICED, ref row, ref col);
                    if (row != 0 || col != 0)
                    {
                        int rowMessage = row - 2;
                        recordLocator = string.Empty;
                        CommandsQik.CopyResponse(sabreAnswer, ref recordLocator, rowMessage + 1, 9, 6);
                    }
                    Common.BeginManualCommandsTransactions();

                    try
                    {
                        //CommandsAPI2.send_MessageToEmulator(Resources.TicketEmission.Constants.MESSAGE_ISSUE);

                        AddRecordsContainerBL.AddRecordsContainer(recordLocator, Login.Agent, true);
                        send = string.Empty;
                        send = string.Concat(Resources.TicketEmission.Constants.AST,
                                             recordLocator);
                        using (CommandsAPI objCommand = new CommandsAPI())
                        {
                            objCommand.SendReceive(send);
                        }
                        QueueAgent();

                        send = string.Empty;
                        MyCTSAPI.SendReservationLog(Login.Firm, Login.PCC, recordLocator, 1);
                        send = string.Concat(Resources.TicketEmission.Constants.AST,
                                             recordLocator);
                        using (CommandsAPI objCommand = new CommandsAPI())
                        {
                            objCommand.SendReceive(send);
                        }
                        SendValidationTicketCommand();
                        if (ucTicketEmissionBuildCommand.emiting)
                        {
                            SetCSCLog();
                            ucTicketEmissionBuildCommand.emiting = false;
                        }
                    }
                    catch { }
                }
                //Common.EndManualCommandsTransactions();
                ExecEndCommandTransaction();
                //System.Threading.Thread.Sleep(1000);
                ClearValues();
            }
            else
            {
                MessageBox.Show("OCURRIO UN ERROR AL IMPRIMIR FACTURA. VERIFIQUE RESPUESTAS", Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Warning);
                if (ucTicketEmissionBuildCommand.emiting)
                {
                    SetCSCLog();
                    ucTicketEmissionBuildCommand.emiting = false;
                }
                //UC = "sendTicketInvoice";//
                Loader.AddToPanel(Loader.Zone.Middle, this, Resources.TicketEmission.Constants.UC_SEND_TICKET_INVOICE);
            }
        }
        //Analiza el comando enviado, para crear la etiqueta de Quality Controls C80
        private void EvaluateCommand()
        {
            string seg            = string.Empty;
            string res            = string.Empty;
            string itinerary      = string.Empty;
            string bysegment      = string.Empty;
            string commandSegment = string.Empty;
            string konnect        = string.Empty;
            int    lenght         = 0;
            int    resplenght     = 0;
            int    lenghtcommand  = 0;
            int    aux            = 0;
            int    row            = 0;
            int    col            = 0;
            int    row1           = 0;
            int    col1           = 0;
            int    i = 0;
            int    j = 0;

            if (command.Contains("‡DPE"))
            {
                command = command.Replace("‡DPE", "‡DPB");
            }
            else if (!command.Contains("‡DPB"))
            {
                command = string.Concat(command, "‡DPB");
            }

            //Obtiene segmentos
            if (command.Contains("‡S"))
            {
                char[] charCommand = command.ToCharArray();
                for (int x = 0; x <= charCommand.Length; x++)
                {
                    int y = x + 1;
                    if (charCommand[x] == '‡' & charCommand[x + 1] == 'S')
                    {
                        x++;
                        while (x < charCommand.Length)
                        {
                            if (charCommand[x] != '‡')
                            {
                                segment = string.Concat(segment, charCommand[x]);
                                x++;
                            }
                            else
                            {
                                break;
                            }
                        }
                        break;
                    }
                }
            }

            //Creación de la etiqueta C80



            if (!string.IsNullOrEmpty(segment))
            {
                segment   = segment.Replace('-', '/');
                bysegment = segment.Replace('S', ' ').Trim();
                newlabel  = string.Concat("5.</C80*");
                seg       = string.Concat("*IA");
                using (CommandsAPI2 objCommand = new CommandsAPI2())
                {
                    res = objCommand.SendReceive(seg, 0, 0);
                }

                string[] segments1 = bysegment.Split(new char[] { '/' });



                for (int a = 0; a < segments1.Length; a++)
                {
                    col = 0; row = 0;
                    CommandsQik.searchResponse(segments1[a], "-", ref row, ref col);
                    if (col != 0 || row != 0)
                    {
                        int num1 = 0;
                        int num2 = 0;

                        string[] seg1       = segments1[a].Split(new char[] { '-' });
                        string   replace    = string.Empty;
                        string   bysegment2 = string.Empty;

                        num1 = Convert.ToInt32(seg1[0]);
                        num2 = Convert.ToInt32(seg1[1]);

                        for (int f = num1; f <= num2; f++)
                        {
                            bysegment2 = string.Concat(bysegment2, f.ToString(), "/");
                        }
                        bysegment2 = bysegment2.Remove(bysegment2.Length - 1, 1);
                        replace    = string.Concat(num1.ToString(), "-", num2.ToString());
                        bysegment  = bysegment.Replace(replace, bysegment2);
                    }
                }

                string[] segments = bysegment.Split(new char[] { '/' });
                lenght = segments.Length - 1;


                string[] resp = res.Split(new char[] { '\n' });
                resplenght = resp.Length;


                for (i = 0; i <= lenght; i++)
                {
                    aux = 0;
                    for (j = 1; j < resplenght; j++)
                    {
                        j = aux + 1;

                        col = 0; row = 0; col1 = 0; row1 = 0;
                        CommandsQik.searchResponse(resp[j], "ARNK", ref row, ref col);
                        if (row == 0 || col == 0)
                        {
                            col = 0; row = 0; col1 = 0; row1 = 0;
                            CommandsQik.searchResponse(resp[j], segments[i], ref row, ref col, 1, 3, 1, 3);
                            if (row != 0 || col != 0)
                            {
                                CommandsQik.CopyResponse(resp[j], ref itinerary, row, 19, 8);
                                itinerary      = itinerary.Replace("*", "").Trim();
                                commandSegment = string.Concat(commandSegment, itinerary.Substring(0, 3), ".",
                                                               itinerary.Substring(3, 3), ".");
                                aux = j;
                                break;
                            }
                        }
                        aux = j;
                    }
                }

                if (!string.IsNullOrEmpty(commandSegment))
                {
                    commandSegment = commandSegment.Remove(commandSegment.Length - 1);
                    if (commandSegment.Length > 7)
                    {
                        string[] commands = commandSegment.Split(new char[] { '.' });
                        lenghtcommand = commands.Length - 1;
                        for (int z = 0; z <= lenghtcommand - 1; z++)
                        {
                            if (commands[z] == commands[z + 1])
                            {
                                commands[z] = string.Empty;
                            }
                        }

                        commandSegment = string.Empty;

                        for (int a = 0; a <= lenghtcommand; a++)
                        {
                            if (!string.IsNullOrEmpty(commands[a]))
                            {
                                commandSegment = string.Concat(commandSegment, commands[a].Trim(), ".");
                            }
                        }
                        commandSegment = commandSegment.Remove(commandSegment.Length - 1);
                    }

                    newlabel = string.Concat(newlabel, commandSegment, "/>");
                    c80      = newlabel;
                }
            }
        }