DeliveryOrderStatusToBooleanConverter.cs 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. using Muchinfo.MTPClient.Data.Enums;
  2. using Muchinfo.MTPClient.Data.Model.Delivery;
  3. using Muchinfo.MTPClient.Resources;
  4. using System;
  5. using System.Windows;
  6. using System.Windows.Data;
  7. namespace Muchinfo.MTPClient.Infrastructure.Converters
  8. {
  9. /// <summary>
  10. /// 申报单查询-状态转换
  11. /// </summary>
  12. public class DeliveryOrderStatusToBooleanConverter : IValueConverter
  13. {
  14. public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
  15. {
  16. // var model = (DeliveryEntrustOrder)value;
  17. var result = Visibility.Collapsed;
  18. if (value != null)
  19. {
  20. switch ((DeliveryOrderStatus)value)
  21. {
  22. case DeliveryOrderStatus.Confirmed:
  23. case DeliveryOrderStatus.Ordered:
  24. result = Visibility.Visible;
  25. break;
  26. //case DeliveryOrderStatus.AuditRefuse:
  27. // result = Client_Resource.Infrastructure_WaitingForDelivery;
  28. // break;
  29. //case DeliveryOrderStatus.Confirmed:
  30. // result = tur;
  31. // break;
  32. //case DeliveryOrderStatus.Matched:
  33. // result = Client_Resource.Infrastructure_Settlement;
  34. // break;
  35. default:
  36. result = Visibility.Collapsed;
  37. break;
  38. }
  39. }
  40. return result;
  41. }
  42. public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
  43. {
  44. throw new NotImplementedException();
  45. }
  46. }
  47. }