DeliveryOrderStatusToStringConverter.cs 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. using Muchinfo.MTPClient.Data.Enums;
  2. using Muchinfo.MTPClient.Resources;
  3. using System;
  4. using System.Windows.Data;
  5. namespace Muchinfo.MTPClient.Infrastructure.Converters
  6. {
  7. public class DeliveryOrderStatusToStringConverter : IValueConverter
  8. {
  9. public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
  10. {
  11. string result = string.Empty;
  12. if (value != null)
  13. {
  14. switch ((DeliveryOrderStatus)value)
  15. {
  16. case DeliveryOrderStatus.Ordered:
  17. result = Client_Resource.DeliveryEntructOrderView_CancelOrder;
  18. break;
  19. //case DeliveryOrderStatus.AuditRefuse:
  20. // result = Client_Resource.Infrastructure_WaitingForDelivery;
  21. // break;
  22. case DeliveryOrderStatus.Confirmed:
  23. result = Client_Resource.DeliveryEntructOrderView_Matched;
  24. break;
  25. //case DeliveryOrderStatus.Matched:
  26. // result = Client_Resource.Infrastructure_Settlement;
  27. // break;
  28. default:
  29. result = Client_Resource.DeliveryEntructOrderView_CancelOrder;
  30. break;
  31. }
  32. }
  33. return result;
  34. }
  35. public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
  36. {
  37. throw new NotImplementedException();
  38. }
  39. }
  40. }