| 1234567891011121314151617181920212223242526272829303132333435363738 |
- 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 eDoneDeliveryOrderAppealToEnable : IValueConverter
- {
- public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
- {
- //DeliveryStatus_ContractTime
- string[] resultValue = value.ToString().Split(',');
- var result = true;
- if (resultValue[0] != null)
- {
- switch ((eDeliveryStatus)int.Parse(resultValue[0].ToString()))
- {
- case eDeliveryStatus.DELIVERYSTATUS_PERFORMANCEFINISHED:
- if (resultValue[1] != null && DateTime.Parse(DateTime.Parse(resultValue[1].ToString()).ToShortDateString()) >= DateTime.Parse(ApplicationParameter.ServerTimeNow.ToShortDateString()))
- result = false;
- break;
- default:
- result = true;
- break;
- }
- }
- return result;
- }
- public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
- {
- throw new NotImplementedException();
- }
- }
- }
|