public static List <object> GetDropdownShippings() { var shippings = new List <object>(); foreach (var shipping in GetShippings()) { ShippingType value; if (shipping.Attributes == null || !ShippingType.TryParse(shipping.Attributes["name"].Value, out value) || !SQLDataHelper.GetBoolean(shipping.Attributes["enabled"].Value)) { continue; } shippings.Add(new { value = ((int)value).ToString(), name = shipping.Attributes["localizename"].Value }); } return(shippings); }