protected void RefreshLogbookData() { mvLayouts.ActiveViewIndex = (int)PrintOptions1.Options.Layout; pnlResults.Visible = true; lblCoverDate.Text = String.Format(CultureInfo.CurrentCulture, Resources.LocalizedText.PrintViewCoverSheetDateTemplate, DateTime.Now); PrintingOptions po = PrintOptions1.Options; // Set any global font appropriately. pnlResults.Style["font-size"] = po.Size == PrintingOptions.FontSize.Normal ? "9pt" : String.Format(CultureInfo.InvariantCulture, po.Size == PrintingOptions.FontSize.Small ? "7pt" : "11pt"); // Make sure that any PDF and section information is up-to-date, and that the PrintOptions property is set up correctly po.Sections = printingSections; po.PDFSettings = pdfOptions; PrintOptions = po; // Make sure copy link is up-to-date lnkPermalink.NavigateUrl = PermaLink(po, mfbSearchForm1.Restriction); mvLayouts.Visible = po.Sections.IncludeFlights; pnlEndorsements.Visible = po.Sections.Endorsements != PrintingSections.EndorsementsLevel.None; rptImages.Visible = po.Sections.Endorsements == PrintingSections.EndorsementsLevel.DigitalAndPhotos; pnlTotals.Visible = po.Sections.IncludeTotals; pnlCover.Visible = po.Sections.IncludeCoverPage; IList <LogbookEntryDisplay> lstFlights = LogbookEntryDisplay.GetFlightsForQuery(LogbookEntry.QueryCommand(mfbSearchForm1.Restriction, fAsc: true), CurrentUser.UserName, string.Empty, SortDirection.Ascending, CurrentUser.UsesHHMM, CurrentUser.UsesUTCDateOfFlight); PrintLayout pl = LogbookPrintedPage.LayoutLogbook(CurrentUser, lstFlights, ActiveTemplate, po, SuppressFooter); Master.PrintingCSS = pl.CSSPath.ToAbsoluteURL(Request).ToString(); }
protected void RefreshLogbookData() { mvLayouts.ActiveViewIndex = (int)PrintOptions1.Options.Layout; pnlResults.Visible = true; IList <LogbookEntryDisplay> lstFlights = LogbookEntryDisplay.GetFlightsForQuery(LogbookEntry.QueryCommand(mfbSearchForm1.Restriction, fAsc: true), CurrentUser.UserName, string.Empty, SortDirection.Ascending, CurrentUser.UsesHHMM, CurrentUser.UsesUTCDateOfFlight); PrintLayout pl = LogbookPrintedPage.LayoutLogbook(CurrentUser, lstFlights, ActiveTemplate, PrintOptions1.Options, SuppressFooter); Master.PrintingCSS = pl.CSSPath.ToAbsoluteURL(Request).ToString(); }