public void OnSearchProfileButtonClick(object sender, SearchProfileEventArgument e) { var table = GetTable(); if (table != null) { var passangerControl = table.Controls.OfType <ucVolarisPassangerCaptureForm>().FirstOrDefault( c => c.Passanger.Number == e.Passanger.Number); if (passangerControl != null) { passangerControl.ShowLoadingProfile(); } } }
/// <summary> /// Handles the Click event of the searchProfileButton 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 searchProfileButton_Click(object sender, EventArgs e) { if (profileInputValidator.Validate()) { if (OnClickSearchProfile != null) { var eventArguments = new SearchProfileEventArgument { FristLevelProfile = this.firstLevelProfile.Text, SecondLevelProfile = this.secondLevelProfileTextBox.Text, Passanger = this.passangers.EditValue as VolarisAdultPassanger }; OnClickSearchProfile(sender, eventArguments); this.EnableControls(false); _presenter.SearchProfile(eventArguments); } } }
public void SearchProfile(SearchProfileEventArgument eventArgument) { Context.Resolve(eventArgument); }