| 12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- using Muchinfo.MTPClient.Data.Enums;
- using Muchinfo.MTPClient.Infrastructure.Utilities;
- using Muchinfo.MTPClient.Resources;
- using System;
- using System.Windows;
- using System.Windows.Data;
- namespace Muchinfo.MTPClient.Infrastructure.Converters
- {
- public class eDoneDeliveryOrderStatusToVisibility : IValueConverter
- {
- public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
- {
- //DeliveryStatus_ContractTime_IsSellAccountId
- string[] resultValue = value.ToString().Split(',');
- var result = Visibility.Hidden;
- if (resultValue[0] != null)
- {
- switch ((eDeliveryStatus)int.Parse(resultValue[0].ToString()))
- {
- case eDeliveryStatus.DELIVERYSTATUS_TRADED:
- case eDeliveryStatus.DELIVERYSTATUS_PERFORMANCEFINISHED:
- if (resultValue[2].ToUpper() != "TRUE")//只有买方才出现确认货票按钮
- {
- if (resultValue[1] != null && DateTime.Parse(DateTime.Parse(resultValue[1].ToString()).ToShortDateString()) >= DateTime.Parse(ApplicationParameter.ServerTimeNow.ToShortDateString()))
- result = Visibility.Visible;
- }
- break;
- default:
- result = Visibility.Hidden;
- break;
- }
- }
- return result;
- }
- public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
- {
- //bool tt = false;true
- throw new NotImplementedException();
- }
- }
- }
|