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; } }