using System; using System.CodeDom.Compiler; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.Windows; using System.Windows.Controls; using System.Windows.Markup; using CurrencyTextBoxControl; using Gestor.Application.Helpers; using Gestor.Application.ViewModels.Ferramentas; using Gestor.Application.Views.Generic; using Gestor.Model.Common; using Gestor.Model.Domain.Generic; using Gestor.Model.Domain.Seguros; namespace Gestor.Application.Views.Ferramentas; public class QualificacaoView : BaseUserControl, IComponentConnector { public QualificacaoViewModel ViewModel; internal MenuItem MaisOpcoesButton; private bool _contentLoaded; public QualificacaoView() { ((FrameworkElement)this).Tag = "CADASTRO DE QUALIFICAÇÃO"; ViewModel = new QualificacaoViewModel(); ((FrameworkElement)this).DataContext = ViewModel; InitializeComponent(); } private void Cancelar_OnClick(object sender, RoutedEventArgs e) { ViewModel.CancelarAlteracao(); } private async void Salvar_OnClick(object sender, RoutedEventArgs e) { ViewModel.Loading(isLoading: true); List> list = await ViewModel.Salvar(); ((DependencyObject)(object)this).ValidateFields(list); bool num = list == null || list.Count == 0; ViewModel.Loading(isLoading: false); if (!num) { await ViewModel.ShowMessage(list, ViewModel.ErroCamposInvalidos, "OK"); } } private void Alterar_OnClick(object sender, RoutedEventArgs e) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown ViewModel.CancelQualificacao = (Qualificacao)((DomainBase)ViewModel.SelectedQualificacao).Clone(); ViewModel.Alterar(alterar: true); ((DomainBase)ViewModel.SelectedQualificacao).Initialize(); } private void AbrirLog_OnClick(object sender, RoutedEventArgs e) { ViewModel.AbrirLog((TipoTela)48, ((DomainBase)ViewModel.SelectedQualificacao).Id); } private void CurrencyTextBox_OnLostFocus(object sender, RoutedEventArgs e) { if (ViewModel.SelectedQualificacao.Liquido2 <= ViewModel.SelectedQualificacao.Liquido1) { ViewModel.SelectedQualificacao.Liquido2 = ViewModel.SelectedQualificacao.Liquido1 + 0.01m; } if (ViewModel.SelectedQualificacao.Liquido3 <= ViewModel.SelectedQualificacao.Liquido2) { ViewModel.SelectedQualificacao.Liquido3 = ViewModel.SelectedQualificacao.Liquido2 + 0.01m; } if (ViewModel.SelectedQualificacao.Comissao2 <= ViewModel.SelectedQualificacao.Comissao1) { ViewModel.SelectedQualificacao.Comissao2 = ViewModel.SelectedQualificacao.Comissao1 + 0.01m; } if (ViewModel.SelectedQualificacao.Comissao3 <= ViewModel.SelectedQualificacao.Comissao2) { ViewModel.SelectedQualificacao.Comissao3 = ViewModel.SelectedQualificacao.Comissao2 + 0.01m; } if (ViewModel.SelectedQualificacao.Resultado2 <= ViewModel.SelectedQualificacao.Resultado1) { ViewModel.SelectedQualificacao.Resultado2 = ViewModel.SelectedQualificacao.Resultado1 + 0.01m; } if (ViewModel.SelectedQualificacao.Resultado3 <= ViewModel.SelectedQualificacao.Resultado2) { ViewModel.SelectedQualificacao.Resultado3 = ViewModel.SelectedQualificacao.Resultado2 + 0.01m; } ViewModel.SelectedQualificacao = ViewModel.SelectedQualificacao; } [DebuggerNonUserCode] [GeneratedCode("PresentationBuildTasks", "4.0.0.0")] public void InitializeComponent() { if (!_contentLoaded) { _contentLoaded = true; Uri uri = new Uri("/Gestor.Application;component/views/ferramentas/qualificacaoview.xaml", UriKind.Relative); Application.LoadComponent((object)this, uri); } } [DebuggerNonUserCode] [GeneratedCode("PresentationBuildTasks", "4.0.0.0")] internal Delegate _CreateDelegate(Type delegateType, string handler) { return Delegate.CreateDelegate(delegateType, this, handler); } [DebuggerNonUserCode] [GeneratedCode("PresentationBuildTasks", "4.0.0.0")] [EditorBrowsable(EditorBrowsableState.Never)] void IComponentConnector.Connect(int connectionId, object target) { //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Expected O, but got Unknown //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Expected O, but got Unknown //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Expected O, but got Unknown //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Expected O, but got Unknown //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Expected O, but got Unknown //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Expected O, but got Unknown //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Expected O, but got Unknown //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Expected O, but got Unknown //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Expected O, but got Unknown //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Expected O, but got Unknown //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Expected O, but got Unknown //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Expected O, but got Unknown //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Expected O, but got Unknown switch (connectionId) { case 1: ((MenuItem)target).Click += new RoutedEventHandler(Alterar_OnClick); break; case 2: ((MenuItem)target).Click += new RoutedEventHandler(Salvar_OnClick); break; case 3: ((MenuItem)target).Click += new RoutedEventHandler(Cancelar_OnClick); break; case 4: MaisOpcoesButton = (MenuItem)target; break; case 5: ((MenuItem)target).Click += new RoutedEventHandler(AbrirLog_OnClick); break; case 6: ((UIElement)(CurrencyTextBox)target).LostFocus += new RoutedEventHandler(CurrencyTextBox_OnLostFocus); break; case 7: ((UIElement)(CurrencyTextBox)target).LostFocus += new RoutedEventHandler(CurrencyTextBox_OnLostFocus); break; case 8: ((UIElement)(CurrencyTextBox)target).LostFocus += new RoutedEventHandler(CurrencyTextBox_OnLostFocus); break; case 9: ((UIElement)(CurrencyTextBox)target).LostFocus += new RoutedEventHandler(CurrencyTextBox_OnLostFocus); break; case 10: ((UIElement)(CurrencyTextBox)target).LostFocus += new RoutedEventHandler(CurrencyTextBox_OnLostFocus); break; case 11: ((UIElement)(CurrencyTextBox)target).LostFocus += new RoutedEventHandler(CurrencyTextBox_OnLostFocus); break; case 12: ((UIElement)(CurrencyTextBox)target).LostFocus += new RoutedEventHandler(CurrencyTextBox_OnLostFocus); break; case 13: ((UIElement)(CurrencyTextBox)target).LostFocus += new RoutedEventHandler(CurrencyTextBox_OnLostFocus); break; case 14: ((UIElement)(CurrencyTextBox)target).LostFocus += new RoutedEventHandler(CurrencyTextBox_OnLostFocus); break; default: _contentLoaded = true; break; } } }