using System; using System.Globalization; using System.Windows.Data; namespace BBWY.Client.Converters { public class WaybillNoConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { if (value == null) return string.Empty; var waybillNo = value.ToString(); return waybillNo.Equals("-10000") ? "厂家自送" : waybillNo; } public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { throw new NotImplementedException(); } } }