// ReSharper disable MemberCanBePrivate.Global // ReSharper disable MemberCanBeProtected.Global // ReSharper disable UnusedMember.Global public Control GenerateReport(PoliticiansAdminReportOptions options) { _AsMaster = options.AsMaster ?? SecurePage.IsMasterUser; _Options = options; _DataManager.GetData(options); var htmlTable = new HtmlTable(); htmlTable.AddCssClasses("tableAdmin"); CreateHeadingRow() .AddTo(htmlTable); ReportDataManager <PoliticiansAdminReportViewRow> .OrderBy sort; if (options.SortByOffice) { sort = new SortByOffice(); } else { sort = new SortByName(); } GenerateReport(htmlTable, _DataManager.GetDataSubset(null, sort)); return(htmlTable); }
public static Control GetReport(PoliticiansAdminReportOptions options) { var reportObject = new PoliticiansAdminReport(); return(reportObject.GenerateReport(options)); }