eAuditStatusToVisibityConverter.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using Muchinfo.MTPClient.Data.Enums;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Windows;
  7. using System.Windows.Data;
  8. namespace Muchinfo.MTPClient.Infrastructure.Converters
  9. {
  10. /// <summary>
  11. /// 提货查询-
  12. /// </summary>
  13. public class eAuditStatusToVisibityConverter : IValueConverter
  14. {
  15. public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
  16. {
  17. var result = Visibility.Hidden;
  18. if (value != null)
  19. {
  20. switch ((eAuditStatus)value)
  21. {
  22. //可撤销的状态
  23. case eAuditStatus.AUDITSTATUS_CHECKING:
  24. result = Visibility.Visible;
  25. break;
  26. default:
  27. result = Visibility.Hidden;
  28. break;
  29. }
  30. }
  31. return result;
  32. }
  33. public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
  34. {
  35. throw new NotImplementedException();
  36. }
  37. }
  38. }