Example #1
0
 /// <summary>
 /// Añade los valores de las cajas de texto y de los ComboBox a una lista
 /// dinamica
 /// </summary>
 private void AddTargets()
 {
     ListTargetsRules = new List <Targets>();
     foreach (Control txt in this.Controls)
     {
         if (txt is SmartTextBox && !string.IsNullOrEmpty(txt.Text) && txt.Name != "txtAgent")
         {
             Targets t = new Targets();
             t.IDTE   = txt.TabIndex;
             t.Value2 = txt.Text;
             ListTargetsRules.Add(t);
         }
         else if (txt is SmartTextBox && !string.IsNullOrEmpty(txt.Text) && txt.Name == "txtAgent")
         {
             Targets t = new Targets();
             t.IDTE   = 12;
             t.Value2 = txt.Text;
             ListTargetsRules.Add(t);
         }
         else if (txt is ComboBox && ((ComboBox)txt).SelectedIndex > 0 &&
                  txt.TabIndex != 5 && txt.TabIndex != 12)
         {
             Targets t = new Targets();
             t.IDTE   = txt.TabIndex;
             t.Value2 = Convert.ToString(((ComboBox)txt).SelectedItem);
             ListTargetsRules.Add(t);
         }
         else if (txt is ComboBox && ((ComboBox)txt).SelectedIndex > 0 && txt.TabIndex == 5 &&
                  Convert.ToString(((ComboBox)txt).SelectedItem).Substring(0, 3) != "---")
         {
             Targets t = new Targets();
             t.IDTE   = txt.TabIndex;
             t.Value2 = Convert.ToString(((ComboBox)txt).SelectedItem).Substring(0, 3);
             ListTargetsRules.Add(t);
             paxnum = ((ComboBox)txt).SelectedIndex;
         }
     }
     if (cmbLocationDKNoAllow.SelectedIndex > 0)
     {
         locationdknotaccepted = Convert.ToString(cmbLocationDKNoAllow.SelectedItem);
     }
     else
     {
         locationdknotaccepted = string.Empty;
     }
     Loader.AddToPanel(Loader.Zone.Middle, this, Resources.TicketEmission.Constants.UCDEFINITIONTARGETELEMENTS2);
 }
 /// <summary>
 /// Asignacion de acciones al presionar la tecla ENTER, ESC o DOWN
 /// cuando el txt origen, destino o conexiones tiene el foco
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void generalActions_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyData == Keys.Escape)
     {
         Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
     }
     if (e.KeyCode == Keys.Down)
     {
         if (lbPredictive.Items.Count > 0)
         {
             lbPredictive.SelectedIndex = 0;
             lbPredictive.Focus();
             lbPredictive.Visible = true;
             lbPredictive.Focus();
         }
     }
 }
Example #3
0
        /// <summary>
        /// Envio del comando a sabre
        /// </summary>
        private void BuildCommand()
        {
            string send = string.Concat("RD", txtLineRate.Text);

            using (CommandsAPI objCommand = new CommandsAPI())
            {
                objCommand.SendReceive(send);
            }
            if (this.Parameters[0] == "2")
            {
                Loader.AddToPanel(Loader.Zone.Middle, this, "ucDisplayRulesByCategories");
            }
            else
            {
                Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
            }
        }
        /// <summary>
        /// Inserta Imagen o archivo a BannerImage
        /// </summary>
        private void InsertBannerImage()
        {
            int rowsAfected = 0;

            rowsAfected = UpdateImagesBL.InsertBannerImage(content, path.Substring(path.LastIndexOf("\\") + 1, path.Length - path.LastIndexOf("\\") - 1),
                                                           path.Substring(path.LastIndexOf("."), path.Length - path.LastIndexOf(".")), txtURL.Text, txtAirline.Text);
            content = null;
            if (rowsAfected > 0)
            {
                MessageBox.Show("SE ACTUALIZARON " + rowsAfected + " REGISTROS", Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                MessageBox.Show("NO SE ACTUALIZO NINGÚN REGISTRO", Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
        }
Example #5
0
        //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 bntAccept_Click(object sender, EventArgs e)
        {
            if (btnYes.ForeColor == Color.OrangeRed)
            {
                if (IsValidateBusinessRules)
                {
                    CommandsSend();
                    addEmails();

                    Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCDEFINE_PASSENGER_TYPE);
                }
            }
            else if (btnNo.ForeColor == Color.OrangeRed)
            {
                Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCDEFINE_PASSENGER_TYPE);
            }
        }
Example #6
0
 private void btnAccept_Click(object sender, EventArgs e)
 {
     if (IsValidateBusinessRules)
     {
         CommandsSend();
         if (endReservation)
         {
             secureFlightPassenger = true;
             string[] sendInfo = new string[] { option };
             Loader.AddToPanelWithParameters(Loader.Zone.Middle, this, Resources.Constants.UCENDRESERVATION, sendInfo);
         }
         else
         {
             Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
         }
     }
 }
Example #7
0
 //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 (IsValidateBusinessRules)
     {
         CommandsSend();
     }
     if (this.Parameters != null && ucEndReservation.EndReservation)
     {
         boletageDate = true;
         string[] sendInfo = new string[] { optionSelected };
         Loader.AddToPanelWithParameters(Loader.Zone.Middle, this, Resources.Constants.UCENDRESERVATION, sendInfo);
     }
     else
     {
         Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
     }
 }
Example #8
0
        private void btnAccept_Click(object sender, EventArgs e)
        {
            string radioText = string.Empty;

            if (rdoPromoNot.Checked)
            {
                Loader.AddToPanel(Loader.Zone.Middle, this, Resources.TicketEmission.Constants.UCCALCULATESERVICECHARGE);
            }
            else
            {
                foreach (Control control in this.Controls)
                {
                    if (control is RadioButton)
                    {
                        RadioButton rdoButton = (RadioButton)control;
                        if (rdoButton.Checked)
                        {
                            checkedRdoPromo = true;
                            radioText       = rdoButton.Text.Substring(0, 2);
                            radioText       = radioText.Trim();
                            if (radioText.Length == 1)
                            {
                                radioText = string.Concat("0", radioText);
                            }
                        }
                    }
                }
            }

            if (checkedRdoPromo)
            {
                if (ValidateBussinesRules)
                {
                    if (!string.IsNullOrEmpty(radioText))
                    {
                        PromoCode = string.Concat("EP", radioText);
                        Loader.AddToPanel(Loader.Zone.Middle, this, Resources.TicketEmission.Constants.UCCALCULATESERVICECHARGE);
                    }
                    else
                    {
                        Loader.AddToPanel(Loader.Zone.Middle, this, Resources.TicketEmission.Constants.UCCALCULATESERVICECHARGE);
                    }
                }
            }
        }
 ///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();
             ShowButton(true);
             ChangeColor();
         }
     }
     else
     {
         if (btnYes.ForeColor == Color.OrangeRed)
         {
             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);
         }
         else if (btnNo.ForeColor == Color.OrangeRed)
         {
             ShowButton(false);
             txtRecordNumber.Text    = string.Empty;
             txtRecordNumber.Enabled = true;
             txtRecordNumber.Focus();
         }
     }
 }
        /// <summary>
        /// Verifica respuesta
        /// </summary>
        private void APIResponse()
        {
            int col = 0;
            int row = 0;

            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
                {
                    Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
                }
            }
        }
 /// <summary>
 /// Regreso a la mascarilla de "Linea de calculo" al presionar la tecla ESC
 /// o ejecutar las funciones al presionar la tecla ENTER
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void BackEnterUserControl_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyData.Equals(Keys.Escape))
     {
         if (ucMenuReservations.phaseIV)
         {
             Loader.AddToPanel(Loader.Zone.Middle, this, Resources.TicketEmission.Constants.UC_PHASEIV_CALCULATION_LINE);
         }
         else
         {
             Loader.AddToPanel(Loader.Zone.Middle, this, Resources.TicketEmission.Constants.UC_PHASEIV_CALCULATION_LINE_RWD);
         }
     }
     if (e.KeyData.Equals(Keys.Enter))
     {
         btnAccept_Click(sender, e);
     }
 }
 private void btnAccept_Click(object sender, EventArgs e)
 {
     if (isValidBussinesRules())
     {
         if (chkFileReport.Checked)
         {
             createDBQTxt();
         }
         else if (chkPrintReport.Checked)
         {
             llenaGrid();
         }
         else if (!chkFileReport.Checked && !chkPrintReport.Checked)
         {
             Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
         }
     }
 }
Example #13
0
 private void BackEnterUserControl_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyData.Equals(Keys.Escape))
     {
         if (ucNewFeeRule.LoadUserWelcome)
         {
             Loader.AddToPanelWithParameters(Loader.Zone.Middle, this, Resources.Constants.UCNEWFEERULE, new string[] { "1" });
         }
         else
         {
             Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCNEWFEERULE);
         }
     }
     if (e.KeyData.Equals(Keys.Enter))
     {
         btnAccept_Click(sender, e);
     }
 }
 /// <summary>
 /// Regresa al user cotrol welcome cuando se presiona ESC o ejecuta
 /// la acción del botón aceptar cuando se presiona Enter
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void BackEnterUserControl_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyData.Equals(Keys.Escape))
     {
         Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
     }
     if (e.KeyData.Equals(Keys.Enter))
     {
         if (btnAccept.Visible)
         {
             btnAccept_Click(sender, e);
         }
         else
         {
             btnActivation_Click(sender, e);
         }
     }
 }
 private void BackEnterUserControl_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyData.Equals(Keys.Escape))
     {
         btnClear_Click(sender, e);
         if (this.Parameters != null && this.Parameters[0] == "1")
         {
             Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
         }
         else
         {
             Loader.AddToPanel(Loader.Zone.Middle, this, Resources.TicketEmission.Constants.UCCALCULATESERVICECHARGE);
         }
     }
     if (e.KeyData.Equals(Keys.Enter))
     {
         btnAccept_Click(sender, e);
     }
 }
 //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 (btnNo.ForeColor == Color.OrangeRed)
     {
         if (IsValidateBusinessRules)
         {
             CommandsSend();
             Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
         }
     }
     else if (btnYes.ForeColor == Color.OrangeRed)
     {
         using (CommandsAPI objCommand = new CommandsAPI())
         {
             objCommand.SendReceive(Resources.Constants.COMMANDS_XI);
         }
         Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
     }
 }
        private void Pagar()
        {
            ucServicesFeePayApply pago = new ucServicesFeePayApply();

            pago.tarjeta                 = new CreditCardInfo();
            pago.tarjeta.TipoTarjeta     = ((ListItem)cmbTypeCard.SelectedItem).Text2;
            pago.tarjeta.NumeroTarjeta   = txtNumberCardCTS.Text;
            pago.tarjeta.CodigoSeguridad = txtDigitoSeguridad.Text;
            pago.tarjeta.MesVencimiento  = seleccionaMes().ToString("00");
            pago.tarjeta.AnioVencimiento = cmbAnioVencimiento.Text.Substring(2, 2);
            pago.tarjeta.NombreTitular   = txtNombreTarjetahabiente.Text;
            pago.tarjeta.MontoCargo      = Convert.ToDecimal(txtMontoCargo.Text);
            pago.tarjeta.OrigenVenta     = "D";
            pago.tarjeta.PNR             = string.Concat(recLoc, "|CAR");
            pago.recLoc = recLoc;
            pago.PayServiceFee();

            Loader.AddToPanel(Loader.Zone.Middle, this, Resources.TicketEmission.Constants.UCSERVICESFEEPAYAPPLY);
        }
Example #18
0
        private void QCRadius()
        {
            bool   status       = false;
            int    row          = 0;
            int    col          = 0;
            string QCAuthorized = CorporativeQualityControls[0].QCAuthorized;

            if (QCAuthorized.Equals(Resources.TicketEmission.Constants.ACTIVE))
            {
                string sLabelQC = 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
            {
                //UC = "ratingActualFAre";//
                Loader.AddToPanel(Loader.Zone.Middle, this, Resources.TicketEmission.Constants.UC_RATING_ACTUAL_FARE);
            }
        }
 /// <summary>
 /// Envia y verifica la respuesta de los comandos enviados a MySabre
 /// </summary>
 private void CommandSend()
 {
     BaseFareCommandSend();
     if (APIResponse())
     {
         firstOK = false;
         BreakDownCommandSend();
         if (APIResponse())
         {
             firstOK  = false;
             secondOK = false;
             CalculationLinesCommandsend();
             if (APIResponse())
             {
                 Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
             }
         }
     }
 }
Example #20
0
 /// <summary>
 /// Validaciones y envio de comando
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnAccept_Click(object sender, EventArgs e)
 {
     if (IsValidateBusinessRules)
     {
         CommandsSend();
         if (chkMoreNames.Checked)
         {
             ShowText();
         }
         else
         {
             using (CommandsAPI objCommands = new CommandsAPI())
             {
                 objCommands.SendReceive(Resources.Group.Constants.COMMANDS_AST_A);
             }
             Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Group.Constants.UC_MANUALRATEGROUP);
         }
     }
 }
Example #21
0
 //KeyDown
 /// <summary>
 /// Este se usa para todos los controles en general si se oprime
 /// Esc se manda a el User control de Welcome
 /// Enter se manda la accion de botón de Aceptar
 /// KeyDown se manda el foco al listBox
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void BackEnterUserControl_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyData == Keys.Escape)
     {
         Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
     }
     if (e.KeyData == Keys.Enter)
     {
         btnAccept_Click(sender, e);
     }
     if (e.KeyCode == Keys.Down)
     {
         if (lbPCC.Items.Count > 0)
         {
             lbPCC.SelectedIndex = 0;
             lbPCC.Focus();
         }
     }
 }
Example #22
0
        //Verifica el PCC y realiza las acciones de acuerdo a las peticiones
        private void btnAccept_Click(object sender, EventArgs e)
        {
            List <ListItem> CatPccsList = CatPccsBL.GetPccs(txtPCC.Text, Login.OrgId);

            if (CatPccsList.Count.Equals(0))
            {
                statusValidPCC = true;
            }
            else
            {
                statusValidPCC = false;
            }
            if (rdoSearch.Checked)
            {
                if (isValidateBussinessRules)
                {
                    List <UserSelectByPCC> list = UserSelectByPCCBL.GetUsersSelectByPCC(txtNumberFirm.Text, txtPCC.Text);
                    if (list.Count > 0)
                    {
                        txtUserId.Text    = list[0].UserId;
                        txtCodeAgent.Text = list[0].Agent;
                        txtEmail.Text     = list[0].UserMail;
                        txtQueue.Text     = list[0].Queue;
                        txtTA.Text        = list[0].TA;
                        txtName.Text      = list[0].FamilyName;
                        txtLastName.Text  = list[0].UserName;
                    }
                }
            }
            else
            {
                if (isValidateModify)
                {
                    UpdateUserBL.UpdateUser(txtNumberFirm.Text, txtPCC.Text,
                                            txtCodeAgent.Text, txtLastName.Text, txtLastName.Text.ToLower(), txtUserId.Text,
                                            txtEmail.Text.ToLower(), txtTA.Text, txtQueue.Text);
                    MessageBox.Show(Resources.Reservations.DATOS_FUERON_CAMBIADO_CORRECTAMENTE, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                    Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
                    //   MessageBox.Show("OCURRIO UN ERROR, VERIFIQUE LOS DATOS", Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
        }
        private void ucGetDIX_Load(object sender, EventArgs e)
        {
            ucAvailability.IsInterJetProcess = false;
            txtPNR.Focus();
            string send        = "*A";
            string sabreAnswer = string.Empty;
            string pnr         = string.Empty;

            using (CommandsAPI objCommand = new CommandsAPI())
            {
                sabreAnswer = objCommand.SendReceive(send);
            }
            string resultAux = sabreAnswer.Replace("‡", "\n");

            string[] sabreAnswerInfo = resultAux.Split(new char[] { '\n' });
            int      row             = 0;
            int      col             = 0;

            CommandsQik.searchResponse(sabreAnswer, "NO DATA", ref row, ref col);
            if (row != 0 && col >= 0)
            {
                MessageBox.Show("NO EXISTE RECORD PRESENTE", 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]))
            {
                CommandsAPI2.send_MessageToEmulator("CTP EDITS IN PROGRESS....PLEASE WAIT....\n" +
                                                    "OK " + sabreAnswerInfo[0] + "\nEXPORT I AND I IN PROGRESS");
                txtPNR.Text = sabreAnswerInfo[0];
                using (CommandsAPI objCommand = new CommandsAPI())
                {
                    objCommand.SendReceive("I", 0, 0);
                }
                GetInformationDIX();
            }
            else
            {
                MessageBox.Show("IGNORE Y RECUPERE EL RECORD", Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
            }
        }
Example #24
0
 //Load User Control
 /// <summary>
 /// Extraemos el Coorporativo de acuerdo a el se realizan ciertas
 /// instrucciones.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void ucCostCenter_Load(object sender, EventArgs e)
 {
     ucAvailability.IsInterJetProcess = false;
     Corporative = activeStepsCorporativeQC.CorporativeQualityControls[0].Attribute1;
     if (Corporative.Equals(Resources.TicketEmission.Constants.CORPORATIVEID_RADIUS))
     {
         costcenterprevious = string.Empty;
         costcenter         = string.Empty;
         Loader.AddToPanel(Loader.Zone.Middle, this, Resources.TicketEmission.Constants.UCBILLINGADRESS);
     }
     if (Corporative == Resources.TicketEmission.Constants.CORPORATIVE_CFE)
     {
         ShowLine();
         txtCostCenter.Focus();
     }
     else
     {
         txtCostCenter.Focus();
     }
 }
        /// <summary>
        /// Envio del comando DQB*ETU agregandole el codigo
        /// de la airolinea que ingresa el usuario
        /// </summary>
        ///
        private void DQBETUSendCommandAirline()
        {
            string send = string.Empty;

            sabreAnswer = string.Empty;
            airline     = txtReportbyAirline.Text;
            send        = string.Concat(Resources.TicketEmission.Constants.COMMANDS_DQB_AST_ETU, "/A", airline);
            using (CommandsAPI objCommand = new CommandsAPI())
            {
                sabreAnswer = objCommand.SendReceive(send);
            }
            if (chkGenerateExcel.Checked)
            {
                CreateExcel();
            }
            else
            {
                Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
            }
        }
 /// Boton aceptar, aplica los impuestos o montos seleccionados
 private void btnAccept_Click(object sender, EventArgs e)
 {
     //Paso 17. Taxes
     if (validBussinesRules())
     {
         Taxes_StepSeventeen();
         if (!ucTicketsEmissionInstructions.wayPayment.Equals(Resources.TicketEmission.Constants.PAYMENT_CASH))
         {
             Loader.AddToPanel(Loader.Zone.Middle, this, Resources.TicketEmission.Constants.UCFORMPAYMENT);
         }
         else if (!string.IsNullOrEmpty(ucAllQualityControls.tempChargeService) && ucAllQualityControls.counter < 10)
         {
             Loader.AddToPanel(Loader.Zone.Middle, this, "ucCalculateServiceCharge");
         }
         else
         {
             Loader.AddToPanel(Loader.Zone.Middle, this, Resources.TicketEmission.Constants.UC_TICKETEMISSION_CONFIRMATION);
         }
     }
 }
Example #27
0
        /// <summary>
        /// Valida el location si el procediemiento de validacion principal falla
        /// </summary>
        private bool LocationValidationBackup()
        {
            bool IsValid = true;
            GetAndSetAttributeBackup AttributeBackup = GetAndSetAttributeBackupBL.GetAttribute(dk, Login.OrgId);

            if (AttributeBackup.Attribute1 != null)
            {
                attribute1 = AttributeBackup.Attribute1.ToString(); //SOLO PRUEBAS
                //attribute1 = "dhl140";
                activeStepsCorporativeQC.CorporativeQualityControls = null;
                activeStepsCorporativeQC.loadQualityControlsList();
                CorporativeQualityControls = activeStepsCorporativeQC.CorporativeQualityControls;
                if (CorporativeQualityControls.Count.Equals(0))
                {
                    if (!string.IsNullOrEmpty(AttributeBackup.Attribute1.ToString()) &&
                        (AttributeBackup.Attribute1.Contains(Resources.TicketEmission.Constants.MESSAGE_NO_EXISTE_LOCATION)))
                    {
                        MessageBox.Show(Resources.TicketEmission.Tickets.NO_LOCATION_INTEGRA, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        //UC = "welcome";//
                        Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
                        IsValid = false;
                    }
                    else if (!string.IsNullOrEmpty(AttributeBackup.Attribute1.ToString()) &&
                             AttributeBackup.Attribute1.Contains(Resources.TicketEmission.Constants.MESSAGE_INACTIVE))
                    {
                        MessageBox.Show(Resources.TicketEmission.Tickets.NUM_CLIENTE_O_LOCATION_INACTIVO, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        //UC = "welcome";//
                        Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
                        IsValid = false;
                    }
                }
            }
            else
            {
                MessageBox.Show(Resources.TicketEmission.Tickets.ERROR_VALIDACION_LOCATION, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Warning);
                //UC = "welcome";//
                Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
                IsValid = false;
            }
            return(IsValid);
        }
Example #28
0
 /// <summary>
 /// Asignacion de acciones al presionar la tecla ENTER, ESC o DOWN
 /// cuando algún txt de aereolínea tiene el foco
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void AirlineActions_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyData == Keys.Escape)
     {
         Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
     }
     if (e.KeyData == Keys.Enter)
     {
         btnAccept_Click(sender, e);
     }
     if (e.KeyCode == Keys.Down)
     {
         if (lbAirline.Items.Count > 0)
         {
             lbAirline.SelectedIndex = 0;
             lbAirline.Focus();
             lbAirline.Visible = true;
             lbAirline.Focus();
         }
     }
 }
Example #29
0
        /// <summary>
        /// Busca errores en la clase de ERR_AddDataPassenger2 de acuerdo a las respuestas recibidas por el
        /// Emulador de Sabre y de acuerdo a ellas se realizan ciertas acciones ya sea
        /// mandar un mensaje de error al usuario notificando del mismo o mandando a otro
        /// User Control
        /// </summary>
        private void APIResponse()
        {
            if ((!string.IsNullOrEmpty(result)))
            {
                ERR_AddDataPassenger2.err_addatapassenger(result);

                if (!ERR_AddDataPassenger2.Status && !ERR_AddDataPassenger2.Othershowmask)
                {
                    Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCADD_MORE_PASSENGER);
                }
                else if (ERR_AddDataPassenger2.Othershowmask && !ERR_AddDataPassenger2.Status)
                {
                    MessageBox.Show(ERR_AddDataPassenger2.CustomUserMsg, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCADD_DATA_PASSENGER);
                }
                else
                {
                    MessageBox.Show(ERR_AddDataPassenger2.CustomUserMsg, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
            }
        }
        /// <summary>
        /// Busca errores en la clase de ERR_APISPassportMessage de acuerdo a las respuestas recibidas por el
        /// Emulador de Sabre y de acuerdo a ellas se realizan ciertas acciones ya sea
        /// mandar un mensaje de error al usuario notificando del mismo o mandando a otro
        /// User Control
        /// </summary>
        private void APIResponse()
        {
            if ((!string.IsNullOrEmpty(result)))
            {
                ERR_APISPassportMessage.err_apispassportmessage(result);

                if (ERR_APISPassportMessage.OtherMask)
                {
                    MessageBox.Show(ERR_APISPassportMessage.CustomUserMsg, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
                }
                else if (ERR_APISPassportMessage.Status)
                {
                    MessageBox.Show(ERR_APISPassportMessage.CustomUserMsg, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
                else
                {
                    Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
                }
            }
        }