using Muchinfo.MTPClient.Data.Enums; using Muchinfo.MTPClient.Data.Model.Delivery; using Muchinfo.MTPClient.Resources; using System; using System.Windows; using System.Windows.Data; namespace Muchinfo.MTPClient.Infrastructure.Converters { /// /// 申报单查询-状态转换 /// public class DeliveryOrderStatusToBooleanConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { // var model = (DeliveryEntrustOrder)value; var result = Visibility.Collapsed; if (value != null) { switch ((DeliveryOrderStatus)value) { case DeliveryOrderStatus.Confirmed: case DeliveryOrderStatus.Ordered: result = Visibility.Visible; break; //case DeliveryOrderStatus.AuditRefuse: // result = Client_Resource.Infrastructure_WaitingForDelivery; // break; //case DeliveryOrderStatus.Confirmed: // result = tur; // break; //case DeliveryOrderStatus.Matched: // result = Client_Resource.Infrastructure_Settlement; // break; default: result = Visibility.Collapsed; break; } } return result; } public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { throw new NotImplementedException(); } } }