예제 #1
0
 public override object Convert(object value, Type targetType, object parameter, CultureInfo culture)
 {
     if (value is IMan)
     {
         bool full = false;
         bool.TryParse(parameter as string, out full);
         if (full)
         {
             var name = NameFormatter.GetFullName(value as IMan);
             return(name ?? ((value is Patient) ? (value as Patient).FullNameOrCreatedAt : ""));
         }
         else
         {
             return(NameFormatter.GetShortName(value as IMan));
         }
     }
     return("");
 }