Beispiel #1
0
            public void GenerateAll(ElectedReportResponsive electedReport, string stateCode,
                                    string countyCode, Control reportContainer = null)
            {
                var localGroups =
                    electedReport.DataManager.GetDataSubset(new LocalFilter(),
                                                            new OfficialsSort())
                    .GroupBy(row => row.LocalCode())
                    .ToList();

                if (localGroups.Count == 0)
                {
                    return;
                }

                var localNamesDictionary = LocalDistricts.GetNamesDictionary(stateCode,
                                                                             countyCode);

                localGroups = localGroups.OrderBy(g => localNamesDictionary[g.Key])
                              .ToList();
                foreach (var local in localGroups)
                {
                    LocalName    = localNamesDictionary[local.Key];
                    _CurrentData = local.GroupBy(row => row.OfficeKey())
                                   .ToList();
                    Generate(electedReport, false, stateCode, countyCode, string.Empty, reportContainer);
                }
            }
Beispiel #2
0
        // ReSharper disable MemberCanBePrivate.Global
        // ReSharper disable MemberCanBeProtected.Global
        // ReSharper disable UnusedMember.Global
        // ReSharper disable UnusedMethodReturnValue.Global
        // ReSharper disable UnusedAutoPropertyAccessor.Global
        // ReSharper disable UnassignedField.Global

        #endregion ReSharper disable

        public static Control GetReport(string stateCode, string countyCode,
                                        string congressionalDistrict, string stateSenateDistrict,
                                        string stateHouseDistrict, bool includeLocals, bool localsSeparated = false)
        {
            var reportObject = new ElectedReportResponsive();

            return(reportObject.GenerateReport(stateCode, countyCode, congressionalDistrict,
                                               stateSenateDistrict, stateHouseDistrict, includeLocals, localsSeparated));
        }
Beispiel #3
0
        // ReSharper disable MemberCanBePrivate.Global
        // ReSharper disable MemberCanBeProtected.Global
        // ReSharper disable UnusedMember.Global
        // ReSharper disable UnusedMethodReturnValue.Global
        // ReSharper disable UnusedAutoPropertyAccessor.Global
        // ReSharper disable UnassignedField.Global

        #endregion ReSharper disable

        public static Control GetReport(string stateCode, string countyCode, string congressionalDistrict,
                                        string stateSenateDistrict, string stateHouseDistrict, string district, string place,
                                        string elementary, string secondary, string unified, string cityCouncil,
                                        string countySupervisors, string schoolDistrictDistrict, bool includeLocals, bool localsSeparated = false)
        {
            var reportObject = new ElectedReportResponsive();

            return(reportObject.GenerateReport(stateCode, countyCode, congressionalDistrict,
                                               stateSenateDistrict, stateHouseDistrict, district, place, elementary, secondary, unified,
                                               cityCouncil, countySupervisors, schoolDistrictDistrict, includeLocals, localsSeparated));
        }