예제 #1
0
            public static List <PoliticianImagesInfo> GetNextOutOfDateHeadshot(int officeLevel,
                                                                               DateTime profileOriginalDate, string politicianKey)
            {
                var table = PoliticiansImagesData.GetDataForOutOfDateHeadshots();
                var list  = ConvertTableToList(table);

                // Get OfficeKey and related data
                var tempCache = GetPageCache();

                foreach (var info in list)
                {
                    info.ApplyAdditionalCoding(tempCache);
                }

                // Eliminate any that are prior to the current processing point
                list = list
                       .Where(item => item.IsGreater(officeLevel, profileOriginalDate, politicianKey))
                       .OrderBy(item => item, new PoliticianImagesInfo()).ToList();

                return(list);
            }