summaryrefslogtreecommitdiff
path: root/Gestor.Application/Converters/EmpresaNomeConverter.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Gestor.Application/Converters/EmpresaNomeConverter.cs')
-rw-r--r--Gestor.Application/Converters/EmpresaNomeConverter.cs38
1 files changed, 0 insertions, 38 deletions
diff --git a/Gestor.Application/Converters/EmpresaNomeConverter.cs b/Gestor.Application/Converters/EmpresaNomeConverter.cs
deleted file mode 100644
index 54ceb4c..0000000
--- a/Gestor.Application/Converters/EmpresaNomeConverter.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-using Gestor.Application.Helpers;
-using Gestor.Model.Domain.Common;
-using Gestor.Model.Domain.Generic;
-using System;
-using System.Globalization;
-using System.Linq;
-using System.Runtime.CompilerServices;
-using System.Windows.Data;
-using System.Windows.Markup;
-
-namespace Gestor.Application.Converters
-{
- public class EmpresaNomeConverter : MarkupExtension, IValueConverter
- {
- public EmpresaNomeConverter()
- {
- }
-
- public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
- {
- if (value != null && (long)value != 0)
- {
- return Recursos.Empresas.First<Empresa>((Empresa x) => x.get_Id() == (long)value).get_Nome();
- }
- return Recursos.Empresas.First<Empresa>((Empresa x) => x.get_Id() == (long)1).get_Nome();
- }
-
- 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