private void CommandsSend()
        {
            string send   = string.Empty;
            string result = string.Empty;
            int    row    = 0;
            int    col    = 0;

            send = "2";
            send = string.Concat(send, txtAirLine.Text, txtFlightNumber.Text);
            if (!string.IsNullOrEmpty(txtDate.Text))
            {
                send = string.Concat(send, Resources.Constants.SLASH, txtDate.Text);
            }
            using (CommandsAPI objCommand = new CommandsAPI())
            {
                result = objCommand.SendReceive(send);
            }


            CommandsQik.searchResponse(result, "@md", ref row, ref col);
            if (row != 0 || col != 0)
            {
                using (CommandsAPI objCommand = new CommandsAPI())
                {
                    objCommand.SendReceive("@md");
                }
            }
        }
        /// <summary>
        /// Verifica la existencia de fase IV en el record
        /// </summary>
        private void FirstValidations()
        {
            string send        = string.Empty;
            string sabreAnswer = string.Empty;
            int    row         = 0;
            int    col         = 0;

            send = Resources.TicketEmission.Constants.COMMANDS_AST_AST_W;
            using (CommandsAPI objCommand = new CommandsAPI())
            {
                sabreAnswer = objCommand.SendReceive(send);
            }

            CommandsQik.searchResponse(sabreAnswer, Resources.TicketEmission.ValitationLabels.NO_TKT_REC_EXISTS, ref row, ref col, 1, 3, 1, 64);
            if (row != 0 || col != 0)
            {
                MessageBox.Show(Resources.TicketEmission.Tickets.NO_EXISTE_FASE_IV, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Warning);
                Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
                return;
            }

            row = 0;
            col = 0;
            CommandsQik.searchResponse(sabreAnswer, Resources.TicketEmission.ValitationLabels.TKT_LIST, ref row, ref col, 1, 3, 1, 64);
            if (!(row == 0 || col == 0))
            {
                MessageBox.Show(Resources.TicketEmission.Tickets.NO_EXISTE_FASE_IV, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Warning);
                Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
                return;
            }
        }
示例#3
0
        /// <summary>
        ///  Validación de inicio de sesion en área E para agentes con
        /// pseudo 3L64
        /// </summary>
        private void LoginEAreaValidation()
        {
            send        = string.Empty;
            sabreAnswer = string.Empty;
            row         = 0;
            col         = 0;
            //locatorrecord = RecordLocalizer.GetRecordLocalizer();
            //LogProductivity.PNR = locatorrecord;
            if (Login.PCC.Equals(Resources.TicketEmission.Constants.PCC_3L64))
            {
                send = Resources.TicketEmission.Constants.COMMANDS_AST_S;
                using (CommandsAPI objCommand = new CommandsAPI())
                {
                    sabreAnswer = objCommand.SendReceive(send);
                }

                CommandsQik.searchResponse(sabreAnswer, Resources.TicketEmission.ValitationLabels.A, ref row, ref col, 1, 1, 15, 15);
                if (row != 0 || col != 0)
                {
                    MessageBox.Show(Resources.TicketEmission.Tickets.NECESITAS_ESTAR_AREA_E_EMITIR_ETKTS, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    isMessageShown = true;
                    return;
                }
                CommandsQik.searchResponse(sabreAnswer, Resources.TicketEmission.ValitationLabels.B, ref row, ref col, 1, 1, 15, 15);
                if (row != 0 || col != 0)
                {
                    MessageBox.Show(Resources.TicketEmission.Tickets.NECESITAS_ESTAR_AREA_E_EMITIR_ETKTS, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    isMessageShown = true;
                    return;
                }
            }
        }
示例#4
0
        /// <summary>
        /// Se manda un commando en el cual se busca si existe linea contable
        /// si es asi te manda al user Control que te permite borrar
        /// la linea contable, si no te manda al siguiente User Control
        /// </summary>
        private void Validation_deleteaccountline()
        {
            Answer = result;
            status = false;
            string send = string.Empty;

            send = Resources.TicketEmission.Constants.COMMANDS_AST_PAC;
            using (CommandsAPI objCommands = new CommandsAPI())
            {
                result = objCommands.SendReceive(send);
            }
            CommandsQik.searchResponse(result, Resources.TicketEmission.ValitationLabels.ACCOUNTING_DATA, ref row, ref col);
            if (row != 0 || col != 0)
            {
                Status = true;
                row    = 0;
                col    = 0;
            }
            if (Status)
            {
                //UC = "deleteAccountLine";
                Loader.AddToPanel(Loader.Zone.Middle, this, Resources.TicketEmission.Constants.UC_DELETEACCOUNTLINE);
            }
            else
            {
                //UC = "removeRemarks";
                Loader.AddToPanel(Loader.Zone.Middle, this, Resources.TicketEmission.Constants.UC_REMOVEREMARKS);
            }
        }
        /// <summary>
        /// Valida si existe la etiqueta MAXIMUM al enviar el comando WPNCS
        /// </summary>
        private void FindMaximum()
        {
            string send        = string.Empty;
            string sabreAnswer = string.Empty;

            int col = 0;
            int row = 0;

            send = Resources.TicketEmission.Constants.COMMANDS_WPNCS;
            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.MAXIMUM, ref row, ref col, 2, 3, 1, 64);
            if (row != 0 || col != 0)
            {
                send = Resources.TicketEmission.Constants.COMMANDS_WPNCS_CROSSLORAINE_S1_INDENT_16;
                MyCTS.Presentation.Parameters.TimeExtendedAPI = true;
                try
                {
                    using (CommandsAPI objCommand = new CommandsAPI())
                    {
                        objCommand.SendReceive(send);
                    }
                }
                catch { }
                MyCTS.Presentation.Parameters.TimeExtendedAPI = false;
            }
        }
        /// <summary>
        /// Validación de itinerario presente en MySabre
        /// </summary>
        private void PreviousValidation()
        {
            string result = string.Empty;
            string send   = Resources.Constants.COMMANDS_AST_I;
            int    row    = 0;
            int    col    = 0;

            using (CommandsAPI objCommand = new CommandsAPI())
            {
                result = objCommand.SendReceive(send);
            }
            CommandsQik.searchResponse(result, Resources.TicketEmission.ValitationLabels.NO_ITIN, ref row, ref col);
            if (row != 0 || col != 0)
            {
                MessageBox.Show(Resources.Reservations.NO_EXISTE_ITINERARIO, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
            }
            else
            {
                send = Resources.Constants.COMMANDS_AST_T_AST_HT;
                using (CommandsAPI objCommand = new CommandsAPI())
                {
                    objCommand.SendReceive(send);
                }
                txtNumberTicket.Focus();
            }
        }
示例#7
0
        private void InitialValidations()
        {
            try
            {
                if (this.Parameters != null)
                {
                    if (this.Parameters.Length.Equals(1))
                    {
                        lblTA.Text = this.Parameters[0];
                        BannerImageList.Clear();
                        lblStateConection.Text      = "No Conectado";
                        lblStateConection.ForeColor = Color.Red;
                        string sabreAnswer = string.Empty;
                        string ta          = string.Empty;
                        string send        = "‡J";
                        using (CommandsAPI objCommand = new CommandsAPI())
                        {
                            sabreAnswer = objCommand.SendReceive(send);
                        }

                        CommandsQik.CopyResponse(sabreAnswer, ref ta, 1, 21, 6);
                        SetTABL.SetTa(Login.Firm, ta);
                    }
                    else if (this.Parameters.Length.Equals(3))
                    {
                        lblTA.Text                = this.Parameters[0];
                        lblBienvenido.Text        = this.Parameters[1];
                        lblInformacion.Text       = this.Parameters[2];
                        lblStateConection.Visible = false;
                    }
                }
                else
                {
                    if (string.IsNullOrEmpty(activeBanner))
                    {
                        activeBanner = ParameterBL.GetParameterValue("ActiveBanner").Values;
                    }
                    if (Convert.ToBoolean(activeBanner))
                    {
                        try
                        {
                            if (BannerImageList != null)
                            {
                                if (BannerImageList.Count.Equals(0))
                                {
                                    BannerImageList = GetBannerImageBL.GetBannerImageList("1");
                                }
                                if (BannerImageList.Count > 0)
                                {
                                    SetDinamicImages();
                                }
                            }
                        }
                        catch
                        { }
                    }
                }
            }
            catch { }
        }
        /// <summary>
        /// Envio del camando armado al emulador
        /// </summary>
        private void SendCommand()
        {
            bool status = true;

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

            CommandsQik.searchResponse(sabreAnswer, Resources.ErrorMessages.SEGMENT_NUMBER_NOT_VALID, ref row, ref col);
            if (row > 0)
            {
                MessageBox.Show(Resources.Reservations.ERROR_NUM_SEGMENTO, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                txtSegment1.Focus();
                status = false;
            }
            row = 0;
            col = 0;
            CommandsQik.searchResponse(sabreAnswer, Resources.ErrorMessages.INVALID_SSR_CODE, ref row, ref col);
            if (row > 0)
            {
                MessageBox.Show(Resources.Reservations.LINEA_AEREA_NO_REQ_INFORMACION, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
                status = false;
            }
            if (status)
            {
                Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
            }
        }
        public static void validation_deleteaccountline(string result)
        {
            Answer = result;
            status = false;
            int row = 0;
            int col = 0;

            string send = string.Empty;

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



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


            //if (Status)
            //{
            //    Loader.AddToPanel(Loader.Zone.Middle, this, Resources.TicketEmission.Constants.UC_DELETEACCOUNTLINE);
            //}
        }
        public static void err_mnuSee(string result)
        {
            Answer = result;
            Status = false;
            int row = 0;
            int col = 0;

            CommandsQik.searchResponse(result, Resources.ErrorMessages.CROSS_NO_PSGR_DATA, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.CROSS_NO_PSGR_DATA, 12);
                CustomUserMsg  = userErrorMessage.CusErrMsgUserMsg;
                CustomUserMsg2 = "NO EXISTEN MENSAJES PARA LA AEROLINEA";
                Status         = true;
                row            = 0;
                col            = 0;
            }


            CommandsQik.searchResponse(result, Resources.ErrorMessages.NO_PSGR_DATA, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.CROSS_NO_PSGR_DATA, 12);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                Status        = true;
                row           = 0;
                col           = 0;
            }
        }
        /// <summary>
        /// Función que valida si en sabre existen registros DQB
        /// para la fecha solicitada
        /// </summary>
        private bool searchDQB()
        {
            int  row         = 0;
            int  col         = 0;
            bool exixtingDQB = false;

            row = 0;
            col = 0;
            CommandsQik.searchResponse(sabreAnswer, Resources.TicketEmission.ValitationLabels.DQB, ref row, ref col);
            if (row > 0)
            {
                exixtingDQB = true;
                sabreConcat = sabreAnswer;
            }
            CommandsQik.searchResponse(sabreAnswer, "EMD", ref row, ref col);
            if (row > 0)
            {
                exixtingDQB = true;
                sabreConcat = sabreAnswer;
            }
            else
            {
                MessageBox.Show(Resources.TicketEmission.Constants.NO_HAY_REGISTROS, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                txtDate.Focus();
                sabreConcat = string.Empty;
                exixtingDQB = false;
            }
            return(exixtingDQB);
        }
示例#12
0
        /// <summary>
        /// Se envia un comando y se buscan dos etiquetas si no se encuentran
        /// es que existe Fase IV en el Record
        /// </summary>
        private void validation_PhaseIV()
        {
            Answer   = result;
            phase_iv = true;
            int row = 0;
            int col = 0;

            send = Resources.TicketEmission.Constants.COMMANDS_AST_AST_W;
            using (CommandsAPI objCommands = new CommandsAPI())
            {
                result = objCommands.SendReceive(send);
            }
            CommandsQik.searchResponse(result, Resources.TicketEmission.ValitationLabels.NO_TKT_REC_EXISTS, ref row, ref col);
            if (row != 0 || col != 0)
            {
                row      = 0;
                col      = 0;
                phase_iv = false;
            }
            CommandsQik.searchResponse(result, Resources.TicketEmission.ValitationLabels.TKT_REC_PRINTED_DELETED, ref row, ref col);
            if (row != 0 || col != 0)
            {
                row      = 0;
                col      = 0;
                phase_iv = false;
            }
        }
示例#13
0
        /// <summary>
        /// Se envia un commando para verficiar si existe un Record Presente
        /// actualmente ya no se ocupa
        /// </summary>
        private void validation_recordPresent()
        {
            Answer        = result;
            PresentRecord = false;
            int row = 0;
            int col = 0;

            send = Resources.TicketEmission.Constants.COMMANDS_AST_N_AST_IA_AST_INDENT;
            using (CommandsAPI objCommands = new CommandsAPI())
            {
                result = objCommands.SendReceive(send);
            }
            CommandsQik.searchResponse(result, Resources.TicketEmission.ValitationLabels.NO_ITIN, ref row, ref col);
            if (row != 0 || col != 0)
            {
                MessageBox.Show(Resources.TicketEmission.Tickets.NO_RECORD_PRESENTE, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Warning);
                PresentRecord = true;
                row           = 0;
                col           = 0;
            }
            CommandsQik.searchResponse(result, Resources.TicketEmission.ValitationLabels.NO_NAMES, ref row, ref col);
            if (row != 0 || col != 0)
            {
                MessageBox.Show(Resources.TicketEmission.Tickets.REQUIREN_NOMBRES_RECORD_EMITIR_BOLETO, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Warning);
                PresentRecord = true;
                row           = 0;
                col           = 0;
            }
            if (PresentRecord)
            {
                Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
            }
        }
示例#14
0
        /// <summary>
        /// crea la rutina para eliminar los remarks contables de las diferentes respuestas
        /// de Mysabre
        /// </summary>
        public static void Remarks()
        {
            string ren    = string.Empty;
            string ren1   = string.Empty;
            string five   = Resources.TicketEmission.Constants.COMMANDS_FIVE;
            int    lenght = 0;

            Sabre = string.Empty;
            string[] sabreAnswerInfo = sabreConcat.Split(new char[] { '\n' });
            lenght = sabreAnswerInfo.Length;

            for (int i = lenght; i >= 2; i--)
            {
                CommandsQik.CopyResponse(sabreConcat, ref ren, i, 4, 2);
                if (ren == Resources.TicketEmission.Constants.COMMADNS_DOT_SLASH)
                {
                    CommandsQik.CopyResponse(sabreConcat, ref ren1, i, 1, 3);
                    ren1  = ren1.Trim();
                    Sabre = string.Concat(Sabre, five, ren1, Resources.TicketEmission.Constants.AT, "Σ");
                }
            }

            if (!string.IsNullOrEmpty(Sabre))
            {
                send  = string.Empty;
                Sabre = Sabre.TrimEnd(new char[] { 'Σ' });
                send  = Sabre;
                using (CommandsAPI objCommand = new CommandsAPI())
                {
                    objCommand.SendReceive(send);
                }
            }
        }
示例#15
0
        public static void err_apispassportmessage(string result)
        {
            Answer    = result;
            Status    = false;
            OtherMask = false;
            int row = 0;
            int col = 0;



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

            CommandsQik.searchResponse(result, Resources.ErrorMessages.INVALID_SSR_CODE, ref row, ref col);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.ErrorMessages.INVALID_SSR_CODE, 21);
                CustomUserMsg = userErrorMessage.CusErrMsgUserMsg;
                OtherMask     = true;
                row           = 0;
                col           = 0;
                return;
            }
        }
示例#16
0
 /// <summary>
 ///  Validación de record presente en MySabre
 /// </summary>
 private void PresentRecordValidation()
 {
     if (!ucEndReservation.isFlowHotel)
     {
         send        = string.Empty;
         sabreAnswer = string.Empty;
         send        = Resources.TicketEmission.Constants.COMMANDS_AST_N_AST_IA;
         using (CommandsAPI objCommand = new CommandsAPI())
         {
             sabreAnswer = objCommand.SendReceive(send);
         }
         CommandsQik.searchResponse(sabreAnswer, Resources.TicketEmission.ValitationLabels.NO_ITIN, ref row, ref col, 2, 3, 1, 64);
         if (row != 0 || col != 0)
         {
             MessageBox.Show(Resources.TicketEmission.Tickets.NO_RECORD_PRESENTE, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Warning);
             isMessageShown = true;
             return;
         }
         CommandsQik.searchResponse(sabreAnswer, Resources.TicketEmission.ValitationLabels.NO_NAMES, ref row, ref col, 2, 3, 1, 64);
         if (row != 0 || col != 0)
         {
             MessageBox.Show(Resources.TicketEmission.Tickets.NO_NOMBRES_PRESENTES, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Warning);
             isMessageShown = true;
             return;
         }
     }
 }
        //Quality Controls for RADIUS
        private void QCRadius()
        {
            bool   status       = false;
            int    row          = 0;
            int    col          = 0;
            string QCAuthorized = ucFirstValidations.CorporativeQualityControls[0].QCAuthorized;

            if (QCAuthorized.Equals(Resources.TicketEmission.Constants.ACTIVE))
            {
                string sLabelQC = ucFirstValidations.CorporativeQualityControls[0].LabelQC;
                string send     = string.Empty;


                send = Resources.TicketEmission.Constants.COMMANDS_AST_Q_CROSSLORRAINE;
                using (CommandsAPI objCommands = new CommandsAPI())
                {
                    result = objCommands.SendReceive(send);
                }
                CommandsQik.searchResponse(result, Resources.TicketEmission.ValitationLabels.RADIUS_QC_PASSED, ref row, ref col);
                if (row != 0 || col != 0)
                {
                    status = true;
                    row    = 0;
                    col    = 0;
                }
                if (!status)
                {
                    MessageBox.Show(Resources.TicketEmission.Tickets.NO_EXISTE_AUTORIZACION_CLIENTE_PARA_EMISION, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    //UC = "welcome";//
                    Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
                }
                //else
                //   //UC = "ratingActualFAre";//
                //    Loader.AddToPanel(Loader.Zone.Middle, this, Resources.TicketEmission.Constants.UC_RATING_ACTUAL_FARE);
                else
                {
                    if (!string.IsNullOrEmpty(ucFirstValidations.PCC))
                    {
                        Loader.AddToPanel(Loader.Zone.Middle, this, Resources.TicketEmission.Constants.UC_COMPARING_FARES);
                    }
                    else
                    {
                        Loader.AddToPanel(Loader.Zone.Middle, this, Resources.TicketEmission.Constants.UC_RATING_ACTUAL_FARE);
                    }
                }
            }
            else
            {
                //UC = "ratingActualFAre";//
                //Loader.AddToPanel(Loader.Zone.Middle, this, Resources.TicketEmission.Constants.UC_RATING_ACTUAL_FARE);
                if (!string.IsNullOrEmpty(ucFirstValidations.PCC))
                {
                    Loader.AddToPanel(Loader.Zone.Middle, this, Resources.TicketEmission.Constants.UC_COMPARING_FARES);
                }
                else
                {
                    Loader.AddToPanel(Loader.Zone.Middle, this, Resources.TicketEmission.Constants.UC_RATING_ACTUAL_FARE);
                }
            }
        }
示例#18
0
        //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, "/D-", 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)
            {
                if (AssignQueueFirmBL.AssignQueueFirm("152", txtAgentCode.Text, txtPCC.Text))
                {
                    UpdateStatusAllFirmModulesBL.UpdateUnassignStatusQueue(txtQueue.Text);
                    MessageBox.Show("QUEUE CANCELADA", Resources.Constants.MYCTS, MessageBoxButtons.OK,
                                    MessageBoxIcon.Information);
                }
                else
                {
                    MessageBox.Show("HA OCURRIDO UN ERROR AL ACTUALIZAR", Resources.Constants.MYCTS, MessageBoxButtons.OK,
                                    MessageBoxIcon.Information);
                }
            }
            else
            {
                MessageBox.Show("ERROR EN LA CONEXIÓN CON MySABRE", Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
        /// <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;
            bool   notcontinue = false;

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

            sabre  = string.Concat("H/AUTH BY ", txtAuthorization.Text);
            change = string.Concat("HH/A", txtAgentCode.Text);
            using (CommandsAPI objCommand = new CommandsAPI())
            {
                result = objCommand.SendReceive(send);
            }
            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);
                notcontinue = true;
            }

            if (!notcontinue)
            {
                using (CommandsAPI objCommand = new CommandsAPI())
                {
                    objCommand.SendReceive(sabre);
                    result = objCommand.SendReceive(change);
                }


                CommandsQik.searchResponse(result, "DUP", ref row, ref col);
                if (row != 0 || col != 0)
                {
                    row = 0;
                    col = 0;
                    MessageBox.Show(Resources.Reservations.INICIALES_YA_EXISTEN_INGRESE_OTRAS, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                CommandsQik.searchResponse(result, "DONE", ref row, ref col);
                if (row != 0 || col != 0)
                {
                    using (CommandsAPI objCommand = new CommandsAPI())
                    {
                        objCommand.SendReceive("I");
                    }
                    CommandsAPI2.send_MessageToEmulator(string.Concat(Resources.Reservations.CODIGO_CAMBIADO_CON_EXITO));
                    UpdateUsersBL.UpdateUsers(txtNumberFirm.Text, txtPCC.Text, txtAgentCode.Text, null, null);
                    MessageBox.Show(Resources.Reservations.CAMBIO_CODIGO_AGENTE_EXITOSO, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                    Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
                }
            }
        }
示例#20
0
 private void NoNames(out bool shouldReturn)
 {
     shouldReturn = false;
     CommandsQik.searchResponse(sabreAnswer, Resources.TicketEmission.ValitationLabels.NO_NAMES, ref row, ref col, 2, 3, 1, 64);
     if (row != 0 || col != 0)
     {
         MessageBox.Show(Resources.TicketEmission.Tickets.NO_NOMBRES_PRESENTES, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Warning);
         isMessageShown = true;
         shouldReturn   = true;
     }
 }
        //Manda comando o muestra los datos deacuerdo a la opción elegida
        private void SendCommand()
        {
            int    col         = 0;
            int    row         = 0;
            bool   notcontinue = false;
            string result      = string.Empty;
            string send        = string.Empty;
            string sabre       = string.Empty;

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

            using (CommandsAPI objCommand = new CommandsAPI())
            {
                result = objCommand.SendReceive(send);
            }
            CommandsQik.searchResponse(result, "RESTRICTED", ref row, ref col);
            if (row != 0 || col != 0)
            {
                using (CommandsAPI objCommand = new CommandsAPI())
                {
                    objCommand.SendReceive("I");
                }
                MessageBox.Show(Resources.Reservations.NO_TIENE_AUTORIZACION_LIMPIAR_FIRMAS, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                notcontinue = true;
                row         = 0;
                col         = 0;
            }
            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);
                notcontinue = true;
                row         = 0;
                col         = 0;
            }
            else if (!notcontinue)
            {
                send  = "H/AUTH BY" + txtAuthorization.Text;
                sabre = "HPCLEAR";

                using (CommandsAPI objCommand = new CommandsAPI())
                {
                    objCommand.SendReceive(send);
                    objCommand.SendReceive(sabre);
                }
                MessageBox.Show(Resources.Reservations.FIRMA_LIMPIADA_EXITO, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
            }
        }
示例#22
0
        //Manda comando o muestra los datos deacuerdo a la opción elegida
        private void SendCommand()
        {
            int col = 0;
            int row = 0;

            string result = string.Empty;
            string send   = string.Empty;
            string sabre  = string.Empty;
            string he     = string.Empty;

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

            using (CommandsAPI objCommand = new CommandsAPI())
            {
                result = objCommand.SendReceive(send);
            }
            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);
                row = 0;
                col = 0;
            }
            else
            {
                send  = "H/AUTH BY " + txtAuthorization.Text;
                sabre = "H/PASS" + txtPasswordTemp.Text;
                he    = "HE";

                using (CommandsAPI objCommand = new CommandsAPI())
                {
                    objCommand.SendReceive(send);
                    objCommand.SendReceive(sabre);
                    result = objCommand.SendReceive(he);
                    objCommand.SendReceive("I");
                }
                CommandsQik.searchResponse(result, "DONE", ref row, ref col);
                if (row != 0 || col != 0)
                {
                    MessageBox.Show(Resources.Reservations.PASSCODE_TEMPORAL_ASIGNADO, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                    Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
                }
                else
                {
                    MessageBox.Show(Resources.Reservations.PRESENTO_ERROR, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
        }
 private void RecuperarPNR()
 {
     if (String.IsNullOrEmpty(recLoc))
     {
         using (CommandsAPI objCommand = new CommandsAPI())
         {
             string recordLocalizador = string.Empty;
             string sabreAnswer       = objCommand.SendReceive(ChargesPerService.PreguntasASabre.VERIFICAR_RESERVA);
             CommandsQik.CopyResponse(sabreAnswer, ref recordLocalizador, 1, 1, 6);
             recLoc = recordLocalizador;
         }
     }
 }
        private void ucPlaceRecordQueue_Load(object sender, EventArgs e)
        {
            string sabreAnswer  = String.Empty;
            string QueueBritish = ParameterBL.GetParameterValue("QueueBritish").Values;

            using (CommandsAPI objCommand = new CommandsAPI())
            {
                sabreAnswer = objCommand.SendReceive(QueueBritish);
                CommandsQik.CopyResponse(sabreAnswer, ref ucFirstValidations.dk, 1, 19, 6);
            }

            Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
        }
 /// <summary>
 /// En esta funcion extrae el DK, primero se manda un comando
 /// despues se buscada una frase y si la encuentra copia el DK
 /// pero por el momento tampoco se usa
 /// </summary>
 private void DK()
 {
     send = Resources.TicketEmission.Constants.COMMANDS_AST_PDK;
     using (CommandsAPI objCommand = new CommandsAPI())
     {
         result = objCommand.SendReceive(send, 0, 0);
     }
     CommandsQik.searchResponse(result, Resources.TicketEmission.ValitationLabels.CUSTOMER_NUMBER, ref row, ref col, 1, 2, 1, 64);
     if (row != 0 || col != 0)
     {
         dk = string.Empty;
         CommandsQik.CopyResponse(result, ref dk, row, 19, 6);
     }
 }
示例#26
0
 /// <summary>
 /// Verifica respuesta
 /// </summary>
 private void APIResponse()
 {
     if ((!string.IsNullOrEmpty(result)))
     {
         CommandsQik.searchResponse(result, Resources.ErrorMessages.ONE, ref col, ref row, 1, 2);
         if (row == 2 && col == 1)
         {
             Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCRECORDSELECT);
         }
         else
         {
             VerifyYieldedRecord();
         }
     }
 }
示例#27
0
        private void APIRespose(string result)
        {
            int row = 0;
            int col = 0;

            CommandsQik.searchResponse(result, Resources.ErrorMessages.NO_VALID_SEGMENT_FOUND, ref row, ref col);
            if (row > 0)
            {
                MessageBox.Show(Resources.Reservations.ERROR_INGRESAR_DATOS, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            else
            {
                Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
            }
        }
        public static void err_boletagedataandreceived(string result)
        {
            Answer = result;
            status = false;
            int row = 0;
            int col = 0;

            CommandsQik.searchResponse(result, Resources.Group.ErrorMessage.CROSSLORAINE, ref row, ref col, 1, 1, 1, 1);
            if (row != 0 || col != 0)
            {
                SabreErrorMsg userErrorMessage = SabreErrorMsgBL.GetSabreErrorMsg(Resources.Group.ErrorMessage.CROSSLORAINE, 20);
                status = true;
                row    = 0;
                col    = 0;
                return;
            }
        }
        private bool ValidaExistenciaPNRActivo()
        {
            bool ExistePNR = true;

            using (CommandsAPI objCommand = new CommandsAPI())
            {
                string sabreAnswer = objCommand.SendReceive(ChargesPerService.PreguntasASabre.VERIFICAR_RESERVA);
                CommandsQik.CopyResponse(sabreAnswer, ref recLoc, 1, 1, 6);
                char[]   separadores = { '\n' };
                string[] respuesta   = sabreAnswer.Split(separadores, StringSplitOptions.RemoveEmptyEntries);
                if (respuesta != null && respuesta.Length > 0 && respuesta[0] == "NO DATA")
                {
                    ExistePNR = false;
                }
            }
            return(ExistePNR);
        }
        private static void APIResponseP6()
        {
            int col = 0;
            int row = 0;

            if ((!string.IsNullOrEmpty(result)))
            {
                CommandsQik.searchResponse(result, Resources.ErrorMessages.RECEIVED, ref row, ref col);
                if (row != 0 || col != 0)
                {
                    p6  = true;
                    row = 0;
                    col = 0;
                    return;
                }
            }
        }