Esempio n. 1
0
        public frmAssignSeats(List <MyCTS.Services.APIInterJet.GetSeatAvailabilityResponse> listResponse, Entities.InterJetTicket ticket)
        {
            InitializeComponent();

            booking = listResponse;
            tickets = ticket;
        }
 private void Plane()
 {
     errorPlane    = false;
     currentTicket = null;
     ticket        = null;
     current       = null;
     currentTicket = (MyCTS.Entities.InterJetTicket) this.Session["CurrentTicket"];
     //this.InterJetServiceManager.MakeReservation(currentTicket);
     ticket = (InterJetSelectedFlights)this.Session["SelectedFlights"];
     //current = this.InterJetServiceManager.GetBooking(currentTicket.RecordLocator);
     response = null;
     response = InterJetServiceManager.GetAvailabilitySeat(ticket.GetFlights());
     if (response != null)
     {
         CostumerAccountInterJet.notSeatAssing = false;
     }
     else
     {
         CostumerAccountInterJet.notSeatAssing = true;
     }
 }
        private void Commit()
        {
            currentTicket = null;
            currentTicket = (MyCTS.Entities.InterJetTicket) this.Session["CurrentTicket"];
            this.InterJetServiceManager.Commit(currentTicket);

            if (currentTicket.Passangers.HasInfants || currentTicket.Passangers.HasSeniorAdult)
            {
                if ((currentTicket.Passangers.HasInfants && currentTicket.Passangers.HasSeniorAdult) || currentTicket.Passangers.HasInfants)
                {
                    if ((PriceTotalResponseInterjet.getItinearyPrice > PriceTotalResponseInterjet.sellResponse ||
                         PriceTotalResponseInterjet.commitResponse > 0 && PriceTotalResponseInterjet.sellResponse != PriceTotalResponseInterjet.commitResponse))
                    {
                        MessageBox.Show("La clase solicitada ya no esta disponible", Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                        Loader.AddToPanel(Loader.Zone.Middle, this, "ucAvailability");
                    }
                    else
                    {
                        Loader.AddToPanelWithParameters(Loader.Zone.Middle, this, "ucInterJetPaymentForm", this.Parameter, null);
                    }
                }
                else if (currentTicket.Passangers.HasSeniorAdult)
                {
                    Loader.AddToPanelWithParameters(Loader.Zone.Middle, this, "ucInterJetPaymentForm", this.Parameter, null);
                }
            }
            else if (PriceTotalResponseInterjet.getItinearyPrice != PriceTotalResponseInterjet.sellResponse ||
                     (PriceTotalResponseInterjet.commitResponse > 0 && PriceTotalResponseInterjet.getItinearyPrice != PriceTotalResponseInterjet.commitResponse))
            {
                MessageBox.Show("La clase solicitada ya no esta disponible", Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                Loader.AddToPanel(Loader.Zone.Middle, this, "ucAvailability");
            }
            else
            {
                Loader.AddToPanelWithParameters(Loader.Zone.Middle, this, "ucInterJetPaymentForm", this.Parameter, null);
            }
        }
 private void Sell()
 {
     currentTicket = null;
     currentTicket = (MyCTS.Entities.InterJetTicket) this.Session["CurrentTicket"];
     this.InterJetServiceManager.MakeReservation(currentTicket);
 }