/// <summary>
        /// Binds the page to data contained in a post election audit report.
        /// </summary>
        /// <param name="report">The report to bind to.</param>
        private void DataBindToReport(AuditReportBase report)
        {
            this.EnsureChildControls();

            // report dates
            _reportSummary.DataSource = report;
            if (report != null)
            {
                _reportSummary.MessagesDataSource = CmoAuditReview.GetAuditReportMessageIDs(CPProfile.Cid, CPProfile.ElectionCycle);

                // inadequate response dates
                report = report.InadequateNotice;
                if (_inadequateSummary.Visible = report != null)
                {
                    _reportSummary.CssClass               = "left column two-up";
                    _inadequateSummary.DataSource         = report;
                    _inadequateSummary.MessagesDataSource = _reportSummary.MessagesDataSource;
                    _inadequateSummary.DataBind();
                }
            }
            _reportSummary.DataBind();

            // force display of title when report is null
            if (report == null)
            {
                _reportSummary.Title = CPConvert.ToString(_postElectionAuditNavigation.SelectedReportType);
            }
        }
        public ActionResult StageSummary(AuditReportType id)
        {
            var stage = GetReport(id);
            var model = AuditViewModelFactory.PostElectionSummaryFrom(stage, CmoAuditReview.GetAuditReportMessageIDs(CPProfile.Cid, CPProfile.ElectionCycle));

            if (stage == null)
            {
                // check for no findings condition
                if (CPProfile.HasFinalAuditReport)
                {
                    model.ReportResponse = AuditViewModelFactory.NoFindingsResponse();
                }
                else
                {
                    return(HttpNotFound());
                }
            }
            return(PartialView(Mvc.Strings.Views.PostElectionSummary, model));
        }