BankInOutConverter.cs 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. using Muchinfo.MTPClient.Resources;
  2. using System;
  3. using System.Windows.Data;
  4. namespace Muchinfo.MTPClient.Infrastructure.Converters
  5. {
  6. public class BankInOutConverter : IValueConverter
  7. {
  8. public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
  9. {
  10. string result = string.Empty;
  11. if (value != null)
  12. {
  13. int srt = (int)value;
  14. switch (srt)
  15. {
  16. case 1:
  17. result = Client_Resource.Infrastructure_Pass;
  18. break;
  19. case 2:
  20. result = Client_Resource.Infrastructure_Refuse;
  21. break;
  22. case 3:
  23. result = Client_Resource.Infrastructure_Pending;
  24. break;
  25. case 4:
  26. result = Client_Resource.Infrastructure_Success;
  27. break;
  28. case 5:
  29. result = Client_Resource.Infrastructure_Failure;
  30. break;
  31. case 6:
  32. result = Client_Resource.Infrastructure_Processing;
  33. break;
  34. }
  35. }
  36. return result;
  37. }
  38. public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
  39. {
  40. throw new NotImplementedException();
  41. }
  42. }
  43. }