/// <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); } }
protected override void OnLoad(EventArgs e) { base.OnLoad(e); var data = CPProfile.StatementReviews; _history.DataSource = data == null ? null : data.Reviews; _history.MessageIDDataSource = CmoAuditReview.GetStatementReviewMessageIDs(CPProfile.Cid, CPProfile.ElectionCycle); _history.DataBind(); }
/// <summary> /// Includes a collection of tolling events in the tolling events list's data source. /// </summary> /// <param name="far">true to include Final Audit Report events; otherwise, false to include Draft Audit Report events.</param> private void IncludeEvents(bool far) { if (_tollingEventsList != null) { var events = GetTollingEvents(far ? (AuditReportBase)_dar : _idr); if (events != null) { _tollingEventsList.DataSource = _tollingEventsList.DataSource.Union(events).ToList(); } var messages = CmoAuditReview.GetTollingMessageIDs(CPProfile.Cid, CPProfile.ElectionCycle, far); if (messages != null) { _tollingEventsList.MessagesDataSource = _tollingEventsList.MessagesDataSource.Union(messages).ToDictionary(k => k.Key, v => v.Value); } } }
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)); }
/// <summary> /// Handles the <see cref="TollingEventsList.UpdateDataSources"/> event. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">An <see cref="EventArgs"/> object that contains the event data.</param> protected void _tollingEventsList_UpdateDataSources(object sender, EventArgs e) { // tolling events list ScriptManager sm = ScriptManager.GetCurrent(this); if (!Page.IsPostBack || !this.IsDataBound || !_tollingEventsList.EnableViewState || (sm != null && sm.IsInAsyncPostBack)) { AuditReportType type = _postElectionAuditNavigation.SelectedReportType; _tollingEventsList.Title = string.Format("{0} Tolling Event Details", _tollingEventsList.DisplayAllEvents ? "All" : CPConvert.ToString(type)); switch (type) { case AuditReportType.FinalAuditReport: _tollingEventsList.DataSource = GetTollingEvents(_dar); _tollingEventsList.MessagesDataSource = CmoAuditReview.GetTollingMessageIDs(CPProfile.Cid, CPProfile.ElectionCycle, true); if (_tollingEventsList.DisplayAllEvents) { IncludeEvents(false); } break; case AuditReportType.DraftAuditReport: _tollingEventsList.DataSource = GetTollingEvents(_idr); _tollingEventsList.MessagesDataSource = CmoAuditReview.GetTollingMessageIDs(CPProfile.Cid, CPProfile.ElectionCycle, false); if (_tollingEventsList.DisplayAllEvents) { IncludeEvents(true); } break; default: _tollingEventsList.DataSource = GetTollingEvents(_idr); _tollingEventsList.MessagesDataSource = CmoAuditReview.GetTollingMessageIDs(CPProfile.Cid, CPProfile.ElectionCycle, false); if (_tollingEventsList.DisplayAllEvents) { IncludeEvents(true); } break; } } }
// GET: Audit/ComplianceVisits public ActionResult Index() { return(View(AuditViewModelFactory.ComplianceVisitsFrom(CPProfile.ComplianceVisits, CmoAuditReview.GetComplianceVisitMessageIDs(CPProfile.Cid, CPProfile.ElectionCycle)))); }
// GET: Audit/StatementReviews public ActionResult Index() { return(View(AuditViewModelFactory.StatementReviewsFrom(CPProfile.StatementReviews, CmoAuditReview.GetStatementReviewMessageIDs(CPProfile.Cid, CPProfile.ElectionCycle)))); }
// GET: Audit/DoingBusinessReviews public ActionResult Index() { return(View(AuditViewModelFactory.DoingBusinessReviewsFrom(CPProfile.DoingBusinessReviews, CmoAuditReview.GetDoingBusinessReviewMessageIDs(CPProfile.Cid, CPProfile.ElectionCycle)))); }
public ActionResult TollingEvents(AuditReportType id = AuditReportType.FinalAuditReport) { AuditReportBase source = null, secondSource = null; switch (id) { case AuditReportType.InitialDocumentationRequest: source = GetReport(AuditReportType.InitialDocumentationRequest); break; case AuditReportType.DraftAuditReport: source = GetReport(AuditReportType.DraftAuditReport); break; case AuditReportType.FinalAuditReport: source = GetReport(AuditReportType.InitialDocumentationRequest); secondSource = GetReport(AuditReportType.DraftAuditReport); break; } return(PartialView(Mvc.Strings.Views.TollingEvents, AuditViewModelFactory.TollingEventsListFrom(source, CmoAuditReview.GetTollingMessageIDs(CPProfile.Cid, CPProfile.ElectionCycle, false), secondSource))); }