using System; using System.CodeDom.Compiler; using System.Collections.Generic; using System.Collections.ObjectModel; using System.ComponentModel; using System.Diagnostics; using System.Linq; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Controls.Primitives; using System.Windows.Data; using System.Windows.Input; using System.Windows.Markup; using System.Windows.Media; using System.Windows.Threading; using Gestor.Application.Actions; using Gestor.Application.Drawers; using Gestor.Application.Helpers; using Gestor.Application.Servicos; using Gestor.Application.Servicos.Seguros; using Gestor.Application.ViewModels; using Gestor.Application.ViewModels.Seguros; using Gestor.Application.Views.Ferramentas; 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.MalaDireta; using Gestor.Model.Domain.Relatorios.ClientesAtivosInativos; using Gestor.Model.Domain.Seguros; using MaterialDesignThemes.Wpf; namespace Gestor.Application.Views.Seguros; public class ConsultaOriginalView : BaseUserControl, IComponentConnector, IStyleConnector { public ConsultaViewModel ViewModel; private bool _carregarDocumetos = true; internal RadioButton ApoliceRadioButton; internal RadioButton EndossoRadioButton; internal MenuItem AcessarDocumentoMenuItem; internal DataGrid ApoliceGrid; internal DataGridTextColumn NomeField; internal DataGridTextColumn ApelidoField; internal DataGridTextColumn ApolicesComissaoColumn; internal DataGrid EndossoGrid; internal DataGridTextColumn EndossosComissaoColumn; internal WrapPanel Comissao; internal DataGrid ParcelaGrid; internal DataGridTextColumn ParcelasTotalColumn; internal DataGridTextColumn ParcelasRealizadoColumn; internal DataGridTextColumn ParcelasComissaoColumn; internal DataGridTextColumn ParcelasReciboColumn; internal DataGridTextColumn ParcelasValorComissaoDescColumn; internal DataGridTemplateColumn MaisInformacoesColumn; internal RadioButton AtivosRadioButton; internal RadioButton ApoliceItensRadioButton; internal RadioButton EndossoItensRadioButton; internal RadioButton InativosRadioButton; internal DataGrid ItemGrid; private bool _contentLoaded; private Documento _documentoAssistencia { get; set; } private string _linkAssistencia { get; set; } public ConsultaOriginalView(ConsultaViewModel viewModel) { ((FrameworkElement)this).Tag = "CONSULTA DE DOCUMENTOS"; ViewModel = viewModel ?? new ConsultaViewModel(); ((FrameworkElement)this).DataContext = ViewModel; InitializeComponent(); Gestor.Application.Actions.Actions.UpdateRadioApolice = (Action)Delegate.Combine(Gestor.Application.Actions.Actions.UpdateRadioApolice, new Action(SelecionarRadios)); Gestor.Application.Actions.Actions.ScrollDocumento = (Action)Delegate.Combine(Gestor.Application.Actions.Actions.ScrollDocumento, new Action(ScrollDocumento)); Gestor.Application.Actions.Actions.ScrollToItem = ScrollToItem; Gestor.Application.Actions.Actions.ScrollToItem = (Action)Delegate.Combine(Gestor.Application.Actions.Actions.ScrollToItem, new Action(ScrollToItem)); ((FrameworkElement)ItemGrid).DataContext = ViewModel; Dispatcher dispatcher = ((DispatcherObject)this).Dispatcher; if (dispatcher != null) { dispatcher.BeginInvoke((DispatcherPriority)7, (Delegate)new Action(ContentLoad)); } } private void ScrollToItem() { if (((Selector)ItemGrid).SelectedItem != null) { ScrollToIndex(ItemGrid, ((Selector)ItemGrid).SelectedIndex); } } private void ContentLoad() { //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Expected O, but got Unknown //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Expected O, but got Unknown //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Expected O, but got Unknown //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Expected O, but got Unknown //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Expected O, but got Unknown //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Expected O, but got Unknown //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Expected O, but got Unknown //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Expected O, but got Unknown //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Expected O, but got Unknown //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Expected O, but got Unknown //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Expected O, but got Unknown //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Expected O, but got Unknown //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_024d: Unknown result type (might be due to invalid IL or missing references) //IL_025c: Unknown result type (might be due to invalid IL or missing references) //IL_026e: Unknown result type (might be due to invalid IL or missing references) //IL_0283: Unknown result type (might be due to invalid IL or missing references) //IL_028f: Unknown result type (might be due to invalid IL or missing references) if (ConsultaViewModel.DocumentoSelecionado != null && ConsultaViewModel.DocumentoSelecionado.Tipo != 0) { ViewModel.FilterDocumento = 1; } ((DataGridColumn)NomeField).Visibility = (Visibility)(ViewModel.Apelido ? 2 : 0); ((DataGridColumn)ApelidoField).Visibility = (Visibility)((!ViewModel.Apelido) ? 2 : 0); ((ToggleButton)ApoliceRadioButton).IsChecked = ViewModel.FilterDocumento == 0; ((ToggleButton)EndossoRadioButton).IsChecked = ViewModel.FilterDocumento == 1; AjustaItem(); ((Selector)ApoliceGrid).SelectionChanged += new SelectionChangedEventHandler(ApoliceGrid_OnSelectionChanged); ((Control)ParcelaGrid).MouseDoubleClick += new MouseButtonEventHandler(ParcelaGrid_OnMouseDoubleClick); ((Selector)EndossoGrid).SelectionChanged += new SelectionChangedEventHandler(EndossoGrid_OnSelectionChanged); ((Control)EndossoGrid).MouseDoubleClick += new MouseButtonEventHandler(EndossoGrid_OnMouseDoubleClick); ((ToggleButton)AtivosRadioButton).Checked += new RoutedEventHandler(Documento_OnChecked); ((ToggleButton)ApoliceItensRadioButton).Checked += new RoutedEventHandler(Documento_OnChecked); ((ToggleButton)EndossoItensRadioButton).Checked += new RoutedEventHandler(Documento_OnChecked); ((ToggleButton)InativosRadioButton).Checked += new RoutedEventHandler(Documento_OnChecked); ((ToggleButton)ApoliceRadioButton).Checked += new RoutedEventHandler(Documento_OnChecked); ((ToggleButton)EndossoRadioButton).Checked += new RoutedEventHandler(Documento_OnChecked); ((Selector)ItemGrid).SelectionChanged += new SelectionChangedEventHandler(ItemGrid_OnSelectionChanged); ((Control)ItemGrid).MouseDoubleClick += new MouseButtonEventHandler(ItemGrid_OnMouseDoubleClick); Visibility val = (Visibility)(ViewModel.Restricao((TipoRestricao)14) ? 2 : 0); ViewModel.ComissaoValorVisibility = (Visibility)(ViewModel.Restricao((TipoRestricao)14) ? 2 : 0); bool flag = ViewModel.Restricao((TipoRestricao)95); ((DataGridColumn)ApolicesComissaoColumn).Visibility = (Visibility)((!flag) ? ((int)val) : 0); ((DataGridColumn)EndossosComissaoColumn).Visibility = (Visibility)((!flag) ? ((int)val) : 0); ((UIElement)Comissao).Visibility = val; bool flag2 = Recursos.Configuracoes.Any((ConfiguracaoSistema x) => (int)x.Configuracao == 5); ((DataGridColumn)ParcelasRealizadoColumn).Visibility = val; ((DataGridColumn)ParcelasComissaoColumn).Visibility = (Visibility)((!flag) ? ((int)val) : 0); ((DataGridColumn)ParcelasReciboColumn).Visibility = (Visibility)(flag2 ? 2 : ((int)val)); ((DataGridColumn)ParcelasValorComissaoDescColumn).Visibility = (Visibility)((!flag2) ? 2 : ((int)val)); ((DataGridColumn)MaisInformacoesColumn).Visibility = val; } private void AjustaItem() { ((ToggleButton)AtivosRadioButton).IsChecked = ViewModel.FilterItens == 0; ((ToggleButton)ApoliceItensRadioButton).IsChecked = ViewModel.FilterItens == 1; ((ToggleButton)EndossoItensRadioButton).IsChecked = ViewModel.FilterItens == 2; ((ToggleButton)InativosRadioButton).IsChecked = ViewModel.FilterItens == 3; } private async void EndossoGrid_OnMouseDoubleClick(object sender, MouseButtonEventArgs e) { DataGrid val = (DataGrid)sender; if (val == null || ((Selector)val).SelectedIndex >= 0) { ((ToggleButton)AtivosRadioButton).IsChecked = true; await ViewModel.SelecionaDocumento(1, (Documento)((val != null) ? ((ItemsControl)val).Items[((Selector)val).SelectedIndex] : null)); Gestor.Application.Actions.Actions.AcessaTela?.Invoke((TipoTela)2, ""); } } private void ItemGrid_OnMouseDoubleClick(object sender, MouseButtonEventArgs e) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown DataGrid val = (DataGrid)sender; if (val == null || ((Selector)val).SelectedIndex >= 0) { ViewModel.SelecionaItem((Item)((val != null) ? ((ItemsControl)val).Items[((Selector)val).SelectedIndex] : null)); Gestor.Application.Actions.Actions.AcessaTela?.Invoke((TipoTela)3, ""); } } private void ItemGrid_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_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Expected O, but got Unknown DataGrid val = (DataGrid)sender; if (val == null || ((Selector)val).SelectedIndex >= 0) { Item val2 = (Item)((Selector)val).SelectedItem; if (!val2.Cancelado && !val2.Substituido.HasValue && val2.Status != null) { AjustaItem(); } ViewModel.SelecionaItem((Item)((val != null) ? ((ItemsControl)val).Items[((Selector)val).SelectedIndex] : null)); } } private void SelecionarRadios(int filter) { _carregarDocumetos = false; ((ToggleButton)ApoliceRadioButton).IsChecked = filter == 0; ((ToggleButton)EndossoRadioButton).IsChecked = filter == 1; _carregarDocumetos = true; } private void ScrollDocumento() { if (ViewModel.UpdatingScroll && ((Selector)ApoliceGrid).SelectedItem != null) { ApoliceGrid.ScrollIntoView(((Selector)ApoliceGrid).SelectedItem); } ViewModel.UpdatingScroll = false; } private async void Documento_OnChecked(object sender, RoutedEventArgs e) { ((HeaderedItemsControl)AcessarDocumentoMenuItem).Header = ((ViewModel.FilterDocumento == 0) ? "ACESSAR APÓLICE" : "ACESSAR ENDOSSO"); ((FrameworkElement)AcessarDocumentoMenuItem).ToolTip = ((ViewModel.FilterDocumento == 0) ? "CLIQUE PARA ACESSAR A TELA DA APÓLICE" : "CLIQUE PARA ACESSAR A TELA DE ENDOSSO"); RadioButton val = (RadioButton)sender; if (string.IsNullOrEmpty(val.GroupName)) { return; } string groupName = val.GroupName; if (!(groupName == "Apolices")) { if (groupName == "Itens") { switch (((FrameworkElement)val).Name) { default: await ViewModel.SelecionaItens(0, null, 0L); break; case "ApoliceItensRadioButton": await ViewModel.SelecionaItens(1, null, 0L); break; case "EndossoItensRadioButton": await ViewModel.SelecionaItens(2, null, 0L); break; case "InativosRadioButton": await ViewModel.SelecionaItens(3, null, 0L); break; } } } else { if (!_carregarDocumetos) { return; } if (!(((FrameworkElement)val).Name == "EndossoRadioButton")) { ((HeaderedItemsControl)AcessarDocumentoMenuItem).Header = "ACESSAR APÓLICE"; ((FrameworkElement)AcessarDocumentoMenuItem).ToolTip = "CLIQUE PARA ACESSAR A TELA DA APÓLICE"; ViewModel.CarregaDocumentos(0); if (((Selector)ApoliceGrid).SelectedItem == null && ((CollectionView)((ItemsControl)ApoliceGrid).Items).Count > 0) { ((Selector)ApoliceGrid).SelectedItem = ((ItemsControl)ApoliceGrid).Items[0]; } if (((Selector)ApoliceGrid).SelectedItem != null) { await ViewModel.SelecionaDocumento(0, (Documento)((Selector)ApoliceGrid).SelectedItem); } } else { ((HeaderedItemsControl)AcessarDocumentoMenuItem).Header = "ACESSAR ENDOSSO"; ((FrameworkElement)AcessarDocumentoMenuItem).ToolTip = "CLIQUE PARA ACESSAR A TELA DE ENDOSSO"; ViewModel.CarregaDocumentos(1); if (((Selector)EndossoGrid).SelectedItem == null && ((CollectionView)((ItemsControl)EndossoGrid).Items).Count > 0) { ((Selector)EndossoGrid).SelectedItem = ((ItemsControl)EndossoGrid).Items[0]; } if (((Selector)EndossoGrid).SelectedItem != null) { await ViewModel.SelecionaDocumento(1, (Documento)((Selector)EndossoGrid).SelectedItem); } } } } public void ScrollToIndex(DataGrid grid, int index) { Visual descendantByType = GetDescendantByType((Visual)(object)grid, typeof(ScrollViewer)); Visual obj = ((descendantByType is ScrollViewer) ? descendantByType : null); int num = ((index - 5 > 0) ? (index - 5) : 0); if (obj != null) { ((ScrollViewer)obj).ScrollToVerticalOffset((double)num); } } public Visual GetDescendantByType(Visual element, Type type) { if (element == null) { return null; } if (((object)element).GetType() == type) { return element; } Visual val = null; FrameworkElement val2 = (FrameworkElement)(object)((element is FrameworkElement) ? element : null); if (val2 != null) { val2.ApplyTemplate(); } for (int i = 0; i < VisualTreeHelper.GetChildrenCount((DependencyObject)(object)element); i++) { DependencyObject child = VisualTreeHelper.GetChild((DependencyObject)(object)element, i); Visual element2 = (Visual)(object)((child is Visual) ? child : null); val = GetDescendantByType(element2, type); if (val != null) { break; } } return val; } private async void ApoliceGrid_OnSelectionChanged(object sender, SelectionChangedEventArgs e) { DataGrid val = (DataGrid)sender; if (val == null || ((Selector)val).SelectedIndex >= 0) { await ViewModel.SelecionaDocumento(0, (Documento)((val != null) ? ((ItemsControl)val).Items[((Selector)val).SelectedIndex] : null)); VisibilityValorPago(); } } private async void EndossoGrid_OnSelectionChanged(object sender, SelectionChangedEventArgs e) { DataGrid val = (DataGrid)sender; if (val == null || ((Selector)val).SelectedIndex >= 0) { await ViewModel.SelecionaDocumento(1, (Documento)((val != null) ? ((ItemsControl)val).Items[((Selector)val).SelectedIndex] : null)); VisibilityValorPago(); } } private void VisibilityValorPago() { DataGridTextColumn parcelasTotalColumn = ParcelasTotalColumn; ObservableCollection parcelas = ViewModel.Parcelas; ((DataGridColumn)parcelasTotalColumn).Visibility = (Visibility)((parcelas == null || !(parcelas.Sum((Parcela p) => p.ValorPago) > default(decimal))) ? 2 : 0); } public async void Pesquisar(PesquisaAvancada pesquisa) { await ViewModel.Pesquisar(pesquisa); if (ViewModel.SelectedControle != null) { ScrollToIndex(ApoliceGrid, ((Selector)ApoliceGrid).SelectedIndex); } if (ViewModel.SelectedEndosso != null) { ScrollToIndex(EndossoGrid, ((Selector)EndossoGrid).SelectedIndex); } if (ViewModel.SelectedItem != null) { ScrollToIndex(ItemGrid, ((Selector)ItemGrid).SelectedIndex); } if (ViewModel.SelectedParcela != null) { ScrollToIndex(ParcelaGrid, ((Selector)ParcelaGrid).SelectedIndex); } } private void ClienteView_Click(object sender, RoutedEventArgs e) { Gestor.Application.Actions.Actions.AcessaTela?.Invoke((TipoTela)1, ""); } private async void ApoliceGrid_OnMouseDoubleClick(object sender, MouseButtonEventArgs e) { DataGridRow val = (DataGridRow)sender; if (val != null && !(((FrameworkElement)val).DataContext.GetType() != typeof(Documento))) { ((ToggleButton)AtivosRadioButton).IsChecked = true; Documento val2 = (Documento)((val != null) ? val.Item : null); if ((((int)val2 != 0) ? new long?(((DomainBase)val2).Id) : null) != ((DomainBase)ViewModel.SelectedControle).Id) { await ViewModel.SelecionaDocumento(0, (Documento)((val != null) ? val.Item : null)); } Gestor.Application.Actions.Actions.AcessaTela?.Invoke((TipoTela)2, ""); } } private static void ParcelaGrid_OnMouseDoubleClick(object sender, MouseButtonEventArgs e) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Expected O, but got Unknown DataGrid val = (DataGrid)sender; if (val == null || ((Selector)val).SelectedIndex >= 0) { ConsultaViewModel.ParcelaSelecionada = (Parcela)((val != null) ? ((ItemsControl)val).Items[((Selector)val).SelectedIndex] : null); Gestor.Application.Actions.Actions.AcessaTela?.Invoke((TipoTela)2, "Parcela"); } } private void ApoliceView_Click(object sender, RoutedEventArgs e) { Gestor.Application.Actions.Actions.AcessaTela?.Invoke((TipoTela)2, ""); } private async void AbrirAquivoDigital_Click(object sender, RoutedEventArgs e) { FiltroArquivoDigital filtro = null; ConsultaViewModel.DocumentoSelecionado.Controle.Cliente = ViewModel.SelectedCliente; switch (((FrameworkElement)(Button)sender).Name) { case "Apolice": 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; } ViewModel.SelectedControle.Controle.Cliente = ViewModel.SelectedCliente; filtro = new FiltroArquivoDigital { Id = ((DomainBase)ViewModel.SelectedControle).Id, Tipo = (TipoArquivoDigital)2, Parente = ViewModel.SelectedControle }; break; case "Endosso": 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; } ViewModel.SelectedEndosso.Controle.Cliente = ViewModel.SelectedCliente; filtro = new FiltroArquivoDigital { Id = ((DomainBase)ViewModel.SelectedEndosso).Id, Tipo = (TipoArquivoDigital)2, Parente = ViewModel.SelectedEndosso }; break; case "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; } ViewModel.SelectedParcela.Documento = ConsultaViewModel.DocumentoSelecionado; filtro = new FiltroArquivoDigital { Id = ((DomainBase)ViewModel.SelectedParcela).Id, IdApolice = ((DomainBase)ViewModel.SelectedParcela.Documento).Id, Tipo = (TipoArquivoDigital)3, Parente = ViewModel.SelectedParcela }; break; case "Item": if (!new PermissaoArquivoDigitalServico().BuscarPermissao(Recursos.Usuario, (TipoArquivoDigital)4).Consultar) { await ViewModel.ShowMessage("VOCÊ NÃO POSSUI PERMISSÃO PARA ACESSAR\nARQUIVO DIGITAL DE " + ValidationHelper.GetDescription((Enum)(object)(TipoArquivoDigital)4) + "."); return; } ViewModel.SelectedItem.Documento = ConsultaViewModel.DocumentoSelecionado; filtro = new FiltroArquivoDigital { Id = ((DomainBase)ViewModel.SelectedItem).Id, IdApolice = ((DomainBase)ViewModel.SelectedItem.Documento).Id, Tipo = (TipoArquivoDigital)4, Parente = ViewModel.SelectedItem }; break; } ViewModel.ShowDrawer(new ArquivoDigitalDrawer(filtro), 0, close: false); } private void Item_Click(object sender, RoutedEventArgs e) { Gestor.Application.Actions.Actions.AcessaTela?.Invoke((TipoTela)3, ""); } private async void ReordenarItem_Click(object sender, RoutedEventArgs e) { List ids = ViewModel.Itens.Select((Item x) => ((DomainBase)x).Id).ToList(); ConsultaViewModel viewModel = ViewModel; viewModel.SalvarOrdem(await ViewModel.ShowReordenarItensDialog(ids)); } private void Parcela_Click(object sender, RoutedEventArgs e) { Gestor.Application.Actions.Actions.AcessaTela?.Invoke((TipoTela)2, "Parcela"); } private async void ValoresInfo_OnClick(object sender, RoutedEventArgs e) { bool restricaoInformacaoValores = ViewModel.Restricao((TipoRestricao)97); if (!restricaoInformacaoValores) { Documento documento = await ViewModel.AbrirDetalhes(); ViewModel.ShowDrawer(new ValoresApoliceDrawer(documento), 0); } if (restricaoInformacaoValores) { await ViewModel.ShowMessage("VOCÊ NÃO POSSUI PERMISSÃO PARA ACESSAR MAIS INFORMAÇÕES."); } } 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."); } else if (!ViewModel.EnableRenovar) { await ViewModel.ShowMessage("NÃO É POSSÍVEL RENOVAR UM DOCUMENTO SEM EMISSÃO OU SEM FINAL DE VIGÊNCIA."); } else if ((int)ConsultaViewModel.DocumentoSelecionado.Situacao == 7) { await ViewModel.ShowMessage("NÃO É POSSÍVEL RENOVAR UM DOCUMENTO RECUSADO."); } else { Gestor.Application.Actions.Actions.AcessaTela?.Invoke((TipoTela)2, "Renovar"); } } 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.SelectedControle.ValidateEndossar(); await ViewModel.ShowMessage(pairs, ViewModel.ErroCamposInvalidos, "OK"); } else if ((int)ConsultaViewModel.DocumentoSelecionado.Situacao == 7) { await ViewModel.ShowMessage("NÃO É POSSÍVEL ENDOSSAR UM DOCUMENTO RECUSADO."); } else { Gestor.Application.Actions.Actions.AcessaTela?.Invoke((TipoTela)2, "Endossar"); } } private async void Recusar_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.RecusarDocumento(); } } private async void EditarParcelas_OnClick(object sender, RoutedEventArgs e) { await ViewModel.EditarParcelas(); } private async void ValoresParcelaInfo_OnClick(object sender, RoutedEventArgs e) { Parcela parcela = await ViewModel.AbrirDetalhesParcela(); ViewModel.ShowDrawer(new ValoresParcelaDrawer(parcela, ViewModel.SelectedControle), 0); } private async void ManutecaoItens_OnClick(object sender, RoutedEventArgs e) { if ((ViewModel.FilterDocumento == 0 && (int)ViewModel.SelectedControle.Situacao == 7) || (ViewModel.FilterDocumento == 1 && (int)ViewModel.SelectedEndosso.Situacao == 7)) { await ViewModel.ShowMessage("NÃO É POSSÍVEL FAZER A MANUTENÇÃO DE ITENS DE UM DOCUMENTO RECUSADO."); } else { ViewModel.ManutecaoItens(); } } 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_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Expected O, but got Unknown Tarefa tarefa = new Tarefa { IdCliente = ((DomainBase)ViewModel.SelectedCliente).Id, Cliente = ViewModel.SelectedCliente.Nome, Entidade = (TipoTarefa)0, IdEntidade = ((DomainBase)ViewModel.SelectedControle).Id, Titulo = ViewModel.SelectedCliente.Nome + " APÓLICE " + ViewModel.SelectedControle.Apolice }; ViewModel.ShowDrawer(new TarefaDrawer(tarefa), 0, close: false); } private async void TrocarCliente_OnClick(object sender, RoutedEventArgs e) { ((Window)new HosterWindow((ContentControl)(object)new TrocarClienteView(ViewModel.SelectedControle), "TROCAR CLIENTE", 500.0, 200.0)).ShowDialog(); await ViewModel.SelecionaCliente(MainViewModel.ClienteSelecionado); Gestor.Application.Actions.Actions.RecarregarDocumentos?.Invoke(null); } private async void Extratos_OnClick(object sender, RoutedEventArgs e) { if (!(await ViewModel.VerificarRestricao((TipoRestricao)13)) || ((DomainBase)ViewModel.SelectedCliente).Id == 0L) { return; } ViewModel.Loading(isLoading: true); if (ViewModel.SelectedControle == null) { ViewModel.ShowDrawer(new ExtratosDrawer(new List { new ClientesAtivosInativos { Selecionado = true, EntidadeCliente = ViewModel.SelectedCliente, Id = ((DomainBase)ViewModel.SelectedCliente).Id, Nome = ViewModel.SelectedCliente.Nome, Documento = ViewModel.SelectedCliente.Documento } }, null, (Relatorio)0), 0, close: false); ViewModel.Loading(isLoading: false); return; } switch (ViewModel.FilterDocumento) { case 0: if (ViewModel.SelectedControle != null) { ViewModel.ShowDrawer(new ExtratosDrawer(null, new List { ViewModel.SelectedControle }, null, new List { ((DomainBase)ViewModel.SelectedControle).Id }), 0, close: false); } break; case 1: if (ViewModel.SelectedEndosso != null) { ViewModel.ShowDrawer(new ExtratosDrawer(null, new List { ViewModel.SelectedEndosso }, null, new List { ((DomainBase)ViewModel.SelectedEndosso).Id }), 0, close: false); } break; } ViewModel.Loading(isLoading: false); } private async void Perdido_OnClick(object sender, RoutedEventArgs e) { if ((int)ConsultaViewModel.DocumentoSelecionado.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.SelectedControle.Controle.Cliente).Id); Cliente val = cliente; val.Telefones = await new ClienteServico().BuscarTelefonesAsync(((DomainBase)ViewModel.SelectedControle.Controle.Cliente).Id); val = cliente; val.Emails = await new ClienteServico().BuscarEmailsAsync(((DomainBase)ViewModel.SelectedControle.Controle.Cliente).Id); if (!(await new ApoliceServico().Perdido(((DomainBase)ViewModel.SelectedControle.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_04ad; } } telefone = ""; goto IL_04ad; IL_04ad: 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.SelectedControle.Vigencia2 ?? Funcoes.GetNetworkTime().Date).AddYears(1); val2.Vendedor = ViewModel.SelectedControle.VendedorPrincipal; Item? obj7 = ViewModel.Itens.FirstOrDefault(); val2.Item = ((obj7 != null) ? obj7.Descricao : null); val2.Tipo = "SEGURO PERDIDO"; val2.Observacao = "SEGURO PERDIDO: PROPOSTA: " + ViewModel.SelectedControle.Proposta + ", APÓLICE: " + ViewModel.SelectedControle.Apolice; val2.Status = (StatusProspeccao)1; val2.Renovacao = true; Prospeccao data = val2; await AbrirProspeccao(data); ViewModel.CarregaDocumentos(0); await ViewModel.SelecionaCliente(ViewModel.SelectedCliente); ((ToggleButton)ApoliceItensRadioButton).IsChecked = true; if (ApoliceGrid != null && ((CollectionView)((ItemsControl)ApoliceGrid).Items).Count > 0 && ((Selector)ApoliceGrid).SelectedItem == null) { ((Selector)ApoliceGrid).SelectedItem = ((ItemsControl)ApoliceGrid).Items[0]; ConsultaViewModel viewModel = ViewModel; DataGrid apoliceGrid = ApoliceGrid; await viewModel.SelecionaDocumento(0, (Documento)((apoliceGrid != null) ? ((Selector)apoliceGrid).SelectedItem : null)); } 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 Sinistros_OnClick(object sender, RoutedEventArgs e) { Gestor.Application.Actions.Actions.AcessaTela?.Invoke((TipoTela)7, ""); } private void Observacoes_OnClick(object sender, RoutedEventArgs e) { //IL_0004: 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_004c: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) long id = 0L; TipoTela tipo = (TipoTela)0; switch (((FrameworkElement)(Button)sender).Name) { case "ObservacaoApolice": id = ((DomainBase)ViewModel.SelectedControle).Id; tipo = (TipoTela)2; break; case "EndossoInfo": id = ((DomainBase)ViewModel.SelectedEndosso).Id; tipo = (TipoTela)2; break; case "ObservacaoParcela": id = ((DomainBase)ViewModel.SelectedParcela).Id; tipo = (TipoTela)5; break; } ViewModel.ShowDrawer(new ObservacoesDrawer(id, tipo), 0); } private async void RelacaoItens_OnClick(object sender, RoutedEventArgs e) { await ViewModel.GerarExcel(ViewModel.FilterItens); } private async void ExpedicaoInfo_OnClick(object sender, RoutedEventArgs e) { if (await ViewModel.VerificarPermissao((TipoTela)46)) { if (ConsultaViewModel.DocumentoSelecionado == null) { await ViewModel.ShowMessage("NECESSÁRIO SELECIONAR UM DOCUMENTO PARA EXIBIR AS INFORMAÇÕES DE EXPEDIÇÃO."); } else { ViewModel.ShowDrawer(new ExpedicaoDrawer(ConsultaViewModel.DocumentoSelecionado), 0, close: false); } } } private async void PopupBox_OnOpened(object sender, RoutedEventArgs e) { PopupBox val = (PopupBox)sender; _documentoAssistencia = (Documento)((FrameworkElement)val).DataContext; _linkAssistencia = await ViewModel.CreateLink(_documentoAssistencia); if (!string.IsNullOrEmpty(_linkAssistencia)) { string anotacoes = "Prezado(a) " + ValidationHelper.Captalize(ViewModel.SelectedCliente.Nome) + ", segue o link do seu Cartão Assistência 24 horas." + Environment.NewLine + Environment.NewLine + "LINK CARTÃO ASSISTÊNCIA 24 HORAS" + Environment.NewLine + _linkAssistencia; ViewModel.Anotacoes = anotacoes; } } private async void EnviarPorWhatsApp_OnClick(object sender, RoutedEventArgs e) { if (ViewModel.Restricao((TipoRestricao)32)) { await ViewModel.ShowMessage("VOCÊ NÃO POSSUI PERMISSÃO PARA ACESSAR O WHATSAPP"); return; } Button val = (Button)sender; if (((FrameworkElement)val).DataContext != null) { object dataContext = ((FrameworkElement)val).DataContext; ClienteTelefone val2 = (ClienteTelefone)((dataContext is ClienteTelefone) ? dataContext : null); if (val2 != null && !((((TelefoneBase)val2).Tipo.HasValue && (int)((TelefoneBase)val2).Tipo.GetValueOrDefault() == 8) ? (((TelefoneBase)val2).Prefixo + ((TelefoneBase)val2).Numero).Clear() : ("55" + ((TelefoneBase)val2).Prefixo + ((TelefoneBase)val2).Numero.Clear())).EnviarWhatsapp(ViewModel.Anotacoes)) { await ViewModel.ShowMessage("HOUVE UM PROBLEMA AO ABRIR LINK DO WHATSAPP, O LINK FOI COPIADO EM SUA MAQUINA, BASTA ABRIR O NAVEGADOR DE INTERNET E COLAR NA BARRA DE ENDEREÇOS"); } } } private void EnviarPorEmail_OnClick(object sender, RoutedEventArgs e) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000e: 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_002c: Expected O, but got Unknown if (_documentoAssistencia != null) { MalaDireta val = new MalaDireta { Cliente = ViewModel.SelectedCliente, Apolice = _documentoAssistencia }; if (Funcoes.IsWindowOpen("ENVIO DE E-MAIL")) { Funcoes.Destroy("ENVIO DE E-MAIL"); } ((Window)new HosterWindow((ContentControl)(object)new MalaDiretaView(new List { val }, "CARTÃO ASSISTÊNCIA 24 HORAS - " + val.Cliente.Nome + " " + val.Apolice.Apolice, "

Prezado(a) " + ValidationHelper.Captalize(ViewModel.SelectedCliente.Nome) + ", segue o link do seu Cartão Assistência 24 horas.

LINK CARTÃO ASSITÊNCIA

"), "ENVIO DE E-MAIL", 1200.0, 600.0, canMaximize: true)).ShowDialog(); } } private void PopupBox_OnClosed(object sender, RoutedEventArgs e) { _documentoAssistencia = null; ViewModel.Anotacoes = ""; _linkAssistencia = ""; } private async void MostrarItens_Click(object sender, RoutedEventArgs e) { int type = 0; if (!((UIElement)ApoliceRadioButton).IsFocused) { RadioButton apoliceItensRadioButton = ApoliceItensRadioButton; if (apoliceItensRadioButton == null || !((ToggleButton)apoliceItensRadioButton).IsChecked.GetValueOrDefault()) { goto IL_0041; } } type = 1; goto IL_0041; IL_0041: if (!((UIElement)EndossoRadioButton).IsFocused) { RadioButton endossoItensRadioButton = EndossoItensRadioButton; if (endossoItensRadioButton == null || !((ToggleButton)endossoItensRadioButton).IsChecked.GetValueOrDefault()) { goto IL_006c; } } type = 2; goto IL_006c; IL_006c: if (((UIElement)InativosRadioButton).IsFocused) { type = 3; } await ViewModel.MostrarItens(type); } [DebuggerNonUserCode] [GeneratedCode("PresentationBuildTasks", "4.0.0.0")] public void InitializeComponent() { if (!_contentLoaded) { _contentLoaded = true; Uri uri = new Uri("/Gestor.Application;component/views/seguros/consultaoriginalview.xaml", UriKind.Relative); Application.LoadComponent((object)this, uri); } } [DebuggerNonUserCode] [GeneratedCode("PresentationBuildTasks", "4.0.0.0")] [EditorBrowsable(EditorBrowsableState.Never)] void IComponentConnector.Connect(int connectionId, object target) { //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Expected O, but got Unknown //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Expected O, but got Unknown //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Expected O, but got Unknown //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Expected O, but got Unknown //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Expected O, but got Unknown //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Expected O, but got Unknown //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Expected O, but got Unknown //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Expected O, but got Unknown //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Expected O, but got Unknown //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Expected O, but got Unknown //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Expected O, but got Unknown //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Expected O, but got Unknown //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Expected O, but got Unknown //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01fc: Unknown result type (might be due to invalid IL or missing references) //IL_0206: Expected O, but got Unknown //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Expected O, but got Unknown //IL_0220: Unknown result type (might be due to invalid IL or missing references) //IL_022c: Unknown result type (might be due to invalid IL or missing references) //IL_0236: Expected O, but got Unknown //IL_0238: Unknown result type (might be due to invalid IL or missing references) //IL_0244: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Expected O, but got Unknown //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_025b: Expected O, but got Unknown //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Expected O, but got Unknown //IL_026b: Unknown result type (might be due to invalid IL or missing references) //IL_0275: Expected O, but got Unknown //IL_0278: Unknown result type (might be due to invalid IL or missing references) //IL_0282: Expected O, but got Unknown //IL_0285: Unknown result type (might be due to invalid IL or missing references) //IL_028f: Expected O, but got Unknown //IL_0292: Unknown result type (might be due to invalid IL or missing references) //IL_029c: Expected O, but got Unknown //IL_029e: Unknown result type (might be due to invalid IL or missing references) //IL_02aa: Unknown result type (might be due to invalid IL or missing references) //IL_02b4: Expected O, but got Unknown //IL_02b7: Unknown result type (might be due to invalid IL or missing references) //IL_02c1: Expected O, but got Unknown //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02ce: Expected O, but got Unknown //IL_02d1: Unknown result type (might be due to invalid IL or missing references) //IL_02db: Expected O, but got Unknown //IL_02de: Unknown result type (might be due to invalid IL or missing references) //IL_02e8: Expected O, but got Unknown //IL_02eb: Unknown result type (might be due to invalid IL or missing references) //IL_02f5: Expected O, but got Unknown //IL_02f8: Unknown result type (might be due to invalid IL or missing references) //IL_0302: Expected O, but got Unknown //IL_0305: Unknown result type (might be due to invalid IL or missing references) //IL_030f: Expected O, but got Unknown //IL_0312: Unknown result type (might be due to invalid IL or missing references) //IL_031c: Expected O, but got Unknown //IL_031e: Unknown result type (might be due to invalid IL or missing references) //IL_032a: Unknown result type (might be due to invalid IL or missing references) //IL_0334: Expected O, but got Unknown //IL_0336: Unknown result type (might be due to invalid IL or missing references) //IL_0342: Unknown result type (might be due to invalid IL or missing references) //IL_034c: Expected O, but got Unknown //IL_034f: Unknown result type (might be due to invalid IL or missing references) //IL_0359: Expected O, but got Unknown //IL_035c: Unknown result type (might be due to invalid IL or missing references) //IL_0366: Expected O, but got Unknown //IL_0369: Unknown result type (might be due to invalid IL or missing references) //IL_0373: Expected O, but got Unknown //IL_0376: Unknown result type (might be due to invalid IL or missing references) //IL_0380: Expected O, but got Unknown //IL_0382: Unknown result type (might be due to invalid IL or missing references) //IL_038e: Unknown result type (might be due to invalid IL or missing references) //IL_0398: Expected O, but got Unknown //IL_039a: Unknown result type (might be due to invalid IL or missing references) //IL_03a6: Unknown result type (might be due to invalid IL or missing references) //IL_03b0: Expected O, but got Unknown //IL_03b3: Unknown result type (might be due to invalid IL or missing references) //IL_03bd: Expected O, but got Unknown switch (connectionId) { case 1: ApoliceRadioButton = (RadioButton)target; break; case 2: EndossoRadioButton = (RadioButton)target; break; case 3: ((MenuItem)target).Click += new RoutedEventHandler(ClienteView_Click); break; case 4: AcessarDocumentoMenuItem = (MenuItem)target; AcessarDocumentoMenuItem.Click += new RoutedEventHandler(ApoliceView_Click); break; case 5: ((MenuItem)target).Click += new RoutedEventHandler(Renovar_OnClick); break; case 6: ((MenuItem)target).Click += new RoutedEventHandler(Perdido_OnClick); break; case 7: ((MenuItem)target).Click += new RoutedEventHandler(Endossar_OnClick); break; case 8: ((MenuItem)target).Click += new RoutedEventHandler(Recusar_OnClick); break; case 9: ((MenuItem)target).Click += new RoutedEventHandler(MenuItem_OnClick); break; case 10: ((MenuItem)target).Click += new RoutedEventHandler(Extratos_OnClick); break; case 11: ((MenuItem)target).Click += new RoutedEventHandler(TrocarCliente_OnClick); break; case 12: ((MenuItem)target).Click += new RoutedEventHandler(EditarParcelas_OnClick); break; case 13: ((MenuItem)target).Click += new RoutedEventHandler(ExpedicaoInfo_OnClick); break; case 14: ((MenuItem)target).Click += new RoutedEventHandler(ValoresInfo_OnClick); break; case 15: ((MenuItem)target).Click += new RoutedEventHandler(ManutecaoItens_OnClick); break; case 16: ((MenuItem)target).Click += new RoutedEventHandler(RelacaoItens_OnClick); break; case 17: ApoliceGrid = (DataGrid)target; break; case 19: NomeField = (DataGridTextColumn)target; break; case 20: ApelidoField = (DataGridTextColumn)target; break; case 21: ApolicesComissaoColumn = (DataGridTextColumn)target; break; case 27: EndossoGrid = (DataGrid)target; break; case 28: EndossosComissaoColumn = (DataGridTextColumn)target; break; case 31: ((MenuItem)target).Click += new RoutedEventHandler(Parcela_Click); break; case 32: Comissao = (WrapPanel)target; break; case 33: ParcelaGrid = (DataGrid)target; break; case 34: ParcelasTotalColumn = (DataGridTextColumn)target; break; case 35: ParcelasRealizadoColumn = (DataGridTextColumn)target; break; case 36: ParcelasComissaoColumn = (DataGridTextColumn)target; break; case 37: ParcelasReciboColumn = (DataGridTextColumn)target; break; case 38: ParcelasValorComissaoDescColumn = (DataGridTextColumn)target; break; case 39: MaisInformacoesColumn = (DataGridTemplateColumn)target; break; case 43: ((MenuItem)target).Click += new RoutedEventHandler(Item_Click); break; case 44: ((MenuItem)target).Click += new RoutedEventHandler(Sinistros_OnClick); break; case 45: AtivosRadioButton = (RadioButton)target; break; case 46: ApoliceItensRadioButton = (RadioButton)target; break; case 47: EndossoItensRadioButton = (RadioButton)target; break; case 48: InativosRadioButton = (RadioButton)target; break; case 49: ((MenuItem)target).Click += new RoutedEventHandler(MostrarItens_Click); break; case 50: ((MenuItem)target).Click += new RoutedEventHandler(ReordenarItem_Click); break; case 51: ItemGrid = (DataGrid)target; break; default: _contentLoaded = true; break; } } [DebuggerNonUserCode] [GeneratedCode("PresentationBuildTasks", "4.0.0.0")] [EditorBrowsable(EditorBrowsableState.Never)] void IStyleConnector.Connect(int connectionId, object target) { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Expected O, but got Unknown //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Expected O, but got Unknown //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Expected O, but got Unknown //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Expected O, but got Unknown //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Expected O, but got Unknown //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Expected O, but got Unknown //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Expected O, but got Unknown //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Expected O, but got Unknown //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Expected O, but got Unknown //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Expected O, but got Unknown //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Expected O, but got Unknown //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Expected O, but got Unknown //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Expected O, but got Unknown switch (connectionId) { case 18: { EventSetter val = new EventSetter(); val.Event = Control.MouseDoubleClickEvent; val.Handler = (Delegate)new MouseButtonEventHandler(ApoliceGrid_OnMouseDoubleClick); ((Collection)(object)((Style)target).Setters).Add((SetterBase)(object)val); break; } case 22: ((ButtonBase)(Button)target).Click += new RoutedEventHandler(AbrirAquivoDigital_Click); break; case 23: ((ButtonBase)(Button)target).Click += new RoutedEventHandler(Observacoes_OnClick); break; case 24: ((PopupBox)target).Opened += new RoutedEventHandler(PopupBox_OnOpened); ((PopupBox)target).Closed += new RoutedEventHandler(PopupBox_OnClosed); break; case 25: ((ButtonBase)(Button)target).Click += new RoutedEventHandler(EnviarPorWhatsApp_OnClick); break; case 26: ((MenuItem)target).Click += new RoutedEventHandler(EnviarPorEmail_OnClick); break; case 29: ((ButtonBase)(Button)target).Click += new RoutedEventHandler(AbrirAquivoDigital_Click); break; case 30: ((ButtonBase)(Button)target).Click += new RoutedEventHandler(Observacoes_OnClick); break; case 40: ((ButtonBase)(Button)target).Click += new RoutedEventHandler(ValoresParcelaInfo_OnClick); break; case 41: ((ButtonBase)(Button)target).Click += new RoutedEventHandler(AbrirAquivoDigital_Click); break; case 42: ((ButtonBase)(Button)target).Click += new RoutedEventHandler(Observacoes_OnClick); break; case 52: ((ButtonBase)(Button)target).Click += new RoutedEventHandler(AbrirAquivoDigital_Click); break; } } }