summaryrefslogtreecommitdiff
path: root/Gestor.Common/Gestor.Common.Converters/ApolicePendenteConverter.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Gestor.Common/Gestor.Common.Converters/ApolicePendenteConverter.cs')
-rw-r--r--Gestor.Common/Gestor.Common.Converters/ApolicePendenteConverter.cs33
1 files changed, 33 insertions, 0 deletions
diff --git a/Gestor.Common/Gestor.Common.Converters/ApolicePendenteConverter.cs b/Gestor.Common/Gestor.Common.Converters/ApolicePendenteConverter.cs
new file mode 100644
index 0000000..ae3003e
--- /dev/null
+++ b/Gestor.Common/Gestor.Common.Converters/ApolicePendenteConverter.cs
@@ -0,0 +1,33 @@
+using System;
+using System.Globalization;
+using System.Windows.Data;
+using System.Windows.Markup;
+
+namespace Gestor.Common.Converters
+{
+ public class ApolicePendenteConverter : MarkupExtension, IValueConverter
+ {
+ public ApolicePendenteConverter()
+ {
+ }
+
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ if (value != null && !string.IsNullOrEmpty((string)value))
+ {
+ return value;
+ }
+ return "PENDENTE DE EMISSÃO";
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ return null;
+ }
+
+ public override object ProvideValue(IServiceProvider serviceProvider)
+ {
+ return this;
+ }
+ }
+} \ No newline at end of file