From 0440c722a221b8068bbf388c1c0c51f0faff0451 Mon Sep 17 00:00:00 2001 From: Lucas Faria Mendes Date: Mon, 30 Mar 2026 14:17:46 -0300 Subject: some dlls --- .../ComissaoConverterMulti.cs | 62 ++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 Gestor.Common/Gestor.Common.Converters/ComissaoConverterMulti.cs (limited to 'Gestor.Common/Gestor.Common.Converters/ComissaoConverterMulti.cs') diff --git a/Gestor.Common/Gestor.Common.Converters/ComissaoConverterMulti.cs b/Gestor.Common/Gestor.Common.Converters/ComissaoConverterMulti.cs new file mode 100644 index 0000000..2812699 --- /dev/null +++ b/Gestor.Common/Gestor.Common.Converters/ComissaoConverterMulti.cs @@ -0,0 +1,62 @@ +using System; +using System.Globalization; +using System.Windows; +using System.Windows.Data; +using Gestor.Model.Common; + +namespace Gestor.Common.Converters; + +public class ComissaoConverterMulti : IMultiValueConverter +{ + public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) + { + //IL_002b: Unknown result type (might be due to invalid IL or missing references) + //IL_0030: Unknown result type (might be due to invalid IL or missing references) + //IL_00d5: Unknown result type (might be due to invalid IL or missing references) + //IL_00d7: Invalid comparison between Unknown and I4 + //IL_00e1: Unknown result type (might be due to invalid IL or missing references) + //IL_00e3: Invalid comparison between Unknown and I4 + //IL_0084: Unknown result type (might be due to invalid IL or missing references) + //IL_0086: Invalid comparison between Unknown and I4 + if (values[0] == DependencyProperty.UnsetValue && values[1] == DependencyProperty.UnsetValue) + { + return null; + } + if (values[1] == DependencyProperty.UnsetValue) + { + return values[0]; + } + object obj = values[0]; + TipoRepasse val = (TipoRepasse)values[1]; + switch (parameter.ToString().ToLower()) + { + default: + if ((int)val == 1) + { + return "--"; + } + return ((decimal?)obj / (decimal?)100).GetValueOrDefault(); + case "tipovendedorcolumn": + if ((int)val == 3) + { + return "CO-CORRETAGEM"; + } + return obj; + case "formapagamentocolumn": + case "incidenciacolumn": + if ((int)val == 3) + { + return "--"; + } + return obj; + case "pagamentosvalorrepassecolumn": + case "repassevendedor": + return obj; + } + } + + public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) + { + return null; + } +} -- cgit v1.2.3