Beispiel #1
0
        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);
            }
        }
Beispiel #2
0
 public static void Send(CityRepresentation selectedCustomer)
 {
     Messenger.Default.Send(selectedCustomer, MessageTypes.cityToSelect);
 }