/// <summary>
        /// Goes to next step.
        /// </summary>
        public void GoToNextStep()
        {
            VolarisSession.ItinerarioVolaris = new List <ItineraryFlowVolaris>();

            string companyName = Itinerary.Departure.OwnerCompany;



            if (Dispatcher.Contains(companyName))
            {
                string nextControlToLoad = Dispatcher[companyName].ToString();
                if (!IsInterJet)
                {
                    LogProductivity.LogTransaction(Login.Agent, "1-Seleccion vuelos de volaris para cotizar.--Volaris");
                    if (!NotExistSale)
                    {
                        Loader.AddToPanel(Loader.Zone.Middle, this, "ucQuoteVolaris");
                    }
                    else
                    {
                        MessageBox.Show("Elegir un vuelo con Tarifa Base mayor a 0", Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }
                }
                else
                {
                    VolarisSession.IsVolarisProcess = false;
                    LogProductivity.LogTransaction(Login.Agent, "Seleccion vuelos de InterJet para cotizar.--InterJet");
                    Loader.AddToPanelWithParameters(Loader.Zone.Middle, this, nextControlToLoad, ExtraData, null,
                                                    null);
                }
            }
        }
Пример #2
0
 public void ucVolarisCustomerDK_Load(object sender, EventArgs e)
 {
     ClearText();
     _presenter = new VolarisCustomerDKPresenter
     {
         View       = this,
         Repository = new VolarisCustomerDKRepository()
     };
     _presenter.OnSearchCustomerDkCompleted += OnSearchCustomerDkCompleted;
     LogProductivity.LogTransaction(Login.Agent, "4-Desplego captura de DK de volaris.--Volaris");
 }
Пример #3
0
 private void buyButton_Click(object sender, EventArgs e)
 {
     this.ValidateInput();
     if (IsValid)
     {
         this.waitingForControls1.Visible = false;
         this.loadingControl.Visible      = true;
         this.mainContainer.Visible       = false;
         _presenter.MakePayment(Reservation);
         LogProductivity.LogTransaction(Login.Agent, string.Format("4-Click en el boton comprar reservación con una cantidad de {0}.--Volaris", Reservation.Itinerary.TotalFinalPrice));
     }
 }
Пример #4
0
 /// <summary>
 /// Handles the Load event of the ucVolarisPreviousPricing control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="args">The <see cref="System.EventArgs"/> instance containing the event data.</param>
 private void ucVolarisPreviousPricing_Load(object sender, EventArgs args)
 {
     _presenter = new VolarisPreviousPrincingPresenter()
     {
         View       = this,
         Repository = new VolarisPreviousPrincingRespository(),
         Context    = new DynamicPreviousPrincingWinFormControlBuilder
         {
             OnWorkCompleted          = WorkCompleted,
             ReportOnCreatingControls = OnCreatingControls
         }
     };
     LogProductivity.LogTransaction(Login.Agent, "2-Desplego Cotización previa de volaris.--Volaris");
     _presenter.Initialize();
     _presenter.BuildDynamicControls();
 }
Пример #5
0
        /// <summary>
        /// Handles the Load event of the ucVolarisPaymentForm control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        private void ucVolarisPaymentForm_Load(object sender, EventArgs e)
        {
            _presenter = new VolarisPaymentFormPresenter()
            {
                Repository = new VolarisPaymentFormRepository(),
                View       = this,
                OnWebServiceCallStartDelegate     = OnWebServiceCallStartDelegate,
                OnWebServiceCallCompletedDelegate = OnWebServiceCallCompletedDelegate,
                OnReservationCompleted            = OnReservationCompleted,
                OnPaymentComplete = OnPaymentComplete
            };
            ucVolarisErrorRecovery1.Cancel += UcVolarisErrorRecovery1OnCancel;
            ucVolarisErrorRecovery1.Retry  += UcVolarisErrorRecovery1OnRetry;
            StartLoadingWorker();
            ucFirstValidations.NameProfile = Reservation.Profile.SecondLevelProfile;
            ucFirstValidations.DK          = Reservation.CustomerDk.Value;
            ucFirstValidations.GetCreditCards();

            LogProductivity.LogTransaction(Login.Agent, "4-Desplego la forma de pago.--Volaris");
        }
Пример #6
0
 /// <summary>
 /// Handles the Load event of the ucVolarisPassangerCapture control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="args">The <see cref="System.EventArgs"/> instance containing the event data.</param>
 public void ucVolarisPassangerCapture_Load(object sender, EventArgs args)
 {
     continueButton.Click += continueButton_Click;
     _presenter            = new VolarisPassangerCapturePresenter()
     {
         Context = new DynamicPassangerCaptureWinFormControlBuilder()
         {
             OnWorkCompleted = OnWorkCompleted
         },
         Repository                   = new VolarisPassangerCaptureRepository(),
         View                         = this,
         OnWebServiceCallStart        = OnWebServiceCallStart,
         OnWebServiceCallCompleted    = OnWebServiceCallCompleted,
         OnReservationCreatedComplete = OnReservationCreatedComplete
     };
     ucVolarisErrorRecovery1.Cancel += new EventHandler(ucVolarisErrorRecovery1_Cancel);
     ucVolarisErrorRecovery1.Retry  += new EventHandler(ucVolarisErrorRecovery1_Retry);
     _presenter.BuildDynamicControls();
     LogProductivity.LogTransaction(Login.Agent, "3-Desplego Captura de pasajeros de volaris.--Volaris");
 }
        //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 (string.IsNullOrEmpty(txtDK.Text))
            {
                MessageBox.Show(Resources.Reservations.REQUIERE_INGRESAR_DK, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                txtDK.Focus();
            }
            else if (txtDK.Text.Length != 6)
            {
                MessageBox.Show(Resources.Reservations.EL_DK_DEBE_SER_6_CARACTERES, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                txtDK.Focus();
            }
            else
            {
                CommandsAPI2.send_MessageToEmulator(string.Concat(Resources.Reservations.ESPERE_FAVOR_VALIDANDO_DK_INTEGRA));

                statusNoExistDK = false;
                statusInactive  = false;

                WsMyCTS wsServ = new WsMyCTS();
                MyCTS.Services.ValidateDKsAndCreditCards.GetAttribute1 integraAttribute  = null;
                MyCTS.Services.ValidateDKsAndCreditCards.GetAttribute1 integraAttribute1 = null;

                try
                {
                    try
                    {
                        integraAttribute = wsServ.GetAttribute(txtDK.Text, Login.OrgId);
                    }
                    catch (Exception ex)
                    {
                        integraAttribute = wsServ.GetAttribute(txtDK.Text, Login.OrgId);
                    }
                }
                catch (Exception ex)
                {
                    MyCTS.Services.ValidateDKsAndCreditCards.GetAttribute1 AttributeBackup = wsServ.GetAttribute(txtDK.Text, Login.OrgId);
                    if (AttributeBackup != null)
                    {
                        if (!string.IsNullOrEmpty(AttributeBackup.Attribute1.ToString()) &&
                            (AttributeBackup.Attribute1.Contains(Resources.Reservations.MESSAGE_NO)))
                        {
                            statusNoExistDK = true;
                        }
                        else if (!string.IsNullOrEmpty(AttributeBackup.Attribute1.ToString()) &&
                                 AttributeBackup.Attribute1.Contains(Resources.Reservations.MESSAGE_INACTIVO))
                        {
                            statusInactive = true;
                        }
                    }
                }
                if (integraAttribute != null)
                {
                    if (!string.IsNullOrEmpty(integraAttribute.Attribute1) && integraAttribute.Status.Contains("NO EXISTE LOCATION") || integraAttribute.Status_Site.Contains("NO EXISTE LOCATION"))
                    {
                        statusNoExistDK = true;
                    }
                    else if (!string.IsNullOrEmpty(integraAttribute.Attribute1) &&
                             integraAttribute.Status.Contains("INACTIVO") || integraAttribute.Status_Site.Contains("INACTIVO"))
                    {
                        statusInactive = true;
                    }
                    else
                    {
                        MyCTS.Services.ValidateDKsAndCreditCards.SetQCByAttribute1 tempAttribute = new MyCTS.Services.ValidateDKsAndCreditCards.SetQCByAttribute1();
                        tempAttribute = wsServ.SetQCGetAttribute(integraAttribute.Attribute1, integraAttribute.Status, integraAttribute.Status_Site);
                        Attribute1    = tempAttribute.Attribute1;
                    }
                }
                else if (integraAttribute1 != null)
                {
                    if (!string.IsNullOrEmpty(integraAttribute1.Attribute1) &&
                        (integraAttribute1.Status.Contains(Resources.Reservations.MESSAGE_NO)) || (integraAttribute1.Status_Site.Contains(Resources.Reservations.MESSAGE_NO)))
                    {
                        statusNoExistDK = true;
                    }
                    else if (!string.IsNullOrEmpty(integraAttribute1.Attribute1) &&
                             integraAttribute1.Status.Contains("INACTIVO") || integraAttribute1.Status_Site.Contains("INACTIVO"))
                    {
                        statusInactive = true;
                    }
                    else
                    {
                        MyCTS.Services.ValidateDKsAndCreditCards.SetQCByAttribute1 tempAttribute = new MyCTS.Services.ValidateDKsAndCreditCards.SetQCByAttribute1();
                        tempAttribute = wsServ.SetQCGetAttribute(integraAttribute1.Attribute1, integraAttribute1.Status, integraAttribute1.Status_Site);
                        Attribute1    = tempAttribute.Attribute1;
                    }
                }
                if (integraAttribute != null || integraAttribute1 != null)
                {
                    if (IsValidateBusinessRules)
                    {
                        if (ucAvailability.IsInterJetProcess || VolarisSession.IsVolarisProcess)
                        {
                            if (integraAttribute != null)
                            {
                                ucFirstValidations.Attribute1 = integraAttribute.Attribute1;
                            }
                            else
                            {
                            }

                            ChargesPerService.DKActualBajoCosto = txtDK.Text;
                            ucFirstValidations.DK = txtDK.Text;
                            activeStepsCorporativeQC.CorporativeQualityControls = null;
                            activeStepsCorporativeQC.loadQualityControlsList();
                            ucFirstValidations.CorporativeQualityControls =
                                activeStepsCorporativeQC.CorporativeQualityControls;

                            if (VolarisSession.IsVolarisProcess)
                            {
                                VolarisSession.DK = txtDK.Text;
                                if (!string.IsNullOrEmpty(Description1.Text))
                                {
                                    builtExtendedDescription();
                                }
                                Loader.AddToPanel(Loader.Zone.Middle, this, "ucVolarisPaymentFormFormulario");
                            }
                            else if (ucAvailability.IsInterJetProcess)
                            {
                                ucAllQualityControls.globalPaxNumber = this.TotalPassangerInterJet;
                                ucQualitiesByPax.Pax = this.TotalPassangerInterJet;
                                LogProductivity.LogTransaction(Login.Agent, "6-Desplego Captura de DK--InterJet");

                                this.SetPassangerNumberRecord();
                                builtExtendedDescription();//verificar si se manda

                                //Loader.AddToPanelWithParameters(Loader.Zone.Middle, this, "ucInterJetPaymentForm",
                                //                                this.Parameter, null);
                                Loader.AddToPanelWithParameters(Loader.Zone.Middle, this, "ucSeatAllocation",
                                                                this.Parameter, null);
                            }
                        }
                        else
                        {
                            CommandsSend();
                            if (this.Parameters == null && !ucBoletageReceived.errorER)
                            {
                                Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME);
                            }
                            else if (ucBoletageReceived.errorER)
                            {
                                DkClient = true;
                                Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCBOLETAGE_RECEIVED);
                            }
                            else
                            {
                                DkClient = true;
                                string[] sendInfo = new string[] { optionSelected };
                                Loader.AddToPanelWithParameters(Loader.Zone.Middle, this, Resources.Constants.UCENDRESERVATION, sendInfo);
                            }
                        }
                    }
                }
                else
                {
                    MessageBox.Show(Resources.Reservations.NO_EXISTE_LOCATIONDK_INTEGRA, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
            }
        }