private void ReportReferendums(string electionKey) { var referendums = Referendums.GetElectionReportSummaryData(electionKey); if (referendums.Count == 0) { return; } // ReSharper disable once PossibleNullReferenceException (new HtmlDiv().AddTo(ReportContainer, "category-title referendum-header accordion-header") as HtmlGenericControl).InnerHtml = "Referendums and Ballot Measures"; var container = new HtmlDiv().AddTo(ReportContainer, "category-content referendums-content accordion-content"); foreach (var referendum in referendums) { ReportOneReferendum(container, referendum); } }