protected void CommitFlight(object sender, int nextFlightToEdit) { Page.Validate(szValGroupEdit); int idResult = CommitChanges(); if (idResult >= 0) { FlightUpdated?.Invoke(sender, new LogbookEventArgs(idResult, nextFlightToEdit)); } }
protected void CommitFlight(object sender, int nextFlightToEdit) { // Save the state of the full-stop landings expansion Request.Cookies.Add(new HttpCookie(keyCookieExpandFSLandings, Convert.ToBoolean(cpeLandingDetails.ClientState, CultureInfo.InvariantCulture) ? string.Empty : "y")); Page.Validate(szValGroupEdit); int idResult = CommitChanges(); if (idResult >= 0) { FlightUpdated?.Invoke(sender, new LogbookEventArgs(idResult, nextFlightToEdit)); } }
protected void btnAddPending_Click(object sender, EventArgs e) { if (String.IsNullOrWhiteSpace(hdnPendingID.Value)) { hdnPendingID.Value = new PendingFlight().PendingID; } PendingFlight le = (PendingFlight)InitLogbookEntryFromForm(); le.FlightData = mfbFlightInfo1.Telemetry; // No need - by definition - to handle errors. le.Commit(); FlightUpdated?.Invoke(sender, new LogbookEventArgs(le)); }
protected void lnkAddPending_Click(object sender, EventArgs e) { if (String.IsNullOrWhiteSpace(hdnPendingID.Value)) { hdnPendingID.Value = new PendingFlight().PendingID; } PendingFlight le = (PendingFlight)InitLogbookEntryFromForm(); le.FlightData = mfbFlightInfo1.Telemetry; Aircraft ac = new Aircraft(le.AircraftID); le.TailNumDisplay = ac.DisplayTailnumber; le.ModelDisplay = ac.ModelDescription; // No need - by definition - to handle errors. le.Commit(); FlightUpdated?.Invoke(sender, new LogbookEventArgs(le)); }
private void HandleFlightDataUpdated() { updated = true; FlightUpdated?.Invoke(this, new FlightUpdatedEventArgs(FlightData)); }