summaryrefslogtreecommitdiff
path: root/Decompiler/Gestor.Application.Views.Seguros/CriticaApoliceView.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Decompiler/Gestor.Application.Views.Seguros/CriticaApoliceView.cs')
-rw-r--r--Decompiler/Gestor.Application.Views.Seguros/CriticaApoliceView.cs1658
1 files changed, 1658 insertions, 0 deletions
diff --git a/Decompiler/Gestor.Application.Views.Seguros/CriticaApoliceView.cs b/Decompiler/Gestor.Application.Views.Seguros/CriticaApoliceView.cs
new file mode 100644
index 0000000..296bea8
--- /dev/null
+++ b/Decompiler/Gestor.Application.Views.Seguros/CriticaApoliceView.cs
@@ -0,0 +1,1658 @@
+using System;
+using System.CodeDom.Compiler;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel;
+using System.Diagnostics;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Data;
+using System.Windows.Input;
+using System.Windows.Markup;
+using System.Windows.Threading;
+using CsQuery.ExtensionMethods;
+using CurrencyTextBoxControl;
+using Gestor.Application.Componentes;
+using Gestor.Application.Drawers;
+using Gestor.Application.Helpers;
+using Gestor.Application.Servicos;
+using Gestor.Application.ViewModels.Seguros;
+using Gestor.Application.Views.Generic;
+using Gestor.Application.Views.Seguros.Itens;
+using Gestor.Common.Helpers;
+using Gestor.Common.Validation;
+using Gestor.Model.Common;
+using Gestor.Model.Domain.Configuracoes;
+using Gestor.Model.Domain.Ferramentas;
+using Gestor.Model.Domain.Generic;
+using Gestor.Model.Domain.Seguros;
+using MaterialDesignThemes.Wpf;
+using Xceed.Wpf.AvalonDock.Controls;
+
+namespace Gestor.Application.Views.Seguros;
+
+public class CriticaApoliceView : BaseUserControl, IComponentConnector, IStyleConnector
+{
+ internal ComboBox UsuarioBox;
+
+ internal ComboBox SeguradoraBox;
+
+ internal DatePicker InicioBox;
+
+ internal DatePicker FimBox;
+
+ internal ToggleButton CriticadoBox;
+
+ internal DataGrid CriticaGrid;
+
+ internal MenuItem ConcluirCriticaButton;
+
+ internal MenuItem CancelarDocumento;
+
+ internal ComboBox ProdutoBox;
+
+ internal ComboBox NegocioCorretoraBox;
+
+ internal ComboBox SituacaoBox;
+
+ internal DatePicker TransmissaoBox;
+
+ internal TextBox ApoliceBox;
+
+ internal TextBox EndossoBox;
+
+ internal DatePicker EmissaoBox;
+
+ internal DatePicker Vigencia1Box;
+
+ internal DatePicker Vigencia2Box;
+
+ internal ToggleButton AdicionalBox;
+
+ internal CustomIsReadOnlyControl Comissao;
+
+ internal CurrencyTextBox ComissaoBox;
+
+ internal CurrencyTextBox PremioLiquidoBox;
+
+ internal CurrencyTextBox PremioAdicionalBox;
+
+ internal CurrencyTextBox IofBox;
+
+ internal CurrencyTextBox DiferencaBox;
+
+ internal CurrencyTextBox PremioTotalBox;
+
+ internal CurrencyTextBox ParcelasBox;
+
+ internal ToggleButton SeguroCombinadoBox;
+
+ internal MenuItem EditarVendedorButton;
+
+ internal MenuItem SalvarVendedorButton;
+
+ internal MenuItem CancelarVendedorButton;
+
+ internal WrapPanel VendedorFields;
+
+ internal ToggleButton CoCorretagemToogle;
+
+ internal ComboBox TipoVendedorBox;
+
+ internal ComboBox VendedorBox;
+
+ internal CustomItemValidation ComissaoNovoBox;
+
+ internal ComboBox ComissaoNovoComboBox;
+
+ internal CustomItemValidation ComissaoRenovacaoBox;
+
+ internal ComboBox ComissaoRenovacaoComboBox;
+
+ internal CurrencyTextBox ValorRepasseBox;
+
+ internal TextBox FormaRecebidaBox;
+
+ internal DataGrid VendedorGrid;
+
+ internal DataGridTextColumn RepasseVendedor;
+
+ internal TextBox NomeBox;
+
+ internal ComboBox TipoDocumentoPrincipalBox;
+
+ internal TextBox DocumentoPrincipalBox;
+
+ internal DatePicker NascimentoBox;
+
+ internal TextBox IdentidadeBox;
+
+ internal TextBox EmissorBox;
+
+ internal TextBox EstadoEmissorBox;
+
+ internal ListBox TelefoneListBox;
+
+ internal ListBox EmailListBox;
+
+ internal DataGrid ItemGrid;
+
+ private bool _contentLoaded;
+
+ public CriticaApoliceViewModel ViewModel { get; set; }
+
+ private bool AdicionandoVendedor { get; set; }
+
+ private int Ordem { get; set; } = 1;
+
+
+ public CriticaApoliceView()
+ {
+ ((FrameworkElement)this).Tag = "CRÍTICA DE IMPORTAÇÃO";
+ ViewModel = new CriticaApoliceViewModel();
+ ((FrameworkElement)this).DataContext = ViewModel;
+ InitializeComponent();
+ Dispatcher dispatcher = ((DispatcherObject)this).Dispatcher;
+ if (dispatcher != null)
+ {
+ dispatcher.BeginInvoke((DispatcherPriority)7, (Delegate)new Action(ContentLoad));
+ }
+ }
+
+ private async void ContentLoad()
+ {
+ ((UIElement)DocumentoPrincipalBox).LostFocus += new RoutedEventHandler(DocumentoPrincipalBox_OnLostFocus);
+ TextBox documentoPrincipalBox = DocumentoPrincipalBox;
+ CriticaApoliceView criticaApoliceView = this;
+ ((UIElement)documentoPrincipalBox).PreviewTextInput += new TextCompositionEventHandler(criticaApoliceView.SomenteNumeros);
+ CriticadoBox.Checked += new RoutedEventHandler(Criticado_OnChecked);
+ CriticadoBox.Unchecked += new RoutedEventHandler(Criticado_OnChecked);
+ ((Selector)UsuarioBox).SelectionChanged += new SelectionChangedEventHandler(Usuario_OnSelectionChanged);
+ ((Selector)SeguradoraBox).SelectionChanged += new SelectionChangedEventHandler(Seguradora_OnSelectionChanged);
+ ((UIElement)InicioBox).LostKeyboardFocus += new KeyboardFocusChangedEventHandler(base.DatePicker_OnLostKeyboardFocus);
+ ((UIElement)InicioBox).PreviewKeyDown += new KeyEventHandler(base.DatePicker_PreviewKeyDown);
+ InicioBox.SelectedDateChanged += FiltroDataBox_OnSelectedDateChanged;
+ ((UIElement)FimBox).LostKeyboardFocus += new KeyboardFocusChangedEventHandler(base.DatePicker_OnLostKeyboardFocus);
+ ((UIElement)FimBox).PreviewKeyDown += new KeyEventHandler(base.DatePicker_PreviewKeyDown);
+ FimBox.SelectedDateChanged += FiltroDataBox_OnSelectedDateChanged;
+ ((UIElement)TransmissaoBox).LostKeyboardFocus += new KeyboardFocusChangedEventHandler(base.DatePicker_OnLostKeyboardFocus);
+ ((UIElement)TransmissaoBox).PreviewKeyDown += new KeyEventHandler(base.DatePicker_PreviewKeyDown);
+ ((UIElement)EmissaoBox).LostKeyboardFocus += new KeyboardFocusChangedEventHandler(base.DatePicker_OnLostKeyboardFocus);
+ ((UIElement)EmissaoBox).PreviewKeyDown += new KeyEventHandler(base.DatePicker_PreviewKeyDown);
+ ((UIElement)Vigencia1Box).LostKeyboardFocus += new KeyboardFocusChangedEventHandler(base.DatePicker_OnLostKeyboardFocus);
+ ((UIElement)Vigencia1Box).PreviewKeyDown += new KeyEventHandler(base.DatePicker_PreviewKeyDown);
+ ((UIElement)Vigencia2Box).LostKeyboardFocus += new KeyboardFocusChangedEventHandler(base.DatePicker_OnLostKeyboardFocus);
+ ((UIElement)Vigencia2Box).PreviewKeyDown += new KeyEventHandler(base.DatePicker_PreviewKeyDown);
+ ((Selector)NegocioCorretoraBox).SelectionChanged += new SelectionChangedEventHandler(NegocioCorretoraBox_OnSelectionChanged);
+ ((UIElement)PremioLiquidoBox).LostFocus += new RoutedEventHandler(AlteracaoDePremio_LostFocus);
+ ((UIElement)PremioAdicionalBox).LostFocus += new RoutedEventHandler(AlteracaoDePremio_LostFocus);
+ ((UIElement)IofBox).LostFocus += new RoutedEventHandler(AlteracaoDePremio_LostFocus);
+ ((UIElement)DiferencaBox).LostFocus += new RoutedEventHandler(AlteracaoDePremio_LostFocus);
+ AdicionalBox.Unchecked += new RoutedEventHandler(AdicionalBox_OnChecked);
+ AdicionalBox.Checked += new RoutedEventHandler(AdicionalBox_OnChecked);
+ ((Selector)VendedorBox).SelectionChanged += new SelectionChangedEventHandler(VendedorBox_OnSelectionChanged);
+ ((Selector)TipoVendedorBox).SelectionChanged += new SelectionChangedEventHandler(TipoVendedorBox_OnSelectionChanged);
+ ((Selector)TipoDocumentoPrincipalBox).SelectionChanged += new SelectionChangedEventHandler(TipoDocumentoPrincipalBox_OnSelectionChanged);
+ ((Selector)CriticaGrid).SelectionChanged += new SelectionChangedEventHandler(Grid_OnSelectionChanged);
+ ((DataGridColumn)RepasseVendedor).Visibility = (Visibility)(ViewModel.Restricao((TipoRestricao)95) ? 2 : 0);
+ await ViewModel.InitialLoad();
+ }
+
+ private void NegocioCorretoraBox_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ //IL_0001: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0006: Unknown result type (might be due to invalid IL or missing references)
+ //IL_001c: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0026: Expected O, but got Unknown
+ //IL_002c: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0042: Unknown result type (might be due to invalid IL or missing references)
+ ComboBox val = (ComboBox)sender;
+ if ((((int)val != 0) ? ((Selector)val).SelectedItem : null) != null)
+ {
+ AlteracaoDePremio_LostFocus(PremioLiquidoBox, new RoutedEventArgs());
+ if ((int)((UIElement)SalvarVendedorButton).Visibility == 0)
+ {
+ EditarVendedor(editar: true);
+ ComissaoVendedorBox_OnSelectionChanged(((int)((UIElement)ComissaoNovoBox).Visibility == 0) ? ComissaoNovoComboBox : ComissaoRenovacaoComboBox, e);
+ }
+ }
+ }
+
+ private void DocumentoPrincipalBox_OnLostFocus(object sender, RoutedEventArgs e)
+ {
+ //IL_0029: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0031: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0036: Unknown result type (might be due to invalid IL or missing references)
+ if (((Selector)TipoDocumentoPrincipalBox).SelectedItem == null)
+ {
+ ((Selector)TipoDocumentoPrincipalBox).SelectedItem = (object)(TipoDocumento)0;
+ }
+ if ((int)(TipoDocumento)((Selector)TipoDocumentoPrincipalBox).SelectedItem == 0)
+ {
+ TextBox val = (TextBox)sender;
+ val.Text = ValidationHelper.FormatDocument(val.Text);
+ }
+ }
+
+ private void AlteracaoDePremio_LostFocus(object sender, RoutedEventArgs e)
+ {
+ //IL_001d: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0023: Expected O, but got Unknown
+ if (!ViewModel.AllowEditApolice || ViewModel.SelectedDocumento == null)
+ {
+ return;
+ }
+ CurrencyTextBox val = (CurrencyTextBox)sender;
+ if (val == null)
+ {
+ return;
+ }
+ string name = ((FrameworkElement)val).Name;
+ if ((name == "PremioLiquidoBox" || name == "PremioAdicionalBox") && IofBox.Number == 0m)
+ {
+ decimal num = PremioLiquidoBox.Number + PremioAdicionalBox.Number;
+ Ramo ramo = ViewModel.SelectedDocumento.Controle.Ramo;
+ decimal num2 = num * ((ramo != null) ? ramo.Iof : 0m);
+ IofBox.Number = num2;
+ CurrencyTextBox premioTotalBox = PremioTotalBox;
+ premioTotalBox.Number += num2;
+ }
+ PremioTotalBox.Number = PremioLiquidoBox.Number + PremioAdicionalBox.Number + IofBox.Number + DiferencaBox.Number;
+ switch (((FrameworkElement)val).Name)
+ {
+ case "PremioLiquidoBox":
+ case "PremioAdicionalBox":
+ case "ComissaoBox":
+ if (ViewModel.HabilitarVendedor().Count == 0)
+ {
+ ViewModel.RecalculaRepasses();
+ }
+ break;
+ }
+ ValidarDocumento();
+ }
+
+ private void AdicionalBox_OnChecked(object sender, RoutedEventArgs e)
+ {
+ //IL_0015: Unknown result type (might be due to invalid IL or missing references)
+ //IL_001f: Expected O, but got Unknown
+ if (ViewModel.SelectedDocumento != null)
+ {
+ AlteracaoDePremio_LostFocus(PremioAdicionalBox, new RoutedEventArgs());
+ }
+ }
+
+ private void ValidarDocumento()
+ {
+ if (ViewModel.SelectedDocumento == null)
+ {
+ return;
+ }
+ List<KeyValuePair<string, string>> errorMessages = ViewModel.SelectedDocumento.Validate();
+ if (ViewModel.Telefones != null)
+ {
+ ExtensionMethods.ForEach<ClienteTelefone>((IEnumerable<ClienteTelefone>)ViewModel.Telefones, (Action<ClienteTelefone>)delegate(ClienteTelefone x)
+ {
+ List<KeyValuePair<string, string>> collection = x.Validate();
+ errorMessages.AddRange(collection);
+ });
+ }
+ ((DependencyObject)(object)this).ValidateFields(errorMessages, focusField: false);
+ ExtensionMethods.ForEach<DependencyObject>(Extentions.FindVisualChildren<DependencyObject>((DependencyObject)(object)TelefoneListBox), (Action<DependencyObject>)delegate(DependencyObject child)
+ {
+ child.ValidateFields(errorMessages, focusField: false);
+ });
+ }
+
+ private async void Criticado_OnChecked(object sender, RoutedEventArgs e)
+ {
+ ToggleButton val = (ToggleButton)sender;
+ if (val != null && val.IsChecked.HasValue)
+ {
+ ComboBox usuarioBox = UsuarioBox;
+ if (((usuarioBox != null) ? ((Selector)usuarioBox).SelectedItem : null) != null && !ViewModel.IsLoading)
+ {
+ bool ischecked = val.IsChecked.Value;
+ ((Selector)SeguradoraBox).SelectionChanged -= new SelectionChangedEventHandler(Seguradora_OnSelectionChanged);
+ ((Selector)UsuarioBox).SelectionChanged -= new SelectionChangedEventHandler(Usuario_OnSelectionChanged);
+ CriticadoBox.Checked -= new RoutedEventHandler(Criticado_OnChecked);
+ await ViewModel.CarregarUsuarios(((DomainBase)(Usuario)((Selector)UsuarioBox).SelectedItem).Id, ischecked);
+ await ViewModel.CarregaCritica(((DomainBase)ViewModel.SelectedUsuario).Id, ((DomainBase)ViewModel.SelectedSeguradora).Id, ischecked);
+ ((Selector)SeguradoraBox).SelectionChanged += new SelectionChangedEventHandler(Seguradora_OnSelectionChanged);
+ ((Selector)UsuarioBox).SelectionChanged += new SelectionChangedEventHandler(Usuario_OnSelectionChanged);
+ CriticadoBox.Checked += new RoutedEventHandler(Criticado_OnChecked);
+ }
+ }
+ }
+
+ private async void Usuario_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ ComboBox val = (ComboBox)sender;
+ if (val != null && ((Selector)val).SelectedItem != null)
+ {
+ ToggleButton criticadoBox = CriticadoBox;
+ if (criticadoBox != null && criticadoBox.IsChecked.HasValue && ViewModel.SelectedSeguradora != null)
+ {
+ ((Selector)SeguradoraBox).SelectionChanged -= new SelectionChangedEventHandler(Seguradora_OnSelectionChanged);
+ ((Selector)UsuarioBox).SelectionChanged -= new SelectionChangedEventHandler(Usuario_OnSelectionChanged);
+ CriticadoBox.Checked -= new RoutedEventHandler(Criticado_OnChecked);
+ ViewModel.SelectedUsuario = (Usuario)((Selector)val).SelectedItem;
+ await ViewModel.CarregaCritica(((DomainBase)(Usuario)((Selector)val).SelectedItem).Id, ((DomainBase)ViewModel.SelectedSeguradora).Id, ViewModel.Criticado);
+ ((Selector)SeguradoraBox).SelectionChanged += new SelectionChangedEventHandler(Seguradora_OnSelectionChanged);
+ ((Selector)UsuarioBox).SelectionChanged += new SelectionChangedEventHandler(Usuario_OnSelectionChanged);
+ CriticadoBox.Checked += new RoutedEventHandler(Criticado_OnChecked);
+ }
+ }
+ }
+
+ private async void Seguradora_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ ComboBox val = (ComboBox)sender;
+ if (val != null && ((Selector)val).SelectedItem != null)
+ {
+ ToggleButton criticadoBox = CriticadoBox;
+ if (criticadoBox != null && criticadoBox.IsChecked.HasValue)
+ {
+ ((Selector)SeguradoraBox).SelectionChanged -= new SelectionChangedEventHandler(Seguradora_OnSelectionChanged);
+ ((Selector)UsuarioBox).SelectionChanged -= new SelectionChangedEventHandler(Usuario_OnSelectionChanged);
+ CriticadoBox.Checked -= new RoutedEventHandler(Criticado_OnChecked);
+ ViewModel.SelectedSeguradora = (Seguradora)((Selector)val).SelectedItem;
+ await ViewModel.CarregaCritica(((DomainBase)ViewModel.SelectedUsuario).Id, ((DomainBase)(Seguradora)((Selector)val).SelectedItem).Id, ViewModel.Criticado);
+ ((Selector)SeguradoraBox).SelectionChanged += new SelectionChangedEventHandler(Seguradora_OnSelectionChanged);
+ ((Selector)UsuarioBox).SelectionChanged += new SelectionChangedEventHandler(Usuario_OnSelectionChanged);
+ CriticadoBox.Checked += new RoutedEventHandler(Criticado_OnChecked);
+ }
+ }
+ }
+
+ private async void FiltroDataBox_OnSelectedDateChanged(object sender, SelectionChangedEventArgs e)
+ {
+ DatePicker val = (DatePicker)sender;
+ if ((int)val != 0 && val.SelectedDate.HasValue)
+ {
+ ComboBox usuarioBox = UsuarioBox;
+ if (((usuarioBox != null) ? ((Selector)usuarioBox).SelectedItem : null) != null)
+ {
+ ((Selector)SeguradoraBox).SelectionChanged -= new SelectionChangedEventHandler(Seguradora_OnSelectionChanged);
+ ((Selector)UsuarioBox).SelectionChanged -= new SelectionChangedEventHandler(Usuario_OnSelectionChanged);
+ CriticadoBox.Checked -= new RoutedEventHandler(Criticado_OnChecked);
+ await ViewModel.CarregarUsuarios(((DomainBase)(Usuario)((Selector)UsuarioBox).SelectedItem).Id, ViewModel.Criticado);
+ await ViewModel.CarregaCritica(((DomainBase)ViewModel.SelectedUsuario).Id, ((DomainBase)ViewModel.SelectedSeguradora).Id, ViewModel.Criticado);
+ ((Selector)SeguradoraBox).SelectionChanged += new SelectionChangedEventHandler(Seguradora_OnSelectionChanged);
+ ((Selector)UsuarioBox).SelectionChanged += new SelectionChangedEventHandler(Usuario_OnSelectionChanged);
+ CriticadoBox.Checked += new RoutedEventHandler(Criticado_OnChecked);
+ }
+ }
+ }
+
+ private async void EditarVendedorButton_OnClick(object sender, RoutedEventArgs e)
+ {
+ List<KeyValuePair<string, string>> list = ViewModel.SelectedDocumento.Validate();
+ bool flag = list == null || list.Count == 0;
+ if (flag)
+ {
+ Parcela selectedParcela = ViewModel.SelectedParcela;
+ if (selectedParcela != null && selectedParcela.DataRecebimento.HasValue)
+ {
+ await ViewModel.ShowMessage("DOCUMENTO COM PARCELA(S) JÁ BAIXADA(S), NÃO É POSSÍVEL ALTERAR VENDEDORES!");
+ return;
+ }
+ }
+ if (!flag)
+ {
+ ((DependencyObject)(object)this).ValidateFields(list);
+ await ViewModel.ShowMessage(list, ViewModel.ErroCamposInvalidos, "OK");
+ }
+ else
+ {
+ ViewModel.IncluirVendedor();
+ EditarVendedor(editar: true);
+ ViewModel.VendedorCoCorretagem();
+ }
+ }
+
+ private void EditarVendedor(bool editar)
+ {
+ //IL_0154: Unknown result type (might be due to invalid IL or missing references)
+ //IL_015a: Invalid comparison between Unknown and I4
+ AdicionandoVendedor = editar;
+ ((UIElement)SalvarVendedorButton).Visibility = (Visibility)((!editar) ? 2 : 0);
+ ((UIElement)CancelarVendedorButton).Visibility = (Visibility)((!editar) ? 2 : 0);
+ ((UIElement)EditarVendedorButton).Visibility = (Visibility)(editar ? 2 : 0);
+ ((UIElement)VendedorFields).Visibility = (Visibility)((!editar) ? 2 : 0);
+ ((UIElement)VendedorGrid).IsEnabled = !editar;
+ if (ViewModel.SelectedDocumento == null)
+ {
+ return;
+ }
+ if (editar && Recursos.Configuracoes.Any((ConfiguracaoSistema config) => (int)config.Configuracao == 56))
+ {
+ ObservableCollection<VendedorParcela> pagamentos = ViewModel.Pagamentos;
+ int num;
+ if (pagamentos == null || pagamentos.Count != 1 || !ViewModel.Pagamentos.Any((VendedorParcela vendedor) => vendedor.Repasse == null))
+ {
+ ObservableCollection<VendedorParcela> pagamentos2 = ViewModel.Pagamentos;
+ num = ((pagamentos2 != null && pagamentos2.Count == 0) ? 1 : 0);
+ }
+ else
+ {
+ num = 1;
+ }
+ bool isEnabled = (byte)num != 0;
+ ((UIElement)CoCorretagemToogle).IsEnabled = isEnabled;
+ ((UIElement)ComissaoNovoBox).Visibility = (Visibility)0;
+ ((UIElement)ComissaoRenovacaoBox).Visibility = (Visibility)2;
+ CoCorretagemToogle.IsChecked = false;
+ }
+ else
+ {
+ bool flag = (int)ViewModel.SelectedDocumento.NegocioCorretora.GetValueOrDefault() == 1;
+ ((UIElement)ComissaoNovoBox).Visibility = (Visibility)((!editar || flag) ? 2 : 0);
+ ((UIElement)ComissaoRenovacaoBox).Visibility = (Visibility)((!(editar && flag)) ? 2 : 0);
+ }
+ }
+
+ private void VendedorBox_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ //IL_0001: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0007: Expected O, but got Unknown
+ //IL_001c: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0026: Expected O, but got Unknown
+ //IL_0039: Unknown result type (might be due to invalid IL or missing references)
+ //IL_003f: Invalid comparison between Unknown and I4
+ ComboBox val = (ComboBox)sender;
+ if (((Selector)val).SelectedItem != null)
+ {
+ ViewModel.FiltrarRepasse((Vendedor)((Selector)val).SelectedItem);
+ bool flag = (int)ViewModel.SelectedDocumento.NegocioCorretora.GetValueOrDefault() == 1;
+ if (flag && ViewModel.CoCorretagem)
+ {
+ ((UIElement)ComissaoNovoBox).Visibility = (Visibility)0;
+ ((UIElement)ComissaoRenovacaoBox).Visibility = (Visibility)2;
+ }
+ else
+ {
+ ((UIElement)ComissaoNovoBox).Visibility = (Visibility)(flag ? 2 : 0);
+ ((UIElement)ComissaoRenovacaoBox).Visibility = (Visibility)((!flag) ? 2 : 0);
+ }
+ }
+ }
+
+ private void ComissaoVendedorBox_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ //IL_0001: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0007: Expected O, but got Unknown
+ //IL_0016: Unknown result type (might be due to invalid IL or missing references)
+ //IL_001c: Expected O, but got Unknown
+ //IL_00e7: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00ed: Invalid comparison between Unknown and I4
+ //IL_002b: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0031: Invalid comparison between Unknown and I4
+ //IL_0103: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0109: Invalid comparison between Unknown and I4
+ //IL_0136: Unknown result type (might be due to invalid IL or missing references)
+ //IL_013b: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0147: Expected O, but got Unknown
+ //IL_0191: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0197: Invalid comparison between Unknown and I4
+ ComboBox val = (ComboBox)sender;
+ if (((Selector)val).SelectedItem == null)
+ {
+ return;
+ }
+ Repasse val2 = (Repasse)((Selector)val).SelectedItem;
+ if (val2 != null && (int)val2.Tipo.GetValueOrDefault() == 3)
+ {
+ decimal num = ViewModel.SelectedDocumento.Comissao * (val2.ValorNovo * 0.01m) * 0.01m;
+ ViewModel.SelectedPagamento.ValorRepasse = ViewModel.SelectedDocumento.PremioTotal * num;
+ ValorRepasseBox.Number = ViewModel.SelectedPagamento.ValorRepasse.Value;
+ return;
+ }
+ ViewModel.SelectedPagamento.Repasse = val2;
+ ViewModel.SelectedPagamento.PorcentagemRepasse = (((int)ViewModel.SelectedDocumento.Situacao == 2 && (int)ViewModel.SelectedDocumento.Negocio.GetValueOrDefault() == 1) ? val2.ValorRenovacao : val2.ValorNovo);
+ if (ViewModel.SelectedParcela == null)
+ {
+ ViewModel.SelectedParcela = new Parcela
+ {
+ SubTipo = (SubTipo)1
+ };
+ }
+ ViewModel.SelectedParcela.Documento = ViewModel.SelectedDocumento;
+ ViewModel.SelectedPagamento.ValorRepasse = Funcoes.CalculaRepasse(val2, ViewModel.SelectedParcela, ViewModel.SelectedParcela == null || (int)ViewModel.SelectedParcela.SubTipo == 1);
+ ViewModel.SelectedPagamento.ValorTotal = ViewModel.SelectedPagamento.ValorRepasse;
+ ValorRepasseBox.Number = ViewModel.SelectedPagamento.ValorRepasse.Value;
+ FormaRecebidaBox.Text = EnumHelper.GetDescription<FormaRepasse?>(val2.Forma);
+ }
+
+ private void TipoVendedorBox_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ //IL_0001: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0007: Expected O, but got Unknown
+ //IL_003e: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0048: Expected O, but got Unknown
+ //IL_0023: Unknown result type (might be due to invalid IL or missing references)
+ //IL_002d: Expected O, but got Unknown
+ ComboBox val = (ComboBox)sender;
+ if (((Selector)val).SelectedItem != null)
+ {
+ if (ViewModel.SelectedPagamento == null)
+ {
+ ViewModel.SelectedPagamento = new VendedorParcela();
+ }
+ ViewModel.SelectedPagamento.TipoVendedor = (TipoVendedor)((Selector)val).SelectedItem;
+ }
+ }
+
+ private async void SalvarVendedor_Click(object sender, RoutedEventArgs e)
+ {
+ ((MenuItem)sender).Click -= new RoutedEventHandler(SalvarVendedor_Click);
+ bool flag = ViewModel.CoCorretagem;
+ if (flag)
+ {
+ flag = !(await ViewModel.ShowMessage("AO ADICIONAR CO-CORRETAGEM COMO VENDEDOR, O DOCUMENTO ACIMA SERÁ SALVO.\nDESEJÁ CONTINUAR?", "SIM", "NÃO"));
+ }
+ if (flag)
+ {
+ ((MenuItem)sender).Click += new RoutedEventHandler(SalvarVendedor_Click);
+ return;
+ }
+ bool flag2 = ViewModel.SelectedParcela == null || ((int)ViewModel.SelectedParcela.SubTipo == 1 && (int)ViewModel.SelectedDocumento.TipoRecebimento.GetValueOrDefault() == 1);
+ bool flag3 = (int)ViewModel.SelectedDocumento.NegocioCorretora.GetValueOrDefault() == 1;
+ if (((Selector)ComissaoRenovacaoComboBox).SelectedItem == null && ((Selector)ComissaoNovoComboBox).SelectedItem == null)
+ {
+ await ViewModel.ShowMessage("NECESSÁRIOS ESCOLHER O VALOR DE REPASSE ANTES DE ADICIONAR O VENDEDOR");
+ ((MenuItem)sender).Click += new RoutedEventHandler(SalvarVendedor_Click);
+ return;
+ }
+ VendedorParcela selectedPagamento = ViewModel.SelectedPagamento;
+ int num;
+ if (selectedPagamento == null)
+ {
+ num = 0;
+ }
+ else
+ {
+ Repasse repasse = selectedPagamento.Repasse;
+ num = (((int)((repasse != null) ? repasse.Tipo : null).GetValueOrDefault() == 3) ? 1 : 0);
+ }
+ if (num != 0)
+ {
+ flag3 = false;
+ }
+ object obj = ((Selector)ComissaoRenovacaoComboBox).SelectedItem ?? ((Selector)ComissaoNovoComboBox).SelectedItem;
+ ViewModel.SelectedPagamento.PorcentagemRepasse = (flag3 ? ((Repasse)obj).ValorRenovacao : ((Repasse)obj).ValorNovo);
+ List<KeyValuePair<string, string>> list = ((!flag2) ? (await ViewModel.AdicionarVendedorParcelaEspecial()) : (await ViewModel.AdicionarVendedor()));
+ List<KeyValuePair<string, string>> list2 = list;
+ if (list2 == null || list2.Count == 0)
+ {
+ EditarVendedor(editar: false);
+ if (ViewModel.VerificaCoCorretagem())
+ {
+ ((TextBoxBase)ComissaoBox).IsReadOnly = true;
+ ViewModel.ComissOriginalVisibility = (Visibility)0;
+ }
+ ((MenuItem)sender).Click += new RoutedEventHandler(SalvarVendedor_Click);
+ }
+ else
+ {
+ await ViewModel.ShowMessage(list2, ViewModel.ErroCamposInvalidos, "OK");
+ ((MenuItem)sender).Click += new RoutedEventHandler(SalvarVendedor_Click);
+ }
+ }
+
+ private void CancelarVendedor_Click(object sender, RoutedEventArgs e)
+ {
+ EditarVendedor(editar: false);
+ ViewModel.SelectedPagamento = null;
+ ViewModel.SelecionarVendedor();
+ }
+
+ private async void ConcluirCritica_OnClick(object sender, RoutedEventArgs e)
+ {
+ ConcluirCriticaButton.Click -= new RoutedEventHandler(ConcluirCritica_OnClick);
+ ViewModel.EnableGrid = false;
+ ExecutarValidacaoData();
+ ((UIElement)NomeBox).Focus();
+ if (ViewModel.CompararValores())
+ {
+ PremioTotalBox.Number = PremioLiquidoBox.Number + PremioAdicionalBox.Number + IofBox.Number + DiferencaBox.Number;
+ }
+ await SalvarDocumento();
+ ConcluirCriticaButton.Click += new RoutedEventHandler(ConcluirCritica_OnClick);
+ }
+
+ private void ExecutarValidacaoData()
+ {
+ ViewModel.SelectedCliente.Nascimento = ((NascimentoBox.Text != null && DateTime.TryParse(ValidationHelper.FormatDate(NascimentoBox.Text), out var result)) ? new DateTime?(result) : null);
+ ViewModel.SelectedDocumento.Remessa = ((TransmissaoBox.Text != null && DateTime.TryParse(ValidationHelper.FormatDate(TransmissaoBox.Text), out result)) ? new DateTime?(result) : null);
+ ViewModel.SelectedDocumento.Emissao = ((EmissaoBox.Text != null && DateTime.TryParse(ValidationHelper.FormatDate(EmissaoBox.Text), out result)) ? new DateTime?(result) : null);
+ ViewModel.SelectedDocumento.Vigencia1 = ((Vigencia1Box.Text != null && DateTime.TryParse(ValidationHelper.FormatDate(Vigencia1Box.Text), out result)) ? result : Funcoes.GetNetworkTime().Date);
+ ViewModel.SelectedDocumento.Vigencia2 = ((Vigencia2Box.Text != null && DateTime.TryParse(ValidationHelper.FormatDate(Vigencia2Box.Text), out result)) ? new DateTime?(result) : null);
+ }
+
+ private async Task SalvarDocumento()
+ {
+ ViewModel.Loading(isLoading: true);
+ List<KeyValuePair<string, string>> list = null;
+ if (AdicionandoVendedor)
+ {
+ list = await ViewModel.AdicionarVendedor();
+ }
+ if (list != null && list.Count != 0)
+ {
+ ViewModel.Loading(isLoading: false);
+ await ViewModel.ShowMessage(list, ViewModel.ErroCamposInvalidos, "OK");
+ return;
+ }
+ list = await ViewModel.SalvarCliente();
+ if (list != null && list.Count != 0)
+ {
+ ViewModel.Loading(isLoading: false);
+ await ViewModel.ShowMessage(list, ViewModel.ErroCamposInvalidos, "OK");
+ return;
+ }
+ if (!ViewModel.StatusDocumento.HasValue)
+ {
+ list = new List<KeyValuePair<string, string>>
+ {
+ new KeyValuePair<string, string>("STATUS DO SEGURO", "OBRIGATÓRIO")
+ };
+ }
+ if (list != null && list.Count != 0)
+ {
+ ViewModel.Loading(isLoading: false);
+ await ViewModel.ShowMessage(list, ViewModel.ErroCamposInvalidos, "OK");
+ return;
+ }
+ if (!ViewModel.StatusDocumento.HasValue)
+ {
+ ViewModel.SelectedDocumento.Situacao = (TipoSeguro)1;
+ }
+ list = await ViewModel.Salvar(critica: true);
+ if (list != null && list.Count != 0)
+ {
+ if (list.Any((KeyValuePair<string, string> x) => x.Value == "VIGENCIANAOACEITA"))
+ {
+ ViewModel.Loading(isLoading: false);
+ return;
+ }
+ ViewModel.Loading(isLoading: false);
+ await ViewModel.ShowMessage(list, ViewModel.ErroCamposInvalidos, "OK");
+ }
+ else
+ {
+ await ViewModel.ConcluirCritica();
+ EditarVendedor(editar: false);
+ ViewModel.EnableGrid = true;
+ SeguroCombinadoBox.IsChecked = false;
+ }
+ }
+
+ private void OrdemBox_OnPreviewGotKeyboardFocus(object sender, KeyboardFocusChangedEventArgs e)
+ {
+ TextBox val = (TextBox)((sender is TextBox) ? sender : null);
+ if (val != null && int.TryParse(val.Text, out var result))
+ {
+ Ordem = result;
+ }
+ }
+
+ private void ExcluirTelefone_OnClick(object sender, RoutedEventArgs e)
+ {
+ //IL_001a: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0020: Expected O, but got Unknown
+ Button val = (Button)((sender is Button) ? sender : null);
+ if (val != null && ((FrameworkElement)val).DataContext != null)
+ {
+ ClienteTelefone telefone = (ClienteTelefone)((FrameworkElement)val).DataContext;
+ ViewModel.ExcluirTelefone(telefone);
+ }
+ }
+
+ private void ExcluirEmail_OnClick(object sender, RoutedEventArgs e)
+ {
+ //IL_001a: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0020: Expected O, but got Unknown
+ Button val = (Button)((sender is Button) ? sender : null);
+ if (val != null && ((FrameworkElement)val).DataContext != null)
+ {
+ ClienteEmail email = (ClienteEmail)((FrameworkElement)val).DataContext;
+ ViewModel.ExcluirEmail(email);
+ }
+ }
+
+ private void TipoDocumentoPrincipalBox_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ ViewModel.AlteraDocumentoPrincipal();
+ }
+
+ private async void AbrirAquivoDigital_Click(object sender, RoutedEventArgs e)
+ {
+ if (!new PermissaoArquivoDigitalServico().BuscarPermissao(Recursos.Usuario, (TipoArquivoDigital)2).Consultar)
+ {
+ await ViewModel.ShowMessage("VOCÊ NÃO POSSUI PERMISSÃO PARA ACESSAR\nARQUIVO DIGITAL DE " + EnumHelper.GetDescription<TipoArquivoDigital>((TipoArquivoDigital)2) + ".");
+ return;
+ }
+ FiltroArquivoDigital filtro = new FiltroArquivoDigital
+ {
+ Id = ((DomainBase)ViewModel.SelectedCritica.Documento).Id,
+ Tipo = (TipoArquivoDigital)2,
+ Parente = ViewModel.SelectedCritica.Documento
+ };
+ ViewModel.ShowDrawer(new ArquivoDigitalDrawer(filtro), 0, close: false);
+ }
+
+ private async void ExcluirVendedor_OnClick(object sender, RoutedEventArgs e)
+ {
+ DataGrid vendedorGrid = VendedorGrid;
+ if (vendedorGrid == null || ((Selector)vendedorGrid).SelectedIndex >= 0)
+ {
+ DataGrid vendedorGrid2 = VendedorGrid;
+ VendedorParcela val = (VendedorParcela)((vendedorGrid2 != null) ? ((ItemsControl)vendedorGrid2).Items[((Selector)VendedorGrid).SelectedIndex] : null);
+ int num;
+ if (val == null)
+ {
+ num = 0;
+ }
+ else
+ {
+ Repasse repasse = val.Repasse;
+ num = (((int)((repasse != null) ? repasse.Tipo : null).GetValueOrDefault() == 3) ? 1 : 0);
+ }
+ bool deleteCoCorretagem = (byte)num != 0;
+ CriticaApoliceViewModel viewModel = ViewModel;
+ DataGrid vendedorGrid3 = VendedorGrid;
+ await viewModel.ExcluirVendedor((VendedorParcela)((vendedorGrid3 != null) ? ((ItemsControl)vendedorGrid3).Items[((Selector)VendedorGrid).SelectedIndex] : null));
+ await ViewModel.SelecionaParcela(ViewModel.Parcelas.FirstOrDefault());
+ ((TextBoxBase)ComissaoBox).IsReadOnly = ViewModel.VerificaCoCorretagem();
+ ViewModel.ComissOriginalVisibility = (Visibility)((!((TextBoxBase)ComissaoBox).IsReadOnly) ? 2 : 0);
+ if (deleteCoCorretagem)
+ {
+ await ViewModel.AjusteComissãoCoCorretagem(removido: true);
+ }
+ }
+ }
+
+ private async void Cliente_OnClick(object sender, RoutedEventArgs e)
+ {
+ ((Window)new HosterWindow((ContentControl)(object)new ClienteView(ViewModel.SelectedDocumento.Controle.Cliente, lockInsert: true), "CADASTRO DE CLIENTES - " + ViewModel.SelectedDocumento.Controle.Cliente.Nome)).ShowDialog();
+ CriticaApoliceViewModel viewModel = ViewModel;
+ viewModel.SelectedCliente = await ViewModel.CarregaCliente(((DomainBase)ViewModel.SelectedCliente).Id);
+ await ViewModel.SelecionaCliente(ViewModel.SelectedCliente);
+ }
+
+ private async void Apolice_OnClick(object sender, RoutedEventArgs e)
+ {
+ if (ViewModel.SelectedDocumento != null)
+ {
+ ((Window)new HosterWindow((ContentControl)(object)new ApoliceView(ViewModel.SelectedDocumento, lockInsert: true, invoke: false, (AcessoApolice)0, 0L, consultaTela: true), "CADASTRO DE APÓLICES - " + ViewModel.SelectedDocumento.Controle.Cliente.Nome + " - " + ViewModel.SelectedDocumento.Apolice)).ShowDialog();
+ await ViewModel.SelecionaDocumento(ViewModel.SelectedDocumento);
+ }
+ }
+
+ private async void Item_Click(object sender, RoutedEventArgs e)
+ {
+ Button val = (Button)sender;
+ if (((FrameworkElement)val).DataContext == null)
+ {
+ return;
+ }
+ Item val2 = (Item)((FrameworkElement)val).DataContext;
+ val2.Documento = ViewModel.SelectedDocumento;
+ long id = ((DomainBase)ViewModel.SelectedDocumento.Controle.Ramo).Id;
+ long num = id - 1;
+ if ((ulong)num <= 19uL)
+ {
+ switch (num)
+ {
+ case 4L:
+ goto IL_00f9;
+ case 0L:
+ case 1L:
+ case 2L:
+ case 14L:
+ case 17L:
+ goto IL_0120;
+ case 12L:
+ goto IL_0147;
+ case 19L:
+ goto IL_016e;
+ case 5L:
+ case 6L:
+ case 8L:
+ case 9L:
+ goto IL_0192;
+ case 3L:
+ case 7L:
+ case 10L:
+ case 11L:
+ case 13L:
+ case 15L:
+ case 16L:
+ case 18L:
+ goto IL_01da;
+ }
+ }
+ long num2 = id - 36;
+ if ((ulong)num2 <= 2uL)
+ {
+ switch (num2)
+ {
+ case 1L:
+ goto IL_00f9;
+ case 2L:
+ goto IL_0120;
+ case 0L:
+ goto IL_01b6;
+ }
+ }
+ if (id == 53)
+ {
+ goto IL_0192;
+ }
+ goto IL_01da;
+ IL_01b6:
+ UserControl control = (UserControl)(object)new ConsorcioView(null, lockInsert: true, substituir: false, null, val2, ViewModel.SelectedDocumento.Controle.Ramo);
+ goto IL_01fc;
+ IL_0192:
+ control = (UserControl)(object)new VidaView(null, lockInsert: true, substituir: false, null, val2, ViewModel.SelectedDocumento.Controle.Ramo);
+ goto IL_01fc;
+ IL_0147:
+ control = (UserControl)(object)new AeronauticoView(null, lockInsert: true, substituir: false, null, val2, ViewModel.SelectedDocumento.Controle.Ramo);
+ goto IL_01fc;
+ IL_016e:
+ control = (UserControl)(object)new GranizoView(null, lockInsert: true, substituir: false, null, val2, ViewModel.SelectedDocumento.Controle.Ramo);
+ goto IL_01fc;
+ IL_01da:
+ control = (UserControl)(object)new RiscosDiversosView(null, lockInsert: false, substituir: false, null, val2, ViewModel.SelectedDocumento.Controle.Ramo);
+ goto IL_01fc;
+ IL_01fc:
+ ((Window)new HosterWindow((ContentControl)(object)control, "CADASTRO DE CLIENTES - " + ViewModel.SelectedDocumento.Controle.Cliente.Nome)).ShowDialog();
+ await ViewModel.SelecionaItens(((DomainBase)ViewModel.SelectedDocumento.Controle).Id);
+ return;
+ IL_00f9:
+ control = (UserControl)(object)new AutoView(null, lockInsert: true, substituir: false, null, val2, ViewModel.SelectedDocumento.Controle.Ramo);
+ goto IL_01fc;
+ IL_0120:
+ control = (UserControl)(object)new PatrimonialView(null, lockInsert: true, substituir: false, null, val2, ViewModel.SelectedDocumento.Controle.Ramo);
+ goto IL_01fc;
+ }
+
+ private async void Perfil_OnClick(object sender, RoutedEventArgs e)
+ {
+ PerfilView perfilView = new PerfilView(ViewModel.SelectedDocumento.Controle);
+ if (await ViewModel.VerificarPermissao((TipoTela)32))
+ {
+ ((Window)new HosterWindow((ContentControl)(object)perfilView, "PERFIL", 800.0, 370.0)).ShowDialog();
+ }
+ }
+
+ private void Tarefa_OnClick(object sender, RoutedEventArgs e)
+ {
+ //IL_0000: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0005: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0025: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0045: Unknown result type (might be due to invalid IL or missing references)
+ //IL_004c: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0062: Unknown result type (might be due to invalid IL or missing references)
+ //IL_009d: Expected O, but got Unknown
+ Tarefa tarefa = new Tarefa
+ {
+ IdCliente = ((DomainBase)ViewModel.SelectedDocumento.Controle.Cliente).Id,
+ Cliente = ViewModel.SelectedDocumento.Controle.Cliente.Nome,
+ Entidade = (TipoTarefa)0,
+ IdEntidade = ((DomainBase)ViewModel.SelectedDocumento).Id,
+ Titulo = ViewModel.SelectedDocumento.Controle.Cliente.Nome + " APÓLICE " + ViewModel.SelectedDocumento.Apolice
+ };
+ ViewModel.ShowDrawer(new TarefaDrawer(tarefa), 0, close: false);
+ }
+
+ private void Pesquisa_OnPreviewKeyDown(object sender, KeyEventArgs e)
+ {
+ //IL_0001: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0007: Invalid comparison between Unknown and I4
+ if ((int)e.Key == 6)
+ {
+ ViewModel.AdcionarFiltro();
+ }
+ }
+
+ private void AdicionarFiltro_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.AdcionarFiltro();
+ }
+
+ private void ExcluirFiltro_OnClick(object sender, RoutedEventArgs e)
+ {
+ Chip val = (Chip)((sender is Chip) ? sender : null);
+ if (val != null)
+ {
+ ListBox val2 = Extentions.FindVisualAncestor<ListBox>((DependencyObject)(object)val);
+ string text = (string)((ItemsControl)val2).Items[((CollectionView)((ItemsControl)val2).Items).IndexOf(((FrameworkElement)val).DataContext)];
+ if (text != null)
+ {
+ ViewModel.PesquisaCritica.Remove(text);
+ ViewModel.Pesquisar();
+ }
+ }
+ }
+
+ private async void Atualizar_OnClick(object sender, RoutedEventArgs e)
+ {
+ await ViewModel.CarregaCritica(((DomainBase)ViewModel.SelectedUsuario).Id, ((DomainBase)ViewModel.SelectedSeguradora).Id, ViewModel.Criticado);
+ }
+
+ private async void Alterar_OnClick(object sender, RoutedEventArgs e)
+ {
+ ViewModel.Alterar(alterar: true);
+ ViewModel.EnableGrid = false;
+ if (Recursos.Configuracoes.Any((ConfiguracaoSistema x) => (int)x.Configuracao == 3))
+ {
+ ((Selector)SituacaoBox).SelectedIndex = -1;
+ }
+ await ViewModel.SelecionaCritica(ViewModel.SelectedCritica);
+ ValidarDocumento();
+ }
+
+ private async void Cancelar_OnClick(object sender, RoutedEventArgs e)
+ {
+ if (ViewModel.Repasses.Where((VendedorParcela repasse) => !repasse.Vendedor.Corretora).Any())
+ {
+ await ViewModel.ShowMessage("PARA CANCELAR AS ALTERAÇÕES É NECESSÁRIO REMOVER OS VENDEDORES COM REPASSE CONFIGURADO.");
+ }
+ else if ((!ViewModel.HasChange && (ViewModel.SelectedDocumento == null || !((DomainBase)ViewModel.SelectedDocumento).HasChange()) && (ViewModel.SelectedCliente == null || !((DomainBase)ViewModel.SelectedCliente).HasChange()) && (ViewModel.Telefones == null || !ViewModel.Telefones.Any((ClienteTelefone x) => ((DomainBase)x).HasChange()))) || await ViewModel.ShowMessage("HÁ ALTERAÇÕES PENDENTES AINDA NÃO SALVAS, DESEJA CONTINUAR? " + Environment.NewLine + "O PROCEDIMENTO IRÁ CANCELAR AS ALTERAÇÕES REALIZADAS.", "SIM", "NÃO"))
+ {
+ await ViewModel.SelecionaCritica(ViewModel.SelectedCritica);
+ ViewModel.Alterar(alterar: false);
+ ViewModel.EnableGrid = true;
+ }
+ }
+
+ private void Initial_DatePicker_OnLostKeyboardFocus(object sender, KeyboardFocusChangedEventArgs e)
+ {
+ DatePicker_OnLostKeyboardFocus(sender, e);
+ if (string.IsNullOrEmpty(Vigencia1Box.Text))
+ {
+ Vigencia1Box.SelectedDate = DateTime.MinValue;
+ ViewModel.SelectedDocumento.Vigencia1 = DateTime.MinValue;
+ }
+ if (string.IsNullOrWhiteSpace(Vigencia2Box.Text))
+ {
+ Vigencia2Box.DisplayDate = ValidationHelper.ToDateTime(Vigencia1Box.Text).AddYears(1);
+ Vigencia2Box.Text = Vigencia2Box.DisplayDate.ToShortDateString();
+ }
+ }
+
+ private async void Grid_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ if (ViewModel.EnableGrid)
+ {
+ DataGrid val = (DataGrid)sender;
+ if (val != null && ((Selector)val).SelectedIndex >= 0)
+ {
+ ViewModel.EnableGrid = false;
+ ViewModel.Index = ((Selector)val).SelectedIndex;
+ await ViewModel.SelecionaCritica((CriticaApolice)((ItemsControl)val).Items[((Selector)val).SelectedIndex]);
+ ViewModel.EnableGrid = true;
+ }
+ }
+ }
+
+ private void DocumentoPrincipalBox_LostFocus(object sender, RoutedEventArgs e)
+ {
+ //IL_0001: Unknown result type (might be due to invalid IL or missing references)
+ if (!((TextBoxBase)(TextBox)sender).IsReadOnly)
+ {
+ string text = ValidationHelper.Clear(DocumentoPrincipalBox.Text);
+ if (!string.IsNullOrEmpty(text))
+ {
+ DocumentoPrincipalBox.Text = ((text.Length == 11) ? ValidationHelper.FormatDocument(text.PadLeft(11, '0').Substring(0, 11)) : ValidationHelper.FormatDocument(text.PadLeft(14, '0').Substring(0, 14)));
+ ViewModel.JuridicaouFisica(DocumentoPrincipalBox.Text);
+ }
+ }
+ }
+
+ private void OrdemBox_OnLostFocus(object sender, RoutedEventArgs e)
+ {
+ //IL_0064: Unknown result type (might be due to invalid IL or missing references)
+ //IL_006e: Expected O, but got Unknown
+ //IL_0083: Unknown result type (might be due to invalid IL or missing references)
+ //IL_008a: Expected O, but got Unknown
+ TextBox val = (TextBox)((sender is TextBox) ? sender : null);
+ if (val == null || ((TextBoxBase)val).IsReadOnly || !int.TryParse(val.Text, out var result))
+ {
+ return;
+ }
+ WrapPanel val2 = Extentions.FindVisualAncestor<WrapPanel>((DependencyObject)(object)Extentions.FindVisualAncestor<CustomItemValidation>((DependencyObject)(object)val));
+ ListBox val3 = Extentions.FindVisualAncestor<ListBox>((DependencyObject)(object)val2);
+ if (val3 == null)
+ {
+ return;
+ }
+ for (int i = 0; i < ((CollectionView)((ItemsControl)val3).Items).Count; i++)
+ {
+ if (i != ((CollectionView)((ItemsControl)val3).Items).IndexOf(((FrameworkElement)val2).DataContext))
+ {
+ ContentPresenter val4 = FindVisualChild.Find<ContentPresenter>((DependencyObject)(ListBoxItem)((ItemsControl)val3).ItemContainerGenerator.ContainerFromIndex(i));
+ TextBox val5 = (TextBox)((FrameworkTemplate)val4.ContentTemplate).FindName("OrdemBox", (FrameworkElement)(object)val4);
+ if (int.TryParse(val5.Text, out var result2) && result2 == result)
+ {
+ val5.Text = Ordem.ToString();
+ }
+ }
+ }
+ }
+
+ private void TipoComboBox_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ //IL_0001: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0007: Expected O, but got Unknown
+ //IL_003c: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0046: Expected O, but got Unknown
+ //IL_009d: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00a3: Invalid comparison between Unknown and I4
+ ComboBox val = (ComboBox)sender;
+ CustomIsReadOnlyControl customIsReadOnlyControl = Extentions.FindVisualAncestor<CustomIsReadOnlyControl>((DependencyObject)(object)val);
+ if (customIsReadOnlyControl == null)
+ {
+ return;
+ }
+ WrapPanel val2 = Extentions.FindVisualAncestor<WrapPanel>((DependencyObject)(object)customIsReadOnlyControl);
+ ListBox val3 = Extentions.FindVisualAncestor<ListBox>((DependencyObject)(object)val2);
+ ContentPresenter val4 = FindVisualChild.Find<ContentPresenter>((DependencyObject)(ListBoxItem)((ItemsControl)val3).ItemContainerGenerator.ContainerFromIndex(((CollectionView)((ItemsControl)val3).Items).IndexOf(((FrameworkElement)val2).DataContext)));
+ DataTemplate contentTemplate = val4.ContentTemplate;
+ CustomItemValidation customItemValidation = (CustomItemValidation)((FrameworkTemplate)contentTemplate).FindName("Prefixo", (FrameworkElement)(object)val4);
+ CustomItemValidation depObj = (CustomItemValidation)((FrameworkTemplate)contentTemplate).FindName("Telefone", (FrameworkElement)(object)val4);
+ TextBox? obj = ((DependencyObject)(object)customItemValidation).FindChildren<TextBox>().FirstOrDefault();
+ TextBox val5 = ((DependencyObject)(object)depObj).FindChildren<TextBox>().FirstOrDefault();
+ if (obj != null && val5 != null)
+ {
+ if ((int)(TipoTelefone)((Selector)val).SelectedValue != 8)
+ {
+ ((UIElement)customItemValidation).Visibility = (Visibility)0;
+ val5.MaxLength = 10;
+ int length = ((val5.Text.Length >= 10) ? 10 : val5.Text.Length);
+ val5.Text = val5.Text.Substring(0, length);
+ }
+ else
+ {
+ ((UIElement)customItemValidation).Visibility = (Visibility)2;
+ val5.MaxLength = 20;
+ }
+ }
+ }
+
+ private void SituacaoBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ //IL_0001: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0007: Expected O, but got Unknown
+ ComboBox val = (ComboBox)sender;
+ if (ViewModel.EnableFields)
+ {
+ ViewModel.StatusDocumento = (TipoSeguro?)((Selector)val).SelectedItem;
+ }
+ }
+
+ private void AdicionarCoCorretagem_OnClick(object sender, RoutedEventArgs e)
+ {
+ //IL_0001: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0006: Unknown result type (might be due to invalid IL or missing references)
+ ToggleButton val = (ToggleButton)sender;
+ bool flag = (int)val != 0 && val.IsChecked.GetValueOrDefault();
+ ComboBox comissaoNovoComboBox = ComissaoNovoComboBox;
+ if (((comissaoNovoComboBox != null) ? ((Selector)comissaoNovoComboBox).SelectedItem : null) != null)
+ {
+ ((Selector)ComissaoNovoComboBox).SelectedItem = null;
+ }
+ if (flag)
+ {
+ ((Selector)TipoVendedorBox).SelectedIndex = 0;
+ }
+ else if (((Selector)TipoVendedorBox).SelectedItem != null)
+ {
+ ((Selector)TipoVendedorBox).SelectedItem = null;
+ }
+ ComboBox vendedorBox = VendedorBox;
+ if (((vendedorBox != null) ? ((Selector)vendedorBox).SelectedItem : null) != null)
+ {
+ ((Selector)VendedorBox).SelectedItem = null;
+ }
+ if (ValidationHelper.IsNotNullOrEmpty(((TextBox)ValorRepasseBox).Text))
+ {
+ ((TextBox)ValorRepasseBox).Text = "";
+ }
+ ViewModel.VendedorCoCorretagem(flag);
+ }
+
+ [DebuggerNonUserCode]
+ [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
+ public void InitializeComponent()
+ {
+ if (!_contentLoaded)
+ {
+ _contentLoaded = true;
+ Uri uri = new Uri("/Gestor.Application;component/views/seguros/criticaapoliceview.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_012b: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0135: Expected O, but got Unknown
+ //IL_0138: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0142: Expected O, but got Unknown
+ //IL_0145: Unknown result type (might be due to invalid IL or missing references)
+ //IL_014f: Expected O, but got Unknown
+ //IL_015c: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0166: Expected O, but got Unknown
+ //IL_0173: Unknown result type (might be due to invalid IL or missing references)
+ //IL_017d: Expected O, but got Unknown
+ //IL_018a: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0194: Expected O, but got Unknown
+ //IL_0197: Unknown result type (might be due to invalid IL or missing references)
+ //IL_01a1: Expected O, but got Unknown
+ //IL_01ae: Unknown result type (might be due to invalid IL or missing references)
+ //IL_01b8: Expected O, but got Unknown
+ //IL_01c5: Unknown result type (might be due to invalid IL or missing references)
+ //IL_01cf: Expected O, but got Unknown
+ //IL_01dc: Unknown result type (might be due to invalid IL or missing references)
+ //IL_01e6: Expected O, but got Unknown
+ //IL_01e9: Unknown result type (might be due to invalid IL or missing references)
+ //IL_01f3: Expected O, but got Unknown
+ //IL_01f5: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0201: Unknown result type (might be due to invalid IL or missing references)
+ //IL_020b: Expected O, but got Unknown
+ //IL_020d: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0219: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0223: Expected O, but got Unknown
+ //IL_0225: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0231: Unknown result type (might be due to invalid IL or missing references)
+ //IL_023b: Expected O, but got Unknown
+ //IL_023e: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0248: Expected O, but got Unknown
+ //IL_024a: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0256: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0260: Expected O, but got Unknown
+ //IL_0263: Unknown result type (might be due to invalid IL or missing references)
+ //IL_026d: Expected O, but got Unknown
+ //IL_027a: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0284: Expected O, but got Unknown
+ //IL_0287: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0291: Expected O, but got Unknown
+ //IL_029e: Unknown result type (might be due to invalid IL or missing references)
+ //IL_02a8: Expected O, but got Unknown
+ //IL_02aa: Unknown result type (might be due to invalid IL or missing references)
+ //IL_02b6: Unknown result type (might be due to invalid IL or missing references)
+ //IL_02c0: Expected O, but got Unknown
+ //IL_02c2: Unknown result type (might be due to invalid IL or missing references)
+ //IL_02ce: Unknown result type (might be due to invalid IL or missing references)
+ //IL_02d8: Expected O, but got Unknown
+ //IL_02da: Unknown result type (might be due to invalid IL or missing references)
+ //IL_02e6: Unknown result type (might be due to invalid IL or missing references)
+ //IL_02f0: Expected O, but got Unknown
+ //IL_02f2: Unknown result type (might be due to invalid IL or missing references)
+ //IL_02fe: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0308: Expected O, but got Unknown
+ //IL_030a: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0316: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0320: Expected O, but got Unknown
+ //IL_0323: Unknown result type (might be due to invalid IL or missing references)
+ //IL_032d: Expected O, but got Unknown
+ //IL_0330: Unknown result type (might be due to invalid IL or missing references)
+ //IL_033a: Expected O, but got Unknown
+ //IL_033d: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0347: Expected O, but got Unknown
+ //IL_0354: Unknown result type (might be due to invalid IL or missing references)
+ //IL_035e: Expected O, but got Unknown
+ //IL_0361: Unknown result type (might be due to invalid IL or missing references)
+ //IL_036b: Expected O, but got Unknown
+ //IL_0378: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0382: Expected O, but got Unknown
+ //IL_038f: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0399: Expected O, but got Unknown
+ //IL_039c: Unknown result type (might be due to invalid IL or missing references)
+ //IL_03a6: Expected O, but got Unknown
+ //IL_03a9: Unknown result type (might be due to invalid IL or missing references)
+ //IL_03b3: Expected O, but got Unknown
+ //IL_03b6: Unknown result type (might be due to invalid IL or missing references)
+ //IL_03c0: Expected O, but got Unknown
+ //IL_03cd: Unknown result type (might be due to invalid IL or missing references)
+ //IL_03d7: Expected O, but got Unknown
+ //IL_03e4: Unknown result type (might be due to invalid IL or missing references)
+ //IL_03ee: Expected O, but got Unknown
+ //IL_03f1: Unknown result type (might be due to invalid IL or missing references)
+ //IL_03fb: Expected O, but got Unknown
+ //IL_0408: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0412: Expected O, but got Unknown
+ //IL_041f: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0429: Expected O, but got Unknown
+ //IL_042c: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0436: Expected O, but got Unknown
+ //IL_0443: Unknown result type (might be due to invalid IL or missing references)
+ //IL_044d: Expected O, but got Unknown
+ //IL_045a: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0464: Expected O, but got Unknown
+ //IL_0467: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0471: Expected O, but got Unknown
+ //IL_0481: Unknown result type (might be due to invalid IL or missing references)
+ //IL_048b: Expected O, but got Unknown
+ //IL_048e: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0498: Expected O, but got Unknown
+ //IL_049b: Unknown result type (might be due to invalid IL or missing references)
+ //IL_04a5: Expected O, but got Unknown
+ //IL_04a8: Unknown result type (might be due to invalid IL or missing references)
+ //IL_04b2: Expected O, but got Unknown
+ //IL_04b5: Unknown result type (might be due to invalid IL or missing references)
+ //IL_04bf: Expected O, but got Unknown
+ //IL_04c2: Unknown result type (might be due to invalid IL or missing references)
+ //IL_04cc: Expected O, but got Unknown
+ //IL_04cf: Unknown result type (might be due to invalid IL or missing references)
+ //IL_04d9: Expected O, but got Unknown
+ //IL_04dc: Unknown result type (might be due to invalid IL or missing references)
+ //IL_04e6: Expected O, but got Unknown
+ //IL_04e9: Unknown result type (might be due to invalid IL or missing references)
+ //IL_04f3: Expected O, but got Unknown
+ //IL_0500: Unknown result type (might be due to invalid IL or missing references)
+ //IL_050a: Expected O, but got Unknown
+ //IL_050d: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0517: Expected O, but got Unknown
+ //IL_0524: Unknown result type (might be due to invalid IL or missing references)
+ //IL_052e: Expected O, but got Unknown
+ //IL_0531: Unknown result type (might be due to invalid IL or missing references)
+ //IL_053b: Expected O, but got Unknown
+ //IL_0548: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0552: Expected O, but got Unknown
+ //IL_0555: Unknown result type (might be due to invalid IL or missing references)
+ //IL_055f: Expected O, but got Unknown
+ //IL_0562: Unknown result type (might be due to invalid IL or missing references)
+ //IL_056c: Expected O, but got Unknown
+ //IL_0579: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0583: Expected O, but got Unknown
+ //IL_0586: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0590: Expected O, but got Unknown
+ //IL_0593: Unknown result type (might be due to invalid IL or missing references)
+ //IL_059d: Expected O, but got Unknown
+ //IL_05ad: Unknown result type (might be due to invalid IL or missing references)
+ //IL_05b7: Expected O, but got Unknown
+ //IL_05c4: Unknown result type (might be due to invalid IL or missing references)
+ //IL_05ce: Expected O, but got Unknown
+ //IL_05de: Unknown result type (might be due to invalid IL or missing references)
+ //IL_05e8: Expected O, but got Unknown
+ //IL_05f5: Unknown result type (might be due to invalid IL or missing references)
+ //IL_05ff: Expected O, but got Unknown
+ //IL_0602: Unknown result type (might be due to invalid IL or missing references)
+ //IL_060c: Expected O, but got Unknown
+ //IL_060f: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0619: Expected O, but got Unknown
+ //IL_061c: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0626: Expected O, but got Unknown
+ //IL_0629: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0633: Expected O, but got Unknown
+ //IL_0636: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0640: Expected O, but got Unknown
+ //IL_0643: Unknown result type (might be due to invalid IL or missing references)
+ //IL_064d: Expected O, but got Unknown
+ //IL_0650: Unknown result type (might be due to invalid IL or missing references)
+ //IL_065a: Expected O, but got Unknown
+ //IL_0668: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0672: Expected O, but got Unknown
+ //IL_067f: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0689: Expected O, but got Unknown
+ //IL_068c: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0696: Expected O, but got Unknown
+ //IL_06a3: Unknown result type (might be due to invalid IL or missing references)
+ //IL_06ad: Expected O, but got Unknown
+ //IL_06ba: Unknown result type (might be due to invalid IL or missing references)
+ //IL_06c4: Expected O, but got Unknown
+ //IL_06c7: Unknown result type (might be due to invalid IL or missing references)
+ //IL_06d1: Expected O, but got Unknown
+ //IL_06d4: Unknown result type (might be due to invalid IL or missing references)
+ //IL_06de: Expected O, but got Unknown
+ //IL_06e1: Unknown result type (might be due to invalid IL or missing references)
+ //IL_06eb: Expected O, but got Unknown
+ //IL_06ed: Unknown result type (might be due to invalid IL or missing references)
+ //IL_06f9: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0703: Expected O, but got Unknown
+ //IL_0704: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0710: Unknown result type (might be due to invalid IL or missing references)
+ //IL_071a: Expected O, but got Unknown
+ //IL_071b: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0727: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0731: Expected O, but got Unknown
+ //IL_0732: Unknown result type (might be due to invalid IL or missing references)
+ //IL_073e: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0748: Expected O, but got Unknown
+ //IL_074b: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0755: Expected O, but got Unknown
+ //IL_0758: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0762: Expected O, but got Unknown
+ //IL_0765: Unknown result type (might be due to invalid IL or missing references)
+ //IL_076f: Expected O, but got Unknown
+ switch (connectionId)
+ {
+ case 1:
+ UsuarioBox = (ComboBox)target;
+ break;
+ case 2:
+ SeguradoraBox = (ComboBox)target;
+ break;
+ case 3:
+ InicioBox = (DatePicker)target;
+ ((UIElement)InicioBox).LostKeyboardFocus += new KeyboardFocusChangedEventHandler(base.DatePicker_OnLostKeyboardFocus);
+ ((UIElement)InicioBox).PreviewKeyDown += new KeyEventHandler(base.DatePicker_PreviewKeyDown);
+ ((Control)InicioBox).MouseDoubleClick += new MouseButtonEventHandler(base.DataAtual_OnDoubleClick);
+ break;
+ case 4:
+ FimBox = (DatePicker)target;
+ ((UIElement)FimBox).LostKeyboardFocus += new KeyboardFocusChangedEventHandler(base.DatePicker_OnLostKeyboardFocus);
+ ((UIElement)FimBox).PreviewKeyDown += new KeyEventHandler(base.DatePicker_PreviewKeyDown);
+ ((Control)FimBox).MouseDoubleClick += new MouseButtonEventHandler(base.DataAtual_OnDoubleClick);
+ break;
+ case 5:
+ CriticadoBox = (ToggleButton)target;
+ break;
+ case 6:
+ ((ButtonBase)(Button)target).Click += new RoutedEventHandler(Atualizar_OnClick);
+ break;
+ case 7:
+ ((UIElement)(TextBox)target).PreviewKeyDown += new KeyEventHandler(Pesquisa_OnPreviewKeyDown);
+ break;
+ case 8:
+ ((ButtonBase)(Button)target).Click += new RoutedEventHandler(AdicionarFiltro_OnClick);
+ break;
+ case 10:
+ CriticaGrid = (DataGrid)target;
+ break;
+ case 11:
+ ((MenuItem)target).Click += new RoutedEventHandler(Alterar_OnClick);
+ break;
+ case 12:
+ ConcluirCriticaButton = (MenuItem)target;
+ ConcluirCriticaButton.Click += new RoutedEventHandler(ConcluirCritica_OnClick);
+ break;
+ case 13:
+ CancelarDocumento = (MenuItem)target;
+ CancelarDocumento.Click += new RoutedEventHandler(Cancelar_OnClick);
+ break;
+ case 14:
+ ((MenuItem)target).Click += new RoutedEventHandler(Cliente_OnClick);
+ break;
+ case 15:
+ ((MenuItem)target).Click += new RoutedEventHandler(Apolice_OnClick);
+ break;
+ case 16:
+ ((MenuItem)target).Click += new RoutedEventHandler(Tarefa_OnClick);
+ break;
+ case 17:
+ ((MenuItem)target).Click += new RoutedEventHandler(Perfil_OnClick);
+ break;
+ case 18:
+ ((MenuItem)target).Click += new RoutedEventHandler(AbrirAquivoDigital_Click);
+ break;
+ case 19:
+ ProdutoBox = (ComboBox)target;
+ break;
+ case 20:
+ NegocioCorretoraBox = (ComboBox)target;
+ break;
+ case 21:
+ SituacaoBox = (ComboBox)target;
+ ((Selector)SituacaoBox).SelectionChanged += new SelectionChangedEventHandler(SituacaoBox_SelectionChanged);
+ break;
+ case 22:
+ TransmissaoBox = (DatePicker)target;
+ ((UIElement)TransmissaoBox).LostKeyboardFocus += new KeyboardFocusChangedEventHandler(base.DatePicker_OnLostKeyboardFocus);
+ ((Control)TransmissaoBox).MouseDoubleClick += new MouseButtonEventHandler(base.DataAtual_OnDoubleClick);
+ break;
+ case 23:
+ ApoliceBox = (TextBox)target;
+ break;
+ case 24:
+ EndossoBox = (TextBox)target;
+ break;
+ case 25:
+ EmissaoBox = (DatePicker)target;
+ ((UIElement)EmissaoBox).LostKeyboardFocus += new KeyboardFocusChangedEventHandler(base.DatePicker_OnLostKeyboardFocus);
+ ((Control)EmissaoBox).MouseDoubleClick += new MouseButtonEventHandler(base.DataAtual_OnDoubleClick);
+ break;
+ case 26:
+ Vigencia1Box = (DatePicker)target;
+ ((UIElement)Vigencia1Box).LostKeyboardFocus += new KeyboardFocusChangedEventHandler(Initial_DatePicker_OnLostKeyboardFocus);
+ ((Control)Vigencia1Box).MouseDoubleClick += new MouseButtonEventHandler(base.DataAtual_OnDoubleClick);
+ break;
+ case 27:
+ Vigencia2Box = (DatePicker)target;
+ ((UIElement)Vigencia2Box).LostKeyboardFocus += new KeyboardFocusChangedEventHandler(base.DatePicker_OnLostKeyboardFocus);
+ ((Control)Vigencia2Box).MouseDoubleClick += new MouseButtonEventHandler(base.DataAtual_OnDoubleClick);
+ break;
+ case 28:
+ AdicionalBox = (ToggleButton)target;
+ break;
+ case 29:
+ Comissao = (CustomIsReadOnlyControl)target;
+ break;
+ case 30:
+ ComissaoBox = (CurrencyTextBox)target;
+ break;
+ case 31:
+ PremioLiquidoBox = (CurrencyTextBox)target;
+ break;
+ case 32:
+ PremioAdicionalBox = (CurrencyTextBox)target;
+ break;
+ case 33:
+ IofBox = (CurrencyTextBox)target;
+ break;
+ case 34:
+ DiferencaBox = (CurrencyTextBox)target;
+ break;
+ case 35:
+ PremioTotalBox = (CurrencyTextBox)target;
+ break;
+ case 36:
+ ParcelasBox = (CurrencyTextBox)target;
+ break;
+ case 37:
+ SeguroCombinadoBox = (ToggleButton)target;
+ break;
+ case 38:
+ EditarVendedorButton = (MenuItem)target;
+ EditarVendedorButton.Click += new RoutedEventHandler(EditarVendedorButton_OnClick);
+ break;
+ case 39:
+ SalvarVendedorButton = (MenuItem)target;
+ SalvarVendedorButton.Click += new RoutedEventHandler(SalvarVendedor_Click);
+ break;
+ case 40:
+ CancelarVendedorButton = (MenuItem)target;
+ CancelarVendedorButton.Click += new RoutedEventHandler(CancelarVendedor_Click);
+ break;
+ case 41:
+ VendedorFields = (WrapPanel)target;
+ break;
+ case 42:
+ CoCorretagemToogle = (ToggleButton)target;
+ ((ButtonBase)CoCorretagemToogle).Click += new RoutedEventHandler(AdicionarCoCorretagem_OnClick);
+ break;
+ case 43:
+ TipoVendedorBox = (ComboBox)target;
+ break;
+ case 44:
+ VendedorBox = (ComboBox)target;
+ break;
+ case 45:
+ ComissaoNovoBox = (CustomItemValidation)target;
+ break;
+ case 46:
+ ComissaoNovoComboBox = (ComboBox)target;
+ ((Selector)ComissaoNovoComboBox).SelectionChanged += new SelectionChangedEventHandler(ComissaoVendedorBox_OnSelectionChanged);
+ break;
+ case 47:
+ ComissaoRenovacaoBox = (CustomItemValidation)target;
+ break;
+ case 48:
+ ComissaoRenovacaoComboBox = (ComboBox)target;
+ ((Selector)ComissaoRenovacaoComboBox).SelectionChanged += new SelectionChangedEventHandler(ComissaoVendedorBox_OnSelectionChanged);
+ break;
+ case 49:
+ ValorRepasseBox = (CurrencyTextBox)target;
+ break;
+ case 50:
+ FormaRecebidaBox = (TextBox)target;
+ break;
+ case 51:
+ VendedorGrid = (DataGrid)target;
+ break;
+ case 52:
+ RepasseVendedor = (DataGridTextColumn)target;
+ break;
+ case 54:
+ NomeBox = (TextBox)target;
+ break;
+ case 55:
+ TipoDocumentoPrincipalBox = (ComboBox)target;
+ break;
+ case 56:
+ DocumentoPrincipalBox = (TextBox)target;
+ ((UIElement)DocumentoPrincipalBox).PreviewTextInput += new TextCompositionEventHandler(SomenteNumeros);
+ ((UIElement)DocumentoPrincipalBox).LostFocus += new RoutedEventHandler(DocumentoPrincipalBox_LostFocus);
+ break;
+ case 57:
+ NascimentoBox = (DatePicker)target;
+ ((UIElement)NascimentoBox).LostKeyboardFocus += new KeyboardFocusChangedEventHandler(base.DatePicker_OnLostKeyboardFocus);
+ ((Control)NascimentoBox).MouseDoubleClick += new MouseButtonEventHandler(base.DataAtual_OnDoubleClick);
+ break;
+ case 58:
+ IdentidadeBox = (TextBox)target;
+ break;
+ case 59:
+ EmissorBox = (TextBox)target;
+ break;
+ case 60:
+ EstadoEmissorBox = (TextBox)target;
+ break;
+ case 61:
+ ((UIElement)(DatePicker)target).LostKeyboardFocus += new KeyboardFocusChangedEventHandler(base.DatePicker_OnLostKeyboardFocus);
+ ((UIElement)(DatePicker)target).PreviewKeyDown += new KeyEventHandler(base.DatePicker_PreviewKeyDown);
+ ((Control)(DatePicker)target).MouseDoubleClick += new MouseButtonEventHandler(base.DataAtual_OnDoubleClick);
+ ((UIElement)(DatePicker)target).PreviewTextInput += new TextCompositionEventHandler(base.SomenteData);
+ break;
+ case 62:
+ TelefoneListBox = (ListBox)target;
+ break;
+ case 68:
+ EmailListBox = (ListBox)target;
+ break;
+ case 71:
+ ItemGrid = (DataGrid)target;
+ break;
+ default:
+ _contentLoaded = true;
+ break;
+ }
+ }
+
+ [DebuggerNonUserCode]
+ [GeneratedCode("PresentationBuildTasks", "4.0.0.0")]
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ void IStyleConnector.Connect(int connectionId, object target)
+ {
+ //IL_003d: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0049: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0053: Expected O, but got Unknown
+ //IL_0055: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0061: Unknown result type (might be due to invalid IL or missing references)
+ //IL_006b: Expected O, but got Unknown
+ //IL_006d: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0079: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0083: Expected O, but got Unknown
+ //IL_0085: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0092: Unknown result type (might be due to invalid IL or missing references)
+ //IL_009c: Expected O, but got Unknown
+ //IL_009e: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00ab: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00b5: Expected O, but got Unknown
+ //IL_00b6: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00c3: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00cd: Expected O, but got Unknown
+ //IL_00cf: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00db: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00e5: Expected O, but got Unknown
+ //IL_00e6: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00f2: Unknown result type (might be due to invalid IL or missing references)
+ //IL_00fc: Expected O, but got Unknown
+ //IL_00fd: Unknown result type (might be due to invalid IL or missing references)
+ //IL_010a: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0114: Expected O, but got Unknown
+ //IL_0116: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0122: Unknown result type (might be due to invalid IL or missing references)
+ //IL_012c: Expected O, but got Unknown
+ //IL_012e: Unknown result type (might be due to invalid IL or missing references)
+ //IL_013a: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0144: Expected O, but got Unknown
+ //IL_0145: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0151: Unknown result type (might be due to invalid IL or missing references)
+ //IL_015b: Expected O, but got Unknown
+ //IL_015c: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0169: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0173: Expected O, but got Unknown
+ //IL_0175: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0181: Unknown result type (might be due to invalid IL or missing references)
+ //IL_018b: Expected O, but got Unknown
+ //IL_018d: Unknown result type (might be due to invalid IL or missing references)
+ //IL_0199: Unknown result type (might be due to invalid IL or missing references)
+ //IL_01a3: Expected O, but got Unknown
+ switch (connectionId)
+ {
+ case 9:
+ ((Chip)target).DeleteClick += new RoutedEventHandler(ExcluirFiltro_OnClick);
+ break;
+ case 53:
+ ((ButtonBase)(Button)target).Click += new RoutedEventHandler(ExcluirVendedor_OnClick);
+ break;
+ case 63:
+ ((Selector)(ComboBox)target).SelectionChanged += new SelectionChangedEventHandler(TipoComboBox_OnSelectionChanged);
+ break;
+ case 64:
+ ((UIElement)(TextBox)target).PreviewTextInput += new TextCompositionEventHandler(SomenteNumeros);
+ break;
+ case 65:
+ ((UIElement)(TextBox)target).LostFocus += new RoutedEventHandler(FormatarTelefone);
+ ((UIElement)(TextBox)target).PreviewTextInput += new TextCompositionEventHandler(SomenteNumeros);
+ break;
+ case 66:
+ ((UIElement)(TextBox)target).PreviewGotKeyboardFocus += new KeyboardFocusChangedEventHandler(OrdemBox_OnPreviewGotKeyboardFocus);
+ ((UIElement)(TextBox)target).LostFocus += new RoutedEventHandler(OrdemBox_OnLostFocus);
+ ((UIElement)(TextBox)target).PreviewTextInput += new TextCompositionEventHandler(SomenteNumeros);
+ break;
+ case 67:
+ ((ButtonBase)(Button)target).Click += new RoutedEventHandler(ExcluirTelefone_OnClick);
+ break;
+ case 69:
+ ((UIElement)(TextBox)target).PreviewGotKeyboardFocus += new KeyboardFocusChangedEventHandler(OrdemBox_OnPreviewGotKeyboardFocus);
+ ((UIElement)(TextBox)target).LostFocus += new RoutedEventHandler(OrdemBox_OnLostFocus);
+ ((UIElement)(TextBox)target).PreviewTextInput += new TextCompositionEventHandler(SomenteNumeros);
+ break;
+ case 70:
+ ((ButtonBase)(Button)target).Click += new RoutedEventHandler(ExcluirEmail_OnClick);
+ break;
+ case 72:
+ ((ButtonBase)(Button)target).Click += new RoutedEventHandler(Item_Click);
+ break;
+ }
+ }
+}