Exemplo n.º 1
0
        public static IEnumerable <SelectListItem> GetProjectBudgetSelectItemList(int selectedValue)
        {
            var budgets = new[] { "1,000", "2,000", "3,000", "5,000", "7,000", "10,000", "15,000", "25,000", "50,000", "75,000", "100,000", "150,000",
                                  "200,000", "300,000" };

            return(HtmlUtil.GetSelectItems(budgets, b => b.Replace(",", ""), b => b, s => s.Replace(",", "") == selectedValue.ToString()));
        }
Exemplo n.º 2
0
        public static IEnumerable <SelectListItem> GetTimeFramesSelectItemList(string selected)
        {
            var timeFrames = Enumerable.Range(2, 22).Select(x => x.ToString()).ToList();

            timeFrames.Add("More than 24");
            return(HtmlUtil.GetSelectItems(timeFrames, valueGetter, displayGetter, i => valueGetter(i) == (selected ?? "2")));
        }
Exemplo n.º 3
0
        public static IEnumerable <SelectListItem> GetBidQuoteSelectItemList()
        {
            var bids = new[] { "Not specified:", "less than 1,000:0-1000", "1,000 - 2,000:1000-2000", "2,000 - 5,000:2000-5000", "5,000 - 10,000:5000-10000",
                               "10,000 - 50,000:10000-50000", "50,000 - 100,000:50000-100000", "100,000 - 200,000:100000-200000" };

            return(HtmlUtil.GetSelectItems(bids, b => b.Split(':')[1], b => b.Split(':')[0]));
        }
Exemplo n.º 4
0
        public static IEnumerable <SelectListItem> GetCountryWithAllSelectItemList(string selected)
        {
            var allCountries = new List <string>(countries);

            allCountries.Add(ALL_COUNTRIES);
            return(HtmlUtil.GetSelectItems(allCountries.OrderBy(c => c), valueGetter, displayGetter, i => valueGetter(i) == (selected ?? ALL_COUNTRIES)));
        }
Exemplo n.º 5
0
        public static IEnumerable <SelectListItem> GetMinimumRatesSelectItemList(string selected)
        {
            var minimumRates = new[] { "35", "40", "45", "50", "55", "60", "70", "80", "100", "120", "150", "200", "250", "Unspecified" };

            return(HtmlUtil.GetSelectItems(minimumRates, valueGetter, displayGetter, i => valueGetter(i) == (selected ?? "35")));
        }
Exemplo n.º 6
0
        public static IEnumerable <SelectListItem> GetCurrencySelectItemList(string selected)
        {
            var currency = new string[] { "$" };

            return(HtmlUtil.GetSelectItems(currency, valueGetter, displayGetter, i => valueGetter(i) == (selected ?? "$")));
        }
Exemplo n.º 7
0
 public static IEnumerable <SelectListItem> GetCountrySelectItemList(string selected)
 {
     return(HtmlUtil.GetSelectItems(countries.OrderBy(c => c), valueGetter, displayGetter, i => valueGetter(i) == (selected ?? "United States")));
 }