private static List<SelectListItem> GetAreaTypeItems(PleaseSelectOption pleaseSelectOption, int selectedAreaTypeId,
     IList<AreaType> areaTypes)
 {
     var items = new AreaTypeSelectListBuilder(areaTypes, selectedAreaTypeId).SelectListItems;
     if (pleaseSelectOption == PleaseSelectOption.Required)
     {
         AddPleaseSelectOption(items);
     }
     return items;
 }
 public static List<SelectListItem> GetListOfSupportedAreaTypes(PleaseSelectOption pleaseSelectOption,
     int selectedAreaTypeId = -1)
 {
     return GetAreaTypeItems(pleaseSelectOption, selectedAreaTypeId, Reader.GetSupportedAreaTypes());
 }
        public static IEnumerable<SelectListItem> GetListOfYearRanges(PleaseSelectOption selectionOption)
        {
            var listOfYearRanges = new List<SelectListItem>
                {
                    new SelectListItem { Text = "1 Year", Value = "1" },
                    new SelectListItem { Text = "2 Years", Value = "2" },
                    new SelectListItem { Text = "3 Years", Value = "3" },
                    new SelectListItem { Text = "4 Years", Value = "4" },
                    new SelectListItem { Text = "5 Years", Value = "5" },
                    new SelectListItem { Text = "6 Years", Value = "6" },
                    new SelectListItem { Text = "7 Years", Value = "7" },
                    new SelectListItem { Text = "8 Years", Value = "8" },
                    new SelectListItem { Text = "9 Years", Value = "9" },
                    new SelectListItem { Text = "10 Years", Value = "10" }
                };

            if (selectionOption == PleaseSelectOption.Required)
            {
                AddPleaseSelectOption(listOfYearRanges);
            }

            return listOfYearRanges;
        }
        public static IEnumerable<SelectListItem> GetListOfPolarityTypes(PleaseSelectOption selectOption)
        {
            var polarities = Reader.GetAllPolarities();

            var listOfPolarities = GetSelectListOfPolarities(polarities);

            if (selectOption == PleaseSelectOption.Required)
            {
                AddPleaseSelectOption(listOfPolarities);
            }

            return listOfPolarities;
        }
        public static IEnumerable<SelectListItem> GetListOfComparatorMethods(PleaseSelectOption selectOption)
        {
            var items = Reader.GetAllComparatorMethods()
                .Select(x => new SelectListItem
                {
                    Value = x.Id.ToString(),
                    Text = x.Name
                }).ToList();

            if (selectOption == PleaseSelectOption.Required)
            {
                AddPleaseSelectOption(items);
            }

            return items;
        }
        public static IEnumerable<SelectListItem> GetFrequencies(PleaseSelectOption selectionOption)
        {
            var listOfFrequencies = new List<SelectListItem>
                {
                    new SelectListItem { Text = "Annual", Value = Frequencies.Annual.ToString() },
                    new SelectListItem { Text = "Monthly", Value = Frequencies.Monthly.ToString()},
                    new SelectListItem { Text = "Quarterly", Value = Frequencies.Quarterly.ToString() }
                };

            if (selectionOption == PleaseSelectOption.Required)
            {
                AddPleaseSelectOption(listOfFrequencies);
            }

            return listOfFrequencies;

        }