public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { // Check for design mode. if ((bool)(DesignerProperties.IsInDesignModeProperty.GetMetadata(typeof(DependencyObject)).DefaultValue)) { return(false); } if (value == null) { return(string.Empty); } try { CityRepresentation c = DataProxy.Instance.GetCityById((long)value); return(c.postalCode + " " + c.city); } catch (Exception) { return(string.Empty); } }
public static void Send(CityRepresentation selectedCustomer) { Messenger.Default.Send(selectedCustomer, MessageTypes.cityToSelect); }