protected void Preview() { if (StartingFlights == null) { return; } FlightQuery fq = new FlightQuery(User.Identity.Name); // Force a refresh on "before" mfbTotalsBefore.CustomRestriction = fq; // Commit the flights CommitFlights(); // force a refresh on "after" mfbTotalsAfter.CustomRestriction = fq; // now delete those starting flights. foreach (StartingFlight sf in StartingFlights) { if (!sf.IsNewFlight) { LogbookEntry.FDeleteEntry(sf.FlightID, User.Identity.Name); } sf.FlightID = LogbookEntry.idFlightNew; } }