Exemplo n.º 1
0
    protected void CommitFlight(object sender, int nextFlightToEdit)
    {
        Page.Validate(szValGroupEdit);
        int idResult = CommitChanges();

        if (idResult >= 0)
        {
            FlightUpdated?.Invoke(sender, new LogbookEventArgs(idResult, nextFlightToEdit));
        }
    }
Exemplo n.º 2
0
    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));
        }
    }
Exemplo n.º 3
0
    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));
    }
Exemplo n.º 4
0
    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));
    }
Exemplo n.º 5
0
 private void HandleFlightDataUpdated()
 {
     updated = true;
     FlightUpdated?.Invoke(this, new FlightUpdatedEventArgs(FlightData));
 }