| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 |
- using Muchinfo.MTPClient.Data.Enums;
- using Muchinfo.MTPClient.Resources;
- using System;
- using System.Windows.Data;
- namespace Muchinfo.MTPClient.Infrastructure.Converters
- {
- public class DeliveryAuditStatusConverter : IValueConverter
- {
- public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
- {
- string result = string.Empty;
- if (value != null)
- {
- switch ((DeliveryStatus)value)
- {
- case DeliveryStatus.Noaudit:
- result = Client_Resource.Infrastructure_NoPending;
- break;
- case DeliveryStatus.Audit_ok:
- result = Client_Resource.Infrastructure_WaitingForDelivery;
- break;
- case DeliveryStatus.Audit_refuse:
- result = Client_Resource.Infrastructure_Refuse;
- break;
- case DeliveryStatus.Deliver:
- result = Client_Resource.Infrastructure_WaitingForReceive;
- break;
- case DeliveryStatus.Take:
- result = Client_Resource.Infrastructure_AlreadyReceive;
- break;
- case DeliveryStatus.Cancle:
- result = Client_Resource.Infrastructure_Cancel;
- break;
- case DeliveryStatus.Settle:
- result = Client_Resource.Infrastructure_Settlement;
- break;
- default:
- break;
- }
- }
- return result;
- }
- public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
- {
- throw new NotImplementedException();
- }
- }
- public class Qy_DeliveryAuditStatusConverter : IValueConverter
- {
- public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
- {
- string result = string.Empty;
- if (value != null)
- {
- switch ((QY_DeliveryStatus)value)
- {
- case QY_DeliveryStatus.DELIVERY_QY_AUDIT_OK:
- result = Client_Resource.Infrastructure_CompleteDelivery;
- break;
- case QY_DeliveryStatus.DELIVERY_QY_CANCLE:
- result = Client_Resource.Infrastructure_Cancel;
- break;
- case QY_DeliveryStatus.DELIVERY_QY_EXCEPTION:
- result = Client_Resource.Infrastructure_SettlementException;
- break;
- case QY_DeliveryStatus.DELIVERY_QY_NOAUDIT:
- result = Client_Resource.Infrastructure_NoPending;
- break;
- case QY_DeliveryStatus.DELIVERY_QY_TAKE:
- result = Client_Resource.Infrastructure_ConfirmReceive;
- break;
- default:
- break;
- }
- }
- return result;
- }
- public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
- {
- throw new NotImplementedException();
- }
- }
- public class Qy_DeliveryAuditStatusIsEnabledConverter : IValueConverter
- {
- public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
- {
- bool bo = false;
- if (value != null)
- {
- switch ((QY_DeliveryStatus)value)
- {
- case QY_DeliveryStatus.DELIVERY_QY_NOAUDIT:
- bo = true;
- break;
- default:
- bo = false;
- break;
- }
- }
- return bo;
- }
- public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
- {
- throw new NotImplementedException();
- }
- }
- }
|