1. Culture Options
[DisplayName("Culture Options")] public IEnumerable<SelectListItem> CultureOptions { get { return CultureInfo.GetCultures(CultureTypes.AllCultures).OrderBy(info => info.DisplayName) .BuildSelectItemList(info => info.DisplayName, info => info.Name, info => string.IsNullOrWhiteSpace(UiCulture) ? Equals(info, CultureInfo.CurrentCulture) : info.Name == UiCulture, emptyItem: null); } }
2. TimeZone Options
public IEnumerable<SelectListItem> TimeZoneOptions { get { return TimeZoneInfo.GetSystemTimeZones() .BuildSelectItemList(info => info.DisplayName, info => info.Id, info => string.IsNullOrWhiteSpace(TimeZone) ? Equals(info, TimeZoneInfo.Local) : info.Id == TimeZone, emptyItem: null); } }