diff options
| author | Lucas Faria Mendes <lucas.fariamo08@gmail.com> | 2026-03-30 15:29:41 +0000 |
|---|---|---|
| committer | Lucas Faria Mendes <lucas.fariamo08@gmail.com> | 2026-03-30 15:29:41 +0000 |
| commit | 225aa1499e37faf9d38257caabbadc68d78b427e (patch) | |
| tree | 102bb7a40c58595348ae9d3c7076201759fe0720 /Decompiler/Gestor.Application.ViewModels.BI/PainelBiViewModel.cs | |
| parent | 1f4e14b2e973ee7de337fd4866d9a5ceff5cb6d1 (diff) | |
| download | gestor-225aa1499e37faf9d38257caabbadc68d78b427e.tar.gz gestor-225aa1499e37faf9d38257caabbadc68d78b427e.zip | |
decompiler.com
Diffstat (limited to 'Decompiler/Gestor.Application.ViewModels.BI/PainelBiViewModel.cs')
| -rw-r--r-- | Decompiler/Gestor.Application.ViewModels.BI/PainelBiViewModel.cs | 1563 |
1 files changed, 1563 insertions, 0 deletions
diff --git a/Decompiler/Gestor.Application.ViewModels.BI/PainelBiViewModel.cs b/Decompiler/Gestor.Application.ViewModels.BI/PainelBiViewModel.cs new file mode 100644 index 0000000..2a12cda --- /dev/null +++ b/Decompiler/Gestor.Application.ViewModels.BI/PainelBiViewModel.cs @@ -0,0 +1,1563 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using Gestor.Application.Componentes; +using Gestor.Application.Helpers; +using Gestor.Application.Model; +using Gestor.Application.Servicos; +using Gestor.Application.Servicos.Seguros; +using Gestor.Application.ViewModels.Generic; +using Gestor.Application.Views.Generic; +using Gestor.Common.Validation; +using Gestor.Model.Common; +using Gestor.Model.Domain.BI; +using Gestor.Model.Domain.Generic; +using Gestor.Model.Domain.Relatorios; +using Gestor.Model.Domain.Relatorios.ClientesAtivosInativos; +using Gestor.Model.Domain.Seguros; +using LiveCharts; +using LiveCharts.Defaults; +using LiveCharts.Definitions.Series; +using LiveCharts.Helpers; +using LiveCharts.Wpf; + +namespace Gestor.Application.ViewModels.BI; + +public class PainelBiViewModel : BaseSegurosViewModel +{ + private readonly ClienteServico _clienteServico; + + private readonly ApoliceServico _apoliceServico; + + private readonly ParcelaServico _parcelaServico; + + private Visibility _isVisibleProducao = (Visibility)2; + + private Visibility _isVisibleClientes = (Visibility)2; + + private Visibility _isVisiblePendencia = (Visibility)2; + + private Visibility _isVisibleVencimento = (Visibility)2; + + private DateTime _inicio = Funcoes.GetNetworkTime().Date.AddDays(-7.0); + + private DateTime _fim = Funcoes.GetNetworkTime().Date; + + private DateTime _inicioClientes = Funcoes.GetNetworkTime().Date.AddDays(-7.0); + + private DateTime _fimClientes = Funcoes.GetNetworkTime().Date; + + private DateTime _inicioVencimento = Funcoes.GetNetworkTime().Date; + + private DateTime _fimVencimento = Funcoes.GetNetworkTime().Date.AddDays(7.0); + + private Grafico _producao; + + private Grafico _fechamento; + + private int _aniversariantes; + + private int _vencimentoCnh; + + private int _vencimentos; + + private int _parcelasPendentes; + + private int _parcelasAVencer; + + private int _cotacoes; + + private List<Parcela> _parcelasPendencia; + + private List<Parcela> _parcelasVencimento; + + private List<Documento> _documentosVencimento; + + private List<ClientesAtivosInativos> _clientesAniversariantes; + + private List<ClientesAtivosInativos> _clientesCnh; + + private int _quatidadeProducao; + + private int _endossos; + + private int _faturas; + + private int _apolicesPendentes; + + private int _novosNegocios; + + private int _renovacoes; + + private int _cancelamentos; + + private decimal _producaoTotal; + + private decimal _producaoTotalAnterior; + + private decimal _comissaoTotal; + + private List<Documento> _documentosProducao; + + private List<Documento> _documentosPendentes; + + private List<Documento> _documentosFechamento; + + private Grafico _gerada; + + private Grafico _mediaComissao; + + private Func<double, string> _yFormatter; + + private Func<double, string> _xFormatter; + + public Visibility IsVisibleProducao + { + get + { + //IL_0001: Unknown result type (might be due to invalid IL or missing references) + return _isVisibleProducao; + } + set + { + //IL_0001: Unknown result type (might be due to invalid IL or missing references) + //IL_0002: Unknown result type (might be due to invalid IL or missing references) + _isVisibleProducao = value; + OnPropertyChanged("IsVisibleProducao"); + } + } + + public Visibility IsVisibleClientes + { + get + { + //IL_0001: Unknown result type (might be due to invalid IL or missing references) + return _isVisibleClientes; + } + set + { + //IL_0001: Unknown result type (might be due to invalid IL or missing references) + //IL_0002: Unknown result type (might be due to invalid IL or missing references) + _isVisibleClientes = value; + OnPropertyChanged("IsVisibleClientes"); + } + } + + public Visibility IsVisiblePendencia + { + get + { + //IL_0001: Unknown result type (might be due to invalid IL or missing references) + return _isVisiblePendencia; + } + set + { + //IL_0001: Unknown result type (might be due to invalid IL or missing references) + //IL_0002: Unknown result type (might be due to invalid IL or missing references) + _isVisiblePendencia = value; + OnPropertyChanged("IsVisiblePendencia"); + } + } + + public Visibility IsVisibleVencimento + { + get + { + //IL_0001: Unknown result type (might be due to invalid IL or missing references) + return _isVisibleVencimento; + } + set + { + //IL_0001: Unknown result type (might be due to invalid IL or missing references) + //IL_0002: Unknown result type (might be due to invalid IL or missing references) + _isVisibleVencimento = value; + OnPropertyChanged("IsVisibleVencimento"); + } + } + + public DateTime Inicio + { + get + { + return _inicio; + } + set + { + _inicio = value; + OnPropertyChanged("Inicio"); + } + } + + public DateTime Fim + { + get + { + return _fim; + } + set + { + _fim = value; + OnPropertyChanged("Fim"); + } + } + + public DateTime InicioClientes + { + get + { + return _inicioClientes; + } + set + { + _inicioClientes = value; + OnPropertyChanged("InicioClientes"); + } + } + + public DateTime FimClientes + { + get + { + return _fimClientes; + } + set + { + _fimClientes = value; + OnPropertyChanged("FimClientes"); + } + } + + public DateTime InicioVencimento + { + get + { + return _inicioVencimento; + } + set + { + _inicioVencimento = value; + OnPropertyChanged("InicioVencimento"); + } + } + + public DateTime FimVencimento + { + get + { + return _fimVencimento; + } + set + { + _fimVencimento = value; + OnPropertyChanged("FimVencimento"); + } + } + + public Grafico Producao + { + get + { + return _producao; + } + set + { + _producao = value; + OnPropertyChanged("Producao"); + } + } + + public Grafico Fechamento + { + get + { + return _fechamento; + } + set + { + _fechamento = value; + OnPropertyChanged("Fechamento"); + } + } + + public int Aniversariantes + { + get + { + return _aniversariantes; + } + set + { + _aniversariantes = value; + OnPropertyChanged("Aniversariantes"); + } + } + + public int VencimentoCnh + { + get + { + return _vencimentoCnh; + } + set + { + _vencimentoCnh = value; + OnPropertyChanged("VencimentoCnh"); + } + } + + public int Vencimentos + { + get + { + return _vencimentos; + } + set + { + _vencimentos = value; + OnPropertyChanged("Vencimentos"); + } + } + + public int ParcelasPendentes + { + get + { + return _parcelasPendentes; + } + set + { + _parcelasPendentes = value; + OnPropertyChanged("ParcelasPendentes"); + } + } + + public int ParcelasAVencer + { + get + { + return _parcelasAVencer; + } + set + { + _parcelasAVencer = value; + OnPropertyChanged("ParcelasAVencer"); + } + } + + public int Cotacoes + { + get + { + return _cotacoes; + } + set + { + _cotacoes = value; + OnPropertyChanged("Cotacoes"); + } + } + + public int QuatidadeProducao + { + get + { + return _quatidadeProducao; + } + set + { + _quatidadeProducao = value; + OnPropertyChanged("QuatidadeProducao"); + } + } + + public int Endossos + { + get + { + return _endossos; + } + set + { + _endossos = value; + OnPropertyChanged("Endossos"); + } + } + + public int Faturas + { + get + { + return _faturas; + } + set + { + _faturas = value; + OnPropertyChanged("Faturas"); + } + } + + public int ApolicesPendentes + { + get + { + return _apolicesPendentes; + } + set + { + _apolicesPendentes = value; + OnPropertyChanged("ApolicesPendentes"); + } + } + + public int NovosNegocios + { + get + { + return _novosNegocios; + } + set + { + _novosNegocios = value; + OnPropertyChanged("NovosNegocios"); + } + } + + public int Renovacoes + { + get + { + return _renovacoes; + } + set + { + _renovacoes = value; + OnPropertyChanged("Renovacoes"); + } + } + + public int Cancelamentos + { + get + { + return _cancelamentos; + } + set + { + _cancelamentos = value; + OnPropertyChanged("Cancelamentos"); + } + } + + public decimal ProducaoTotal + { + get + { + return _producaoTotal; + } + set + { + _producaoTotal = value; + OnPropertyChanged("ProducaoTotal"); + } + } + + public decimal ProducaoTotalAnterior + { + get + { + return _producaoTotalAnterior; + } + set + { + _producaoTotalAnterior = value; + OnPropertyChanged("ProducaoTotalAnterior"); + } + } + + public decimal ComissaoTotal + { + get + { + return _comissaoTotal; + } + set + { + _comissaoTotal = value; + OnPropertyChanged("ComissaoTotal"); + } + } + + public Grafico Gerada + { + get + { + return _gerada; + } + set + { + _gerada = value; + OnPropertyChanged("Gerada"); + } + } + + public Grafico MediaComissao + { + get + { + return _mediaComissao; + } + set + { + _mediaComissao = value; + OnPropertyChanged("MediaComissao"); + } + } + + public Func<double, string> YFormatter + { + get + { + return _yFormatter; + } + set + { + _yFormatter = value; + OnPropertyChanged("YFormatter"); + } + } + + public Func<double, string> XFormatter + { + get + { + return _xFormatter; + } + set + { + _xFormatter = value; + OnPropertyChanged("XFormatter"); + } + } + + public PainelBiViewModel() + { + //IL_0002: Unknown result type (might be due to invalid IL or missing references) + //IL_0009: Unknown result type (might be due to invalid IL or missing references) + //IL_0010: Unknown result type (might be due to invalid IL or missing references) + //IL_0017: Unknown result type (might be due to invalid IL or missing references) + _clienteServico = new ClienteServico(); + _apoliceServico = new ApoliceServico(); + _parcelaServico = new ParcelaServico(); + LoadInicial(); + } + + private async void LoadInicial() + { + await GerarProducao(); + await GerarVencimento(); + await GerarClientes(); + } + + public async Task GerarClientes() + { + IsVisibleClientes = (Visibility)2; + Filtros filtro = new Filtros + { + Inicio = InicioClientes, + Fim = FimClientes, + IdEmpresa = ((Recursos.Usuario.IdEmpresa == 1) ? 0 : Recursos.Usuario.IdEmpresa) + }; + _clientesAniversariantes = await _clienteServico.BuscarAniversariantes(filtro); + Aniversariantes = _clientesAniversariantes.Count; + _clientesCnh = await _clienteServico.BuscarVencimentosCnh(filtro); + VencimentoCnh = _clientesCnh.Count; + IsVisibleClientes = (Visibility)0; + } + + public async Task GerarVencimento() + { + IsVisibleVencimento = (Visibility)2; + List<VendedorUsuario> source = await new VendedorUsuarioServico().FindByVinculo(Recursos.Usuario); + Filtros filtro = new Filtros + { + Inicio = InicioVencimento, + Fim = FimVencimento, + IdEmpresa = ((Recursos.Usuario.IdEmpresa == 1) ? 0 : Recursos.Usuario.IdEmpresa), + Vendedores = source.Select((VendedorUsuario x) => ((DomainBase)x.Vendedor).Id).ToList() + }; + _documentosVencimento = (await _apoliceServico.BuscarApolicesVigenciaFinal(filtro)).Where((Documento x) => (int)x.Situacao != 7).ToList(); + Vencimentos = _documentosVencimento.Count; + _parcelasVencimento = (await _parcelaServico.BuscarParcelas(filtro)).Where((Parcela x) => (int)x.Documento.Situacao != 7).ToList(); + ParcelasAVencer = _parcelasVencimento.Count; + IsVisibleVencimento = (Visibility)0; + } + + public async Task GerarPendencia() + { + IsVisiblePendencia = (Visibility)2; + List<VendedorUsuario> source = await new VendedorUsuarioServico().FindByVinculo(Recursos.Usuario); + Filtros filtro = new Filtros + { + Inicio = Inicio, + Fim = Fim, + IdEmpresa = ((Recursos.Usuario.IdEmpresa == 1) ? 0 : Recursos.Usuario.IdEmpresa), + Vendedores = source.Select((VendedorUsuario x) => ((DomainBase)x.Vendedor).Id).ToList() + }; + _parcelasPendencia = (await _parcelaServico.BuscarParcelasPendentes(filtro)).Where((Parcela x) => (int)x.Documento.Situacao != 7).ToList(); + ParcelasPendentes = _parcelasPendencia.Count; + IsVisiblePendencia = (Visibility)0; + } + + public async Task GerarProducao() + { + IsVisibleProducao = (Visibility)2; + Producao = new Grafico + { + Series = new SeriesCollection(), + Formatter = (double value) => value.ToString("C0") + }; + Gerada = new Grafico + { + Series = new SeriesCollection(), + Formatter = (double value) => value.ToString("C2") + }; + MediaComissao = new Grafico + { + Series = new SeriesCollection(), + Formatter = (double value) => value.ToString("P2") + }; + Fechamento = new Grafico + { + Series = new SeriesCollection(), + Formatter = (double value) => value.ToString("C2") + }; + List<VendedorUsuario> source = await new VendedorUsuarioServico().FindByVinculo(Recursos.Usuario); + Filtros filtro = new Filtros + { + Inicio = Inicio, + Fim = Fim, + IdEmpresa = ((Recursos.Usuario.IdEmpresa == 1) ? 0 : Recursos.Usuario.IdEmpresa), + Vendedores = source.Select((VendedorUsuario x) => ((DomainBase)x.Vendedor).Id).ToList() + }; + Filtros filtroFechamento = new Filtros + { + Inicio = Inicio.AddYears(-1), + Fim = Fim.AddYears(-1), + IdEmpresa = ((Recursos.Usuario.IdEmpresa == 1) ? 0 : Recursos.Usuario.IdEmpresa), + Vendedores = source.Select((VendedorUsuario x) => ((DomainBase)x.Vendedor).Id).ToList() + }; + _documentosProducao = (await _apoliceServico.BuscarApolices(filtro, buscarAssinatura: false, painelBi: true)).Where((Documento x) => (int)x.Situacao != 7).ToList(); + _documentosPendentes = await _apoliceServico.BuscarApolicesPendentes(filtro); + List<Documento> source2 = await _parcelaServico.BuscarFaturas(filtro, buscaAssinaturas: false, painelBi: true); + _documentosProducao.AddRange(source2.Where((Documento x) => (int)x.Situacao != 7)); + ApolicesPendentes = _documentosPendentes.Count((Documento x) => string.IsNullOrEmpty(x.Apolice) && x.Tipo != 2); + await GerarPendencia(); + _documentosFechamento = (await _apoliceServico.BuscarApolices(filtroFechamento, buscarAssinatura: false, painelBi: true)).Where((Documento x) => (int)x.Situacao != 7).ToList(); + List<Documento> source3 = await _parcelaServico.BuscarFaturas(filtroFechamento, buscaAssinaturas: false, painelBi: true); + _documentosFechamento.AddRange(source3.Where((Documento x) => (int)x.Situacao != 7)); + Cotacoes = await _apoliceServico.Cotacoes(filtro); + QuatidadeProducao = _documentosProducao.Count((Documento x) => x.Tipo != 2); + Faturas = _documentosProducao.Count((Documento x) => x.Tipo == 2); + NovosNegocios = _documentosProducao.Count((Documento x) => x.Tipo == 0 && ((int)x.Situacao == 1 || ((int)x.Situacao == 2 && x.NegocioCorretora == (NegocioCorretora?)0))); + Renovacoes = _documentosProducao.Count((Documento x) => x.Tipo == 0 && (int)x.Situacao == 2 && ((int)x.NegocioCorretora.GetValueOrDefault() == 1 || (int)x.Negocio.GetValueOrDefault() == 1)); + Cancelamentos = (from x in _documentosProducao + where (int)x.Situacao == 3 && x.Tipo == 1 + select ((DomainBase)x.Controle).Id).Distinct().Count(); + Endossos = _documentosProducao.Count((Documento x) => x.Tipo == 1); + ProducaoTotal = _documentosProducao.Sum((Documento x) => x.PremioLiquido); + ProducaoTotalAnterior = _documentosFechamento.Sum((Documento x) => x.PremioLiquido); + ComissaoTotal = _documentosProducao.Sum((Documento x) => (x.PremioLiquido + (x.AdicionalComiss ? x.PremioAdicional : 0m)) * x.Comissao * 0.01m); + (from x in _documentosProducao + group x by x.Controle.Seguradora.NomeSocial into x + orderby x.Sum((Documento p) => p.PremioLiquido) descending + select x).ToList().ForEach(delegate(IGrouping<string, Documento> x) + { + //IL_000d: Unknown result type (might be due to invalid IL or missing references) + //IL_0012: Unknown result type (might be due to invalid IL or missing references) + //IL_0023: Unknown result type (might be due to invalid IL or missing references) + //IL_005e: Unknown result type (might be due to invalid IL or missing references) + //IL_0070: Unknown result type (might be due to invalid IL or missing references) + //IL_0080: Expected O, but got Unknown + //IL_00c1: Unknown result type (might be due to invalid IL or missing references) + //IL_00c6: Unknown result type (might be due to invalid IL or missing references) + //IL_00d7: Unknown result type (might be due to invalid IL or missing references) + //IL_0112: Unknown result type (might be due to invalid IL or missing references) + //IL_0119: Unknown result type (might be due to invalid IL or missing references) + //IL_012c: Expected O, but got Unknown + //IL_0188: Unknown result type (might be due to invalid IL or missing references) + //IL_018d: Unknown result type (might be due to invalid IL or missing references) + //IL_019e: Unknown result type (might be due to invalid IL or missing references) + //IL_01b5: Unknown result type (might be due to invalid IL or missing references) + //IL_01bc: Unknown result type (might be due to invalid IL or missing references) + //IL_01cf: Expected O, but got Unknown + ColumnSeries val6 = new ColumnSeries + { + Title = x.Key + }; + ChartValues<decimal> obj = new ChartValues<decimal>(); + ((NoisyCollection<decimal>)(object)obj).Add(x.Sum((Documento p) => p.PremioLiquido)); + ((Series)val6).Values = (IChartValues)(object)obj; + ((Series)val6).LabelPoint = (ChartPoint chartPoint) => "R$ " + x.Sum((Documento p) => p.PremioLiquido).ToString("N2"); + val6.MaxColumnWidth = double.PositiveInfinity; + ColumnSeries val7 = val6; + ((NoisyCollection<ISeriesView>)(object)Producao.Series).Add((ISeriesView)(object)val7); + decimal comissaoGerada = x.Sum((Documento p) => (p.PremioLiquido + (p.AdicionalComiss ? p.PremioAdicional : 0m)) * p.Comissao * 0.01m); + PieSeries val8 = new PieSeries + { + Title = x.Key + }; + ChartValues<decimal> obj2 = new ChartValues<decimal>(); + ((NoisyCollection<decimal>)(object)obj2).Add((comissaoGerada > 0m) ? comissaoGerada : (comissaoGerada * -1m)); + ((Series)val8).Values = (IChartValues)(object)obj2; + ((Series)val8).DataLabels = false; + ((Series)val8).LabelPoint = (ChartPoint chartPoint) => "R$ " + comissaoGerada.ToString("N2"); + PieSeries val9 = val8; + ((NoisyCollection<ISeriesView>)(object)Gerada.Series).Add((ISeriesView)(object)val9); + decimal mediaComissao = Math.Round(x.Sum((Documento p) => p.Comissao) / (decimal)x.Count(), 2); + PieSeries val10 = new PieSeries + { + Title = x.Key + }; + ChartValues<decimal> obj3 = new ChartValues<decimal>(); + ((NoisyCollection<decimal>)(object)obj3).Add(mediaComissao); + ((Series)val10).Values = (IChartValues)(object)obj3; + ((Series)val10).DataLabels = false; + ((Series)val10).LabelPoint = (ChartPoint chartPoint) => $" Media de Comissão {mediaComissao}% "; + PieSeries val11 = val10; + ((NoisyCollection<ISeriesView>)(object)MediaComissao.Series).Add((ISeriesView)(object)val11); + }); + double totalDays = (filtro.Fim - filtro.Inicio).TotalDays; + ChartValues<DateTimePoint> val2 = new ChartValues<DateTimePoint>(); + ChartValues<DateTimePoint> val3 = new ChartValues<DateTimePoint>(); + for (int i = 0; (double)i <= totalDays; i++) + { + DateTime dateProc = filtro.Inicio.AddDays(i); + DateTime dateProcAnterior = dateProc.AddYears(-1); + decimal num = _documentosFechamento.Where((Documento s) => s.Vigencia1 == dateProcAnterior).Sum((Documento s) => s.PremioLiquido); + decimal num2 = _documentosProducao.Where((Documento s) => s.Vigencia1 == dateProc).Sum((Documento s) => s.PremioLiquido); + ((NoisyCollection<DateTimePoint>)(object)val2).Add(new DateTimePoint(dateProc, (double)num)); + ((NoisyCollection<DateTimePoint>)(object)val3).Add(new DateTimePoint(dateProc, (double)num2)); + } + LineSeries val4 = new LineSeries + { + Title = $"{filtroFechamento.Inicio.Year}", + Values = (IChartValues)(object)val2 + }; + LineSeries val5 = new LineSeries + { + Title = $"{filtro.Inicio.Year}", + Values = (IChartValues)(object)val3 + }; + ((NoisyCollection<ISeriesView>)(object)Fechamento.Series).Add((ISeriesView)(object)val4); + ((NoisyCollection<ISeriesView>)(object)Fechamento.Series).Add((ISeriesView)(object)val5); + XFormatter = (double val) => new DateTime((long)val).ToString("dd/MM"); + YFormatter = (double val) => val.ToString("C2"); + IsVisibleProducao = (Visibility)0; + } + + public async void Detalhar(int tipo) + { + string titulo = ""; + string tipo2 = "APOLICES"; + List<string> campos = new List<string> + { + "Nome", "Apolice", "Endosso", "Status", "Negocio", "VigenciaInicial", "VigenciaFinal", "Comissao", "PremioLiquido", "PremioTotal", + "Seguradora", "Ramo" + }; + List<Analitico> list; + switch (tipo) + { + default: + titulo = "PRODUÇÃO"; + list = ((IEnumerable<Documento>)_documentosProducao).Select((Func<Documento, Analitico>)delegate(Documento x) + { + //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_0024: Unknown result type (might be due to invalid IL or missing references) + //IL_0039: 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_005a: Unknown result type (might be due to invalid IL or missing references) + //IL_00af: Unknown result type (might be due to invalid IL or missing references) + //IL_00bb: Unknown result type (might be due to invalid IL or missing references) + //IL_00c7: Unknown result type (might be due to invalid IL or missing references) + //IL_00d3: Unknown result type (might be due to invalid IL or missing references) + //IL_00df: Unknown result type (might be due to invalid IL or missing references) + //IL_00e1: Unknown result type (might be due to invalid IL or missing references) + //IL_0080: Unknown result type (might be due to invalid IL or missing references) + //IL_00fe: 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_012a: Unknown result type (might be due to invalid IL or missing references) + //IL_012b: Unknown result type (might be due to invalid IL or missing references) + //IL_0130: Unknown result type (might be due to invalid IL or missing references) + //IL_0146: Unknown result type (might be due to invalid IL or missing references) + //IL_0161: Expected O, but got Unknown + //IL_0161: Unknown result type (might be due to invalid IL or missing references) + //IL_0169: Expected O, but got Unknown + Analitico val3 = new Analitico + { + Nome = (x.Controle.Cliente.Nome ?? ""), + Apolice = (x.Apolice ?? ""), + Endosso = (x.Endosso ?? ""), + Comissao = x.Comissao + }; + object negocio3; + if (x.NegocioCorretora.HasValue) + { + NegocioCorretora? negocioCorretora3 = x.NegocioCorretora; + negocio3 = (negocioCorretora3.HasValue ? ValidationHelper.GetDescription((Enum)(object)negocioCorretora3.GetValueOrDefault()) : null) ?? ""; + } + else + { + negocio3 = ValidationHelper.GetDescription((Enum)(object)x.Negocio); + } + val3.Negocio = (string)negocio3; + val3.PremioLiquido = x.PremioLiquido; + val3.PremioTotal = x.PremioTotal; + val3.VigenciaFinal = x.Vigencia2; + val3.VigenciaInicial = x.Vigencia1; + val3.Status = ValidationHelper.GetDescription((Enum)(object)x.Situacao) ?? ""; + val3.Seguradora = x.Controle.Seguradora.NomeSocial; + val3.Ramo = x.Controle.Ramo.Nome; + val3.Cliente = new ClientesAtivosInativos + { + Id = ((DomainBase)x.Controle.Cliente).Id, + Nome = x.Controle.Cliente.Nome + }; + val3.Documento = x; + return val3; + }).ToList(); + break; + case 1: + { + titulo = "COMPARATIVO"; + List<Documento> documentosProducao = _documentosProducao; + List<Documento> documentosFechamento = _documentosFechamento; + List<Documento> list2 = new List<Documento>(); + list2.AddRange(documentosProducao); + list2.AddRange(documentosFechamento); + list = ((IEnumerable<Documento>)list2.OrderBy((Documento x) => x.Vigencia1)).Select((Func<Documento, Analitico>)delegate(Documento x) + { + //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_0024: Unknown result type (might be due to invalid IL or missing references) + //IL_0039: 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_005a: Unknown result type (might be due to invalid IL or missing references) + //IL_00af: Unknown result type (might be due to invalid IL or missing references) + //IL_00bb: Unknown result type (might be due to invalid IL or missing references) + //IL_00c7: Unknown result type (might be due to invalid IL or missing references) + //IL_00d3: Unknown result type (might be due to invalid IL or missing references) + //IL_00df: Unknown result type (might be due to invalid IL or missing references) + //IL_00e1: Unknown result type (might be due to invalid IL or missing references) + //IL_0080: Unknown result type (might be due to invalid IL or missing references) + //IL_00fe: 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_012a: Unknown result type (might be due to invalid IL or missing references) + //IL_012b: Unknown result type (might be due to invalid IL or missing references) + //IL_0130: Unknown result type (might be due to invalid IL or missing references) + //IL_0146: Unknown result type (might be due to invalid IL or missing references) + //IL_0161: Expected O, but got Unknown + //IL_0161: Unknown result type (might be due to invalid IL or missing references) + //IL_0169: Expected O, but got Unknown + Analitico val10 = new Analitico + { + Nome = (x.Controle.Cliente.Nome ?? ""), + Apolice = (x.Apolice ?? ""), + Endosso = (x.Endosso ?? ""), + Comissao = x.Comissao + }; + object negocio10; + if (x.NegocioCorretora.HasValue) + { + NegocioCorretora? negocioCorretora10 = x.NegocioCorretora; + negocio10 = (negocioCorretora10.HasValue ? ValidationHelper.GetDescription((Enum)(object)negocioCorretora10.GetValueOrDefault()) : null) ?? ""; + } + else + { + negocio10 = ValidationHelper.GetDescription((Enum)(object)x.Negocio); + } + val10.Negocio = (string)negocio10; + val10.PremioLiquido = x.PremioLiquido; + val10.PremioTotal = x.PremioTotal; + val10.VigenciaFinal = x.Vigencia2; + val10.VigenciaInicial = x.Vigencia1; + val10.Status = ValidationHelper.GetDescription((Enum)(object)x.Situacao) ?? ""; + val10.Seguradora = x.Controle.Seguradora.NomeSocial; + val10.Ramo = x.Controle.Ramo.Nome; + val10.Cliente = new ClientesAtivosInativos + { + Id = ((DomainBase)x.Controle.Cliente).Id, + Nome = x.Controle.Cliente.Nome + }; + val10.Documento = x; + return val10; + }).ToList(); + break; + } + case 2: + titulo = "NOVOS NEGÓCIOS"; + list = ((IEnumerable<Documento>)(from x in _documentosProducao + where x.Tipo == 0 && ((int)x.Situacao == 1 || ((int)x.Situacao == 2 && x.NegocioCorretora == (NegocioCorretora?)0)) + orderby x.Vigencia1 + select x)).Select((Func<Documento, Analitico>)delegate(Documento x) + { + //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_0024: Unknown result type (might be due to invalid IL or missing references) + //IL_0039: 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_005a: Unknown result type (might be due to invalid IL or missing references) + //IL_00af: Unknown result type (might be due to invalid IL or missing references) + //IL_00bb: Unknown result type (might be due to invalid IL or missing references) + //IL_00c7: Unknown result type (might be due to invalid IL or missing references) + //IL_00d3: Unknown result type (might be due to invalid IL or missing references) + //IL_00df: Unknown result type (might be due to invalid IL or missing references) + //IL_00e1: Unknown result type (might be due to invalid IL or missing references) + //IL_0080: Unknown result type (might be due to invalid IL or missing references) + //IL_00fe: 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_012a: Unknown result type (might be due to invalid IL or missing references) + //IL_012b: Unknown result type (might be due to invalid IL or missing references) + //IL_0130: Unknown result type (might be due to invalid IL or missing references) + //IL_0146: Unknown result type (might be due to invalid IL or missing references) + //IL_0161: Expected O, but got Unknown + //IL_0161: Unknown result type (might be due to invalid IL or missing references) + //IL_0169: Expected O, but got Unknown + Analitico val8 = new Analitico + { + Nome = (x.Controle.Cliente.Nome ?? ""), + Apolice = (x.Apolice ?? ""), + Endosso = (x.Endosso ?? ""), + Comissao = x.Comissao + }; + object negocio8; + if (x.NegocioCorretora.HasValue) + { + NegocioCorretora? negocioCorretora8 = x.NegocioCorretora; + negocio8 = (negocioCorretora8.HasValue ? ValidationHelper.GetDescription((Enum)(object)negocioCorretora8.GetValueOrDefault()) : null) ?? ""; + } + else + { + negocio8 = ValidationHelper.GetDescription((Enum)(object)x.Negocio); + } + val8.Negocio = (string)negocio8; + val8.PremioLiquido = x.PremioLiquido; + val8.PremioTotal = x.PremioTotal; + val8.VigenciaFinal = x.Vigencia2; + val8.VigenciaInicial = x.Vigencia1; + val8.Status = ValidationHelper.GetDescription((Enum)(object)x.Situacao) ?? ""; + val8.Seguradora = x.Controle.Seguradora.NomeSocial; + val8.Ramo = x.Controle.Ramo.Nome; + val8.Cliente = new ClientesAtivosInativos + { + Id = ((DomainBase)x.Controle.Cliente).Id, + Nome = x.Controle.Cliente.Nome + }; + val8.Documento = x; + return val8; + }).ToList(); + break; + case 3: + titulo = "RENOVAÇÕES"; + list = ((IEnumerable<Documento>)(from x in _documentosProducao + where x.Tipo == 0 && (int)x.Situacao == 2 && ((int)x.NegocioCorretora.GetValueOrDefault() == 1 || (int)x.Negocio.GetValueOrDefault() == 1) + orderby x.Vigencia1 + select x)).Select((Func<Documento, Analitico>)delegate(Documento x) + { + //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_0024: Unknown result type (might be due to invalid IL or missing references) + //IL_0039: 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_005a: Unknown result type (might be due to invalid IL or missing references) + //IL_00af: Unknown result type (might be due to invalid IL or missing references) + //IL_00bb: Unknown result type (might be due to invalid IL or missing references) + //IL_00c7: Unknown result type (might be due to invalid IL or missing references) + //IL_00d3: Unknown result type (might be due to invalid IL or missing references) + //IL_00df: Unknown result type (might be due to invalid IL or missing references) + //IL_00e1: Unknown result type (might be due to invalid IL or missing references) + //IL_0080: Unknown result type (might be due to invalid IL or missing references) + //IL_00fe: 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_012a: Unknown result type (might be due to invalid IL or missing references) + //IL_012b: Unknown result type (might be due to invalid IL or missing references) + //IL_0130: Unknown result type (might be due to invalid IL or missing references) + //IL_0146: Unknown result type (might be due to invalid IL or missing references) + //IL_0161: Expected O, but got Unknown + //IL_0161: Unknown result type (might be due to invalid IL or missing references) + //IL_0169: Expected O, but got Unknown + Analitico val6 = new Analitico + { + Nome = (x.Controle.Cliente.Nome ?? ""), + Apolice = (x.Apolice ?? ""), + Endosso = (x.Endosso ?? ""), + Comissao = x.Comissao + }; + object negocio6; + if (x.NegocioCorretora.HasValue) + { + NegocioCorretora? negocioCorretora6 = x.NegocioCorretora; + negocio6 = (negocioCorretora6.HasValue ? ValidationHelper.GetDescription((Enum)(object)negocioCorretora6.GetValueOrDefault()) : null) ?? ""; + } + else + { + negocio6 = ValidationHelper.GetDescription((Enum)(object)x.Negocio); + } + val6.Negocio = (string)negocio6; + val6.PremioLiquido = x.PremioLiquido; + val6.PremioTotal = x.PremioTotal; + val6.VigenciaFinal = x.Vigencia2; + val6.VigenciaInicial = x.Vigencia1; + val6.Status = ValidationHelper.GetDescription((Enum)(object)x.Situacao) ?? ""; + val6.Seguradora = x.Controle.Seguradora.NomeSocial; + val6.Ramo = x.Controle.Ramo.Nome; + val6.Cliente = new ClientesAtivosInativos + { + Id = ((DomainBase)x.Controle.Cliente).Id, + Nome = x.Controle.Cliente.Nome + }; + val6.Documento = x; + return val6; + }).ToList(); + break; + case 4: + titulo = "CANCELAMENTOS"; + list = ((IEnumerable<Documento>)(from x in _documentosProducao + where (int)x.Situacao == 3 && x.Tipo == 1 + orderby x.Vigencia1 + select x)).Select((Func<Documento, Analitico>)delegate(Documento x) + { + //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_0024: Unknown result type (might be due to invalid IL or missing references) + //IL_0039: 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_005a: Unknown result type (might be due to invalid IL or missing references) + //IL_00af: Unknown result type (might be due to invalid IL or missing references) + //IL_00bb: Unknown result type (might be due to invalid IL or missing references) + //IL_00c7: Unknown result type (might be due to invalid IL or missing references) + //IL_00d3: Unknown result type (might be due to invalid IL or missing references) + //IL_00df: Unknown result type (might be due to invalid IL or missing references) + //IL_00e1: Unknown result type (might be due to invalid IL or missing references) + //IL_0080: Unknown result type (might be due to invalid IL or missing references) + //IL_00fe: 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_012a: Unknown result type (might be due to invalid IL or missing references) + //IL_012b: Unknown result type (might be due to invalid IL or missing references) + //IL_0130: Unknown result type (might be due to invalid IL or missing references) + //IL_0146: Unknown result type (might be due to invalid IL or missing references) + //IL_0161: Expected O, but got Unknown + //IL_0161: Unknown result type (might be due to invalid IL or missing references) + //IL_0169: Expected O, but got Unknown + Analitico val4 = new Analitico + { + Nome = (x.Controle.Cliente.Nome ?? ""), + Apolice = (x.Apolice ?? ""), + Endosso = (x.Endosso ?? ""), + Comissao = x.Comissao + }; + object negocio4; + if (x.NegocioCorretora.HasValue) + { + NegocioCorretora? negocioCorretora4 = x.NegocioCorretora; + negocio4 = (negocioCorretora4.HasValue ? ValidationHelper.GetDescription((Enum)(object)negocioCorretora4.GetValueOrDefault()) : null) ?? ""; + } + else + { + negocio4 = ValidationHelper.GetDescription((Enum)(object)x.Negocio); + } + val4.Negocio = (string)negocio4; + val4.PremioLiquido = x.PremioLiquido; + val4.PremioTotal = x.PremioTotal; + val4.VigenciaFinal = x.Vigencia2; + val4.VigenciaInicial = x.Vigencia1; + val4.Status = ValidationHelper.GetDescription((Enum)(object)x.Situacao) ?? ""; + val4.Seguradora = x.Controle.Seguradora.NomeSocial; + val4.Ramo = x.Controle.Ramo.Nome; + val4.Cliente = new ClientesAtivosInativos + { + Id = ((DomainBase)x.Controle.Cliente).Id, + Nome = x.Controle.Cliente.Nome + }; + val4.Documento = x; + return val4; + }).ToList(); + break; + case 5: + tipo2 = "CLIENTES"; + campos = new List<string> + { + "Nome", "DocumentoCliente", "Dia/Mês", "Nascimento", "TipoPessoa", "Cidade", "Uf", "Cep", "Telefone", "E-mail", + "Profissão" + }; + list = ((IEnumerable<ClientesAtivosInativos>)_clientesAniversariantes).Select((Func<ClientesAtivosInativos, Analitico>)((ClientesAtivosInativos x) => new Analitico + { + Nome = (x.Nome ?? ""), + DocumentoCliente = x.Documento, + DiaMes = x.Aniversario, + TipoPessoa = ((ValidationHelper.OnlyNumber(x.Documento).Length > 11) ? "JURÍDICA" : "FÍSICA"), + Nascimento = x.Nascimento, + VencimentoHabilitacao = x.VencimentoCnh, + Cliente = x, + Cidade = x.Cidade, + Uf = x.Estado, + Cep = x.Cep, + Telefone = x.Telefone, + Email = x.Email, + Profissao = x.Profissao + })).ToList(); + break; + case 6: + tipo2 = "CLIENTES"; + campos = new List<string> { "Nome", "DocumentoCliente", "Nascimento", "VencimentoHabilitacao" }; + list = ((IEnumerable<ClientesAtivosInativos>)_clientesCnh).Select((Func<ClientesAtivosInativos, Analitico>)((ClientesAtivosInativos x) => new Analitico + { + Nome = (x.Nome ?? ""), + DocumentoCliente = x.Documento, + Nascimento = x.Nascimento, + VencimentoHabilitacao = x.VencimentoCnh, + Cliente = x + })).ToList(); + break; + case 7: + titulo = "APÓLICES À VENCER"; + list = ((IEnumerable<Documento>)_documentosVencimento.OrderBy((Documento x) => x.Vigencia1)).Select((Func<Documento, Analitico>)delegate(Documento x) + { + //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_0024: Unknown result type (might be due to invalid IL or missing references) + //IL_0039: 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_005a: Unknown result type (might be due to invalid IL or missing references) + //IL_00af: Unknown result type (might be due to invalid IL or missing references) + //IL_00bb: Unknown result type (might be due to invalid IL or missing references) + //IL_00c7: Unknown result type (might be due to invalid IL or missing references) + //IL_00d3: Unknown result type (might be due to invalid IL or missing references) + //IL_00df: Unknown result type (might be due to invalid IL or missing references) + //IL_00e1: Unknown result type (might be due to invalid IL or missing references) + //IL_0080: Unknown result type (might be due to invalid IL or missing references) + //IL_00fe: 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_012a: Unknown result type (might be due to invalid IL or missing references) + //IL_012b: Unknown result type (might be due to invalid IL or missing references) + //IL_0130: Unknown result type (might be due to invalid IL or missing references) + //IL_0146: Unknown result type (might be due to invalid IL or missing references) + //IL_0161: Expected O, but got Unknown + //IL_0161: Unknown result type (might be due to invalid IL or missing references) + //IL_0169: Expected O, but got Unknown + Analitico val = new Analitico + { + Nome = (x.Controle.Cliente.Nome ?? ""), + Apolice = (x.Apolice ?? ""), + Endosso = (x.Endosso ?? ""), + Comissao = x.Comissao + }; + object negocio; + if (x.NegocioCorretora.HasValue) + { + NegocioCorretora? negocioCorretora = x.NegocioCorretora; + negocio = (negocioCorretora.HasValue ? ValidationHelper.GetDescription((Enum)(object)negocioCorretora.GetValueOrDefault()) : null) ?? ""; + } + else + { + negocio = ValidationHelper.GetDescription((Enum)(object)x.Negocio); + } + val.Negocio = (string)negocio; + val.PremioLiquido = x.PremioLiquido; + val.PremioTotal = x.PremioTotal; + val.VigenciaFinal = x.Vigencia2; + val.VigenciaInicial = x.Vigencia1; + val.Status = ValidationHelper.GetDescription((Enum)(object)x.Situacao) ?? ""; + val.Seguradora = x.Controle.Seguradora.NomeSocial; + val.Ramo = x.Controle.Ramo.Nome; + val.Cliente = new ClientesAtivosInativos + { + Id = ((DomainBase)x.Controle.Cliente).Id, + Nome = x.Controle.Cliente.Nome + }; + val.Documento = x; + return val; + }).ToList(); + break; + case 8: + campos = new List<string> + { + "Nome", "Apolice", "Endosso", "Seguradora", "Comissao", "Vencimento", "Recebimento", "Valor", "ComissaoGerada", "NumeroParcela", + "Ramo" + }; + titulo = "PARCELAS À VENCER"; + tipo2 = "PARCELAS"; + list = ((IEnumerable<Parcela>)_parcelasVencimento.OrderBy((Parcela x) => x.Vencimento)).Select((Func<Parcela, Analitico>)((Parcela x) => new Analitico + { + Nome = (x.Documento.Controle.Cliente.Nome ?? ""), + Apolice = (x.Documento.Apolice ?? ""), + Endosso = (x.Documento.Endosso ?? ""), + Comissao = x.Comissao, + Seguradora = x.Documento.Controle.Seguradora.NomeSocial, + Ramo = x.Documento.Controle.Ramo.Nome, + Vencimento = x.Vencimento, + Recebimento = x.DataRecebimento, + Valor = x.Valor, + ValorComissao = x.ValorComDesconto, + NumeroParcela = x.NumeroParcela, + Cliente = new ClientesAtivosInativos + { + Id = ((DomainBase)x.Documento.Controle.Cliente).Id, + Nome = x.Documento.Controle.Cliente.Nome + }, + Documento = x.Documento, + Parcela = x + })).ToList(); + break; + case 9: + titulo = "APÓLICES PENDENTES"; + list = ((IEnumerable<Documento>)(from x in _documentosPendentes + where string.IsNullOrEmpty(x.Apolice) && x.Tipo != 2 + orderby x.Vigencia1 + select x)).Select((Func<Documento, Analitico>)delegate(Documento x) + { + //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_0024: Unknown result type (might be due to invalid IL or missing references) + //IL_0039: 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_005a: Unknown result type (might be due to invalid IL or missing references) + //IL_00af: Unknown result type (might be due to invalid IL or missing references) + //IL_00bb: Unknown result type (might be due to invalid IL or missing references) + //IL_00c7: Unknown result type (might be due to invalid IL or missing references) + //IL_00d3: Unknown result type (might be due to invalid IL or missing references) + //IL_00df: Unknown result type (might be due to invalid IL or missing references) + //IL_00e1: Unknown result type (might be due to invalid IL or missing references) + //IL_0080: Unknown result type (might be due to invalid IL or missing references) + //IL_00fe: 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_012a: Unknown result type (might be due to invalid IL or missing references) + //IL_012b: Unknown result type (might be due to invalid IL or missing references) + //IL_0130: Unknown result type (might be due to invalid IL or missing references) + //IL_0146: Unknown result type (might be due to invalid IL or missing references) + //IL_0161: Expected O, but got Unknown + //IL_0161: Unknown result type (might be due to invalid IL or missing references) + //IL_0169: Expected O, but got Unknown + Analitico val5 = new Analitico + { + Nome = (x.Controle.Cliente.Nome ?? ""), + Apolice = (x.Apolice ?? ""), + Endosso = (x.Endosso ?? ""), + Comissao = x.Comissao + }; + object negocio5; + if (x.NegocioCorretora.HasValue) + { + NegocioCorretora? negocioCorretora5 = x.NegocioCorretora; + negocio5 = (negocioCorretora5.HasValue ? ValidationHelper.GetDescription((Enum)(object)negocioCorretora5.GetValueOrDefault()) : null) ?? ""; + } + else + { + negocio5 = ValidationHelper.GetDescription((Enum)(object)x.Negocio); + } + val5.Negocio = (string)negocio5; + val5.PremioLiquido = x.PremioLiquido; + val5.PremioTotal = x.PremioTotal; + val5.VigenciaFinal = x.Vigencia2; + val5.VigenciaInicial = x.Vigencia1; + val5.Status = ValidationHelper.GetDescription((Enum)(object)x.Situacao) ?? ""; + val5.Seguradora = x.Controle.Seguradora.NomeSocial; + val5.Ramo = x.Controle.Ramo.Nome; + val5.Cliente = new ClientesAtivosInativos + { + Id = ((DomainBase)x.Controle.Cliente).Id, + Nome = x.Controle.Cliente.Nome + }; + val5.Documento = x; + return val5; + }).ToList(); + break; + case 10: + campos = new List<string> { "Nome", "Apolice", "Endosso", "Seguradora", "Comissao", "Vencimento", "Valor", "NumeroParcela", "Ramo" }; + titulo = "PARCELAS PENDENTES"; + tipo2 = "PARCELAS"; + list = ((IEnumerable<Parcela>)_parcelasPendencia.OrderBy((Parcela x) => x.Vencimento)).Select((Func<Parcela, Analitico>)((Parcela x) => new Analitico + { + Nome = (x.Documento.Controle.Cliente.Nome ?? ""), + Apolice = (x.Documento.Apolice ?? ""), + Endosso = (x.Documento.Endosso ?? ""), + Comissao = x.Comissao, + Seguradora = x.Documento.Controle.Seguradora.NomeSocial, + Ramo = x.Documento.Controle.Ramo.Nome, + Vencimento = x.Vencimento, + Recebimento = x.DataRecebimento, + Valor = x.Valor, + ValorComissao = x.ValorComissao, + NumeroParcela = x.NumeroParcela, + Cliente = new ClientesAtivosInativos + { + Id = ((DomainBase)x.Documento.Controle.Cliente).Id, + Nome = x.Documento.Controle.Cliente.Nome + }, + Documento = x.Documento, + Parcela = x + })).ToList(); + break; + case 11: + titulo = "ENDOSSOS"; + list = ((IEnumerable<Documento>)(from x in _documentosProducao + where x.Tipo == 1 + orderby x.Vigencia1 + select x)).Select((Func<Documento, Analitico>)delegate(Documento x) + { + //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_0024: Unknown result type (might be due to invalid IL or missing references) + //IL_0039: 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_005a: Unknown result type (might be due to invalid IL or missing references) + //IL_00af: Unknown result type (might be due to invalid IL or missing references) + //IL_00bb: Unknown result type (might be due to invalid IL or missing references) + //IL_00c7: Unknown result type (might be due to invalid IL or missing references) + //IL_00d3: Unknown result type (might be due to invalid IL or missing references) + //IL_00df: Unknown result type (might be due to invalid IL or missing references) + //IL_00e1: Unknown result type (might be due to invalid IL or missing references) + //IL_0080: Unknown result type (might be due to invalid IL or missing references) + //IL_00fe: 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_012a: Unknown result type (might be due to invalid IL or missing references) + //IL_012b: Unknown result type (might be due to invalid IL or missing references) + //IL_0130: Unknown result type (might be due to invalid IL or missing references) + //IL_0146: Unknown result type (might be due to invalid IL or missing references) + //IL_0161: Expected O, but got Unknown + //IL_0161: Unknown result type (might be due to invalid IL or missing references) + //IL_0169: Expected O, but got Unknown + Analitico val7 = new Analitico + { + Nome = (x.Controle.Cliente.Nome ?? ""), + Apolice = (x.Apolice ?? ""), + Endosso = (x.Endosso ?? ""), + Comissao = x.Comissao + }; + object negocio7; + if (x.NegocioCorretora.HasValue) + { + NegocioCorretora? negocioCorretora7 = x.NegocioCorretora; + negocio7 = (negocioCorretora7.HasValue ? ValidationHelper.GetDescription((Enum)(object)negocioCorretora7.GetValueOrDefault()) : null) ?? ""; + } + else + { + negocio7 = ValidationHelper.GetDescription((Enum)(object)x.Negocio); + } + val7.Negocio = (string)negocio7; + val7.PremioLiquido = x.PremioLiquido; + val7.PremioTotal = x.PremioTotal; + val7.VigenciaFinal = x.Vigencia2; + val7.VigenciaInicial = x.Vigencia1; + val7.Status = ValidationHelper.GetDescription((Enum)(object)x.Situacao) ?? ""; + val7.Seguradora = x.Controle.Seguradora.NomeSocial; + val7.Ramo = x.Controle.Ramo.Nome; + val7.Cliente = new ClientesAtivosInativos + { + Id = ((DomainBase)x.Controle.Cliente).Id, + Nome = x.Controle.Cliente.Nome + }; + val7.Documento = x; + return val7; + }).ToList(); + break; + case 12: + titulo = "FATURAS"; + list = ((IEnumerable<Documento>)(from x in _documentosProducao + where x.Tipo == 2 + orderby x.Vigencia1 + select x)).Select((Func<Documento, Analitico>)delegate(Documento x) + { + //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_0024: Unknown result type (might be due to invalid IL or missing references) + //IL_0039: 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_005a: Unknown result type (might be due to invalid IL or missing references) + //IL_00af: Unknown result type (might be due to invalid IL or missing references) + //IL_00bb: Unknown result type (might be due to invalid IL or missing references) + //IL_00c7: Unknown result type (might be due to invalid IL or missing references) + //IL_00d3: Unknown result type (might be due to invalid IL or missing references) + //IL_00df: Unknown result type (might be due to invalid IL or missing references) + //IL_00e1: Unknown result type (might be due to invalid IL or missing references) + //IL_0080: Unknown result type (might be due to invalid IL or missing references) + //IL_00fe: 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_012a: Unknown result type (might be due to invalid IL or missing references) + //IL_012b: Unknown result type (might be due to invalid IL or missing references) + //IL_0130: Unknown result type (might be due to invalid IL or missing references) + //IL_0146: Unknown result type (might be due to invalid IL or missing references) + //IL_0161: Expected O, but got Unknown + //IL_0161: Unknown result type (might be due to invalid IL or missing references) + //IL_0169: Expected O, but got Unknown + Analitico val2 = new Analitico + { + Nome = (x.Controle.Cliente.Nome ?? ""), + Apolice = (x.Apolice ?? ""), + Endosso = (x.Endosso ?? ""), + Comissao = x.Comissao + }; + object negocio2; + if (x.NegocioCorretora.HasValue) + { + NegocioCorretora? negocioCorretora2 = x.NegocioCorretora; + negocio2 = (negocioCorretora2.HasValue ? ValidationHelper.GetDescription((Enum)(object)negocioCorretora2.GetValueOrDefault()) : null) ?? ""; + } + else + { + negocio2 = ValidationHelper.GetDescription((Enum)(object)x.Negocio); + } + val2.Negocio = (string)negocio2; + val2.PremioLiquido = x.PremioLiquido; + val2.PremioTotal = x.PremioTotal; + val2.VigenciaFinal = x.Vigencia2; + val2.VigenciaInicial = x.Vigencia1; + val2.Status = ValidationHelper.GetDescription((Enum)(object)x.Situacao) ?? ""; + val2.Seguradora = x.Controle.Seguradora.NomeSocial; + val2.Ramo = x.Controle.Ramo.Nome; + val2.Cliente = new ClientesAtivosInativos + { + Id = ((DomainBase)x.Controle.Cliente).Id, + Nome = x.Controle.Cliente.Nome + }; + val2.Documento = x; + return val2; + }).ToList(); + break; + case 13: + titulo = "TOTAL DOCUMENTOS"; + list = ((IEnumerable<Documento>)(from x in _documentosProducao + where x.Tipo != 2 + orderby x.Vigencia1 + select x)).Select((Func<Documento, Analitico>)delegate(Documento x) + { + //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_0024: Unknown result type (might be due to invalid IL or missing references) + //IL_0039: 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_005a: Unknown result type (might be due to invalid IL or missing references) + //IL_00af: Unknown result type (might be due to invalid IL or missing references) + //IL_00bb: Unknown result type (might be due to invalid IL or missing references) + //IL_00c7: Unknown result type (might be due to invalid IL or missing references) + //IL_00d3: Unknown result type (might be due to invalid IL or missing references) + //IL_00df: Unknown result type (might be due to invalid IL or missing references) + //IL_00e1: Unknown result type (might be due to invalid IL or missing references) + //IL_0080: Unknown result type (might be due to invalid IL or missing references) + //IL_00fe: 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_012a: Unknown result type (might be due to invalid IL or missing references) + //IL_012b: Unknown result type (might be due to invalid IL or missing references) + //IL_0130: Unknown result type (might be due to invalid IL or missing references) + //IL_0146: Unknown result type (might be due to invalid IL or missing references) + //IL_0161: Expected O, but got Unknown + //IL_0161: Unknown result type (might be due to invalid IL or missing references) + //IL_0169: Expected O, but got Unknown + Analitico val9 = new Analitico + { + Nome = (x.Controle.Cliente.Nome ?? ""), + Apolice = (x.Apolice ?? ""), + Endosso = (x.Endosso ?? ""), + Comissao = x.Comissao + }; + object negocio9; + if (x.NegocioCorretora.HasValue) + { + NegocioCorretora? negocioCorretora9 = x.NegocioCorretora; + negocio9 = (negocioCorretora9.HasValue ? ValidationHelper.GetDescription((Enum)(object)negocioCorretora9.GetValueOrDefault()) : null) ?? ""; + } + else + { + negocio9 = ValidationHelper.GetDescription((Enum)(object)x.Negocio); + } + val9.Negocio = (string)negocio9; + val9.PremioLiquido = x.PremioLiquido; + val9.PremioTotal = x.PremioTotal; + val9.VigenciaFinal = x.Vigencia2; + val9.VigenciaInicial = x.Vigencia1; + val9.Status = ValidationHelper.GetDescription((Enum)(object)x.Situacao) ?? ""; + val9.Seguradora = x.Controle.Seguradora.NomeSocial; + val9.Ramo = x.Controle.Ramo.Nome; + val9.Cliente = new ClientesAtivosInativos + { + Id = ((DomainBase)x.Controle.Cliente).Id, + Nome = x.Controle.Cliente.Nome + }; + val9.Documento = x; + return val9; + }).ToList(); + break; + case 14: + titulo = "PRODUÇÃO ANTERIOR"; + list = ((IEnumerable<Documento>)_documentosFechamento).Select((Func<Documento, Analitico>)delegate(Documento x) + { + //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_0024: Unknown result type (might be due to invalid IL or missing references) + //IL_0039: 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_005a: Unknown result type (might be due to invalid IL or missing references) + //IL_00af: Unknown result type (might be due to invalid IL or missing references) + //IL_00bb: Unknown result type (might be due to invalid IL or missing references) + //IL_00c7: Unknown result type (might be due to invalid IL or missing references) + //IL_00d3: Unknown result type (might be due to invalid IL or missing references) + //IL_00df: Unknown result type (might be due to invalid IL or missing references) + //IL_00e1: Unknown result type (might be due to invalid IL or missing references) + //IL_0080: Unknown result type (might be due to invalid IL or missing references) + //IL_00fe: 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_012a: Unknown result type (might be due to invalid IL or missing references) + //IL_012b: Unknown result type (might be due to invalid IL or missing references) + //IL_0130: Unknown result type (might be due to invalid IL or missing references) + //IL_0146: Unknown result type (might be due to invalid IL or missing references) + //IL_0161: Expected O, but got Unknown + //IL_0161: Unknown result type (might be due to invalid IL or missing references) + //IL_0169: Expected O, but got Unknown + Analitico val11 = new Analitico + { + Nome = (x.Controle.Cliente.Nome ?? ""), + Apolice = (x.Apolice ?? ""), + Endosso = (x.Endosso ?? ""), + Comissao = x.Comissao + }; + object negocio11; + if (x.NegocioCorretora.HasValue) + { + NegocioCorretora? negocioCorretora11 = x.NegocioCorretora; + negocio11 = (negocioCorretora11.HasValue ? ValidationHelper.GetDescription((Enum)(object)negocioCorretora11.GetValueOrDefault()) : null) ?? ""; + } + else + { + negocio11 = ValidationHelper.GetDescription((Enum)(object)x.Negocio); + } + val11.Negocio = (string)negocio11; + val11.PremioLiquido = x.PremioLiquido; + val11.PremioTotal = x.PremioTotal; + val11.VigenciaFinal = x.Vigencia2; + val11.VigenciaInicial = x.Vigencia1; + val11.Status = ValidationHelper.GetDescription((Enum)(object)x.Situacao) ?? ""; + val11.Seguradora = x.Controle.Seguradora.NomeSocial; + val11.Ramo = x.Controle.Ramo.Nome; + val11.Cliente = new ClientesAtivosInativos + { + Id = ((DomainBase)x.Controle.Cliente).Id, + Nome = x.Controle.Cliente.Nome + }; + val11.Documento = x; + return val11; + }).ToList(); + break; + } + if (list.Count == 0) + { + await ShowMessage("NÃO FOI POSSÍVEL DETALHAR POIS NÃO HÁ DADOS"); + } + else + { + ((Window)new HosterWindow((ContentControl)(object)new DialogAnaliticoBi(titulo, list, tipo2, campos), "ANALÍTICO", 1260.0, 500.0)).Show(); + } + } +} |