| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- using Muchinfo.MTPClient.Data.Enums;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Windows;
- using System.Windows.Data;
- namespace Muchinfo.MTPClient.Infrastructure.Converters
- {
- public class RelationModeConverter : IValueConverter
- {
- public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
- {
- Visibility result = Visibility.Collapsed;
- if (value != null)
- {
- switch(value.ToString())
- {
- case "N":
- result = Visibility.Collapsed;
- break;
- default:
- result = Visibility.Visible;
- break;
- }
-
- }
- return result;
- }
- public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
- {
- throw new NotImplementedException();
- }
- }
- public class RelationPModeConverter : IValueConverter
- {
- public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
- {
- Visibility result = Visibility.Collapsed;
- if (value != null)
- {
- switch ((eDeliveryContractLink)value)
- {
- case eDeliveryContractLink.Normal:
- result = Visibility.Collapsed;
- break;
- default:
- result = Visibility.Visible;
- break;
- }
- }
- return result;
- }
- public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
- {
- throw new NotImplementedException();
- }
- }
- }
|