//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) { if (ucAvailability.IsInterJetProcess) { Loader.AddToPanelWithParameters(Loader.Zone.Middle, this, "ucInterJetFlightsPricesDetailsForm", this.Parameter, null); } else { this.Parameters = null; VolarisSession.Clean(); Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME); } } if (e.KeyData == Keys.Enter) { btnAccept_Click(sender, e); } if (e.KeyCode == Keys.Down) { if (lbDK.Items.Count > 0) { lbDK.SelectedIndex = 0; lbDK.Focus(); } } }
/// <summary> /// Regresa al ucWelcome cuando se presion la tecla Esc y ejecuta las acciones del /// boton 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 == Keys.Escape) { VolarisSession.Clean(); Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME); } if (e.KeyData == Keys.Enter) { btnAccept_Click(sender, e); } }
/// <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 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void BackEnterUserControl_KeyDown(object sender, KeyEventArgs e) { if (e.KeyData == Keys.Escape) { VolarisSession.Clean(); 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(); } } }
/// <summary> /// Sets the passangers. /// </summary> public void SetPassangers() { var passangers = VolarisSession.AddPassengerComplete; var panelsWithGroupBoxes = this.PassangerGroupBox.Controls.OfType <Panel>(); var userControls = new List <ucVolarisPassengerOnly>(); userControls = panelsWithGroupBoxes.Where(panel => panel.Controls.OfType <ucVolarisPassengerOnly>().FirstOrDefault() != null). Select(panel => panel.Controls.OfType <ucVolarisPassengerOnly>().FirstOrDefault()).ToList(); int i = passangers.Count() - 1; if (userControls.Count > 0) { foreach (ucVolarisPassengerOnly userControl in userControls.Reverse <ucVolarisPassengerOnly>()) { userControl.Passanger = VolarisSession.GetAndRemove(i); i--; } } }
private void suggestButton_Click(object sender, EventArgs e) { VolarisSession.Clean(); Loader.AddToPanelWithParameters(Loader.Zone.Middle, this, "ucWelcome", null); }
private void finalizeButton_Click(object sender, EventArgs e) { ucServicesFeePayApply.OrigenTipo = ChargesPerService.OrigenTipoCargo.BajoCosto; VolarisSession.Clean(); Loader.AddToPanel(Loader.Zone.Middle, this, Resources.TicketEmission.Constants.UCSERVICESFEEPAYAPPLY); }
private void ucQualitiesByPax_Load(object sender, EventArgs e) { VolarisSession.Clean(); ucAvailability.IsInterJetProcess = false; string attribute = string.Empty; bool cfeRemark = Convert.ToBoolean(ParameterBL.GetParameterValue("ActivateRemarkToCFE").Values); if (!ucEndReservation.isFlowHotel) { attribute = ucFirstValidations.Attribute1.Substring(3, 3); } else { attribute = ucQCHotels.Attribute1.Substring(3, 3); } if (attribute.Equals("990")) { showDescription(false); } else { showDescription(true); } if (ucEndReservation.isFlowHotel) { if (ucQCHotels.Attribute1.Equals("CFE100") && cfeRemark && !ucRemarkToCFE.Status) { Loader.AddToPanel(Loader.Zone.Middle, this, Resources.TicketEmission.Constants.UCREMARKTOCFE); return; } else { ucRemarkToCFE.Status = false; } } else { if (ucFirstValidations.Attribute1.Equals("CFE100") && cfeRemark && !ucRemarkToCFE.Status) { Loader.AddToPanel(Loader.Zone.Middle, this, Resources.TicketEmission.Constants.UCREMARKTOCFE); return; } else { ucRemarkToCFE.Status = false; } } dayTime = DateTime.Now; ucFormPayment.C28 = string.Empty; LoadCreditCardTypeOption(); rdoYes.Checked = true; rdoYes.Focus(); ucAllQualityControls.originOfSale.Clear(); ucAllQualityControls.ListBussinesUnit.Clear(); numberone = string.Empty; numbertwo = string.Empty; numberthree = string.Empty; numberfour = string.Empty; passengers = string.Empty; pax = 0; sabreAnswer = string.Empty; if (string.IsNullOrEmpty(sabreconcat)) { commandSend(); bucleFindEndScroll(); } }