private void btnAcept_Click(object sender, EventArgs e)
        {
            if (IsValidBusinessRules)
            {
                //LoginEAreaValidation();

                if (!isMessageShown)
                {
                    PresentRecordValidation();
                    if (!isMessageShown)
                    {
                        if (rdoGenerate.Checked.Equals(true))
                        {
                            command = string.Concat("WFR", txtCommand.Text);
                            EvaluateCommand();
                            CommandQREX = command;
                            using (CommandsAPI objCommand = new CommandsAPI())
                            {
                                CommandsAPI2.send_MessageToEmulator(Resources.TicketEmission.Constants.PLEASE_WAIT);
                                objCommand.SendReceive(Resources.Constants.COMMANDS_PPO, 0, 0);
                                string res = objCommand.SendReceive("*S", 0, 0);
                                if (res.Substring(0, 4).Equals("3L64"))
                                {
                                    objCommand.SendReceive(Resources.Constants.COMMANDS_PPS5, 0, 0);
                                }
                                else
                                {
                                    objCommand.SendReceive(Resources.Constants.COMMANDS_PPS1, 0, 0);
                                }
                            }
                            ucMenuReservations.qualityControls = true;
                            Loader.AddToPanel(Loader.Zone.Middle, this, Resources.TicketEmission.Constants.UCFIRST_VALIDATIONS);
                        }
                        else
                        {
                            using (CommandsAPI objCommand = new CommandsAPI())
                            {
                                command = string.Concat("WFR", txtCommand.Text);
                                CommandsAPI2.send_MessageToEmulator(Resources.TicketEmission.Constants.PLEASE_WAIT);
                                objCommand.SendReceive(Resources.Constants.COMMANDS_PTR_SLASH_END, 0, 0);
                                objCommand.SendReceive(command);
                                Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
                            }
                        }
                    }
                }
            }
        }
        /// <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);
            }
        }
 //Button Accept
 /// <summary>
 /// Se realizan las validaciones despues de que el usuario ingresa datos,
 /// se mandan los comandos y termina el proceso llamando a otro User Control
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnAccept_Click(object sender, EventArgs e)
 {
     if (!firstentrance)
     {
         if (IsValidateBusinessRules)
         {
             CommandsSend();
             HideInformation();
         }
     }
     else
     {
         if (btnYes.ForeColor == Color.OrangeRed)
         {
             send = Resources.Constants.COMMANDS_AT_Q + txtAeroline.Text + Resources.Constants.COMMANDS_SLAHS_CLM;
             using (CommandsAPI objCommand = new CommandsAPI())
             {
                 objCommand.SendReceive(send, 0, 1);
             }
             Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
         }
         else if (btnNo.ForeColor == Color.OrangeRed)
         {
             Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
         }
     }
 }
Пример #4
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;
            }
        }
        /// <summary>
        /// Función que crea el reporte txt de los DQB
        /// para la fecha seleccionada
        /// </summary>
        private void DQBSendCommnand()
        {
            string send = string.Empty;

            sabreAnswer = string.Empty;
            if (!string.IsNullOrEmpty(txtDate.Text))
            {
                send = Resources.TicketEmission.Constants.COMMANDS_DQB_AST;
                if (chkmpd.Checked)
                {
                    send = string.Concat(send, "EMD/D");
                }
                send = string.Concat(send,
                                     txtDate.Text);
            }
            else
            {
                send = Resources.TicketEmission.Constants.COMMANDS_DQB_AST;
                if (chkmpd.Checked)
                {
                    send = string.Concat(send, "EMD");
                }
            }

            using (CommandsAPI objCommand = new CommandsAPI())
            {
                sabreAnswer = objCommand.SendReceive(send);
            }
        }
 private void CommandsSend()
 {
     command = Resources.Constants.COMMANDS_5U99_CC_SLASH +
               txtCostCenter.Text + Resources.Constants.COMMANDS_END_IT_5U99_ID_SLASH +
               txtEmployesNumber.Text;
     using (CommandsAPI objCommand = new CommandsAPI())
     {
         result = objCommand.SendReceive(Resources.Constants.COMMANDS_WPOC_BY);
     }
     APIResponse();
     if (!string.IsNullOrEmpty(standardrate))
     {
         commandstandardrate = Resources.Constants.COMMANDS_5U99_HF_SLASH + standardrate;
         using (CommandsAPI objCommands = new CommandsAPI())
         {
             result      = objCommands.SendReceive(Resources.Constants.COMMANDS_WPNCS_CROSSLORAINE_MMXN);
             economyrate = true;
         }
         if (economyrate)
         {
             commandeconomyrate = Resources.Constants.COMMANDS_5U99_LF_SLASH + standardrate;
             send = command + Resources.Constants.END_ITEM + commandstandardrate +
                    Resources.Constants.END_ITEM + commandeconomyrate +
                    Resources.Constants.END_ITEM;
             string[] sendInfo = new string[] { Resources.Reservations.MCAFEE, send, optionSelected };
             Loader.AddToPanelWithParameters(Loader.Zone.Middle, this, Resources.Constants.UCJUSTIFICATIONS, sendInfo);
         }
     }
 }
Пример #7
0
        /// <summary>
        /// Manda comando a MySabre para agregar un codigo de viajero frecuente
        /// </summary>
        private void DeleteFligherCommandsSend()
        {
            string send = string.Empty;

            send = Resources.Constants.COMMANDS_FF;

            if (string.IsNullOrEmpty(txtLineNumber.Text) &&
                string.IsNullOrEmpty(txtRange.Text))
            {
                send = string.Concat(send,
                                     Resources.Constants.COMMANDS_CHANGE_ALL);
            }
            else
            {
                send = string.Concat(send,
                                     txtLineNumber.Text);
                if (!string.IsNullOrEmpty(txtRange.Text))
                {
                    send = string.Concat(send,
                                         Resources.Constants.INDENT,
                                         txtRange.Text);
                }
                send = string.Concat(send,
                                     Resources.Constants.CHANGE);
            }

            using (CommandsAPI objCommand = new CommandsAPI())
            {
                objCommand.SendReceive(send);
            }
        }
Пример #8
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;
         }
     }
 }
Пример #9
0
        /// <summary>
        /// Se envia el comando de acuerdo a los campos ingresados
        /// </summary>
        private void CommandsSend()
        {
            string   agent = string.Empty;
            CatQueue item  = CatQueueBL.GetQueue(Login.Firm, Login.PCC);

            if (!string.IsNullOrEmpty(item.Agent))
            {
                agent = item.Agent;
            }
            if ((!string.IsNullOrEmpty(txtDateSelected.Text)) &&
                (!string.IsNullOrEmpty(txtSolicitorName.Text)) &&
                string.IsNullOrEmpty(txtComment.Text))
            {
                send = Resources.Constants.COMMANDS_7TAW +
                       txtDateSelected.Text + Resources.Constants.COMMANDS_SLASH_END_IT_6 +
                       txtSolicitorName.Text + Resources.Constants.SLASH + agent;
            }
            else if ((!string.IsNullOrEmpty(txtDateSelected.Text)) &&
                     (!string.IsNullOrEmpty(txtSolicitorName.Text)) &&
                     (!string.IsNullOrEmpty(txtComment.Text)))
            {
                send = Resources.Constants.COMMANDS_7TAW + txtDateSelected.Text +
                       Resources.Constants.SLASH + txtComment.Text +
                       Resources.Constants.COMMANDS_END_IT_6 +
                       txtSolicitorName.Text + Resources.Constants.SLASH + agent;
            }
            using (CommandsAPI objCommands = new CommandsAPI())
            {
                objCommands.SendReceive(send);
            }
            Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCSETS_MAP);
        }
Пример #10
0
        /// <summary>
        /// Armado del comando que se envia a Sabre
        /// </summary>
        private void BuildCommand()
        {
            string send = string.Empty;

            if (!string.IsNullOrEmpty(txtRange.Text))
            {
                send = string.Concat(txtLine1.Text, "-", txtRange.Text);
            }
            else
            {
                send = txtLine1.Text;
            }
            if (!string.IsNullOrEmpty(txtLine2.Text))
            {
                send = string.Concat(send, "/", txtLine2.Text);
            }
            if (!string.IsNullOrEmpty(txtLine3.Text))
            {
                send = string.Concat(send, "/", txtLine3.Text);
            }
            if (!string.IsNullOrEmpty(txtLine4.Text))
            {
                send = string.Concat(send, "/", txtLine4.Text);
            }
            using (CommandsAPI objCommand = new CommandsAPI())
            {
                objCommand.SendReceive(string.Concat("5", send, "¤"));
            }
            Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
        }
        /// <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;
            }
        }
        /// <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;
            }
        }
Пример #13
0
        //Assign justification code and load ucAccountingInformation
        /// <summary>
        /// Se selecciona la justificación y despues de eso de acuerdo al DK
        /// es la forma en que continua el flujo y manda comandos
        /// </summary>
        public void justificationCodeSelected()
        {
            int    index = dgvJustifications.CurrentCell.RowIndex;
            DKTemp obj   = dgvJustifications.Rows[index].DataBoundItem as DKTemp;
            string commandreasonjustify = obj.Code.ToString();

            ucEndReservation.interrupt = false;
            if (!string.IsNullOrEmpty(DKToSearch))
            {
                if (DKToSearch.Equals(Resources.Reservations.MCAFEE))
                {
                    send = command + Resources.Constants.COMMANDS_5U99_RC_SLASH + commandreasonjustify;
                    using (CommandsAPI objCommands = new CommandsAPI())
                    {
                        objCommands.SendReceive(send);
                    }
                    string[] sendInfo = new string[] { Resources.Reservations.CONTINUE_RADIUS, optionSelected };
                    Loader.AddToPanelWithParameters(Loader.Zone.Middle, this, Resources.Constants.UCENDRESERVATION, sendInfo);
                }
                else
                {
                    string[] sendInfo = new string[] { Resources.Reservations.CONTINUE_SANTANDER, commandreasonjustify, optionSelected };
                    Loader.AddToPanelWithParameters(Loader.Zone.Middle, this, Resources.Constants.UCENDRESERVATION, sendInfo);
                }
            }
        }
Пример #14
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);
            }
        }
Пример #15
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 { }
        }
Пример #16
0
        /// <summary>
        /// Envia el comando de eliminación de remarks
        /// </summary>
        private void SendDeleteRemarkCommand()
        {
            if (!remarkNumber.Count.Equals(0))
            {
                List <int> TempNumber = new List <int>();
                foreach (string number in remarkNumber)
                {
                    try
                    {
                        TempNumber.Add(Convert.ToInt32(number));
                    }
                    catch { }
                }
                TempNumber.Sort();
                TempNumber.Reverse();
                foreach (int number in TempNumber)
                {
                    Sabre = Sabre + "5" + number.ToString().Trim() + "@Σ";
                }
            }

            if (!string.IsNullOrEmpty(Sabre))
            {
                send  = string.Empty;
                Sabre = Sabre.TrimEnd(new char[] { 'Σ' });
                send  = Sabre;
                using (CommandsAPI objCommand = new CommandsAPI())
                {
                    sabreAnswer = objCommand.SendReceive(send);
                }
            }
        }
Пример #17
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;
                }
            }
        }
        //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);
                }
            }
        }
        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);
            //}
        }
Пример #20
0
        /// <summary>
        /// Armado y envio del comando respectivo de la mascarilla
        /// a MySabre
        /// </summary>
        private void CommandsSend()
        {
            string send;
            string saveManualRate;
            string manualRate;

            saveManualRate = Resources.Constants.COMMANDS_PQM;
            manualRate     = string.Concat(Resources.Constants.INDENT,
                                           txtManualRate.Text);
            if (this.Parameters != null)
            {
                string parameter = this.Parameters[0];
                if (!string.IsNullOrEmpty(parameter))
                {
                    money = String.Concat(Resources.Constants.INDENT,
                                          parameter);
                }
            }
            else
            {
                money = string.Empty;
            }
            send = string.Concat(saveManualRate,
                                 money,
                                 manualRate);
            using (CommandsAPI objCommand = new CommandsAPI())
            {
                sabreAnswer = objCommand.SendReceive(send);
            }
        }
Пример #21
0
 //Button Return Page
 /// <summary>
 /// Se manda un comando para regresar la pagina
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnReturnPag_Click(object sender, EventArgs e)
 {
     using (CommandsAPI objCommands = new CommandsAPI())
     {
         objCommands.SendReceive(Resources.Constants.COMMANDS_MU);
     }
 }
        //Button Accept
        /// <summary>
        /// Se hace la validación de checkbox si esta checado entonces
        /// se manda el comando y se va al siguient User Control
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnAccept_Click(object sender, EventArgs e)
        {
            if (!IsValidBusinessRules)
            {
                string send = string.Empty;
                if (chkDeleteAcountLine.Checked)
                {
                    send = Resources.TicketEmission.Constants.COMMANDS_AC_AT_ALL;
                    using (CommandsAPI objCommands = new CommandsAPI())
                    {
                        objCommands.SendReceive(send);
                    }
                }
                else if (!string.IsNullOrEmpty(txtLineNumber.Text))
                {
                    send = string.Concat(Resources.TicketEmission.Constants.COMMANDS_AC_CHANGE,
                                         txtLineNumber.Text);

                    if (!string.IsNullOrEmpty(txtRange.Text))
                    {
                        send = string.Concat(send,
                                             Resources.TicketEmission.Constants.INDENT,
                                             txtRange.Text);
                    }
                    using (CommandsAPI objCommands = new CommandsAPI())
                    {
                        objCommands.SendReceive(send);
                    }
                }
                Loader.AddToPanel(Loader.Zone.Middle, this, Resources.TicketEmission.Constants.UC_REMOVEREMARKS);
            }
        }
Пример #23
0
        /// <summary>
        /// Se envia el comando de acuerdo a los campos ingresados
        /// </summary>
        private void CommandsSend()
        {
            send = string.Empty;
            send = Resources.Constants.COMMANDS_NM;

            if (!string.IsNullOrEmpty(txtLine1.Text))
            {
                send = string.Concat(send, txtLine1.Text);
            }
            if (!string.IsNullOrEmpty(txtRange4.Text))
            {
                send = string.Concat(send, Resources.Constants.INDENT, txtRange4.Text);
            }
            if (!string.IsNullOrEmpty(txtLine2.Text))
            {
                send = string.Concat(send, Resources.Constants.END_ITEM + txtLine2.Text);
            }
            if (!string.IsNullOrEmpty(txtRange5.Text))
            {
                send = string.Concat(send, Resources.Constants.INDENT, txtRange5.Text);
            }
            if (!string.IsNullOrEmpty(txtLine3.Text))
            {
                send = string.Concat(send, Resources.Constants.END_ITEM + txtLine3.Text);
            }
            if (!string.IsNullOrEmpty(txtRange6.Text))
            {
                send = string.Concat(send, Resources.Constants.INDENT, txtRange6.Text);
            }

            using (CommandsAPI objCommnads = new CommandsAPI())
            {
                result = objCommnads.SendReceive(send);
            }
        }
        /// <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();
            }
        }
        /// <summary>
        /// Se envia el comando de acuerdo a los campos ingresados
        /// </summary>
        private void CommandsSend()
        {
            string send = string.Empty;

            send = "3DOCA";
            if (!string.IsNullOrEmpty(txtSegment1.Text))
            {
                send = string.Concat(send, txtSegment1.Text);
            }
            if (!string.IsNullOrEmpty(domicile))
            {
                send = string.Concat(send, "/", domicile, "/", txtCountry.Text,
                                     "/", txtStreet.Text, "/", txtCity.Text);
            }
            if (!string.IsNullOrEmpty(txtState.Text))
            {
                send = string.Concat(send, "/", txtState.Text);
            }
            if (!string.IsNullOrEmpty(txtZIP.Text))
            {
                send = string.Concat(send, "/", txtZIP.Text, "-", txtNumberPax.Text);
            }

            using (CommandsAPI objCommand = new CommandsAPI())
            {
                result = objCommand.SendReceive(send);
            }
        }
Пример #26
0
 /// <summary>
 /// Validación de las probables respuesta erroneas de MySabre
 /// </summary>
 private void APIResponse()
 {
     ERR_DWLIST.err_DWLIST(sabreAnswer);
     if ((ERR_DWLIST.Status == false) && (firstCommandSend))
     {
         return;
     }
     if (ERR_DWLIST.Status == false)
     {
         Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
     }
     else if ((ERR_DWLIST.Status == true) && (ERR_DWLIST.StatusPrinter == true))
     {
         Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
         MessageBox.Show(ERR_DWLIST.CustomUserMsg, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Warning);
         send = Resources.Constants.IGNORE;
         using (CommandsAPI objCommand = new CommandsAPI())
         {
             objCommand.SendReceive(send, 0, 0);
         }
     }
     else
     {
         MessageBox.Show(ERR_DWLIST.CustomUserMsg, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Warning);
         Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
     }
 }
Пример #27
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);
            }
        }
Пример #28
0
        /// <summary>
        /// Armado y envio del comando respectivo de la mascarilla
        /// a MySabre
        /// </summary>
        private void CommandsSend()
        {
            string SellOptionDisplayed = string.Empty;
            string OptionToSell        = string.Empty;
            string CancelItinerary     = string.Empty;
            string send = string.Empty;
            bool   StatusCancelItinerary;

            SellOptionDisplayed   = Resources.Constants.COMMANDS_WC_CROSSLORAINE;
            OptionToSell          = txtOptionToSell.Text;
            CancelItinerary       = Resources.Constants.COMMANDS_X;
            StatusSellOption      = chkSellOption.Checked;
            StatusCancelItinerary = chkCancelItinerary.Checked;
            int  i   = 0;
            bool num = int.TryParse(txtOptionToSell.Text, out i);

            if (StatusSellOption)
            {
                if (!StatusCancelItinerary)
                {
                    CancelItinerary = string.Empty;
                }
                send = string.Concat(SellOptionDisplayed,
                                     OptionToSell,
                                     CancelItinerary);
                using (CommandsAPI objCommand = new CommandsAPI())
                {
                    sabreAnswer = objCommand.SendReceive(send);
                }
            }
        }
Пример #29
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>
        /// Envia un comando que muestra la lista de los empleados
        /// </summary>
        private void ListEmployes()
        {
            String listemployes;

            if (string.IsNullOrEmpty(txtProfileCompany.Text))
            {
                MessageBox.Show(Resources.Reservations.REQUIERE_INGRESE_PERFIL_COMPAÑÍA, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                txtProfileCompany.Focus();
            }

            else if (string.IsNullOrEmpty(txtProfileEmployee.Text) &&
                     (!string.IsNullOrEmpty(txtProfileCompany.Text)))
            {
                listemployes = Resources.Constants.COMMANDS_NU + txtProfileCompany.Text;
                using (CommandsAPI objCommand = new CommandsAPI())
                {
                    objCommand.SendReceive(listemployes);
                }
            }
            else
            {
                listemployes = Resources.Constants.COMMANDS_NU + txtProfileCompany.Text + "-" + txtProfileEmployee.Text;
                using (CommandsAPI objCommand = new CommandsAPI())
                {
                    objCommand.SendReceive(listemployes);
                }
            }
        }