コード例 #1
0
        /// <summary>
        /// Sets the senior pricing.
        /// </summary>
        /// <param name="paxPrincing">The pax princing.</param>
        private void SetSeniorPricing(InterJetPassangerPreviousPricing paxPrincing)
        {
            SetPaxPricing(paxPrincing, "SRM");
            this.SetAdultPassangerIcon();
            Label passangerTypeLabel = this.GetLabelByName("passangerTypeLabel");

            passangerTypeLabel.Text = "Adulto(s) Mayor(es)";
        }
コード例 #2
0
        /// <summary>
        /// Sets the child princing.
        /// </summary>
        /// <param name="paxPrincing">The pax princing.</param>
        private void SetInfantPrincing(InterJetPassangerPreviousPricing paxPrincing)
        {
            SetInfantPassaangerIcon();
            SetPaxPricing(paxPrincing, "INF");

            Label passangerTypeLabel = this.GetLabelByName("passangerTypeLabel");

            passangerTypeLabel.Text = "Infante(s)";
        }
コード例 #3
0
        /// <summary>
        /// Sets the child princing.
        /// </summary>
        /// <param name="paxPrincing">The pax princing.</param>
        private void SetChildPrincing(InterJetPassangerPreviousPricing paxPrincing)
        {
            this.SetChildPassangerIcon();
            SetPaxPricing(paxPrincing, "CHD");

            Label passangerTypeLabel = this.GetLabelByName("passangerTypeLabel");

            passangerTypeLabel.Text = "Menor(es)";
        }
コード例 #4
0
        /// <summary>
        /// Sets the pax pricing.
        /// </summary>
        /// <param name="paxPrincing">The pax princing.</param>
        private void SetPaxPricing(InterJetPassangerPreviousPricing paxPrincing, string pax)
        {
            if (ListTaxesInterjet.roud && InterJetPreviousPrincingHandler.Conexion && pax != "INF")
            {
                try
                {
                    Label numberOfPax = this.GetLabelByName("numberOfPaxLabel");
                    numberOfPax.Text = paxPrincing.TotalPax.ToString(CultureInfo.InvariantCulture);
                    Label basePrice = this.GetLabelByName("basePriceTotal");
                    basePrice.Text = (ListTaxesInterjet.BasePriceList[ListTaxesInterjet.turning] * paxPrincing.TotalPax).ToString("c", new CultureInfo("es-MX"));
                    Label taxes = this.GetLabelByName("totalTaxesLabel");
                    taxes.Text = (ListTaxesInterjet.TaxesList[ListTaxesInterjet.turning] * paxPrincing.TotalPax).ToString("c", new CultureInfo("es-MX"));
                    Label totalPriceLabel = this.GetLabelByName("totalPriceLabel");
                    ListTaxesInterjet.TotalPrice.Add((ListTaxesInterjet.BasePriceList[ListTaxesInterjet.turning] + ListTaxesInterjet.TaxesList[ListTaxesInterjet.turning]) * paxPrincing.TotalPax);
                    totalPriceLabel.Text         = ((ListTaxesInterjet.BasePriceList[ListTaxesInterjet.turning] + ListTaxesInterjet.TaxesList[ListTaxesInterjet.turning]) * paxPrincing.TotalPax).ToString("c", new CultureInfo("es-MX"));
                    ListTaxesInterjet.TotalRound = ListTaxesInterjet.TotalRound + ((ListTaxesInterjet.BasePriceList[ListTaxesInterjet.turning] + ListTaxesInterjet.TaxesList[ListTaxesInterjet.turning]) * paxPrincing.TotalPax);

                    if (ListTaxesInterjet.turning < ListTaxesInterjet.BasePriceList.Count)
                    {
                        ListTaxesInterjet.turning = ListTaxesInterjet.turning + 2;
                    }
                    if (ListTaxesInterjet.turning >= ListTaxesInterjet.BasePriceList.Count && ListTaxesInterjet.Fligth == 1)
                    {
                        ListTaxesInterjet.turning = 0;
                    }
                    if (ListTaxesInterjet.turning >= ListTaxesInterjet.BasePriceList.Count && ListTaxesInterjet.Fligth == 2)
                    {
                        ListTaxesInterjet.turning = 1;
                    }
                }
                catch (Exception ex)
                {
                    throw ex;
                }
            }
            else
            {
                Label numberOfPax = this.GetLabelByName("numberOfPaxLabel");
                numberOfPax.Text = paxPrincing.TotalPax.ToString(CultureInfo.InvariantCulture);
                Label basePrice = this.GetLabelByName("basePriceTotal");
                basePrice.Text = (paxPrincing.BasePrice * paxPrincing.TotalPax).ToString("c", new CultureInfo("es-MX"));

                Label taxes = this.GetLabelByName("totalTaxesLabel");
                taxes.Text = (paxPrincing.Taxes * paxPrincing.TotalPax).ToString("c", new CultureInfo("es-MX"));

                Label totalPriceLabel = this.GetLabelByName("totalPriceLabel");
                totalPriceLabel.Text = paxPrincing.Total.ToString("c", new CultureInfo("es-MX"));
            }
        }
        /// <summary>
        /// Loads the controls.
        /// </summary>
        /// <param name="flight">The flight.</param>
        /// <param name="type">The type.</param>
        /// <param name="paxprevious">The paxprevious.</param>
        private void LoadControls(InterJetFlight flight, InterJetPassangerType type, InterJetPassangerPreviousPricing paxprevious)
        {
            var passangerControl = new ucInterJetPreviousPassangerPrincingControl();

            passangerControl.PassangerType            = type;
            passangerControl.PassangerPreviousPricing = paxprevious;
            passangerControl.BindPassangerPricing();
            if (!HasAddedControls)
            {
                passangerControl.Location = this.GetDefaultPoint();
            }
            else
            {
                passangerControl.Location = this.GetLastedPoint();
            }
            this.MainContainer.Controls.Add(passangerControl);
        }