using System; using System.CodeDom.Compiler; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; using System.ComponentModel; using System.Diagnostics; using System.Linq; using System.Text.RegularExpressions; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Controls.Primitives; using System.Windows.Input; using System.Windows.Markup; using System.Windows.Threading; using CurrencyTextBoxControl; using Gestor.Application.Actions; using Gestor.Application.Componentes; using Gestor.Application.Drawers; using Gestor.Application.Helpers; using Gestor.Application.Servicos; using Gestor.Application.Servicos.Seguros; using Gestor.Application.Servicos.Seguros.Itens; using Gestor.Application.ViewModels.Seguros; using Gestor.Application.Views.Generic; using Gestor.Common.Validation; using Gestor.Model.Common; using Gestor.Model.Domain.Common; using Gestor.Model.Domain.Configuracoes; using Gestor.Model.Domain.Ferramentas; using Gestor.Model.Domain.Generic; using Gestor.Model.Domain.Seguros; namespace Gestor.Application.Views.Seguros; public class ApoliceView : BaseUserControl, IComponentConnector, IStyleConnector { private string _vencimentoCartaoOld = ""; private bool _calculando; internal DockPanel MenuApolice; internal MenuItem IncluirpoliceButton; internal MenuItem AlterarApoliceButton; internal MenuItem SalvarApoliceButton; internal MenuItem CancelarApoliceButton; internal MenuItem ExcluirpoliceButton; internal Button ButtonImportado; internal MenuItem ArquivoDigitalButton; internal MenuItem MaisOpcoesButton; internal MenuItem EditarParcelasButton; internal WrapPanel ApoliceControl1; internal ComboBox ProdutoBox; internal ComboBox SituacaoBox; internal ComboBox NegocioCorretoraBox; internal ComboBox TipoRecebimentoBox; internal ComboBox TipoEndossoBox; internal TextBox ApoliceBox; internal TextBox EndossoBox; internal DatePicker Vigencia2Box; internal DatePicker TransmissaoBox; internal DatePicker EmissaoBox; internal ComboBox FormaPagamentoBox; internal Grid PremiosBox; 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 CustomIsReadOnlyControl ComissaoOriginal; internal CustomIsReadOnlyControl Gerada; internal CustomIsReadOnlyControl Recebida; internal CustomIsReadOnlyControl Pendente; internal CustomIsReadOnlyControl Repasse; internal Menu BaixarParcelaButton; internal Menu SalvarParcelaButton; internal StackPanel EditarParcelasFields; internal CustomItemValidation TipoParcelaField; internal ComboBox TipoParcelaBox; internal CustomItemControl QuantidadeFaturaField; internal CurrencyTextBox QuantidadeFaturaBox; internal CustomItemValidation FaturaField; internal TextBox FaturaBox; internal CustomItemValidation VigenciaInicialField; internal CustomItemValidation VigenciaFinalField; internal DatePicker VigenciaFinalParcelaBox; internal CustomItemValidation VencimentoField; internal CustomItemControl EmissaoField; internal DatePicker EmissaoParcelaBox; internal CustomItemValidation PercentualComissaoField; internal CurrencyTextBox ComissaoParcelaBox; internal TextBlock ComissaoIcon; internal CustomItemControl ValorLiquidoField; internal CurrencyTextBox ValorLiquidoParcelaBox; internal CustomItemControl ValorField; internal CurrencyTextBox ValorParcelaBox; internal CustomItemValidation RecebimentoField; internal DatePicker RecebimentoParcelaBox; internal CustomItemControl QuitacaoField; internal CustomItemControl DataControleParcelaField; internal CustomItemValidation CreditoField; internal DatePicker CreditoParcelaBox; internal CustomItemValidation ValorRealizadoField; internal CurrencyTextBox ValorRealizadoParcelaBox; internal CustomItemValidation ValorComissaoField; internal CurrencyTextBox ValorComissaoParcelaBox; internal WrapPanel ImpostosField; internal CustomItemControl PorcentagemIrField; internal CurrencyTextBox PorcentagemIrBox; internal CustomItemControl ValorIrField; internal CurrencyTextBox ValorIrBox; internal CustomItemControl PorcentagemIssField; internal CurrencyTextBox PorcentagemIssBox; internal CustomItemControl ValorIssField; internal CurrencyTextBox ValorIssBox; internal CustomItemControl ValorOutrosField; internal CurrencyTextBox ValorOutrosBox; internal CustomItemControl ValorDescontoField; internal CurrencyTextBox ValorDescontoBox; internal CustomItemControl ValorComDescField; internal CurrencyTextBox ValorComDescBox; internal DataGrid ParcelaGrid; internal DataGridTextColumn ParcelaColumn; internal DataGridTextColumn FaturaColumn; internal DataGridTextColumn VigenciaInicialColumn; internal DataGridTextColumn VigenciaFinalColumn; internal DataGridTextColumn ParcelasComissaoColumn; internal DataGridTextColumn ParcelasValorComissaoColumn; internal DataGridTextColumn ParcelasValorComissaoDescColumn; internal DataGridTemplateColumn MaisInformacoesColumn; internal MenuItem EditarVendedorButton; internal MenuItem SalvarVendedorButton; internal MenuItem CancelarVendedorButton; internal WrapPanel EditarVendedorFields; 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 TextBox FormaIncidenciaBox; internal DataGrid VendedorGrid; internal DataGridTextColumn VendedorGridColumn; internal DataGridTextColumn PagamentosPorcentagemRepasseColumn; internal DataGridTextColumn PagamentosValorRepasseColumn; internal TextBox ProponenteBox; internal AutoCompleteBox AutoCompleteBanco; internal TextBox AgenciaBox; internal TextBox ContaBox; internal TextBox CartaoBox; internal ComboBox BandeiraBox; internal TextBox VencimentoCartaoBox; internal DatePicker DataBox; internal TextBox PastaBox; private bool _contentLoaded; public ApoliceViewModel ViewModel { get; set; } private int EditarParcelaTipo { get; set; } private AcessoApolice AcessoApolice { get; } public ApoliceView(Documento documentoSelecionado, bool lockInsert = false, bool invoke = true, AcessoApolice acesso = 0, long idparcela = 0L, bool consultaTela = false) { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_001f: 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) ((FrameworkElement)this).Tag = "CADASTRO DE APÓLICE"; AcessoApolice = acesso; Gestor.Application.Actions.Actions.Redimencionar = (Action)Delegate.Combine(Gestor.Application.Actions.Actions.Redimencionar, new Action(Redimencionar)); ViewModel = new ApoliceViewModel(acesso, documentoSelecionado, invoke, idparcela); ((FrameworkElement)this).DataContext = ViewModel; InitializeComponent(); Dispatcher dispatcher = ((DispatcherObject)this).Dispatcher; if (dispatcher != null) { dispatcher.BeginInvoke((DispatcherPriority)7, (Delegate)new Action(ContentLoad)); } ((FrameworkElement)ParcelaGrid).DataContext = ViewModel; if (consultaTela) { ((UIElement)ExcluirpoliceButton).IsEnabled = false; } Restricao(); if (lockInsert) { ((UIElement)IncluirpoliceButton).IsEnabled = false; } if (documentoSelecionado != null) { string text = ((documentoSelecionado.Tipo == 0 && string.IsNullOrEmpty(documentoSelecionado.Apolice)) ? ("PROPOSTA \"" + documentoSelecionado.Proposta + "\"") : ((documentoSelecionado.Tipo == 0 && !string.IsNullOrEmpty(documentoSelecionado.Apolice)) ? ("APÓLICE \"" + documentoSelecionado.Apolice + "\"") : (string.IsNullOrEmpty(documentoSelecionado.Endosso) ? ("PROPOSTA DE ENDOSSO \"" + documentoSelecionado.PropostaEndosso + "\"") : ("ENDOSSO \"" + documentoSelecionado.Endosso + "\"")))); ViewModel.RegistrarAcao("ACESSOU " + text, ((DomainBase)documentoSelecionado).Id, (TipoTela)2, ViewModel.GerarObs(documentoSelecionado)); } } private void ValidarTela() { if (ViewModel.SelectedDocumento != null) { List> errorMessages = ViewModel.SelectedDocumento.Validate(); ((DependencyObject)(object)this).ValidateFields(errorMessages, focusField: false); } } private void Redimencionar(bool invoke) { Window? obj = ((IEnumerable)Application.Current.Windows).OfType().SingleOrDefault((Func)((Window x) => x.IsActive)); double num = ((obj != null) ? ((FrameworkElement)obj).ActualWidth : 1366.0); Redimencionar(num - (double)(invoke ? 40 : 0)); Gestor.Application.Actions.Actions.Redimencionar = (Action)Delegate.Remove(Gestor.Application.Actions.Actions.Redimencionar, new Action(Redimencionar)); } private async void ApoliceView_OnLoaded(object sender, RoutedEventArgs e) { while (!ViewModel.Loaded) { await Task.Delay(100); } AcessarApolice(AcessoApolice); } private void AcessarApolice(AcessoApolice acesso) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Invalid comparison between Unknown and I4 //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Expected O, but got Unknown //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Invalid comparison between Unknown and I4 //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Expected O, but got Unknown if ((int)acesso != 2) { if ((int)acesso == 3) { Renovar_OnClick(this, new RoutedEventArgs()); Restricao(insert: true); } } else { Endossar_OnClick(this, new RoutedEventArgs()); Restricao(insert: true); } } private void ContentLoad() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Expected O, but got Unknown //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Expected O, but got Unknown //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Expected O, but got Unknown //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Expected O, but got Unknown //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Expected O, but got Unknown //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Expected O, but got Unknown //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Expected O, but got Unknown //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Expected O, but got Unknown //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Expected O, but got Unknown //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Expected O, but got Unknown //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Expected O, but got Unknown //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_012b: 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_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Expected O, but got Unknown //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Expected O, but got Unknown //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Expected O, but got Unknown //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Expected O, but got Unknown //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Expected O, but got Unknown //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Expected O, but got Unknown //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Expected O, but got Unknown //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01fa: Expected O, but got Unknown //IL_0207: Unknown result type (might be due to invalid IL or missing references) //IL_0211: Expected O, but got Unknown //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_0228: Expected O, but got Unknown //IL_0235: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Expected O, but got Unknown //IL_0283: Unknown result type (might be due to invalid IL or missing references) //IL_028d: Expected O, but got Unknown //IL_02dc: Unknown result type (might be due to invalid IL or missing references) //IL_02e2: Invalid comparison between Unknown and I4 ((Selector)ParcelaGrid).SelectionChanged += new SelectionChangedEventHandler(ParcelaGrid_OnSelectionChanged); ((UIElement)ApoliceBox).LostFocus += new RoutedEventHandler(ValidacaoDocumento); ((UIElement)EndossoBox).LostFocus += new RoutedEventHandler(ValidacaoDocumento); ((Selector)TipoEndossoBox).SelectionChanged += new SelectionChangedEventHandler(TipoEndossoBox_OnSelectionChanged); ((Selector)TipoRecebimentoBox).SelectionChanged += new SelectionChangedEventHandler(TipoRecebimentoBox_OnSelectionChanged); ((Selector)SituacaoBox).SelectionChanged += new SelectionChangedEventHandler(SituacaoBox_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); ((UIElement)ParcelasBox).LostFocus += new RoutedEventHandler(AlteracaoParcela_LostFocus); ((Selector)NegocioCorretoraBox).SelectionChanged += new SelectionChangedEventHandler(NegocioCorretoraBox_OnSelectionChanged); ((UIElement)ComissaoBox).LostFocus += new RoutedEventHandler(AlteracaoDePremio_LostFocus); ((UIElement)DataBox).LostKeyboardFocus += new KeyboardFocusChangedEventHandler(base.DatePicker_OnLostKeyboardFocus); ((UIElement)DataBox).PreviewKeyDown += new KeyEventHandler(base.DatePicker_PreviewKeyDown); ((Selector)VendedorBox).SelectionChanged += new SelectionChangedEventHandler(VendedorBox_OnSelectionChanged); ((Selector)TipoVendedorBox).SelectionChanged += new SelectionChangedEventHandler(TipoVendedorBox_OnSelectionChanged); ((UIElement)ValorLiquidoParcelaBox).LostFocus += new RoutedEventHandler(ValorParcelaBox_OnLostFocus); ((UIElement)ComissaoParcelaBox).LostFocus += new RoutedEventHandler(Recalcula); ((UIElement)ValorLiquidoParcelaBox).LostFocus += new RoutedEventHandler(Recalcula); ((UIElement)ValorComissaoParcelaBox).LostFocus += new RoutedEventHandler(Recalcula); ((UIElement)ValorRealizadoParcelaBox).LostFocus += new RoutedEventHandler(Recalcula); ((UIElement)ValorParcelaBox).LostFocus += new RoutedEventHandler(Recalcula); bool flag = Recursos.Configuracoes.Any((ConfiguracaoSistema x) => (int)x.Configuracao == 5); ((UIElement)ValorDescontoField).Visibility = (Visibility)((!flag) ? 2 : 0); ((FrameworkElement)this).SizeChanged += new SizeChangedEventHandler(ApoliceControl_SizeChanged); if (ViewModel.SelectedDocumento != null) { AutoCompleteBox autoCompleteBanco = AutoCompleteBanco; Banco banco = ViewModel.SelectedDocumento.Banco; autoCompleteBanco.Text = ((banco != null) ? banco.Nome : null); ViewModel.IsFatura = (int)ViewModel.SelectedDocumento.TipoRecebimento.GetValueOrDefault((TipoRecebimento)1) == 2; Parcelas(!ViewModel.IsFatura); } } private async void ExcluirVendedor_Click(object sender, RoutedEventArgs e) { ((ButtonBase)(Button)sender).Click -= new RoutedEventHandler(ExcluirVendedor_Click); Button val = (Button)sender; if (val == null || ((FrameworkElement)val).DataContext == null) { return; } VendedorParcela pagamento = (VendedorParcela)((FrameworkElement)val).DataContext; int num; if (pagamento == null) { num = 0; } else { Repasse repasse = pagamento.Repasse; num = (((int)((repasse != null) ? repasse.Tipo : null).GetValueOrDefault() == 3) ? 1 : 0); } bool deleteCoCorretagem = (byte)num != 0; if (!((UIElement)AlterarApoliceButton).IsEnabled && ((UIElement)SalvarApoliceButton).IsEnabled) { await ViewModel.ShowMessage("NÃO É POSSÍVEL EXCLUIR VENDEDOR DURANTE ALTERAÇÃO DE DOCUMENTO."); return; } if (pagamento != null && !pagamento.DataPagamento.HasValue) { if (!ViewModel._excluirPermissEnabled) { await ViewModel.ShowMessage("VOCÊ NÃO POSSUI PERMISSÃO PARA EXCLUIR VENDEDORES. ENTRE EM CONTATO COM O ADMINISTRADOR DO SISTEMA."); return; } if (pagamento.CoCorretagem) { IEnumerable enumerable = ViewModel.Pagamentos.Where(delegate(VendedorParcela pgt) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Invalid comparison between Unknown and I4 Repasse repasse2 = pgt.Repasse; return (repasse2 == null || (int)repasse2.Tipo.GetValueOrDefault() != 3) && !pgt.Vendedor.Corretora; }); if (enumerable != null && enumerable.Count() >= 1) { await ViewModel.ShowMessage("NÃO É POSSÍVEL EXCLUIR O VENDEDOR CO-CORRETAGEM. HÁ VENDEDORES CADASTRADOS NO DOCUMENTO"); return; } } await ViewModel.ExcluirVendedor(pagamento); } else if ((await ViewModel.ShowSenha($"DESEJA REALMENTE EXCLUIR O PAGAMENTO DO VENDEDOR {pagamento.Vendedor.Nome} {pagamento.DataPagamento:d}?\nESSE PROCEDIMENTO É IRREVERSÍVEL.")).GetValueOrDefault()) { await ViewModel.ExcluirPagamento(pagamento); } ((TextBoxBase)ComissaoBox).IsReadOnly = ViewModel.VerificaCoCorretagem(); ViewModel.ComissOriginalVisibility = (Visibility)((!((TextBoxBase)ComissaoBox).IsReadOnly) ? 2 : 0); if (deleteCoCorretagem) { await ViewModel.AjusteComissãoCoCorretagem(removido: true); } ((ButtonBase)(Button)sender).Click += new RoutedEventHandler(ExcluirVendedor_Click); } private async void BaixarParcelas_Click(object sender, RoutedEventArgs e) { ((UIElement)ParcelaGrid).IsEnabled = false; ((MenuItem)sender).Click -= new RoutedEventHandler(BaixarParcelas_Click); ViewModel.QuantidadeFaturas = 1; if (await ViewModel.SelecionarParcelaBaixa()) { ToggleBotoesParcela(habilitar: true); ViewModel.BaixarParcelas = true; await ViewModel.CarregarImposto(); EditarParcelaTipo = 2; BaixarParcelas(); Gestor.Application.Actions.Actions.EnableMainMenu?.Invoke(obj: false); Gestor.Application.Actions.Actions.EnableMenu?.Invoke(obj: false); ((MenuItem)sender).Click += new RoutedEventHandler(BaixarParcelas_Click); ViewModel.AllowEditVendedor = false; } } private async Task SalvarParcela() { bool flag = EditarParcelaTipo == 3 && ViewModel.QuantidadeFaturas > 1; if (flag) { flag = !(await ViewModel.ShowMessage($"O SISTEMA IRÁ INCLUIR/REPLICAR A FATURA {ViewModel.QuantidadeFaturas} VEZES. DESEJA PROSSEGUIR?", "SIM", "NÃO")); } if (flag) { return; } List> list = await ViewModel.SalvarParcelas(EditarParcelaTipo); ((DependencyObject)(object)this).ValidateFields(list); if (list != null && list.Count != 0) { await ViewModel.ShowMessage(list, ViewModel.ErroCamposInvalidos, "OK"); return; } EditarVendedor(editar: false); ((UIElement)SalvarParcelaButton).Visibility = (Visibility)2; ViewModel.EditandoParcela = false; ((UIElement)BaixarParcelaButton).Visibility = (Visibility)0; ViewModel.BaixarParcelas = false; EditarParcelaTipo = 0; Gestor.Application.Actions.Actions.EnableMainMenu?.Invoke(obj: true); Gestor.Application.Actions.Actions.EnableMenu?.Invoke(obj: true); ToggleBotoesParcela(habilitar: false); if (ViewModel.UltimaFatura) { ViewModel.UltimaFatura = false; ToggleBotoesParcela(habilitar: true); EditarParcelaTipo = 3; ReplicarFatura(); ViewModel.QuantidadeFaturas = 0; Gestor.Application.Actions.Actions.EnableMainMenu?.Invoke(obj: false); Gestor.Application.Actions.Actions.EnableMenu?.Invoke(obj: false); EditandoParcela(!ViewModel.UltimaFatura); } } private async void SalvarParcela_Click(object sender, RoutedEventArgs e) { ((MenuItem)((ItemsControl)SalvarParcelaButton).Items[0]).Click -= new RoutedEventHandler(SalvarParcela_Click); LostFocusValorRealizado(); ViewModel.Loading(isLoading: true); if (!ViewModel.CriandoParcelaEspecial) { await SalvarParcela(); } ViewModel.Loading(isLoading: false); ((UIElement)SalvarParcelaButton).IsEnabled = true; ((MenuItem)((ItemsControl)SalvarParcelaButton).Items[0]).Click += new RoutedEventHandler(SalvarParcela_Click); } private void AlterarParcela_Click(object sender, RoutedEventArgs e) { ViewModel.QuantidadeFaturas = 1; if (ViewModel.Parcelas.Count != 0) { ToggleBotoesParcela(habilitar: true); EditarParcelaTipo = 1; ViewModel.SelecionaPrimeiraParcela(); AlterarParcela(); Gestor.Application.Actions.Actions.EnableMainMenu?.Invoke(obj: false); Gestor.Application.Actions.Actions.EnableMenu?.Invoke(obj: false); ViewModel.AllowEditVendedor = ViewModel.IsFatura; } } private void AlterarParcela() { ((UIElement)FaturaField).Visibility = (Visibility)((!ViewModel.IsFatura) ? 2 : 0); ((UIElement)QuantidadeFaturaField).Visibility = (Visibility)((!ViewModel.IsFatura) ? 2 : 0); ((UIElement)VigenciaInicialField).Visibility = (Visibility)((!ViewModel.IsFatura) ? 2 : 0); ((UIElement)VigenciaFinalField).Visibility = (Visibility)((!ViewModel.IsFatura) ? 2 : 0); ((UIElement)ValorLiquidoField).Visibility = (Visibility)((!ViewModel.IsFatura) ? 2 : 0); ((UIElement)PercentualComissaoField).Visibility = (Visibility)((!ViewModel.IsFatura) ? 2 : 0); ((UIElement)ComissaoIcon).Visibility = (Visibility)((!ViewModel.IsFatura) ? 2 : 0); ((UIElement)EmissaoField).Visibility = (Visibility)((!ViewModel.IsFatura) ? 2 : 0); ((UIElement)RecebimentoField).Visibility = (Visibility)2; ((UIElement)QuitacaoField).Visibility = (Visibility)0; ((UIElement)DataControleParcelaField).Visibility = (Visibility)0; ((UIElement)ValorRealizadoField).Visibility = (Visibility)2; ((UIElement)CreditoField).Visibility = (Visibility)2; ((UIElement)ValorComissaoField).Visibility = (Visibility)2; ((UIElement)VencimentoField).Visibility = (Visibility)0; ((UIElement)ValorField).Visibility = (Visibility)0; ((UIElement)TipoParcelaField).Visibility = (Visibility)2; ((UIElement)VencimentoField).Visibility = (Visibility)0; ((UIElement)ValorField).Visibility = (Visibility)0; ((UIElement)EditarParcelasFields).Visibility = (Visibility)0; ValidarParcela(); } private void BaixarParcelas() { ((UIElement)FaturaField).Visibility = (Visibility)((!ViewModel.IsFatura) ? 2 : 0); ((UIElement)VigenciaInicialField).Visibility = (Visibility)((!ViewModel.IsFatura) ? 2 : 0); ((UIElement)VigenciaFinalField).Visibility = (Visibility)((!ViewModel.IsFatura) ? 2 : 0); ((UIElement)PercentualComissaoField).Visibility = (Visibility)((!ViewModel.IsFatura) ? 2 : 0); ((UIElement)ComissaoIcon).Visibility = (Visibility)((!ViewModel.IsFatura) ? 2 : 0); ((UIElement)QuantidadeFaturaField).Visibility = (Visibility)2; ((UIElement)QuitacaoField).Visibility = (Visibility)2; ((UIElement)DataControleParcelaField).Visibility = (Visibility)2; ((UIElement)EmissaoField).Visibility = (Visibility)2; ((UIElement)ValorLiquidoField).Visibility = (Visibility)0; ((UIElement)VencimentoField).Visibility = (Visibility)2; ((UIElement)ValorField).Visibility = (Visibility)2; ((UIElement)TipoParcelaField).Visibility = (Visibility)2; ((UIElement)RecebimentoField).Visibility = (Visibility)0; ((UIElement)CreditoField).Visibility = (Visibility)0; ((UIElement)ValorRealizadoField).Visibility = (Visibility)0; ((UIElement)ValorComissaoField).Visibility = (Visibility)0; ((UIElement)EditarParcelasFields).Visibility = (Visibility)0; if (Recursos.Configuracoes.Any((ConfiguracaoSistema x) => (int)x.Configuracao == 5)) { ((UIElement)ImpostosField).Visibility = (Visibility)0; } ((UIElement)ParcelaGrid).IsEnabled = false; ValidarParcela(); ((UIElement)RecebimentoParcelaBox).Focus(); } private async void ExcluirParcela_Click(object sender, RoutedEventArgs e) { if (await ViewModel.PagamentoVendedor(ViewModel.SelectedParcela)) { bool? flag = await ViewModel.ShowSenha("HÁ PAGAMENTOS DE VENDEDORES REALIZADOS PARA ESSA PARCELA. DESEJA PROSSEGUIR COM A EXCLUSÃO?"); if (!flag.HasValue) { return; } if (!flag.GetValueOrDefault()) { await ViewModel.ShowMessage("SENHA INVÁLIDA"); return; } } if (!ViewModel.SelectedParcela.DataRecebimento.HasValue) { await ViewModel.ExcluirParcela(); } else { await ViewModel.ExcluirBaixa(); } EditandoParcela(enable: true); } private void MenuItem_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 async void AbrirAquivoDigital_Click(object sender, RoutedEventArgs e) { FiltroArquivoDigital filtro = null; string text = ""; Button val = (Button)((sender is Button) ? sender : null); if (val == null) { MenuItem val2 = (MenuItem)((sender is MenuItem) ? sender : null); if (val2 != null) { text = ((FrameworkElement)val2).Name; } } else { text = ((FrameworkElement)val).Name; } if (!(text == "ArquivoDigitalButton")) { if (text == "Parcela") { if (!new PermissaoArquivoDigitalServico().BuscarPermissao(Recursos.Usuario, (TipoArquivoDigital)3).Consultar) { await ViewModel.ShowMessage("VOCÊ NÃO POSSUI PERMISSÃO PARA ACESSAR\nARQUIVO DIGITAL DE " + ValidationHelper.GetDescription((Enum)(object)(TipoArquivoDigital)3) + "."); return; } filtro = new FiltroArquivoDigital { Id = ((DomainBase)ViewModel.SelectedParcela).Id, IdApolice = ((DomainBase)ViewModel.SelectedParcela.Documento).Id, Tipo = (TipoArquivoDigital)3, Parente = ViewModel.SelectedParcela }; } } else { if (!new PermissaoArquivoDigitalServico().BuscarPermissao(Recursos.Usuario, (TipoArquivoDigital)2).Consultar) { await ViewModel.ShowMessage("VOCÊ NÃO POSSUI PERMISSÃO PARA ACESSAR\nARQUIVO DIGITAL DE " + ValidationHelper.GetDescription((Enum)(object)(TipoArquivoDigital)2) + "."); return; } filtro = new FiltroArquivoDigital { Id = ((DomainBase)ViewModel.SelectedDocumento).Id, Tipo = (TipoArquivoDigital)2, Parente = ViewModel.SelectedDocumento }; } ViewModel.ShowDrawer(new ArquivoDigitalDrawer(filtro), 0, close: false); } private async void ExcluirDocumento_OnClick(object sender, RoutedEventArgs e) { await ViewModel.ExcluirApolice(); } private async void RecusarDocumento_OnClick(object sender, RoutedEventArgs e) { if (ViewModel.Restricao((TipoRestricao)18)) { await ViewModel.ShowMessage("VOCÊ NÃO POSSUI PERMISSÃO PARA RECUSAR. PROCURE O ADMINSTRADOR DO SISTEMA."); } else { await ViewModel.RecusarApolice(); } } private async void Renovar_OnClick(object sender, RoutedEventArgs e) { if (ViewModel.Restricao((TipoRestricao)17)) { await ViewModel.ShowMessage("VOCÊ NÃO POSSUI PERMISSÃO PARA RENOVAR. PROCURE O ADMINSTRADOR DO SISTEMA."); return; } if (!ViewModel.EnableRenovar) { await ViewModel.ShowMessage("NÃO É POSSÍVEL RENOVAR UM DOCUMENTO SEM EMISSÃO OU SEM FINAL DE VIGÊNCIA."); } if (await ViewModel.IncluirApolice(renovar: true)) { ViewModel.BotoesParcelaEnabled = false; ViewModel.AllowEditEmissao = true; Restricao(insert: true); } } private async void Endossar_OnClick(object sender, RoutedEventArgs e) { if (ViewModel.Restricao((TipoRestricao)33)) { await ViewModel.ShowMessage("VOCÊ NÃO POSSUI PERMISSÃO PARA ENDOSSAR. PROCURE O ADMINSTRADOR DO SISTEMA."); } else if (!ViewModel.EnableEndossar) { List> pairs = ViewModel.SelectedDocumento.ValidateEndossar(); await ViewModel.ShowMessage(pairs, ViewModel.ErroCamposInvalidos, "OK"); } else if (await ViewModel.IncluirEndosso()) { ViewModel.BotoesParcelaEnabled = false; Endossar(); Restricao(insert: true); } } private async void CancelarApolice_OnClick(object sender, RoutedEventArgs e) { CancelarAlteracao(); await ViewModel.CancelarAlteracao(); AlterandoDocumento(alterando: false); EditandoVendedor(enable: false); Restricao(); } private void CancelarAlteracao() { SetValid(AutoCompleteBanco, valid: true); AutoCompleteBanco.Text = string.Empty; ViewModel.BotoesParcelaEnabled = true; ViewModel.AlteracaoEnabled = true; EditarVendedor(editar: false); ValidarDocumento(); } private static void SetValid(AutoCompleteBox autocomplete, bool valid) { ViewHelper.SetInvalid((Control)(object)autocomplete, "BANCO INVÁLIDO", valid); } private async void SalvarApolice_OnClick(object sender, RoutedEventArgs e) { SalvarApoliceButton.Click -= new RoutedEventHandler(SalvarApolice_OnClick); if (ViewModel.CompararValores()) { PremioTotalBox.Number = PremioLiquidoBox.Number + PremioAdicionalBox.Number + IofBox.Number + DiferencaBox.Number; } ExecutarValidacaoDataApolice(); if (!(await SalvarDocumento())) { SalvarApoliceButton.Click += new RoutedEventHandler(SalvarApolice_OnClick); return; } try { await ViewModel.CreateLinkAssistencia(ViewModel.SelectedDocumento, null, retorno: false); } catch (Exception) { } AlterandoDocumento(alterando: false); EditandoVendedor(enable: false); ViewModel.BotoesParcelaEnabled = true; Restricao(); SalvarApoliceButton.Click += new RoutedEventHandler(SalvarApolice_OnClick); } public void AlterandoDocumento(bool alterando) { PermissaoUsuario val = ViewModel.ServicoPermissUsuario.BuscarPermissao(Recursos.Usuario, (TipoTela)2); ((UIElement)EditarVendedorButton).IsEnabled = (val == null || val.Incluir) && !alterando; } private void ExecutarValidacaoDataApolice() { ViewModel.SelectedDocumento.Vigencia2 = (DateTime.TryParse(ValidationHelper.FormatDate(Vigencia2Box.Text), out var result) ? new DateTime?(result) : null); ViewModel.SelectedDocumento.Remessa = (DateTime.TryParse(ValidationHelper.FormatDate(TransmissaoBox.Text), out result) ? new DateTime?(result) : null); ViewModel.SelectedDocumento.Emissao = (DateTime.TryParse(ValidationHelper.FormatDate(EmissaoBox.Text), out result) ? new DateTime?(result) : null); ViewModel.SelectedDocumento.DataControle = (DateTime.TryParse(ValidationHelper.FormatDate(DataBox.Text), out result) ? new DateTime?(result) : null); } private async Task SalvarDocumento() { ViewModel.Loading(isLoading: true); List> list = await ViewModel.Salvar(); bool num = list == null || list.Count == 0; ViewModel.Loading(isLoading: false); if (num) { EditarVendedor(editar: false); SetValid(AutoCompleteBanco, valid: true); return true; } await ViewModel.ShowMessage(list, ViewModel.ErroCamposInvalidos, "OK"); return false; } private async void IncluirApolice_OnClick(object sender, RoutedEventArgs e) { await ViewModel.IncluirApolice(); ViewModel.BotoesParcelaEnabled = false; ViewModel.AllowEditEmissao = true; ValidarDocumento(); Restricao(insert: true); ValidarTela(); ((UIElement)IncluirpoliceButton).IsEnabled = false; ((UIElement)AlterarApoliceButton).IsEnabled = false; ((UIElement)ExcluirpoliceButton).IsEnabled = false; AlterandoDocumento(alterando: true); } private async void SalvarVendedor_Click(object sender, RoutedEventArgs e) { ViewModel.Loading(isLoading: true); bool num = ViewModel.SelectedParcela == null || ((int)ViewModel.SelectedParcela.SubTipo == 1 && (int)ViewModel.SelectedDocumento.TipoRecebimento.GetValueOrDefault() == 1); if (Recursos.Configuracoes.Any((ConfiguracaoSistema config) => (int)config.Configuracao == 56)) { ToggleButton coCorretagemToogle = CoCorretagemToogle; if (coCorretagemToogle != null && coCorretagemToogle.IsChecked.GetValueOrDefault()) { VendedorParcela selectedPagamento = ViewModel.SelectedPagamento; ToggleButton coCorretagemToogle2 = CoCorretagemToogle; selectedPagamento.CoCorretagem = ((coCorretagemToogle2 != null) ? coCorretagemToogle2.IsChecked : null).GetValueOrDefault(true); } } List> list = ((!num) ? (await ViewModel.AdicionarVendedorParcelaEspecial()) : (await ViewModel.AdicionarVendedor())); List> list2 = list; bool flag = list2 == null || list2.Count == 0; ViewModel.Loading(isLoading: false); if (flag) { EditarVendedor(editar: false); EditandoVendedor(enable: false); if (ViewModel.VerificaCoCorretagem()) { ((TextBoxBase)ComissaoBox).IsReadOnly = true; ViewModel.ComissOriginalVisibility = (Visibility)0; } ViewModel.AllowEditParcela = flag; } else { ViewModel.AllowEditParcela = flag; await ViewModel.ShowMessage(list2, ViewModel.ErroCamposInvalidos, "OK"); } } private void CancelarVendedor_Click(object sender, RoutedEventArgs e) { EditarVendedor(editar: false); ViewModel.SelectedPagamento = null; ViewModel.AllowEditParcela = true; EditandoVendedor(enable: false); } private void EditarVendedor(bool editar) { //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Invalid comparison between Unknown and I4 //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Invalid comparison between Unknown and I4 //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Invalid comparison between Unknown and I4 ((UIElement)SalvarVendedorButton).Visibility = (Visibility)((!editar) ? 2 : 0); ((UIElement)CancelarVendedorButton).Visibility = (Visibility)((!editar) ? 2 : 0); ((UIElement)EditarVendedorButton).Visibility = (Visibility)(editar ? 2 : 0); ((UIElement)EditarVendedorFields).Visibility = (Visibility)((!editar) ? 2 : 0); ((UIElement)VendedorGrid).IsEnabled = !editar; if (editar && Recursos.Configuracoes.Any((ConfiguracaoSistema config) => (int)config.Configuracao == 56)) { bool isEnabled = ViewModel.Pagamentos.Count == 1 && ViewModel.Pagamentos.Any((VendedorParcela vendedor) => vendedor.Repasse == null) && !IsFatura(); ((UIElement)CoCorretagemToogle).IsEnabled = isEnabled; } bool flag = (ViewModel.SelectedDocumento.NegocioCorretora.HasValue ? ((int)ViewModel.SelectedDocumento.NegocioCorretora.GetValueOrDefault() == 1) : ((int)ViewModel.SelectedDocumento.Situacao == 2 && ViewModel.SelectedDocumento.Negocio.HasValue && (int)ViewModel.SelectedDocumento.Negocio.GetValueOrDefault() == 1)); ((UIElement)ComissaoNovoBox).Visibility = (Visibility)((!editar || flag) ? 2 : 0); ((UIElement)ComissaoRenovacaoBox).Visibility = (Visibility)((!(editar && flag)) ? 2 : 0); CoCorretagemToogle.IsChecked = false; } private async void IncluirVendedor_Click(object sender, RoutedEventArgs e) { ViewModel.AllowEditParcela = false; List> list = ViewModel.HabilitarVendedor(EditarParcelaTipo); if (list != null && list.Count != 0) { ((DependencyObject)(object)this).ValidateFields(list); await ViewModel.ShowMessage(list, ViewModel.ErroCamposInvalidos, "OK"); return; } ViewModel.IncluirVendedor(); EditarVendedor(editar: true); ValidarVendedor(); EditandoVendedor(enable: true); ViewModel.VendedorCoCorretagem(); } public void EditandoVendedor(bool enable) { PermissaoUsuario val = ViewModel.ServicoPermissUsuario.BuscarPermissao(Recursos.Usuario, (TipoTela)2); ((UIElement)IncluirpoliceButton).IsEnabled = (val == null || val.Incluir) && !enable; ((UIElement)AlterarApoliceButton).IsEnabled = (val == null || val.Alterar) && !enable; ((UIElement)ExcluirpoliceButton).IsEnabled = (val == null || val.Excluir) && !enable; } public void EditandoParcela(bool enable) { PermissaoUsuario val = ViewModel.ServicoPermissUsuario.BuscarPermissao(Recursos.Usuario, (TipoTela)2); ViewModel.AllowEditVendedor = (val == null || val.Incluir) && !enable; } 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 void TipoRecebimentoBox_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_0022: Invalid comparison between Unknown and I4 ComboBox val = (ComboBox)sender; if (((Selector)val).SelectedItem != null) { ViewModel.IsFatura = (int)(TipoRecebimento)((Selector)val).SelectedItem == 2; Parcelas(!ViewModel.IsFatura); if (ViewModel.EnableFields) { ((Selector)FormaPagamentoBox).SelectedItem = (ViewModel.IsFatura ? new FormaPagamento?((FormaPagamento)5) : ViewModel.SelectedDocumento.FormaPagamento); } } } private void Parcelas(bool premios) { ViewModel.AllowEditVendedor = ((DomainBase)ViewModel.SelectedDocumento).Id == 0; ((UIElement)PremiosBox).Visibility = (Visibility)((!premios) ? 2 : 0); ((DataGridColumn)FaturaColumn).Visibility = (Visibility)((!ViewModel.IsFatura) ? 2 : 0); ((DataGridColumn)VigenciaInicialColumn).Visibility = (Visibility)((!ViewModel.IsFatura) ? 2 : 0); ((DataGridColumn)VigenciaFinalColumn).Visibility = (Visibility)((!ViewModel.IsFatura) ? 2 : 0); ValidarDocumento(); if (!premios) { ParcelasBox.Number = 0m; ComissaoBox.Number = 0m; PremioLiquidoBox.Number = 0m; PremioTotalBox.Number = 0m; IofBox.Number = 0m; DiferencaBox.Number = 0m; PremioAdicionalBox.Number = 0m; ((Selector)FormaPagamentoBox).SelectedItem = (object)(FormaPagamento)4; Vigencia2Box.SelectedDate = ((((DomainBase)ViewModel.SelectedDocumento).Id == 0L && ViewModel.SelectedDocumento.Tipo == 0) ? null : Vigencia2Box.SelectedDate); ViewModel.AllowEditVendedor = ((DomainBase)ViewModel.SelectedDocumento).Id != 0; } } private async void ParcelaGrid_OnSelectionChanged(object sender, SelectionChangedEventArgs e) { DataGrid val = (DataGrid)sender; if (val == null || ((Selector)val).SelectedIndex >= 0) { await ViewModel.SelecionaParcela((Parcela)((val != null) ? ((ItemsControl)val).Items[((Selector)val).SelectedIndex] : null)); } } private void SituacaoBox_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_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) ComboBox val = (ComboBox)sender; if (((Selector)val).SelectedItem != null) { TipoSeguro situacao = (TipoSeguro)((Selector)val).SelectedItem; ViewModel.ToggleSeguradoraAnterior(situacao); } } private void Recalcula(object sender, RoutedEventArgs e) { ViewModel.RecalculaRepasse(); } private void AlteracaoParcela_LostFocus(object sender, RoutedEventArgs e) { ValidarDocumento(); } 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 CancelarParcela_Click(object sender, RoutedEventArgs e) { ToggleBotoesParcela(habilitar: false); ViewModel.BaixarParcelas = false; ViewModel.CancelPagamento(); ValidarDocumento(); EditarVendedor(editar: false); Gestor.Application.Actions.Actions.EnableMainMenu?.Invoke(obj: true); Gestor.Application.Actions.Actions.EnableMenu?.Invoke(obj: true); EditandoParcela(enable: false); } private bool IsFatura() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Invalid comparison between Unknown and I4 return (int)ViewModel.SelectedDocumento.TipoRecebimento.GetValueOrDefault() == 2; } private void Vigencia_DatePicker_OnLostKeyboardFocus(object sender, KeyboardFocusChangedEventArgs e) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Expected O, but got Unknown DatePicker_OnLostKeyboardFocus(sender, e); DatePicker val = (DatePicker)sender; if (!string.IsNullOrEmpty(val.Text) && DateTime.TryParse(ValidationHelper.FormatDate(val.Text), out var result)) { VigenciaFinalParcelaBox.SelectedDate = result.AddMonths(1); EmissaoParcelaBox.SelectedDate = result; } } private void Vencimento_OnLostKeyboardFocus(object sender, KeyboardFocusChangedEventArgs e) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Expected O, but got Unknown DatePicker_OnLostKeyboardFocus(sender, e); DatePicker val = (DatePicker)sender; if (!string.IsNullOrEmpty(val.Text) && DateTime.TryParse(ValidationHelper.FormatDate(val.Text), out var result)) { CreditoParcelaBox.SelectedDate = result; } } private void ToggleBotoesParcela(bool habilitar) { ((UIElement)SalvarParcelaButton).Visibility = (Visibility)((!habilitar) ? 2 : 0); ViewModel.EditandoParcela = habilitar; ((UIElement)BaixarParcelaButton).Visibility = (Visibility)(habilitar ? 2 : 0); ((UIElement)MenuApolice).IsEnabled = !habilitar; ViewModel.IsEnabled = !habilitar; ((UIElement)PremiosBox).IsEnabled = !habilitar; ((UIElement)DataControleParcelaField).Visibility = (Visibility)2; if (!habilitar) { ((UIElement)QuantidadeFaturaField).Visibility = (Visibility)2; ((UIElement)TipoParcelaField).Visibility = (Visibility)2; ((UIElement)VencimentoField).Visibility = (Visibility)2; ((UIElement)ValorField).Visibility = (Visibility)2; ((UIElement)RecebimentoField).Visibility = (Visibility)2; ((UIElement)QuitacaoField).Visibility = (Visibility)2; ((UIElement)CreditoField).Visibility = (Visibility)2; ((UIElement)ValorRealizadoField).Visibility = (Visibility)2; ((UIElement)ValorComissaoField).Visibility = (Visibility)2; ((UIElement)PercentualComissaoField).Visibility = (Visibility)2; ((UIElement)ComissaoIcon).Visibility = (Visibility)2; ((UIElement)EmissaoField).Visibility = (Visibility)2; ((UIElement)ValorLiquidoField).Visibility = (Visibility)2; ((UIElement)FaturaField).Visibility = (Visibility)2; ((UIElement)VigenciaInicialField).Visibility = (Visibility)2; ((UIElement)VigenciaFinalField).Visibility = (Visibility)2; ((UIElement)EditarParcelasFields).Visibility = (Visibility)2; ((UIElement)ImpostosField).Visibility = (Visibility)2; ((UIElement)ParcelaGrid).IsEnabled = true; } } private async void IncluirNovaFatura_Click(object sender, RoutedEventArgs e) { ViewModel.QuantidadeFaturas = 1; bool flag = IsFatura(); if (flag && ViewModel.SelectedDocumento.Ordem > 0) { await ViewModel.ShowMessage("NÃO É POSSÍVEL ADICIONAR FATURAS AO ENDOSSO, TODAS AS FATURAS DEVEM SER ADICIONADAS SOBRE A APÓLICE."); return; } ToggleBotoesParcela(habilitar: true); EditarParcelaTipo = 3; ViewModel.QuantidadeFaturas = 1; NovaFatura(); ViewModel.AllowEditVendedor = flag; ViewModel.BaixarParcelas = true; ViewModel.VisibilityAlterarVencimento = (Visibility)0; Gestor.Application.Actions.Actions.EnableMainMenu?.Invoke(obj: false); Gestor.Application.Actions.Actions.EnableMenu?.Invoke(obj: false); } private void IncluirParcelaEspecial_Click(object sender, RoutedEventArgs e) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Expected O, but got Unknown ((MenuItem)sender).Click -= new RoutedEventHandler(IncluirParcelaEspecial_Click); ViewModel.QuantidadeFaturas = 1; ToggleBotoesParcela(habilitar: true); EditarParcelaTipo = 4; NovaParcelaEspecial(); ViewModel.EditarParcelaEspecial(); ViewModel.BaixarParcelas = true; Gestor.Application.Actions.Actions.EnableMainMenu?.Invoke(obj: false); Gestor.Application.Actions.Actions.EnableMenu?.Invoke(obj: false); ((MenuItem)sender).Click += new RoutedEventHandler(IncluirParcelaEspecial_Click); EditandoParcela(enable: true); } private void NovaParcelaEspecial() { //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Invalid comparison between Unknown and I4 ((UIElement)FaturaField).Visibility = (Visibility)2; ((UIElement)VigenciaInicialField).Visibility = (Visibility)2; ((UIElement)VigenciaFinalField).Visibility = (Visibility)2; ((UIElement)EmissaoField).Visibility = (Visibility)2; ((UIElement)ValorLiquidoField).Visibility = (Visibility)2; ((UIElement)QuantidadeFaturaField).Visibility = (Visibility)(((int)ViewModel.SelectedDocumento.TipoRecebimento.GetValueOrDefault() != 2) ? 2 : 0); ((UIElement)TipoParcelaField).Visibility = (Visibility)0; ((UIElement)VencimentoField).Visibility = (Visibility)0; ((UIElement)ValorField).Visibility = (Visibility)0; ((UIElement)RecebimentoField).Visibility = (Visibility)0; ((UIElement)QuitacaoField).Visibility = (Visibility)0; ((UIElement)CreditoField).Visibility = (Visibility)0; ((UIElement)ValorRealizadoField).Visibility = (Visibility)0; ((UIElement)ValorComissaoField).Visibility = (Visibility)0; ((UIElement)PercentualComissaoField).Visibility = (Visibility)0; ((UIElement)ComissaoIcon).Visibility = (Visibility)0; ((UIElement)EditarParcelasFields).Visibility = (Visibility)0; ((UIElement)ParcelaGrid).IsEnabled = false; if (Recursos.Configuracoes.Any((ConfiguracaoSistema x) => (int)x.Configuracao == 5)) { ((UIElement)ImpostosField).Visibility = (Visibility)0; } ViewModel.IncluirParcelaEspecial(); ValidarParcela(); ((UIElement)ValorParcelaBox).Focus(); } private void NovaFatura() { ((UIElement)VigenciaInicialField).Visibility = (Visibility)0; ((UIElement)VigenciaFinalField).Visibility = (Visibility)0; ((UIElement)EmissaoField).Visibility = (Visibility)0; ((UIElement)ValorLiquidoField).Visibility = (Visibility)0; ((UIElement)QuantidadeFaturaField).Visibility = (Visibility)0; ((UIElement)RecebimentoField).Visibility = (Visibility)0; ((UIElement)QuitacaoField).Visibility = (Visibility)0; ((UIElement)DataControleParcelaField).Visibility = (Visibility)0; ((UIElement)CreditoField).Visibility = (Visibility)0; ((UIElement)ValorRealizadoField).Visibility = (Visibility)0; ((UIElement)ValorComissaoField).Visibility = (Visibility)0; ((UIElement)VencimentoField).Visibility = (Visibility)0; ((UIElement)ValorField).Visibility = (Visibility)0; ((UIElement)TipoParcelaField).Visibility = (Visibility)2; ((UIElement)PercentualComissaoField).Visibility = (Visibility)0; ((UIElement)ComissaoIcon).Visibility = (Visibility)0; ((UIElement)FaturaField).Visibility = (Visibility)0; ((UIElement)EditarParcelasFields).Visibility = (Visibility)0; ((UIElement)ParcelaGrid).IsEnabled = false; if (ViewModel.Restricao((TipoRestricao)15)) { ((UIElement)RecebimentoField).Visibility = (Visibility)2; ((UIElement)QuitacaoField).Visibility = (Visibility)2; ((UIElement)CreditoField).Visibility = (Visibility)2; ((UIElement)ValorRealizadoField).Visibility = (Visibility)2; ((UIElement)ValorComissaoField).Visibility = (Visibility)2; } ViewModel.IncluirFatura(); ValidarParcela(); ((UIElement)QuantidadeFaturaBox).Focus(); EditandoParcela(enable: true); } private void ReplicarFatura() { ((UIElement)VigenciaInicialField).Visibility = (Visibility)0; ((UIElement)VigenciaFinalField).Visibility = (Visibility)0; ((UIElement)EmissaoField).Visibility = (Visibility)0; ((UIElement)ValorLiquidoField).Visibility = (Visibility)0; ((UIElement)QuantidadeFaturaField).Visibility = (Visibility)0; ((UIElement)RecebimentoField).Visibility = (Visibility)0; ((UIElement)QuitacaoField).Visibility = (Visibility)0; ((UIElement)DataControleParcelaField).Visibility = (Visibility)0; ((UIElement)CreditoField).Visibility = (Visibility)0; ((UIElement)ValorRealizadoField).Visibility = (Visibility)0; ((UIElement)ValorComissaoField).Visibility = (Visibility)0; ((UIElement)VencimentoField).Visibility = (Visibility)0; ((UIElement)ValorField).Visibility = (Visibility)0; ((UIElement)TipoParcelaField).Visibility = (Visibility)2; ((UIElement)PercentualComissaoField).Visibility = (Visibility)0; ((UIElement)ComissaoIcon).Visibility = (Visibility)0; ((UIElement)FaturaField).Visibility = (Visibility)0; if (!ViewModel.Restricao((TipoRestricao)15)) { ViewModel.BaixarParcelas = true; if (Recursos.Configuracoes.Any((ConfiguracaoSistema x) => (int)x.Configuracao == 5)) { ((UIElement)ImpostosField).Visibility = (Visibility)0; } } if (((IEnumerable)ViewModel.Parcelas.OrderBy((Parcela x) => x.NumeroParcela)).LastOrDefault((Func)((Parcela x) => (int)x.SubTipo == 1)).NumeroParcela != 999) { ((UIElement)EditarParcelasFields).Visibility = (Visibility)0; ((UIElement)ParcelaGrid).IsEnabled = false; } ViewModel.ReplicarFatura(); ValidarParcela(); ((UIElement)QuantidadeFaturaBox).Focus(); } private void AutoCompleteBancoBox_Populating(object sender, PopulatingEventArgs e) { if (e.Parameter.Length < 3) { return; } e.Cancel = true; ViewModel.BuscarBanco(ValidationHelper.RemoveDiacritics(e.Parameter.Trim())).ContinueWith(delegate(Task> searchResult) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) if (searchResult.Result != null) { AutoCompleteBox val = (AutoCompleteBox)sender; val.ItemsSource = searchResult.Result; val.PopulateComplete(); } }, TaskScheduler.FromCurrentSynchronizationContext()); } private void Endossar() { ViewModel.AlteracaoEnabled = false; ViewModel.Situacao.Add((TipoSeguro)3); ValidarDocumento(); } private void TipoEndossoBox_OnSelectionChanged(object sender, SelectionChangedEventArgs e) { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Invalid comparison between Unknown and I4 //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Invalid comparison between Unknown and I4 if (ViewModel.SelectedDocumento != null && ViewModel.SelectedDocumento.Tipo == 0) { return; } ComboBox val = (ComboBox)sender; if (((Selector)val).SelectedItem == null) { return; } bool premios = !ViewModel.IsFatura && (int)(TipoEndosso)((Selector)val).SelectedItem != 1; if (ViewModel.EnableFields) { if ((int)(TipoEndosso)((Selector)val).SelectedItem == 0 || (int)(TipoEndosso)((Selector)val).SelectedItem == 4) { if (ViewModel.SelectedDocumento != null) { Documento selectedDocumento = ViewModel.SelectedDocumento; Documento cancelDocumento = ViewModel.CancelDocumento; selectedDocumento.Comissao = ((cancelDocumento != null) ? cancelDocumento.Comissao : 0m); } } else if (ViewModel.SelectedDocumento != null) { ViewModel.SelectedDocumento.Comissao = 0m; } ViewModel.OnPropertyChanged("SelectedDocumento"); } Parcelas(premios); } 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 ComboBox val = (ComboBox)sender; if (((Selector)val).SelectedItem != null) { ViewModel.FiltrarRepasse((Vendedor)((Selector)val).SelectedItem); if (ViewModel.CoCorretagem) { ((UIElement)ComissaoNovoBox).Visibility = (Visibility)0; ((UIElement)ComissaoRenovacaoBox).Visibility = (Visibility)2; } } } 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_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Invalid comparison between Unknown and I4 //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Invalid comparison between Unknown and I4 //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Invalid comparison between Unknown and I4 //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Expected O, but got Unknown //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: 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) { ViewModel.SelectedPagamento.ValorRepasse = 0.00m; ValorRepasseBox.Number = ViewModel.SelectedPagamento.ValorRepasse.Value; return; } bool flag = (ViewModel.SelectedDocumento.NegocioCorretora.HasValue ? ((int)ViewModel.SelectedDocumento.NegocioCorretora.GetValueOrDefault() == 1) : ((int)ViewModel.SelectedDocumento.Situacao == 2 && ViewModel.SelectedDocumento.Negocio.HasValue && (int)ViewModel.SelectedDocumento.Negocio.GetValueOrDefault() == 1)); ViewModel.SelectedPagamento.Repasse = val2; ViewModel.SelectedPagamento.PorcentagemRepasse = (flag ? 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 = ValidationHelper.GetDescription((Enum)(object)val2.Forma); FormaIncidenciaBox.Text = ValidationHelper.GetDescription((Enum)(object)val2.Incidencia); } private void ValidacaoDocumento(object sender, RoutedEventArgs e) { ValidarDocumento(); } private void ValidarDocumento() { if (ViewModel.SelectedDocumento != null) { List> errorMessages = ViewModel.SelectedDocumento.Validate(ViewModel.IsEndosso, Recursos.Configuracoes.Any((ConfiguracaoSistema c) => (int)c.Configuracao == 11)); ((DependencyObject)(object)this).ValidateFields(errorMessages, focusField: false); } } private void ValidacaoParcela(object sender, RoutedEventArgs e) { ValidarParcela(); } private void ValidarParcela() { if (ViewModel.SelectedParcela != null) { if (ViewModel.SelectedParcela.Documento == null) { ViewModel.SelectedParcela.Documento = ViewModel.SelectedDocumento; } ViewModel.SelectedParcela.Documento.Parcelas = ViewModel.Parcelas; List> errorMessages = ViewModel.SelectedParcela.Validate(Recursos.Configuracoes.Any((ConfiguracaoSistema x) => (int)x.Configuracao == 9), Recursos.Configuracoes.Any((ConfiguracaoSistema y) => (int)y.Configuracao == 11), ViewModel.EditandoParcela, Recursos.Configuracoes.Any((ConfiguracaoSistema x) => (int)x.Configuracao == 16)); ((DependencyObject)(object)this).ValidateFields(errorMessages, focusField: false); } } private void ValidarVendedor() { if (ViewModel.SelectedPagamento != null) { List> errorMessages = ViewModel.SelectedPagamento.Validate(); ((DependencyObject)(object)this).ValidateFields(errorMessages, focusField: false); } } private void ValorRealizadoParcelaBox_OnLostFocus(object sender, RoutedEventArgs e) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown CurrencyTextBox val = (CurrencyTextBox)sender; if (val != null && val.Number != 0m && ViewModel.SelectedParcela != null) { decimal number = val.Number; decimal num = ViewModel.SelectedParcela.Comissao * 0.01m; ValorComissaoParcelaBox.Number = number * num; } } private void LostFocusValorRealizado() { if (!(ValorRealizadoParcelaBox.Number == 0m) && ViewModel.SelectedParcela != null && ((UIElement)ValorRealizadoParcelaBox).IsFocused) { decimal number = ValorRealizadoParcelaBox.Number; decimal num = ViewModel.SelectedParcela.Comissao * 0.01m; ValorComissaoParcelaBox.Number = number * num; } } private void Restricao(bool insert = false) { //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: 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_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0128: 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_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) bool flag = Recursos.Configuracoes.Any((ConfiguracaoSistema x) => (int)x.Configuracao == 5); if (insert) { ((UIElement)Comissao).Visibility = (Visibility)0; ((UIElement)Gerada).Visibility = (Visibility)0; ((UIElement)Recebida).Visibility = (Visibility)0; ((UIElement)Pendente).Visibility = (Visibility)0; ((UIElement)Repasse).Visibility = (Visibility)0; ((DataGridColumn)ParcelasComissaoColumn).Visibility = (Visibility)0; ((DataGridColumn)ParcelasValorComissaoColumn).Visibility = (Visibility)(flag ? 2 : 0); ((DataGridColumn)ParcelasValorComissaoDescColumn).Visibility = (Visibility)((!flag) ? 2 : 0); ((DataGridColumn)PagamentosPorcentagemRepasseColumn).Visibility = (Visibility)0; ((DataGridColumn)PagamentosValorRepasseColumn).Visibility = (Visibility)0; } else { Visibility val = (Visibility)(ViewModel.Restricao((TipoRestricao)14) ? 2 : 0); bool flag2 = ViewModel.Restricao((TipoRestricao)95); ((UIElement)Comissao).Visibility = (Visibility)((!flag2) ? ((int)val) : 0); ((UIElement)Gerada).Visibility = (Visibility)(flag2 ? 2 : ((int)val)); ((UIElement)Recebida).Visibility = (Visibility)(flag2 ? 2 : ((int)val)); ((UIElement)Pendente).Visibility = (Visibility)(flag2 ? 2 : ((int)val)); ((UIElement)Repasse).Visibility = (Visibility)(flag2 ? 2 : ((int)val)); ((DataGridColumn)ParcelasComissaoColumn).Visibility = (Visibility)((!flag2) ? ((int)val) : 0); ((DataGridColumn)ParcelasValorComissaoColumn).Visibility = (Visibility)((flag || flag2) ? 2 : ((int)val)); ((DataGridColumn)ParcelasValorComissaoDescColumn).Visibility = (Visibility)((!flag) ? 2 : ((int)val)); ((DataGridColumn)MaisInformacoesColumn).Visibility = val; ((DataGridColumn)PagamentosPorcentagemRepasseColumn).Visibility = val; ((DataGridColumn)PagamentosValorRepasseColumn).Visibility = (Visibility)(flag2 ? 2 : ((int)val)); } } 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 async void Button_Click(object sender, RoutedEventArgs e) { bool num = ViewModel.Restricao((TipoRestricao)97); if (!num) { Documento documento = ViewModel.AbrirDetalhes(); ViewModel.ShowDrawer(new ValoresApoliceDrawer(documento), 0); } if (num) { await ViewModel.ShowMessage("VOCÊ NÃO POSSUI PERMISSÃO PARA ACESSAR MAIS INFORMAÇÕES."); } } private void ReplicarFatura_Click(object sender, RoutedEventArgs e) { ViewModel.QuantidadeFaturas = 1; ToggleBotoesParcela(habilitar: true); EditarParcelaTipo = 3; ReplicarFatura(); ViewModel.QuantidadeFaturas = 1; Gestor.Application.Actions.Actions.EnableMainMenu?.Invoke(obj: false); Gestor.Application.Actions.Actions.EnableMenu?.Invoke(obj: false); } private async void Alterar_OnClick(object sender, RoutedEventArgs e) { ViewModel.UpdatePremio = false; Restricao(); ViewModel.EnableControle = Recursos.Configuracoes.All((ConfiguracaoSistema x) => (int)x.Configuracao != 34) || ViewModel.Repasses.All((VendedorParcela x) => !x.DataPagamento.HasValue); ViewModel.CoCorretagem = ViewModel.Repasses.Any(delegate(VendedorParcela x) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Invalid comparison between Unknown and I4 Repasse repasse = x.Repasse; return repasse != null && (int)repasse.Tipo.GetValueOrDefault() == 3; }); ViewModel.VerificaCoCorretagem(); await ViewModel.Alteracao(alterar: true); ViewModel.Alterar(alterar: true); ValidarTela(); AlterandoDocumento(alterando: true); ((UIElement)ExcluirpoliceButton).IsEnabled = false; ((UIElement)IncluirpoliceButton).IsEnabled = false; ((UIElement)AlterarApoliceButton).IsEnabled = false; ViewModel.Inclusao = false; } private void ValorParcelaBox_OnLostFocus(object sender, RoutedEventArgs e) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Expected O, but got Unknown if (!ViewModel.IsFatura) { return; } CurrencyTextBox val = (CurrencyTextBox)sender; if (!(ValorParcelaBox.Number > 0m)) { decimal obj; if (!Recursos.Configuracoes.Any((ConfiguracaoSistema x) => (int)x.Configuracao == 46)) { obj = 0m; } else { Ramo ramo = ViewModel.SelectedDocumento.Controle.Ramo; obj = ((ramo != null) ? ramo.Iof : 0m); } decimal num = obj + 1m; ValorParcelaBox.Number = val.Number * num; ((UIElement)ValorParcelaBox).Focus(); } } private void ValoresParcelaInfo_OnClick(object sender, RoutedEventArgs e) { Parcela parcela = ViewModel.AbrirDetalhesParcela(); ViewModel.ShowDrawer(new ValoresParcelaDrawer(parcela, ViewModel.SelectedDocumento), 0); } private void ManutecaoItens_OnClick(object sender, RoutedEventArgs e) { ViewModel.ManutecaoItens(); } private void VencimentoCartaoBox_OnTextChanged(object sender, TextChangedEventArgs e) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Expected O, but got Unknown int num = ((TextBox)sender).CaretIndex; TextBox val = (TextBox)sender; if (val.Text.Contains("/") && new Regex("/").Match(val.Text).Index < num) { num--; } string text = val.Text.Replace("/", ""); string text2 = text.Substring(0, (text.Length > 4) ? 4 : text.Length); if (new Regex("^0").IsMatch(text2)) { if (new Regex("^00").IsMatch(text2)) { val.Text = _vencimentoCartaoOld; val.CaretIndex = num; return; } } else if (new Regex("^1").IsMatch(text2)) { if (new Regex("^1[^0-2]").IsMatch(text2)) { val.Text = _vencimentoCartaoOld; val.CaretIndex = num; return; } } else if (new Regex("^[^01]").IsMatch(text2)) { val.Text = _vencimentoCartaoOld; val.CaretIndex = num; return; } if (text2.Length > 2) { val.Text = text2.Insert(2, "/"); num++; } else if (val.Text.Contains("/")) { val.Text = text2; } val.CaretIndex = num; _vencimentoCartaoOld = text2; } private void VencimentoCartaoBox_OnGotFocus(object sender, RoutedEventArgs e) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) string text = ((TextBox)sender).Text.Replace("/", ""); _vencimentoCartaoOld = text.Substring(0, (text.Length > 4) ? 4 : text.Length); } private async void AbrirPerfil_OnClick(object sender, RoutedEventArgs e) { if (await ViewModel.VerificarPermissao((TipoTela)32)) { if (((DomainBase)ViewModel.SelectedDocumento.Controle.Ramo).Id == 5) { ((Window)new HosterWindow((ContentControl)(object)new PerfilView(ViewModel.SelectedDocumento.Controle), "PERFIL", 900.0, 500.0)).ShowDialog(); } else { ((Window)new HosterWindow((ContentControl)(object)new PerfilEmpresaView(ViewModel.SelectedDocumento.Controle), "QUESTIONÁRIO EMPRESA", 900.0, 500.0)).ShowDialog(); } ViewModel.Alterar(alterar: false); } } private void NegocioCorretoraBox_OnSelectionChanged(object sender, SelectionChangedEventArgs e) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Expected O, but got Unknown //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) if (!ViewModel.EnableFields) { return; } 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 AbrirLog_OnClick(object sender, RoutedEventArgs e) { if (ViewModel.SelectedDocumento != null && ((DomainBase)ViewModel.SelectedDocumento).Id != 0L) { ViewModel.AbrirLog((TipoTela)2, ((DomainBase)ViewModel.SelectedDocumento).Id); } } private async void AbrirLogParcelas_OnClick(object sender, RoutedEventArgs e) { if (ViewModel.SelectedDocumento == null) { return; } ApoliceViewModel viewModel = ViewModel; if (viewModel != null && viewModel.Parcelas.Count > 0) { List listaParcelas = new List(); ViewModel.Parcelas.ToList().ForEach(delegate(Parcela x) { listaParcelas.Add(((DomainBase)x).Id); }); ViewModel.AbrirLogParcela(listaParcelas, ((DomainBase)ViewModel.SelectedDocumento).Id); } } private void AbrirLogParcelaSelecionada_OnClick(object sender, RoutedEventArgs e) { if (ViewModel.SelectedParcela != null && ((DomainBase)ViewModel.SelectedParcela).Id != 0L) { List parcelas = new List { ((DomainBase)ViewModel.SelectedParcela).Id }; if (ViewModel.SelectedDocumento != null && ((DomainBase)ViewModel.SelectedDocumento).Id != 0L) { ViewModel.AbrirLogParcela(parcelas, ((DomainBase)ViewModel.SelectedDocumento).Id, ViewModel.SelectedParcela.NumeroParcela); } } } private void AbrirLogVendedor_OnClick(object sender, RoutedEventArgs e) { if (ViewModel.SelectedParcela != null && ((DomainBase)ViewModel.SelectedParcela).Id != 0L) { ViewModel.AbrirLog((TipoTela)37, ((DomainBase)ViewModel.SelectedParcela).Id); } } private void AbrirLogEmail_OnClick(object sender, RoutedEventArgs e) { if (ViewModel.SelectedDocumento != null && ((DomainBase)ViewModel.SelectedDocumento).Id != 0L) { ViewModel.AbrirLogEmail((TipoTela)2, ((DomainBase)ViewModel.SelectedDocumento).Id); } } private void AbrirLogEmailPF_OnClick(object sender, RoutedEventArgs e) { if (ViewModel.SelectedParcela != null && ((DomainBase)ViewModel.SelectedParcela).Id != 0L) { ViewModel.AbrirLogEmail((TipoTela)5, ((DomainBase)ViewModel.SelectedParcela).Id); } } private void AbrirLogTrocaCliente_OnClick(object sender, RoutedEventArgs e) { if (ViewModel.SelectedDocumento != null && ((DomainBase)ViewModel.SelectedDocumento).Id != 0L) { ViewModel.AbrirLog((TipoTela)41, ((DomainBase)ViewModel.SelectedDocumento).Id); } } private void Importacao_OnClick(object sender, RoutedEventArgs e) { if (ViewModel.SelectedDocumento != null && ((DomainBase)ViewModel.SelectedDocumento).Id != 0L) { AbrirImportacao(); } } private async void AbrirImportacao() { await ViewModel.Importacao(); ((ToolTip)((FrameworkElement)ButtonImportado).ToolTip).PlacementTarget = (UIElement)(object)ButtonImportado; ((ToolTip)((FrameworkElement)ButtonImportado).ToolTip).Placement = (PlacementMode)3; ((ToolTip)((FrameworkElement)ButtonImportado).ToolTip).IsOpen = true; await Task.Run(async delegate { await Task.Delay(5000); }); ((ToolTip)((FrameworkElement)ButtonImportado).ToolTip).IsOpen = false; } private void AbrirInfo_OnClick(object sender, RoutedEventArgs e) { ViewModel.AbrirInfo(); } private void Initial_DatePicker_OnLostKeyboardFocus(object sender, KeyboardFocusChangedEventArgs e) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) DatePicker_OnLostKeyboardFocus(sender, e); if (string.IsNullOrEmpty(((DatePicker)sender).Text)) { ((DatePicker)sender).SelectedDate = DateTime.MinValue; ViewModel.SelectedDocumento.Vigencia1 = DateTime.MinValue; Documento selectedDocumento = ViewModel.SelectedDocumento; if (selectedDocumento != null) { _ = selectedDocumento.Vigencia1; if (true && ViewModel.SelectedDocumento.Vigencia1 == DateTime.MinValue) { ((DatePicker)sender).SelectedDate = DateTime.Now.Date; ViewModel.SelectedDocumento.Vigencia1 = DateTime.Now.Date; } } } if (string.IsNullOrWhiteSpace(Vigencia2Box.Text)) { Vigencia2Box.DisplayDate = ValidationHelper.ToDateTime(((DatePicker)sender).Text).AddYears(1); Vigencia2Box.Text = Vigencia2Box.DisplayDate.ToShortDateString(); } } private void Vencimento_DatePicker_OnLostKeyboardFocus(object sender, KeyboardFocusChangedEventArgs e) { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0029: 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) DatePicker_OnLostKeyboardFocus(sender, e); if (ViewModel.SelectedDocumento != null) { if (string.IsNullOrEmpty(((DatePicker)sender).Text)) { ((DatePicker)sender).SelectedDate = ViewModel.SelectedDocumento.Vigencia1; ((DatePicker)sender).Text = ViewModel.SelectedDocumento.Vigencia1.ToString("dd/MM/yyyy"); } DatePicker_OnLostKeyboardFocus(sender, e); } } private void CalculoComissao_OnNumberChanged(object sender, EventArgs e) { if (ViewModel.BaixarParcelas && !_calculando) { _calculando = true; decimal number = ValorComissaoParcelaBox.Number; PorcentagemIrBox.NumberChanged -= PorcentagemIrBox_OnNumberChanged; PorcentagemIssBox.NumberChanged -= PorcentagemIssBox_OnNumberChanged; Imposto imposto = ViewModel.Imposto; if (imposto != null && ((DomainBase)imposto).Id > 0) { PorcentagemIrBox.Number = ViewModel.Imposto.Ir * 100m; } Imposto imposto2 = ViewModel.Imposto; if (imposto2 != null && ((DomainBase)imposto2).Id > 0) { PorcentagemIssBox.Number = ViewModel.Imposto.Iss * 100m; } PorcentagemIrBox.NumberChanged += PorcentagemIrBox_OnNumberChanged; PorcentagemIssBox.NumberChanged += PorcentagemIssBox_OnNumberChanged; Imposto imposto3 = ViewModel.Imposto; decimal num = ((imposto3 != null && ((DomainBase)imposto3).Id > 0) ? (number * ViewModel.Imposto.Ir) : ValorIrBox.Number); if (ValorIrBox.Number != num) { ViewModel.SelectedParcela.Irr = num; } Imposto imposto4 = ViewModel.Imposto; decimal num2 = ((imposto4 != null && ((DomainBase)imposto4).Id > 0) ? (number * ViewModel.Imposto.Iss) : ValorIssBox.Number); if (ValorIssBox.Number != num2) { ViewModel.SelectedParcela.Iss = num2; } Imposto imposto5 = ViewModel.Imposto; decimal num3 = ((imposto5 != null && ((DomainBase)imposto5).Id > 0) ? (number * ViewModel.Imposto.Outros) : ValorOutrosBox.Number); if (ValorOutrosBox.Number != num3) { ViewModel.SelectedParcela.Outros = num3; } Imposto imposto6 = ViewModel.Imposto; decimal num4 = ((imposto6 != null && ((DomainBase)imposto6).Id > 0) ? (number * ViewModel.Imposto.Desconto) : ValorDescontoBox.Number); if (ValorDescontoBox.Number != num4) { ViewModel.SelectedParcela.Desconto = num4; } ValorComDescBox.Number = number - num - num2 - num3 - num4; ViewModel.OnPropertyChanged("SelectedParcela"); _calculando = false; } } private void PorcentagemIrBox_OnNumberChanged(object sender, EventArgs e) { if (ViewModel.BaixarParcelas && !_calculando) { _calculando = true; ValorIrBox.Number = ValorComissaoParcelaBox.Number * (PorcentagemIrBox.Number / 100m); _calculando = false; ValorImposto_OnNumberChanged(ValorIrBox, new EventArgs()); } } private void PorcentagemIssBox_OnNumberChanged(object sender, EventArgs e) { if (ViewModel.BaixarParcelas && !_calculando) { _calculando = true; ValorIssBox.Number = ValorComissaoParcelaBox.Number * (PorcentagemIssBox.Number / 100m); _calculando = false; ValorImposto_OnNumberChanged(ValorIssBox, new EventArgs()); } } private void ValorImposto_OnNumberChanged(object sender, EventArgs e) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown if (ViewModel.BaixarParcelas && !_calculando) { _calculando = true; CurrencyTextBox val = (CurrencyTextBox)sender; decimal num = ((ValorComissaoParcelaBox.Number == 0m) ? 1m : ValorComissaoParcelaBox.Number); decimal number = ValorComissaoParcelaBox.Number; switch (((FrameworkElement)val).Name) { case "ValorIrBox": PorcentagemIrBox.Number = ValorIrBox.Number * 100m / num; number = num - val.Number - ValorIssBox.Number - ValorOutrosBox.Number - ValorDescontoBox.Number; break; case "ValorIssBox": PorcentagemIssBox.Number = ValorIssBox.Number * 100m / num; number = num - val.Number - ValorIrBox.Number - ValorOutrosBox.Number - ValorDescontoBox.Number; break; case "ValorOutrosBox": number = num - val.Number - ValorIrBox.Number - ValorIrBox.Number - ValorDescontoBox.Number; break; case "ValorDescontoBox": number = num - val.Number - ValorIrBox.Number - ValorIrBox.Number - ValorOutrosBox.Number; break; } ValorComDescBox.Number = number; _calculando = false; } } private void AutoCompleteBanco_OnLostKeyboardFocus(object sender, KeyboardFocusChangedEventArgs 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_002e: Expected O, but got Unknown AutoCompleteBox val = (AutoCompleteBox)sender; SetValid(val, string.IsNullOrWhiteSpace(val.Text) || ViewModel.SelectedDocumento.Banco != null); } private void Redimencionar(double width) { ViewModel.TamanhoGrid = (width - 17.0) / 2.0; int num = (ViewModel.IsFatura ? 620 : 450); if (ViewModel.TamanhoGrid < (double)num) { ViewModel.TamanhoGrid = width; } } private void ApoliceControl_SizeChanged(object sender, SizeChangedEventArgs e) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) if (e != null) { _ = e.NewSize; if (0 == 0) { Size newSize = e.NewSize; Redimencionar(((Size)(ref newSize)).Width); } } } private async void Ramo_OnSelectionChanged(object sender, SelectionChangedEventArgs e) { if (!Recursos.Configuracoes.All((ConfiguracaoSistema x) => (int)x.Configuracao != 20) && ViewModel.SelectedDocumento != null) { EditarVendedor(editar: false); ViewModel.SelectedPagamento = null; await ViewModel.BuscarVendedores(); await ViewModel.LimparRepasses(); } } private async void EditarParcelas_OnClick(object sender, RoutedEventArgs e) { await ViewModel.EditarParcelas(); } private void MenuItem_Click(object sender, RoutedEventArgs e) { ViewModel.AbrirLogAntigo(); } private async void Perdido_OnClick(object sender, RoutedEventArgs e) { if ((int)ViewModel.SelectedDocumento.Situacao == 7) { await ViewModel.ShowMessage("NÃO É POSSÍVEL ALTERAR O STATUS PARA PERDIDO DE UM DOCUMENTO RECUSADO."); return; } if (!(await ViewModel.ShowMessage("DESEJA REALMENTE ALTERAR O STATUS DO SEGURO PARA PERDIDO?", "SIM", "NÃO"))) { return; } ViewModel.Loading(isLoading: true); Cliente cliente = await new ClienteServico().BuscarCliente(((DomainBase)ViewModel.SelectedDocumento.Controle.Cliente).Id); Cliente val = cliente; val.Telefones = await new ClienteServico().BuscarTelefonesAsync(((DomainBase)ViewModel.SelectedDocumento.Controle.Cliente).Id); val = cliente; val.Emails = await new ClienteServico().BuscarEmailsAsync(((DomainBase)ViewModel.SelectedDocumento.Controle.Cliente).Id); ObservableCollection itens = await new ItemServico().BuscarItems(((DomainBase)ViewModel.SelectedDocumento.Controle).Id, (StatusItem)0); if (!(await new ApoliceServico().Perdido(((DomainBase)ViewModel.SelectedDocumento.Controle).Id))) { ViewModel.Loading(isLoading: false); return; } Prospeccao val2 = new Prospeccao { Nome = cliente.Nome, Documento = cliente.Documento, Nascimento = cliente.Nascimento }; ObservableCollection telefones = cliente.Telefones; object obj; if (telefones == null) { obj = null; } else { ClienteTelefone? obj2 = telefones.FirstOrDefault(); obj = ((obj2 != null) ? ((TelefoneBase)obj2).Prefixo : null); } if (obj == null) { obj = ""; } val2.Prefixo1 = (string)obj; ObservableCollection telefones2 = cliente.Telefones; object obj3; if (telefones2 == null) { obj3 = null; } else { ClienteTelefone? obj4 = telefones2.FirstOrDefault(); obj3 = ((obj4 != null) ? ((TelefoneBase)obj4).Numero : null); } if (obj3 == null) { obj3 = ""; } val2.Telefone1 = (string)obj3; val2.Prefixo2 = ((cliente.Telefones != null && cliente.Telefones.Count > 1) ? ((TelefoneBase)cliente.Telefones[1]).Prefixo : ""); object telefone; if (cliente.Telefones != null) { ObservableCollection telefones3 = cliente.Telefones; if (telefones3 != null && telefones3.Count > 1) { telefone = ((TelefoneBase)cliente.Telefones[1]).Numero; goto IL_0536; } } telefone = ""; goto IL_0536; IL_0536: val2.Telefone2 = (string)telefone; ObservableCollection emails = cliente.Emails; object obj5; if (emails == null) { obj5 = null; } else { ClienteEmail? obj6 = emails.FirstOrDefault(); obj5 = ((obj6 != null) ? ((EmailBase)obj6).Email : null); } if (obj5 == null) { obj5 = ""; } val2.Email = (string)obj5; val2.VigenciaFinal = (ViewModel.SelectedDocumento.Vigencia2 ?? Funcoes.GetNetworkTime().Date).AddYears(1); val2.Vendedor = ViewModel.SelectedDocumento.VendedorPrincipal; Item? obj7 = itens.FirstOrDefault(); val2.Item = ((obj7 != null) ? obj7.Descricao : null); val2.Tipo = "SEGURO PERDIDO"; val2.Observacao = "SEGURO PERDIDO: PROPOSTA: " + ViewModel.SelectedDocumento.Proposta + ", APÓLICE: " + ViewModel.SelectedDocumento.Apolice; val2.Status = (StatusProspeccao)1; val2.Renovacao = true; Prospeccao data = val2; await AbrirProspeccao(data); await ViewModel.SelecionaDocumento(ViewModel.SelectedDocumento); ViewModel.Loading(isLoading: false); } private async Task AbrirProspeccao(Prospeccao data) { while (true) { if (await ViewModel.ShowProspeccaoDialog(data) == null) { if (await ViewModel.ShowMessage("DESEJA REALMENTE NÃO CADASTRAR UMA PROSPECÇÃO PARA ESSE DOCUMENTO?", "SIM", "NÃO")) { return; } continue; } List> list = await ViewModel.SalvarProspeccao(data); if (list == null || list.Count == 0) { break; } await ViewModel.ShowMessage(list, ViewModel.ErroCamposInvalidos, "OK"); } ViewModel.ToggleSnackBar("PROSPECÇÃO SALVA COM SUCESSO."); } private void FocusPremios(object sender, RoutedEventArgs e) { ViewModel.UpdatePremio = true; } private void AbrirLogParcelaAntigo_OnClick(object sender, RoutedEventArgs e) { ViewModel.AbrirLogAntigoParcela(); } 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/apoliceview.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_027b: Unknown result type (might be due to invalid IL or missing references) //IL_0285: Expected O, but got Unknown //IL_0288: Unknown result type (might be due to invalid IL or missing references) //IL_0292: Expected O, but got Unknown //IL_029f: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Expected O, but got Unknown //IL_02ac: Unknown result type (might be due to invalid IL or missing references) //IL_02b6: Expected O, but got Unknown //IL_02c3: Unknown result type (might be due to invalid IL or missing references) //IL_02cd: Expected O, but got Unknown //IL_02d0: Unknown result type (might be due to invalid IL or missing references) //IL_02da: Expected O, but got Unknown //IL_02e7: Unknown result type (might be due to invalid IL or missing references) //IL_02f1: Expected O, but got Unknown //IL_02f4: Unknown result type (might be due to invalid IL or missing references) //IL_02fe: Expected O, but got Unknown //IL_030b: Unknown result type (might be due to invalid IL or missing references) //IL_0315: Expected O, but got Unknown //IL_0318: Unknown result type (might be due to invalid IL or missing references) //IL_0322: Expected O, but got Unknown //IL_032f: Unknown result type (might be due to invalid IL or missing references) //IL_0339: Expected O, but got Unknown //IL_033c: Unknown result type (might be due to invalid IL or missing references) //IL_0346: Expected O, but got Unknown //IL_0353: Unknown result type (might be due to invalid IL or missing references) //IL_035d: Expected O, but got Unknown //IL_035f: Unknown result type (might be due to invalid IL or missing references) //IL_036b: Unknown result type (might be due to invalid IL or missing references) //IL_0375: 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_03c0: Unknown result type (might be due to invalid IL or missing references) //IL_03ca: Expected O, but got Unknown //IL_03cc: Unknown result type (might be due to invalid IL or missing references) //IL_03d8: Unknown result type (might be due to invalid IL or missing references) //IL_03e2: Expected O, but got Unknown //IL_03e4: Unknown result type (might be due to invalid IL or missing references) //IL_03f0: Unknown result type (might be due to invalid IL or missing references) //IL_03fa: Expected O, but got Unknown //IL_03fc: Unknown result type (might be due to invalid IL or missing references) //IL_0408: Unknown result type (might be due to invalid IL or missing references) //IL_0412: Expected O, but got Unknown //IL_0414: Unknown result type (might be due to invalid IL or missing references) //IL_0420: Unknown result type (might be due to invalid IL or missing references) //IL_042a: Expected O, but got Unknown //IL_042c: Unknown result type (might be due to invalid IL or missing references) //IL_0438: Unknown result type (might be due to invalid IL or missing references) //IL_0442: Expected O, but got Unknown //IL_0444: Unknown result type (might be due to invalid IL or missing references) //IL_0450: Unknown result type (might be due to invalid IL or missing references) //IL_045a: Expected O, but got Unknown //IL_045c: Unknown result type (might be due to invalid IL or missing references) //IL_0468: Unknown result type (might be due to invalid IL or missing references) //IL_0472: Expected O, but got Unknown //IL_0474: Unknown result type (might be due to invalid IL or missing references) //IL_0480: Unknown result type (might be due to invalid IL or missing references) //IL_048a: Expected O, but got Unknown //IL_048c: Unknown result type (might be due to invalid IL or missing references) //IL_0498: Unknown result type (might be due to invalid IL or missing references) //IL_04a2: Expected O, but got Unknown //IL_04a4: Unknown result type (might be due to invalid IL or missing references) //IL_04b0: Unknown result type (might be due to invalid IL or missing references) //IL_04ba: Expected O, but got Unknown //IL_04bc: Unknown result type (might be due to invalid IL or missing references) //IL_04c8: Unknown result type (might be due to invalid IL or missing references) //IL_04d2: Expected O, but got Unknown //IL_04d4: Unknown result type (might be due to invalid IL or missing references) //IL_04e0: Unknown result type (might be due to invalid IL or missing references) //IL_04ea: Expected O, but got Unknown //IL_04ed: Unknown result type (might be due to invalid IL or missing references) //IL_04f7: Expected O, but got Unknown //IL_04f9: Unknown result type (might be due to invalid IL or missing references) //IL_0505: Unknown result type (might be due to invalid IL or missing references) //IL_050f: Expected O, but got Unknown //IL_0512: Unknown result type (might be due to invalid IL or missing references) //IL_051c: Expected O, but got Unknown //IL_051f: Unknown result type (might be due to invalid IL or missing references) //IL_0529: Expected O, but got Unknown //IL_052c: Unknown result type (might be due to invalid IL or missing references) //IL_0536: Expected O, but got Unknown //IL_0539: Unknown result type (might be due to invalid IL or missing references) //IL_0543: Expected O, but got Unknown //IL_0546: Unknown result type (might be due to invalid IL or missing references) //IL_0550: Expected O, but got Unknown //IL_0553: Unknown result type (might be due to invalid IL or missing references) //IL_055d: Expected O, but got Unknown //IL_0560: Unknown result type (might be due to invalid IL or missing references) //IL_056a: Expected O, but got Unknown //IL_056c: Unknown result type (might be due to invalid IL or missing references) //IL_0578: Unknown result type (might be due to invalid IL or missing references) //IL_0582: Expected O, but got Unknown //IL_0583: Unknown result type (might be due to invalid IL or missing references) //IL_058f: Unknown result type (might be due to invalid IL or missing references) //IL_0599: Expected O, but got Unknown //IL_059a: Unknown result type (might be due to invalid IL or missing references) //IL_05a6: Unknown result type (might be due to invalid IL or missing references) //IL_05b0: Expected O, but got Unknown //IL_05b1: Unknown result type (might be due to invalid IL or missing references) //IL_05ca: Unknown result type (might be due to invalid IL or missing references) //IL_05d4: Expected O, but got Unknown //IL_05e1: Unknown result type (might be due to invalid IL or missing references) //IL_05eb: Expected O, but got Unknown //IL_05f8: Unknown result type (might be due to invalid IL or missing references) //IL_0602: 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_0633: Unknown result type (might be due to invalid IL or missing references) //IL_063d: Expected O, but got Unknown //IL_064a: Unknown result type (might be due to invalid IL or missing references) //IL_0654: Expected O, but got Unknown //IL_0661: Unknown result type (might be due to invalid IL or missing references) //IL_066b: Expected O, but got Unknown //IL_066e: Unknown result type (might be due to invalid IL or missing references) //IL_0678: Expected O, but got Unknown //IL_0685: Unknown result type (might be due to invalid IL or missing references) //IL_068f: Expected O, but got Unknown //IL_069c: Unknown result type (might be due to invalid IL or missing references) //IL_06a6: Expected O, but got Unknown //IL_06b3: Unknown result type (might be due to invalid IL or missing references) //IL_06bd: Expected O, but got Unknown //IL_06d7: Unknown result type (might be due to invalid IL or missing references) //IL_06e1: Expected O, but got Unknown //IL_06e4: Unknown result type (might be due to invalid IL or missing references) //IL_06ee: Expected O, but got Unknown //IL_06f1: Unknown result type (might be due to invalid IL or missing references) //IL_06fb: Expected O, but got Unknown //IL_070b: Unknown result type (might be due to invalid IL or missing references) //IL_0715: Expected O, but got Unknown //IL_0718: Unknown result type (might be due to invalid IL or missing references) //IL_0722: Expected O, but got Unknown //IL_0725: Unknown result type (might be due to invalid IL or missing references) //IL_072f: Expected O, but got Unknown //IL_073c: Unknown result type (might be due to invalid IL or missing references) //IL_0746: Expected O, but got Unknown //IL_0749: Unknown result type (might be due to invalid IL or missing references) //IL_0753: Expected O, but got Unknown //IL_0756: Unknown result type (might be due to invalid IL or missing references) //IL_0760: Expected O, but got Unknown //IL_0763: Unknown result type (might be due to invalid IL or missing references) //IL_076d: Expected O, but got Unknown //IL_0770: Unknown result type (might be due to invalid IL or missing references) //IL_077a: Expected O, but got Unknown //IL_07bd: Unknown result type (might be due to invalid IL or missing references) //IL_07c9: Unknown result type (might be due to invalid IL or missing references) //IL_07d3: Expected O, but got Unknown //IL_07d6: Unknown result type (might be due to invalid IL or missing references) //IL_07e0: Expected O, but got Unknown //IL_07e2: Unknown result type (might be due to invalid IL or missing references) //IL_07ee: Unknown result type (might be due to invalid IL or missing references) //IL_07f8: Expected O, but got Unknown //IL_07fa: Unknown result type (might be due to invalid IL or missing references) //IL_0806: Unknown result type (might be due to invalid IL or missing references) //IL_0810: Expected O, but got Unknown //IL_0812: Unknown result type (might be due to invalid IL or missing references) //IL_081e: Unknown result type (might be due to invalid IL or missing references) //IL_0828: Expected O, but got Unknown //IL_082a: Unknown result type (might be due to invalid IL or missing references) //IL_0836: Unknown result type (might be due to invalid IL or missing references) //IL_0840: Expected O, but got Unknown //IL_0842: Unknown result type (might be due to invalid IL or missing references) //IL_084e: Unknown result type (might be due to invalid IL or missing references) //IL_0858: Expected O, but got Unknown //IL_085a: Unknown result type (might be due to invalid IL or missing references) //IL_0866: Unknown result type (might be due to invalid IL or missing references) //IL_0870: Expected O, but got Unknown //IL_0873: Unknown result type (might be due to invalid IL or missing references) //IL_087d: Expected O, but got Unknown //IL_087f: Unknown result type (might be due to invalid IL or missing references) //IL_088b: Unknown result type (might be due to invalid IL or missing references) //IL_0895: Expected O, but got Unknown //IL_0897: Unknown result type (might be due to invalid IL or missing references) //IL_08a3: Unknown result type (might be due to invalid IL or missing references) //IL_08ad: Expected O, but got Unknown //IL_08af: Unknown result type (might be due to invalid IL or missing references) //IL_08bb: Unknown result type (might be due to invalid IL or missing references) //IL_08c5: Expected O, but got Unknown //IL_08c7: Unknown result type (might be due to invalid IL or missing references) //IL_08d3: Unknown result type (might be due to invalid IL or missing references) //IL_08dd: Expected O, but got Unknown //IL_08df: Unknown result type (might be due to invalid IL or missing references) //IL_08eb: Unknown result type (might be due to invalid IL or missing references) //IL_08f5: Expected O, but got Unknown //IL_08f8: Unknown result type (might be due to invalid IL or missing references) //IL_0902: Expected O, but got Unknown //IL_0912: Unknown result type (might be due to invalid IL or missing references) //IL_091c: Expected O, but got Unknown //IL_092c: Unknown result type (might be due to invalid IL or missing references) //IL_0936: Expected O, but got Unknown //IL_0946: Unknown result type (might be due to invalid IL or missing references) //IL_0950: Expected O, but got Unknown //IL_095f: Unknown result type (might be due to invalid IL or missing references) //IL_096b: Unknown result type (might be due to invalid IL or missing references) //IL_0975: Expected O, but got Unknown //IL_0976: Unknown result type (might be due to invalid IL or missing references) //IL_0982: Unknown result type (might be due to invalid IL or missing references) //IL_098c: Expected O, but got Unknown //IL_098d: Unknown result type (might be due to invalid IL or missing references) //IL_0999: Unknown result type (might be due to invalid IL or missing references) //IL_09a3: Expected O, but got Unknown //IL_09b3: Unknown result type (might be due to invalid IL or missing references) //IL_09bd: Expected O, but got Unknown //IL_09ca: Unknown result type (might be due to invalid IL or missing references) //IL_09d4: Expected O, but got Unknown //IL_09e1: Unknown result type (might be due to invalid IL or missing references) //IL_09eb: Expected O, but got Unknown //IL_09f8: Unknown result type (might be due to invalid IL or missing references) //IL_0a02: Expected O, but got Unknown //IL_0a11: Unknown result type (might be due to invalid IL or missing references) //IL_0a1d: Unknown result type (might be due to invalid IL or missing references) //IL_0a27: Expected O, but got Unknown //IL_0a28: Unknown result type (might be due to invalid IL or missing references) //IL_0a34: Unknown result type (might be due to invalid IL or missing references) //IL_0a3e: Expected O, but got Unknown //IL_0a3f: Unknown result type (might be due to invalid IL or missing references) //IL_0a4b: Unknown result type (might be due to invalid IL or missing references) //IL_0a55: Expected O, but got Unknown //IL_0a65: Unknown result type (might be due to invalid IL or missing references) //IL_0a6f: Expected O, but got Unknown //IL_0a7c: Unknown result type (might be due to invalid IL or missing references) //IL_0a86: Expected O, but got Unknown //IL_0a93: Unknown result type (might be due to invalid IL or missing references) //IL_0a9d: Expected O, but got Unknown //IL_0aaa: Unknown result type (might be due to invalid IL or missing references) //IL_0ab4: Expected O, but got Unknown //IL_0ac4: Unknown result type (might be due to invalid IL or missing references) //IL_0ace: Expected O, but got Unknown //IL_0ad1: Unknown result type (might be due to invalid IL or missing references) //IL_0adb: Expected O, but got Unknown //IL_0aeb: Unknown result type (might be due to invalid IL or missing references) //IL_0af5: Expected O, but got Unknown //IL_0b05: Unknown result type (might be due to invalid IL or missing references) //IL_0b0f: Expected O, but got Unknown //IL_0b1f: Unknown result type (might be due to invalid IL or missing references) //IL_0b29: Expected O, but got Unknown //IL_0b36: Unknown result type (might be due to invalid IL or missing references) //IL_0b40: Expected O, but got Unknown //IL_0b4d: Unknown result type (might be due to invalid IL or missing references) //IL_0b57: Expected O, but got Unknown //IL_0b64: Unknown result type (might be due to invalid IL or missing references) //IL_0b6e: Expected O, but got Unknown //IL_0b94: Unknown result type (might be due to invalid IL or missing references) //IL_0ba0: Unknown result type (might be due to invalid IL or missing references) //IL_0baa: Expected O, but got Unknown //IL_0bab: Unknown result type (might be due to invalid IL or missing references) //IL_0bb7: Unknown result type (might be due to invalid IL or missing references) //IL_0bc1: Expected O, but got Unknown //IL_0bc2: Unknown result type (might be due to invalid IL or missing references) //IL_0bce: Unknown result type (might be due to invalid IL or missing references) //IL_0bd8: Expected O, but got Unknown //IL_0bd9: Unknown result type (might be due to invalid IL or missing references) //IL_0bfe: Unknown result type (might be due to invalid IL or missing references) //IL_0c0a: Unknown result type (might be due to invalid IL or missing references) //IL_0c14: Expected O, but got Unknown //IL_0c15: Unknown result type (might be due to invalid IL or missing references) //IL_0c21: Unknown result type (might be due to invalid IL or missing references) //IL_0c2b: Expected O, but got Unknown //IL_0c2c: Unknown result type (might be due to invalid IL or missing references) //IL_0c38: Unknown result type (might be due to invalid IL or missing references) //IL_0c42: Expected O, but got Unknown //IL_0c43: Unknown result type (might be due to invalid IL or missing references) //IL_0c69: Unknown result type (might be due to invalid IL or missing references) //IL_0c73: Expected O, but got Unknown //IL_0c80: Unknown result type (might be due to invalid IL or missing references) //IL_0c8a: Expected O, but got Unknown //IL_0c97: Unknown result type (might be due to invalid IL or missing references) //IL_0ca1: Expected O, but got Unknown //IL_0cae: Unknown result type (might be due to invalid IL or missing references) //IL_0cb8: Expected O, but got Unknown //IL_0cdf: Unknown result type (might be due to invalid IL or missing references) //IL_0ce9: Expected O, but got Unknown //IL_0cf6: Unknown result type (might be due to invalid IL or missing references) //IL_0d00: Expected O, but got Unknown //IL_0d10: Unknown result type (might be due to invalid IL or missing references) //IL_0d1a: Expected O, but got Unknown //IL_0d34: Unknown result type (might be due to invalid IL or missing references) //IL_0d3e: Expected O, but got Unknown //IL_0d4e: Unknown result type (might be due to invalid IL or missing references) //IL_0d58: Expected O, but got Unknown //IL_0d7f: Unknown result type (might be due to invalid IL or missing references) //IL_0d89: Expected O, but got Unknown //IL_0db0: Unknown result type (might be due to invalid IL or missing references) //IL_0dba: Expected O, but got Unknown //IL_0de1: Unknown result type (might be due to invalid IL or missing references) //IL_0deb: Expected O, but got Unknown //IL_0e12: Unknown result type (might be due to invalid IL or missing references) //IL_0e1c: Expected O, but got Unknown //IL_0e43: Unknown result type (might be due to invalid IL or missing references) //IL_0e4d: Expected O, but got Unknown //IL_0e74: Unknown result type (might be due to invalid IL or missing references) //IL_0e7e: Expected O, but got Unknown //IL_0e98: Unknown result type (might be due to invalid IL or missing references) //IL_0ea2: Expected O, but got Unknown //IL_0ea5: Unknown result type (might be due to invalid IL or missing references) //IL_0eaf: Expected O, but got Unknown //IL_0eb2: Unknown result type (might be due to invalid IL or missing references) //IL_0ebc: Expected O, but got Unknown //IL_0ebf: Unknown result type (might be due to invalid IL or missing references) //IL_0ec9: Expected O, but got Unknown //IL_0ecc: Unknown result type (might be due to invalid IL or missing references) //IL_0ed6: Expected O, but got Unknown //IL_0ed9: Unknown result type (might be due to invalid IL or missing references) //IL_0ee3: Expected O, but got Unknown //IL_0ee6: Unknown result type (might be due to invalid IL or missing references) //IL_0ef0: Expected O, but got Unknown //IL_0ef3: Unknown result type (might be due to invalid IL or missing references) //IL_0efd: Expected O, but got Unknown //IL_0f00: Unknown result type (might be due to invalid IL or missing references) //IL_0f0a: Expected O, but got Unknown //IL_0f0d: Unknown result type (might be due to invalid IL or missing references) //IL_0f17: Expected O, but got Unknown //IL_0f24: Unknown result type (might be due to invalid IL or missing references) //IL_0f2e: Expected O, but got Unknown //IL_0f31: Unknown result type (might be due to invalid IL or missing references) //IL_0f3b: Expected O, but got Unknown //IL_0f48: Unknown result type (might be due to invalid IL or missing references) //IL_0f52: Expected O, but got Unknown //IL_0f55: Unknown result type (might be due to invalid IL or missing references) //IL_0f5f: Expected O, but got Unknown //IL_0f6c: Unknown result type (might be due to invalid IL or missing references) //IL_0f76: Expected O, but got Unknown //IL_0f78: Unknown result type (might be due to invalid IL or missing references) //IL_0f84: Unknown result type (might be due to invalid IL or missing references) //IL_0f8e: Expected O, but got Unknown //IL_0f91: Unknown result type (might be due to invalid IL or missing references) //IL_0f9b: Expected O, but got Unknown //IL_0f9e: Unknown result type (might be due to invalid IL or missing references) //IL_0fa8: Expected O, but got Unknown //IL_0fb5: Unknown result type (might be due to invalid IL or missing references) //IL_0fbf: Expected O, but got Unknown //IL_0fc2: Unknown result type (might be due to invalid IL or missing references) //IL_0fcc: Expected O, but got Unknown //IL_0fcf: Unknown result type (might be due to invalid IL or missing references) //IL_0fd9: Expected O, but got Unknown //IL_0fe9: Unknown result type (might be due to invalid IL or missing references) //IL_0ff3: Expected O, but got Unknown //IL_1000: Unknown result type (might be due to invalid IL or missing references) //IL_100a: Expected O, but got Unknown //IL_101a: Unknown result type (might be due to invalid IL or missing references) //IL_1024: Expected O, but got Unknown //IL_1031: Unknown result type (might be due to invalid IL or missing references) //IL_103b: Expected O, but got Unknown //IL_103e: Unknown result type (might be due to invalid IL or missing references) //IL_1048: Expected O, but got Unknown //IL_1062: Unknown result type (might be due to invalid IL or missing references) //IL_106c: Expected O, but got Unknown //IL_106f: Unknown result type (might be due to invalid IL or missing references) //IL_1079: Expected O, but got Unknown //IL_107c: Unknown result type (might be due to invalid IL or missing references) //IL_1086: Expected O, but got Unknown //IL_1089: Unknown result type (might be due to invalid IL or missing references) //IL_1093: Expected O, but got Unknown //IL_1096: Unknown result type (might be due to invalid IL or missing references) //IL_10a0: Expected O, but got Unknown //IL_10a3: Unknown result type (might be due to invalid IL or missing references) //IL_10ad: Expected O, but got Unknown //IL_10b0: Unknown result type (might be due to invalid IL or missing references) //IL_10ba: Expected O, but got Unknown //IL_10bd: Unknown result type (might be due to invalid IL or missing references) //IL_10c7: Expected O, but got Unknown //IL_10d4: Unknown result type (might be due to invalid IL or missing references) //IL_10de: Expected O, but got Unknown //IL_10eb: Unknown result type (might be due to invalid IL or missing references) //IL_10f5: Expected O, but got Unknown //IL_10f8: Unknown result type (might be due to invalid IL or missing references) //IL_1102: Expected O, but got Unknown //IL_1105: Unknown result type (might be due to invalid IL or missing references) //IL_110f: Expected O, but got Unknown //IL_1112: Unknown result type (might be due to invalid IL or missing references) //IL_111c: Expected O, but got Unknown //IL_111f: Unknown result type (might be due to invalid IL or missing references) //IL_1129: Expected O, but got Unknown //IL_112c: Unknown result type (might be due to invalid IL or missing references) //IL_1136: Expected O, but got Unknown //IL_1144: Unknown result type (might be due to invalid IL or missing references) //IL_114e: Expected O, but got Unknown //IL_115b: Unknown result type (might be due to invalid IL or missing references) //IL_1165: Expected O, but got Unknown //IL_1172: Unknown result type (might be due to invalid IL or missing references) //IL_117c: Expected O, but got Unknown //IL_117f: Unknown result type (might be due to invalid IL or missing references) //IL_1189: Expected O, but got Unknown //IL_1196: Unknown result type (might be due to invalid IL or missing references) //IL_11a0: Expected O, but got Unknown //IL_11a3: Unknown result type (might be due to invalid IL or missing references) //IL_11ad: Expected O, but got Unknown switch (connectionId) { case 1: MenuApolice = (DockPanel)target; break; case 2: IncluirpoliceButton = (MenuItem)target; IncluirpoliceButton.Click += new RoutedEventHandler(IncluirApolice_OnClick); break; case 3: AlterarApoliceButton = (MenuItem)target; AlterarApoliceButton.Click += new RoutedEventHandler(Alterar_OnClick); break; case 4: SalvarApoliceButton = (MenuItem)target; SalvarApoliceButton.Click += new RoutedEventHandler(SalvarApolice_OnClick); break; case 5: CancelarApoliceButton = (MenuItem)target; CancelarApoliceButton.Click += new RoutedEventHandler(CancelarApolice_OnClick); break; case 6: ExcluirpoliceButton = (MenuItem)target; ExcluirpoliceButton.Click += new RoutedEventHandler(ExcluirDocumento_OnClick); break; case 7: ButtonImportado = (Button)target; ((ButtonBase)ButtonImportado).Click += new RoutedEventHandler(Importacao_OnClick); break; case 8: ((MenuItem)target).Click += new RoutedEventHandler(AbrirPerfil_OnClick); break; case 9: ArquivoDigitalButton = (MenuItem)target; ArquivoDigitalButton.Click += new RoutedEventHandler(AbrirAquivoDigital_Click); break; case 10: MaisOpcoesButton = (MenuItem)target; break; case 11: EditarParcelasButton = (MenuItem)target; EditarParcelasButton.Click += new RoutedEventHandler(EditarParcelas_OnClick); break; case 12: ((MenuItem)target).Click += new RoutedEventHandler(Renovar_OnClick); break; case 13: ((MenuItem)target).Click += new RoutedEventHandler(Perdido_OnClick); break; case 14: ((MenuItem)target).Click += new RoutedEventHandler(Endossar_OnClick); break; case 15: ((MenuItem)target).Click += new RoutedEventHandler(RecusarDocumento_OnClick); break; case 16: ((MenuItem)target).Click += new RoutedEventHandler(ManutecaoItens_OnClick); break; case 17: ((MenuItem)target).Click += new RoutedEventHandler(MenuItem_OnClick); break; case 18: ((MenuItem)target).Click += new RoutedEventHandler(AbrirLog_OnClick); break; case 19: ((MenuItem)target).Click += new RoutedEventHandler(AbrirLogEmail_OnClick); break; case 20: ((MenuItem)target).Click += new RoutedEventHandler(AbrirLogEmailPF_OnClick); break; case 21: ((MenuItem)target).Click += new RoutedEventHandler(AbrirLogTrocaCliente_OnClick); break; case 22: ((MenuItem)target).Click += new RoutedEventHandler(MenuItem_Click); break; case 23: ((MenuItem)target).Click += new RoutedEventHandler(AbrirInfo_OnClick); break; case 24: ApoliceControl1 = (WrapPanel)target; break; case 25: ((Selector)(ComboBox)target).SelectionChanged += new SelectionChangedEventHandler(Ramo_OnSelectionChanged); break; case 26: ProdutoBox = (ComboBox)target; break; case 27: SituacaoBox = (ComboBox)target; break; case 28: NegocioCorretoraBox = (ComboBox)target; break; case 29: TipoRecebimentoBox = (ComboBox)target; break; case 30: TipoEndossoBox = (ComboBox)target; break; case 31: ApoliceBox = (TextBox)target; break; case 32: EndossoBox = (TextBox)target; break; case 33: ((UIElement)(DatePicker)target).LostKeyboardFocus += new KeyboardFocusChangedEventHandler(Initial_DatePicker_OnLostKeyboardFocus); ((UIElement)(DatePicker)target).PreviewKeyDown += new KeyEventHandler(base.DatePicker_PreviewKeyDown); ((Control)(DatePicker)target).MouseDoubleClick += new MouseButtonEventHandler(base.DataAtual_OnDoubleClick); ((DatePicker)target).SelectedDateChanged += ValidacaoDocumento; break; case 34: Vigencia2Box = (DatePicker)target; ((UIElement)Vigencia2Box).LostKeyboardFocus += new KeyboardFocusChangedEventHandler(base.DatePicker_OnLostKeyboardFocus); ((Control)Vigencia2Box).MouseDoubleClick += new MouseButtonEventHandler(base.DataAtual_OnDoubleClick); Vigencia2Box.SelectedDateChanged += ValidacaoDocumento; break; case 35: TransmissaoBox = (DatePicker)target; ((UIElement)TransmissaoBox).LostKeyboardFocus += new KeyboardFocusChangedEventHandler(base.DatePicker_OnLostKeyboardFocus); ((UIElement)TransmissaoBox).PreviewKeyDown += new KeyEventHandler(base.DatePicker_PreviewKeyDown); ((Control)TransmissaoBox).MouseDoubleClick += new MouseButtonEventHandler(base.DataAtual_OnDoubleClick); break; case 36: EmissaoBox = (DatePicker)target; ((UIElement)EmissaoBox).LostKeyboardFocus += new KeyboardFocusChangedEventHandler(base.DatePicker_OnLostKeyboardFocus); ((UIElement)EmissaoBox).PreviewKeyDown += new KeyEventHandler(base.DatePicker_PreviewKeyDown); ((Control)EmissaoBox).MouseDoubleClick += new MouseButtonEventHandler(base.DataAtual_OnDoubleClick); EmissaoBox.SelectedDateChanged += ValidacaoDocumento; break; case 37: FormaPagamentoBox = (ComboBox)target; break; case 38: PremiosBox = (Grid)target; break; case 39: AdicionalBox = (ToggleButton)target; break; case 40: Comissao = (CustomIsReadOnlyControl)target; break; case 41: ComissaoBox = (CurrencyTextBox)target; break; case 42: PremioLiquidoBox = (CurrencyTextBox)target; break; case 43: PremioAdicionalBox = (CurrencyTextBox)target; ((UIElement)PremioAdicionalBox).GotFocus += new RoutedEventHandler(FocusPremios); break; case 44: IofBox = (CurrencyTextBox)target; break; case 45: DiferencaBox = (CurrencyTextBox)target; break; case 46: PremioTotalBox = (CurrencyTextBox)target; break; case 47: ParcelasBox = (CurrencyTextBox)target; break; case 48: ComissaoOriginal = (CustomIsReadOnlyControl)target; break; case 49: Gerada = (CustomIsReadOnlyControl)target; break; case 50: Recebida = (CustomIsReadOnlyControl)target; break; case 51: Pendente = (CustomIsReadOnlyControl)target; break; case 52: Repasse = (CustomIsReadOnlyControl)target; break; case 53: ((ButtonBase)(Button)target).Click += new RoutedEventHandler(Button_Click); break; case 54: BaixarParcelaButton = (Menu)target; break; case 55: ((MenuItem)target).Click += new RoutedEventHandler(BaixarParcelas_Click); break; case 56: ((MenuItem)target).Click += new RoutedEventHandler(AlterarParcela_Click); break; case 57: ((MenuItem)target).Click += new RoutedEventHandler(IncluirNovaFatura_Click); break; case 58: ((MenuItem)target).Click += new RoutedEventHandler(ReplicarFatura_Click); break; case 59: ((MenuItem)target).Click += new RoutedEventHandler(IncluirParcelaEspecial_Click); break; case 60: ((MenuItem)target).Click += new RoutedEventHandler(ExcluirParcela_Click); break; case 61: SalvarParcelaButton = (Menu)target; break; case 62: ((MenuItem)target).Click += new RoutedEventHandler(SalvarParcela_Click); break; case 63: ((MenuItem)target).Click += new RoutedEventHandler(CancelarParcela_Click); break; case 64: ((MenuItem)target).Click += new RoutedEventHandler(AbrirLogParcelas_OnClick); break; case 65: ((MenuItem)target).Click += new RoutedEventHandler(AbrirLogParcelaSelecionada_OnClick); break; case 66: ((MenuItem)target).Click += new RoutedEventHandler(AbrirLogParcelaAntigo_OnClick); break; case 67: EditarParcelasFields = (StackPanel)target; break; case 68: TipoParcelaField = (CustomItemValidation)target; break; case 69: TipoParcelaBox = (ComboBox)target; break; case 70: QuantidadeFaturaField = (CustomItemControl)target; break; case 71: QuantidadeFaturaBox = (CurrencyTextBox)target; break; case 72: FaturaField = (CustomItemValidation)target; break; case 73: FaturaBox = (TextBox)target; break; case 74: VigenciaInicialField = (CustomItemValidation)target; break; case 75: ((UIElement)(DatePicker)target).LostKeyboardFocus += new KeyboardFocusChangedEventHandler(Vigencia_DatePicker_OnLostKeyboardFocus); ((UIElement)(DatePicker)target).PreviewKeyDown += new KeyEventHandler(base.DatePicker_PreviewKeyDown); ((Control)(DatePicker)target).MouseDoubleClick += new MouseButtonEventHandler(base.DataAtual_OnDoubleClick); break; case 76: VigenciaFinalField = (CustomItemValidation)target; break; case 77: VigenciaFinalParcelaBox = (DatePicker)target; ((UIElement)VigenciaFinalParcelaBox).LostKeyboardFocus += new KeyboardFocusChangedEventHandler(base.DatePicker_OnLostKeyboardFocus); ((UIElement)VigenciaFinalParcelaBox).PreviewKeyDown += new KeyEventHandler(base.DatePicker_PreviewKeyDown); ((Control)VigenciaFinalParcelaBox).MouseDoubleClick += new MouseButtonEventHandler(base.DataAtual_OnDoubleClick); break; case 78: VencimentoField = (CustomItemValidation)target; break; case 79: ((UIElement)(DatePicker)target).LostKeyboardFocus += new KeyboardFocusChangedEventHandler(Vencimento_DatePicker_OnLostKeyboardFocus); ((UIElement)(DatePicker)target).PreviewKeyDown += new KeyEventHandler(base.DatePicker_PreviewKeyDown); ((Control)(DatePicker)target).MouseDoubleClick += new MouseButtonEventHandler(base.DataAtual_OnDoubleClick); break; case 80: EmissaoField = (CustomItemControl)target; break; case 81: EmissaoParcelaBox = (DatePicker)target; ((UIElement)EmissaoParcelaBox).LostKeyboardFocus += new KeyboardFocusChangedEventHandler(base.DatePicker_OnLostKeyboardFocus); ((UIElement)EmissaoParcelaBox).PreviewKeyDown += new KeyEventHandler(base.DatePicker_PreviewKeyDown); ((Control)EmissaoParcelaBox).MouseDoubleClick += new MouseButtonEventHandler(base.DataAtual_OnDoubleClick); break; case 82: PercentualComissaoField = (CustomItemValidation)target; break; case 83: ComissaoParcelaBox = (CurrencyTextBox)target; break; case 84: ComissaoIcon = (TextBlock)target; break; case 85: ValorLiquidoField = (CustomItemControl)target; break; case 86: ValorLiquidoParcelaBox = (CurrencyTextBox)target; break; case 87: ValorField = (CustomItemControl)target; break; case 88: ValorParcelaBox = (CurrencyTextBox)target; break; case 89: RecebimentoField = (CustomItemValidation)target; break; case 90: RecebimentoParcelaBox = (DatePicker)target; ((UIElement)RecebimentoParcelaBox).LostKeyboardFocus += new KeyboardFocusChangedEventHandler(Vencimento_OnLostKeyboardFocus); ((UIElement)RecebimentoParcelaBox).PreviewKeyDown += new KeyEventHandler(base.DatePicker_PreviewKeyDown); ((Control)RecebimentoParcelaBox).MouseDoubleClick += new MouseButtonEventHandler(base.DataAtual_OnDoubleClick); RecebimentoParcelaBox.SelectedDateChanged += ValidacaoParcela; break; case 91: QuitacaoField = (CustomItemControl)target; break; case 92: ((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); ((DatePicker)target).SelectedDateChanged += ValidacaoParcela; break; case 93: DataControleParcelaField = (CustomItemControl)target; break; case 94: ((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); ((DatePicker)target).SelectedDateChanged += ValidacaoParcela; break; case 95: CreditoField = (CustomItemValidation)target; break; case 96: CreditoParcelaBox = (DatePicker)target; ((UIElement)CreditoParcelaBox).LostKeyboardFocus += new KeyboardFocusChangedEventHandler(base.DatePicker_OnLostKeyboardFocus); ((UIElement)CreditoParcelaBox).PreviewKeyDown += new KeyEventHandler(base.DatePicker_PreviewKeyDown); ((Control)CreditoParcelaBox).MouseDoubleClick += new MouseButtonEventHandler(base.DataAtual_OnDoubleClick); CreditoParcelaBox.SelectedDateChanged += ValidacaoParcela; break; case 97: ValorRealizadoField = (CustomItemValidation)target; break; case 98: ValorRealizadoParcelaBox = (CurrencyTextBox)target; ((UIElement)ValorRealizadoParcelaBox).LostFocus += new RoutedEventHandler(ValorRealizadoParcelaBox_OnLostFocus); break; case 99: ValorComissaoField = (CustomItemValidation)target; break; case 100: ValorComissaoParcelaBox = (CurrencyTextBox)target; ValorComissaoParcelaBox.NumberChanged += CalculoComissao_OnNumberChanged; break; case 101: ImpostosField = (WrapPanel)target; break; case 102: PorcentagemIrField = (CustomItemControl)target; break; case 103: PorcentagemIrBox = (CurrencyTextBox)target; PorcentagemIrBox.NumberChanged += PorcentagemIrBox_OnNumberChanged; break; case 104: ValorIrField = (CustomItemControl)target; break; case 105: ValorIrBox = (CurrencyTextBox)target; ValorIrBox.NumberChanged += ValorImposto_OnNumberChanged; break; case 106: PorcentagemIssField = (CustomItemControl)target; break; case 107: PorcentagemIssBox = (CurrencyTextBox)target; PorcentagemIssBox.NumberChanged += PorcentagemIssBox_OnNumberChanged; break; case 108: ValorIssField = (CustomItemControl)target; break; case 109: ValorIssBox = (CurrencyTextBox)target; ValorIssBox.NumberChanged += ValorImposto_OnNumberChanged; break; case 110: ValorOutrosField = (CustomItemControl)target; break; case 111: ValorOutrosBox = (CurrencyTextBox)target; ValorOutrosBox.NumberChanged += ValorImposto_OnNumberChanged; break; case 112: ValorDescontoField = (CustomItemControl)target; break; case 113: ValorDescontoBox = (CurrencyTextBox)target; ValorDescontoBox.NumberChanged += ValorImposto_OnNumberChanged; break; case 114: ValorComDescField = (CustomItemControl)target; break; case 115: ValorComDescBox = (CurrencyTextBox)target; ValorComDescBox.NumberChanged += ValorImposto_OnNumberChanged; break; case 116: ParcelaGrid = (DataGrid)target; break; case 117: ParcelaColumn = (DataGridTextColumn)target; break; case 118: FaturaColumn = (DataGridTextColumn)target; break; case 119: VigenciaInicialColumn = (DataGridTextColumn)target; break; case 120: VigenciaFinalColumn = (DataGridTextColumn)target; break; case 121: ParcelasComissaoColumn = (DataGridTextColumn)target; break; case 122: ParcelasValorComissaoColumn = (DataGridTextColumn)target; break; case 123: ParcelasValorComissaoDescColumn = (DataGridTextColumn)target; break; case 124: MaisInformacoesColumn = (DataGridTemplateColumn)target; break; case 127: EditarVendedorButton = (MenuItem)target; EditarVendedorButton.Click += new RoutedEventHandler(IncluirVendedor_Click); break; case 128: SalvarVendedorButton = (MenuItem)target; SalvarVendedorButton.Click += new RoutedEventHandler(SalvarVendedor_Click); break; case 129: CancelarVendedorButton = (MenuItem)target; CancelarVendedorButton.Click += new RoutedEventHandler(CancelarVendedor_Click); break; case 130: ((MenuItem)target).Click += new RoutedEventHandler(AbrirLogVendedor_OnClick); break; case 131: EditarVendedorFields = (WrapPanel)target; break; case 132: CoCorretagemToogle = (ToggleButton)target; ((ButtonBase)CoCorretagemToogle).Click += new RoutedEventHandler(AdicionarCoCorretagem_OnClick); break; case 133: TipoVendedorBox = (ComboBox)target; break; case 134: VendedorBox = (ComboBox)target; break; case 135: ComissaoNovoBox = (CustomItemValidation)target; break; case 136: ComissaoNovoComboBox = (ComboBox)target; ((Selector)ComissaoNovoComboBox).SelectionChanged += new SelectionChangedEventHandler(ComissaoVendedorBox_OnSelectionChanged); break; case 137: ComissaoRenovacaoBox = (CustomItemValidation)target; break; case 138: ComissaoRenovacaoComboBox = (ComboBox)target; ((Selector)ComissaoRenovacaoComboBox).SelectionChanged += new SelectionChangedEventHandler(ComissaoVendedorBox_OnSelectionChanged); break; case 139: ValorRepasseBox = (CurrencyTextBox)target; ValorRepasseBox.NumberChanged += CalculoComissao_OnNumberChanged; break; case 140: FormaRecebidaBox = (TextBox)target; break; case 141: FormaIncidenciaBox = (TextBox)target; break; case 142: VendedorGrid = (DataGrid)target; break; case 143: VendedorGridColumn = (DataGridTextColumn)target; break; case 144: PagamentosPorcentagemRepasseColumn = (DataGridTextColumn)target; break; case 145: PagamentosValorRepasseColumn = (DataGridTextColumn)target; break; case 147: ProponenteBox = (TextBox)target; break; case 148: AutoCompleteBanco = (AutoCompleteBox)target; AutoCompleteBanco.Populating += new PopulatingEventHandler(AutoCompleteBancoBox_Populating); ((UIElement)AutoCompleteBanco).LostKeyboardFocus += new KeyboardFocusChangedEventHandler(AutoCompleteBanco_OnLostKeyboardFocus); break; case 149: AgenciaBox = (TextBox)target; break; case 150: ContaBox = (TextBox)target; break; case 151: CartaoBox = (TextBox)target; break; case 152: BandeiraBox = (ComboBox)target; break; case 153: VencimentoCartaoBox = (TextBox)target; ((UIElement)VencimentoCartaoBox).PreviewTextInput += new TextCompositionEventHandler(SomenteNumeros); ((TextBoxBase)VencimentoCartaoBox).TextChanged += new TextChangedEventHandler(VencimentoCartaoBox_OnTextChanged); ((UIElement)VencimentoCartaoBox).GotFocus += new RoutedEventHandler(VencimentoCartaoBox_OnGotFocus); break; case 154: DataBox = (DatePicker)target; ((Control)DataBox).MouseDoubleClick += new MouseButtonEventHandler(base.DataAtual_OnDoubleClick); break; case 155: PastaBox = (TextBox)target; break; default: _contentLoaded = true; break; } } [DebuggerNonUserCode] [GeneratedCode("PresentationBuildTasks", "4.0.0.0")] [EditorBrowsable(EditorBrowsableState.Never)] void IStyleConnector.Connect(int connectionId, object target) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Expected O, but got Unknown //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Expected O, but got Unknown switch (connectionId) { case 125: ((ButtonBase)(Button)target).Click += new RoutedEventHandler(ValoresParcelaInfo_OnClick); break; case 126: ((ButtonBase)(Button)target).Click += new RoutedEventHandler(AbrirAquivoDigital_Click); break; case 146: ((ButtonBase)(Button)target).Click += new RoutedEventHandler(ExcluirVendedor_Click); break; } } }