Rock.Apps.StatementGenerator.ProgressPage.bw_DoWork C# (CSharp) Méthode

bw_DoWork() protected méthode

Handles the DoWork event of the bw control.
protected bw_DoWork ( object sender, DoWorkEventArgs e ) : void
sender object The source of the event.
e System.ComponentModel.DoWorkEventArgs The instance containing the event data.
Résultat void
        protected void bw_DoWork( object sender, DoWorkEventArgs e )
        {
            ContributionReport contributionReport = new ContributionReport( ReportOptions.Current );
            contributionReport.OnProgress += contributionReport_OnProgress;

            var doc = contributionReport.RunReport();

            if ( doc != null )
            {
                ShowProgress( 0, 0, "Rendering PDF..." );
                byte[] pdfData = doc.Draw();
                e.Result = pdfData;
            }
            else
            {
                e.Result = null;
            }
        }