summaryrefslogtreecommitdiff
path: root/Gestor.Model/Model.Domain.Seguros
diff options
context:
space:
mode:
Diffstat (limited to 'Gestor.Model/Model.Domain.Seguros')
-rw-r--r--Gestor.Model/Model.Domain.Seguros/Adiantamento.cs145
-rw-r--r--Gestor.Model/Model.Domain.Seguros/Aeronautico.cs475
-rw-r--r--Gestor.Model/Model.Domain.Seguros/AggilizadorPermissao.cs25
-rw-r--r--Gestor.Model/Model.Domain.Seguros/Auto.cs793
-rw-r--r--Gestor.Model/Model.Domain.Seguros/Cliente.cs1193
-rw-r--r--Gestor.Model/Model.Domain.Seguros/ClienteEmail.cs88
-rw-r--r--Gestor.Model/Model.Domain.Seguros/ClienteEndereco.cs155
-rw-r--r--Gestor.Model/Model.Domain.Seguros/ClienteTelefone.cs82
-rw-r--r--Gestor.Model/Model.Domain.Seguros/ClienteVinculo.cs56
-rw-r--r--Gestor.Model/Model.Domain.Seguros/Cobertura.cs86
-rw-r--r--Gestor.Model/Model.Domain.Seguros/CoberturaGranizo.cs125
-rw-r--r--Gestor.Model/Model.Domain.Seguros/CoberturaPadrao.cs67
-rw-r--r--Gestor.Model/Model.Domain.Seguros/CondicaoRepasse.cs49
-rw-r--r--Gestor.Model/Model.Domain.Seguros/ConfigExtratoImport.cs50
-rw-r--r--Gestor.Model/Model.Domain.Seguros/Consorcio.cs191
-rw-r--r--Gestor.Model/Model.Domain.Seguros/Controle.cs128
-rw-r--r--Gestor.Model/Model.Domain.Seguros/ControleSinistro.cs118
-rw-r--r--Gestor.Model/Model.Domain.Seguros/CriticaApolice.cs116
-rw-r--r--Gestor.Model/Model.Domain.Seguros/DetalheExtrato.cs250
-rw-r--r--Gestor.Model/Model.Domain.Seguros/Documento.cs1426
-rw-r--r--Gestor.Model/Model.Domain.Seguros/Estipulante.cs373
-rw-r--r--Gestor.Model/Model.Domain.Seguros/Expedicao.cs94
-rw-r--r--Gestor.Model/Model.Domain.Seguros/Extrato.cs177
-rw-r--r--Gestor.Model/Model.Domain.Seguros/Fabricante.cs62
-rw-r--r--Gestor.Model/Model.Domain.Seguros/Granizo.cs247
-rw-r--r--Gestor.Model/Model.Domain.Seguros/Item.cs505
-rw-r--r--Gestor.Model/Model.Domain.Seguros/MaisContato.cs340
-rw-r--r--Gestor.Model/Model.Domain.Seguros/MetaSeguradora.cs60
-rw-r--r--Gestor.Model/Model.Domain.Seguros/MetaVendedor.cs56
-rw-r--r--Gestor.Model/Model.Domain.Seguros/Parceiro.cs528
-rw-r--r--Gestor.Model/Model.Domain.Seguros/Parcela.cs789
-rw-r--r--Gestor.Model/Model.Domain.Seguros/Parcelas.cs204
-rw-r--r--Gestor.Model/Model.Domain.Seguros/Patrimonial.cs574
-rw-r--r--Gestor.Model/Model.Domain.Seguros/Perfil.cs275
-rw-r--r--Gestor.Model/Model.Domain.Seguros/PerfilEmpresa.cs141
-rw-r--r--Gestor.Model/Model.Domain.Seguros/PermissaoArquivoDigital.cs69
-rw-r--r--Gestor.Model/Model.Domain.Seguros/PermissaoUsuario.cs57
-rw-r--r--Gestor.Model/Model.Domain.Seguros/Produto.cs120
-rw-r--r--Gestor.Model/Model.Domain.Seguros/Prospeccao.cs400
-rw-r--r--Gestor.Model/Model.Domain.Seguros/ProspeccaoToPrint.cs149
-rw-r--r--Gestor.Model/Model.Domain.Seguros/Qualificacao.cs152
-rw-r--r--Gestor.Model/Model.Domain.Seguros/Ramo.cs165
-rw-r--r--Gestor.Model/Model.Domain.Seguros/Repasse.cs187
-rw-r--r--Gestor.Model/Model.Domain.Seguros/ResponsavelAssinatura.cs109
-rw-r--r--Gestor.Model/Model.Domain.Seguros/RestricaoUsuario.cs60
-rw-r--r--Gestor.Model/Model.Domain.Seguros/RestricaoUsuarioCamposRelatorios.cs61
-rw-r--r--Gestor.Model/Model.Domain.Seguros/RiscosDiversos.cs130
-rw-r--r--Gestor.Model/Model.Domain.Seguros/Seguradora.cs1804
-rw-r--r--Gestor.Model/Model.Domain.Seguros/SeguradoraContato.cs90
-rw-r--r--Gestor.Model/Model.Domain.Seguros/SeguradoraEndereco.cs115
-rw-r--r--Gestor.Model/Model.Domain.Seguros/Sinistro.cs1132
-rw-r--r--Gestor.Model/Model.Domain.Seguros/SinistroAuto.cs284
-rw-r--r--Gestor.Model/Model.Domain.Seguros/SinistroVida.cs138
-rw-r--r--Gestor.Model/Model.Domain.Seguros/Status.cs86
-rw-r--r--Gestor.Model/Model.Domain.Seguros/TipoVendedor.cs138
-rw-r--r--Gestor.Model/Model.Domain.Seguros/TitularesVida.cs269
-rw-r--r--Gestor.Model/Model.Domain.Seguros/TupleList.cs19
-rw-r--r--Gestor.Model/Model.Domain.Seguros/Usuario.cs872
-rw-r--r--Gestor.Model/Model.Domain.Seguros/Vendedor.cs375
-rw-r--r--Gestor.Model/Model.Domain.Seguros/VendedorParcela.cs235
-rw-r--r--Gestor.Model/Model.Domain.Seguros/VendedorParcelas.cs162
-rw-r--r--Gestor.Model/Model.Domain.Seguros/VendedorTelefone.cs89
-rw-r--r--Gestor.Model/Model.Domain.Seguros/VendedorUsuario.cs51
-rw-r--r--Gestor.Model/Model.Domain.Seguros/Vida.cs306
-rw-r--r--Gestor.Model/Model.Domain.Seguros/VinculoRepasse.cs159
-rw-r--r--Gestor.Model/Model.Domain.Seguros/VinculoVendedor.cs25
66 files changed, 0 insertions, 18051 deletions
diff --git a/Gestor.Model/Model.Domain.Seguros/Adiantamento.cs b/Gestor.Model/Model.Domain.Seguros/Adiantamento.cs
deleted file mode 100644
index 979ce16..0000000
--- a/Gestor.Model/Model.Domain.Seguros/Adiantamento.cs
+++ /dev/null
@@ -1,145 +0,0 @@
-using Gestor.Model.Common;
-using Gestor.Model.Domain.Generic;
-using Gestor.Model.Validation;
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Runtime.CompilerServices;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class Adiantamento : DomainBase
- {
- private string _historico;
-
- public DateTime? Data
- {
- get;
- set;
- }
-
- public string Historico
- {
- get
- {
- string str = this._historico;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._historico = value;
- }
- }
-
- public DateTime? Pagamento
- {
- get;
- set;
- }
-
- public bool Pago
- {
- get;
- set;
- }
-
- public Gestor.Model.Common.TipoPagamento? TipoPagamento
- {
- get;
- set;
- }
-
- public decimal Valor
- {
- get;
- set;
- }
-
- public Gestor.Model.Domain.Seguros.Vendedor Vendedor
- {
- get;
- set;
- }
-
- public Adiantamento()
- {
- }
-
- public List<TupleList> Log()
- {
- string shortDateString;
- string description;
- string str;
- List<TupleList> tupleLists = new List<TupleList>();
- TupleList tupleList = new TupleList();
- ObservableCollection<Tuple<string, string, string>> observableCollection = new ObservableCollection<Tuple<string, string, string>>()
- {
- new Tuple<string, string, string>("HISTÓRICO", (string.IsNullOrWhiteSpace(this.Historico) ? "" : this.Historico), "")
- };
- DateTime? data = this.Data;
- if (!data.HasValue)
- {
- shortDateString = "";
- }
- else
- {
- data = this.Data;
- if (data.HasValue)
- {
- shortDateString = data.GetValueOrDefault().ToShortDateString();
- }
- else
- {
- shortDateString = null;
- }
- }
- observableCollection.Add(new Tuple<string, string, string>("DATA DO ADIANTAMENTO", shortDateString, ""));
- decimal valor = this.Valor;
- observableCollection.Add(new Tuple<string, string, string>("VALOR DO ADIANTAMENTO", valor.ToString("c2"), ""));
- Gestor.Model.Common.TipoPagamento? tipoPagamento = this.TipoPagamento;
- if (!tipoPagamento.HasValue)
- {
- description = "";
- }
- else
- {
- tipoPagamento = this.TipoPagamento;
- if (tipoPagamento.HasValue)
- {
- description = tipoPagamento.GetValueOrDefault().GetDescription();
- }
- else
- {
- description = null;
- }
- }
- observableCollection.Add(new Tuple<string, string, string>("TIPO DO PAGAMENTO", description, ""));
- observableCollection.Add(new Tuple<string, string, string>("PAGO", (this.Pago ? "SIM" : "NÃO"), ""));
- data = this.Pagamento;
- if (!data.HasValue)
- {
- str = "";
- }
- else
- {
- data = this.Pagamento;
- if (data.HasValue)
- {
- str = data.GetValueOrDefault().ToShortDateString();
- }
- else
- {
- str = null;
- }
- }
- observableCollection.Add(new Tuple<string, string, string>("DATA DO PAGAMENTO", str, ""));
- tupleList.Tuples = observableCollection;
- tupleLists.Add(tupleList);
- return tupleLists;
- }
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/Aeronautico.cs b/Gestor.Model/Model.Domain.Seguros/Aeronautico.cs
deleted file mode 100644
index 09f19f9..0000000
--- a/Gestor.Model/Model.Domain.Seguros/Aeronautico.cs
+++ /dev/null
@@ -1,475 +0,0 @@
-using Gestor.Model.Common;
-using Gestor.Model.Domain.Generic;
-using Gestor.Model.Helper;
-using Gestor.Model.Resources;
-using Gestor.Model.Validation;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Globalization;
-using System.Runtime.CompilerServices;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class Aeronautico : DomainBase, IDomain
- {
- private string _fabricante;
-
- private string _modelo;
-
- private string _serie;
-
- private string _prefixo;
-
- private string _marinaAero;
-
- private string _certificado;
-
- private string _casco;
-
- private string _navegacao;
-
- private string _observacao;
-
- public string Casco
- {
- get
- {
- string str = this._casco;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._casco = value;
- }
- }
-
- public string Certificado
- {
- get
- {
- string str = this._certificado;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._certificado = value;
- }
- }
-
- public int? Fabricacao
- {
- get;
- set;
- }
-
- public string Fabricante
- {
- get
- {
- string str = this._fabricante;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._fabricante = value;
- }
- }
-
- public Gestor.Model.Domain.Seguros.Item Item
- {
- get;
- set;
- }
-
- public string MarinaAero
- {
- get
- {
- string str = this._marinaAero;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._marinaAero = value;
- }
- }
-
- public string Modelo
- {
- get
- {
- string str = this._modelo;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._modelo = value;
- }
- }
-
- public string Navegacao
- {
- get
- {
- string str = this._navegacao;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._navegacao = value;
- }
- }
-
- public string Observacao
- {
- get
- {
- string str = this._observacao;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._observacao = value;
- }
- }
-
- public int? Passageiros
- {
- get;
- set;
- }
-
- public long? Peso
- {
- get;
- set;
- }
-
- public string Prefixo
- {
- get
- {
- string str = this._prefixo;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._prefixo = value;
- }
- }
-
- public string Serie
- {
- get
- {
- string str = this._serie;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._serie = value;
- }
- }
-
- public TipoAeronautico Tipo
- {
- get;
- set;
- }
-
- public int? Tripulantes
- {
- get;
- set;
- }
-
- [JsonIgnore]
- public Func<List<KeyValuePair<string, string>>> ValidationEvent
- {
- get
- {
- Aeronautico aeronautico = this;
- return new Func<List<KeyValuePair<string, string>>>(aeronautico.Validate);
- }
- }
-
- public DateTime? Vistoria
- {
- get;
- set;
- }
-
- public Aeronautico()
- {
- }
-
- public static List<TupleList> Log(Gestor.Model.Domain.Seguros.Item item)
- {
- string str;
- string str1;
- string str2;
- string str3;
- string shortDateString;
- List<TupleList> tupleLists = new List<TupleList>();
- TupleList tupleList = new TupleList();
- ObservableCollection<Tuple<string, string, string>> observableCollection = new ObservableCollection<Tuple<string, string, string>>()
- {
- new Tuple<string, string, string>("TIPO DE AERONAVE", item.Aeronautico.Tipo.GetDescription(), ""),
- new Tuple<string, string, string>("FABRICANTE", (string.IsNullOrWhiteSpace(item.Aeronautico.Fabricante) ? "" : item.Aeronautico.Fabricante.ToUpper()), ""),
- new Tuple<string, string, string>("MODELO", (string.IsNullOrWhiteSpace(item.Aeronautico.Modelo) ? "" : item.Aeronautico.Modelo.ToUpper()), ""),
- new Tuple<string, string, string>("REGISTRO", (string.IsNullOrWhiteSpace(item.Aeronautico.Serie) ? "" : item.Aeronautico.Serie.ToUpper()), ""),
- new Tuple<string, string, string>("PREFIXO", (string.IsNullOrWhiteSpace(item.Aeronautico.Prefixo) ? "" : item.Aeronautico.Prefixo.ToUpper()), "")
- };
- int? fabricacao = item.Aeronautico.Fabricacao;
- if (!fabricacao.HasValue)
- {
- str = "";
- }
- else
- {
- fabricacao = item.Aeronautico.Fabricacao;
- if (fabricacao.HasValue)
- {
- str = fabricacao.GetValueOrDefault().ToString();
- }
- else
- {
- str = null;
- }
- }
- observableCollection.Add(new Tuple<string, string, string>("ANO DE FABRICAÇÃO", str, ""));
- fabricacao = item.Aeronautico.Tripulantes;
- if (!fabricacao.HasValue)
- {
- str1 = "";
- }
- else
- {
- fabricacao = item.Aeronautico.Tripulantes;
- if (fabricacao.HasValue)
- {
- str1 = fabricacao.GetValueOrDefault().ToString();
- }
- else
- {
- str1 = null;
- }
- }
- observableCollection.Add(new Tuple<string, string, string>("TRIPULANTES", str1, ""));
- fabricacao = item.Aeronautico.Passageiros;
- if (!fabricacao.HasValue)
- {
- str2 = "";
- }
- else
- {
- fabricacao = item.Aeronautico.Passageiros;
- if (fabricacao.HasValue)
- {
- str2 = fabricacao.GetValueOrDefault().ToString();
- }
- else
- {
- str2 = null;
- }
- }
- observableCollection.Add(new Tuple<string, string, string>("PASSAGEIROS", str2, ""));
- observableCollection.Add(new Tuple<string, string, string>("AERÓDROMO", (string.IsNullOrWhiteSpace(item.Aeronautico.MarinaAero) ? "" : item.Aeronautico.MarinaAero.ToUpper()), ""));
- long? peso = item.Aeronautico.Peso;
- if (!peso.HasValue)
- {
- str3 = "";
- }
- else
- {
- peso = item.Aeronautico.Peso;
- if (peso.HasValue)
- {
- str3 = peso.GetValueOrDefault().ToString();
- }
- else
- {
- str3 = null;
- }
- }
- observableCollection.Add(new Tuple<string, string, string>("PESO", str3, ""));
- observableCollection.Add(new Tuple<string, string, string>("NAVEGAÇÃO", (string.IsNullOrWhiteSpace(item.Aeronautico.Navegacao) ? "" : item.Aeronautico.Navegacao.ToUpper()), ""));
- observableCollection.Add(new Tuple<string, string, string>("CERTIFICADO", (string.IsNullOrWhiteSpace(item.Aeronautico.Certificado) ? "" : item.Aeronautico.Certificado.ToUpper()), ""));
- observableCollection.Add(new Tuple<string, string, string>("MATERIAL DO CASCO", (string.IsNullOrWhiteSpace(item.Aeronautico.Casco) ? "" : item.Aeronautico.Casco.ToUpper()), ""));
- DateTime? vistoria = item.Aeronautico.Vistoria;
- if (!vistoria.HasValue)
- {
- shortDateString = "";
- }
- else
- {
- vistoria = item.Aeronautico.Vistoria;
- if (vistoria.HasValue)
- {
- shortDateString = vistoria.GetValueOrDefault().ToShortDateString();
- }
- else
- {
- shortDateString = null;
- }
- }
- observableCollection.Add(new Tuple<string, string, string>("VALIDADE DA VISTORIA", shortDateString, ""));
- observableCollection.Add(new Tuple<string, string, string>("OBSERVAÇÃO", (string.IsNullOrWhiteSpace(item.Aeronautico.Observacao) ? "" : item.Aeronautico.Observacao.ToUpper()), ""));
- tupleList.Tuples = observableCollection;
- tupleLists.Add(tupleList);
- List<TupleList> tupleLists1 = tupleLists;
- ObservableCollection<Tuple<string, string, string>> observableCollection1 = new ObservableCollection<Tuple<string, string, string>>()
- {
- new Tuple<string, string, string>("COBERTURAS$", "", "")
- };
- foreach (Cobertura cobertura in item.Coberturas)
- {
- observableCollection1.Add(new Tuple<string, string, string>(string.Format(" COBERTURA {0}$", item.Coberturas.IndexOf(cobertura) + 1), "", ""));
- observableCollection1.Add(new Tuple<string, string, string>(" OBSERVAÇÃO", (string.IsNullOrWhiteSpace(cobertura.Observacao) ? "" : cobertura.Observacao.ToUpper()), ""));
- decimal premio = cobertura.Premio;
- observableCollection1.Add(new Tuple<string, string, string>(" PRÊMIO", premio.ToString("C", new CultureInfo("pt-BR", false)), ""));
- premio = cobertura.Franquia;
- observableCollection1.Add(new Tuple<string, string, string>(" FRANQUIA", premio.ToString("C", new CultureInfo("pt-BR", false)), ""));
- premio = cobertura.Lmi;
- observableCollection1.Add(new Tuple<string, string, string>(" L.M.I.", premio.ToString("C", new CultureInfo("pt-BR", false)), ""));
- }
- tupleLists1.Add(new TupleList()
- {
- Tuples = observableCollection1
- });
- return tupleLists1;
- }
-
- public List<KeyValuePair<string, string>> Validate()
- {
- List<KeyValuePair<string, string>> keyValuePairs = ValidationHelper.AddValue();
- if (string.IsNullOrWhiteSpace(this.Fabricante))
- {
- keyValuePairs.AddValue<string, string>("Fabricante", Messages.Obrigatorio, true);
- }
- else if (this.Fabricante != null && this.Fabricante.Length > 60)
- {
- keyValuePairs.AddValue<string, string>("Fabricante", string.Format(Messages.MaiorQueLimite, 60), true);
- }
- if ((int)this.Tipo == 0)
- {
- keyValuePairs.AddValue<string, string>("Tipo", Messages.Obrigatorio, true);
- }
- if (string.IsNullOrWhiteSpace(this.Modelo))
- {
- keyValuePairs.AddValue<string, string>("Modelo", Messages.Obrigatorio, true);
- }
- else if (this.Modelo.Length > 60)
- {
- keyValuePairs.AddValue<string, string>("Modelo", string.Format(Messages.MaiorQueLimite, 60), true);
- }
- if (this.Vistoria.HasValue && (DateTime.Compare(this.Vistoria.Value, new DateTime(1753, 1, 1)) < 0 || DateTime.Compare(this.Vistoria.Value, new DateTime(9999, 12, 31)) > 0))
- {
- keyValuePairs.AddValue<string, string>("Vistoria", string.Format(Messages.DataInvalida, Array.Empty<object>()), true);
- }
- if (string.IsNullOrWhiteSpace(this.Serie))
- {
- keyValuePairs.AddValue<string, string>("Serie", Messages.Obrigatorio, true);
- }
- else if (this.Serie.Length > 30)
- {
- keyValuePairs.AddValue<string, string>("Serie", string.Format(Messages.MaiorQueLimite, 30), true);
- }
- if (string.IsNullOrWhiteSpace(this.Prefixo))
- {
- keyValuePairs.AddValue<string, string>("Prefixo", Messages.Obrigatorio, true);
- }
- else if (this.Prefixo.Length > 30)
- {
- keyValuePairs.AddValue<string, string>("Prefixo", string.Format(Messages.MaiorQueLimite, 30), true);
- }
- if (!this.Fabricacao.HasValue)
- {
- keyValuePairs.AddValue<string, string>("Fabricacao", Messages.Obrigatorio, true);
- }
- else if (!this.Fabricacao.Value.ToString().ValidacaoFabricacao())
- {
- keyValuePairs.AddValue<string, string>("Fabricacao", Messages.Invalido, true);
- }
- if (!this.Tripulantes.HasValue)
- {
- keyValuePairs.AddValue<string, string>("Tripulantes", Messages.Obrigatorio, true);
- }
- if (!this.Passageiros.HasValue)
- {
- keyValuePairs.AddValue<string, string>("Passageiros", Messages.Obrigatorio, true);
- }
- if (string.IsNullOrWhiteSpace(this.MarinaAero))
- {
- keyValuePairs.AddValue<string, string>("MarinaAero", Messages.Obrigatorio, true);
- }
- else if (this.MarinaAero.Length > 60)
- {
- keyValuePairs.AddValue<string, string>("MarinaAero", string.Format(Messages.MaiorQueLimite, 60), true);
- }
- if (!string.IsNullOrWhiteSpace(this.Certificado) && this.Certificado.Length > 60)
- {
- keyValuePairs.AddValue<string, string>("Certificado", string.Format(Messages.MaiorQueLimite, 60), true);
- }
- if (string.IsNullOrWhiteSpace(this.Casco) && this.Tipo.Categoria() == "Aero")
- {
- keyValuePairs.AddValue<string, string>("Casco", Messages.Obrigatorio, true);
- }
- else if (this.Tipo.Categoria() != "Aero" && this.Casco != null && this.Casco.Length > 60)
- {
- keyValuePairs.AddValue<string, string>("Casco", string.Format(Messages.MaiorQueLimite, 60), true);
- }
- if (!string.IsNullOrWhiteSpace(this.Navegacao) && this.Tipo.Categoria() != "Aero" && this.Navegacao.Length > 60)
- {
- keyValuePairs.AddValue<string, string>("Navegacao", string.Format(Messages.MaiorQueLimite, 60), true);
- }
- if (!this.Vistoria.HasValue && this.Tipo.Categoria() == "Aero")
- {
- keyValuePairs.AddValue<string, string>("Vistoria", Messages.Obrigatorio, true);
- }
- if (!this.Peso.HasValue && this.Tipo.Categoria() == "Aero")
- {
- keyValuePairs.AddValue<string, string>("Peso", Messages.Obrigatorio, true);
- }
- return keyValuePairs;
- }
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/AggilizadorPermissao.cs b/Gestor.Model/Model.Domain.Seguros/AggilizadorPermissao.cs
deleted file mode 100644
index 686e669..0000000
--- a/Gestor.Model/Model.Domain.Seguros/AggilizadorPermissao.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-using Gestor.Model.Common;
-using System;
-using System.Runtime.CompilerServices;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class AggilizadorPermissao
- {
- public PermissaoAggilizador Aggilizador
- {
- get;
- set;
- }
-
- public bool Permissao
- {
- get;
- set;
- }
-
- public AggilizadorPermissao()
- {
- }
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/Auto.cs b/Gestor.Model/Model.Domain.Seguros/Auto.cs
deleted file mode 100644
index 25b7903..0000000
--- a/Gestor.Model/Model.Domain.Seguros/Auto.cs
+++ /dev/null
@@ -1,793 +0,0 @@
-using Gestor.Model.Common;
-using Gestor.Model.Domain.Generic;
-using Gestor.Model.Helper;
-using Gestor.Model.Resources;
-using Gestor.Model.Validation;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Globalization;
-using System.Runtime.CompilerServices;
-using System.Text.RegularExpressions;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class Auto : DomainBase, IDomain
- {
- private string _fipe;
-
- private string _chassi;
-
- private string _placa;
-
- private string _modelo;
-
- private string _anoFabricacao;
-
- private string _anoModelo;
-
- private string _renavam;
-
- private string _capacidade;
-
- private string _portas;
-
- private string _observacao;
-
- private string _regiaoCirculacao;
-
- private string _ci;
-
- private string _cepPernoite;
-
- private Gestor.Model.Common.Categoria? _categoria;
-
- private bool _fabricanteBranco = true;
-
- private bool _chassiInvalido;
-
- public string AnoFabricacao
- {
- get
- {
- string str = this._anoFabricacao;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._anoFabricacao = value;
- }
- }
-
- public string AnoModelo
- {
- get
- {
- string str = this._anoModelo;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._anoModelo = value;
- }
- }
-
- public bool? Blindagem
- {
- get;
- set;
- }
-
- public int? Bonus
- {
- get;
- set;
- }
-
- public string Capacidade
- {
- get
- {
- string str = this._capacidade;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._capacidade = value;
- }
- }
-
- public Gestor.Model.Common.Categoria? Categoria
- {
- get
- {
- return this._categoria;
- }
- set
- {
- this._categoria = value;
- if (value.GetValueOrDefault() == Gestor.Model.Common.Categoria.Motocicleta)
- {
- this.Portas = "0";
- }
- }
- }
-
- public string CepPernoite
- {
- get
- {
- if (this._cepPernoite == null || !Regex.IsMatch(this._cepPernoite, "[0-9]+"))
- {
- return string.Empty;
- }
- return this._cepPernoite.FormataCep().Trim();
- }
- set
- {
- this._cepPernoite = value;
- }
- }
-
- public string Chassi
- {
- get
- {
- string str = this._chassi;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._chassi = value;
- }
- }
-
- public string Ci
- {
- get
- {
- string str = this._ci;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._ci = value;
- }
- }
-
- public Gestor.Model.Common.Combustivel? Combustivel
- {
- get;
- set;
- }
-
- public Gestor.Model.Common.Cor? Cor
- {
- get;
- set;
- }
-
- public Gestor.Model.Common.Correcao? Correcao
- {
- get;
- set;
- }
-
- public bool Excluido
- {
- get;
- set;
- }
-
- public Gestor.Model.Domain.Seguros.Fabricante Fabricante
- {
- get;
- set;
- }
-
- public bool? Financiado
- {
- get;
- set;
- }
-
- public string Fipe
- {
- get
- {
- if (this._fipe == null || !Regex.IsMatch(this._fipe, "[0-9]+"))
- {
- return "";
- }
- return this._fipe.Trim();
- }
- set
- {
- this._fipe = value;
- }
- }
-
- public Gestor.Model.Common.Isencao? Isencao
- {
- get;
- set;
- }
-
- public Gestor.Model.Domain.Seguros.Item Item
- {
- get;
- set;
- }
-
- public bool? KitGas
- {
- get;
- set;
- }
-
- public string Modelo
- {
- get
- {
- string str = this._modelo;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._modelo = value;
- }
- }
-
- public string Observacao
- {
- get
- {
- string str = this._observacao;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._observacao = value;
- }
- }
-
- public bool? Pcd
- {
- get;
- set;
- }
-
- public string Placa
- {
- get
- {
- string str = this._placa;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._placa = value;
- }
- }
-
- public decimal PorcentagemReferencia
- {
- get;
- set;
- }
-
- public string Portas
- {
- get
- {
- string str = this._portas;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._portas = value;
- }
- }
-
- public Gestor.Model.Common.Rastreador Rastreador
- {
- get;
- set;
- }
-
- public string RegiaoCirculacao
- {
- get
- {
- if (this._regiaoCirculacao == null || !Regex.IsMatch(this._regiaoCirculacao, "[0-9]+"))
- {
- return "";
- }
- return this._regiaoCirculacao.FormataCep().Trim();
- }
- set
- {
- this._regiaoCirculacao = value;
- }
- }
-
- public string Renavam
- {
- get
- {
- string str = this._renavam;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._renavam = value;
- }
- }
-
- public Gestor.Model.Common.TabelaReferencia? TabelaReferencia
- {
- get;
- set;
- }
-
- public Gestor.Model.Common.TipoCobertura? TipoCobertura
- {
- get;
- set;
- }
-
- public Gestor.Model.Common.UsoVeiculo? UsoVeiculo
- {
- get;
- set;
- }
-
- [JsonIgnore]
- public Func<List<KeyValuePair<string, string>>> ValidationEvent
- {
- get
- {
- Auto auto = this;
- return new Func<List<KeyValuePair<string, string>>>(auto.Validate);
- }
- }
-
- public decimal ValorDeterminado
- {
- get;
- set;
- }
-
- public bool? ZeroKm
- {
- get;
- set;
- }
-
- public Auto()
- {
- }
-
- public static List<TupleList> Log(Gestor.Model.Domain.Seguros.Item item)
- {
- string description;
- string str;
- string description1;
- string str1;
- string str2;
- string description2;
- string description3;
- string str3;
- string str4;
- string str5;
- string description4;
- string description5;
- string str6;
- List<TupleList> tupleLists = new List<TupleList>();
- TupleList tupleList = new TupleList();
- ObservableCollection<Tuple<string, string, string>> observableCollection = new ObservableCollection<Tuple<string, string, string>>()
- {
- new Tuple<string, string, string>("CÓDIGO FIPE", (string.IsNullOrWhiteSpace(item.Auto.Fipe) ? "" : item.Auto.Fipe.ToUpper()), ""),
- new Tuple<string, string, string>("CHASSI", (string.IsNullOrWhiteSpace(item.Auto.Chassi) ? "" : item.Auto.Chassi.ToUpper()), ""),
- new Tuple<string, string, string>("PLACA", (string.IsNullOrWhiteSpace(item.Auto.Placa) ? "" : item.Auto.Placa.ToUpper()), ""),
- new Tuple<string, string, string>("FABRICANTE", (item.Auto.Fabricante == null ? "" : item.Auto.Fabricante.Descricao.ToUpper()), ""),
- new Tuple<string, string, string>("MODELO", (string.IsNullOrWhiteSpace(item.Auto.Modelo) ? "" : item.Auto.Modelo.ToUpper()), "")
- };
- Gestor.Model.Common.UsoVeiculo? usoVeiculo = item.Auto.UsoVeiculo;
- if (!usoVeiculo.HasValue)
- {
- description = "";
- }
- else
- {
- Auto auto = item.Auto;
- if (auto != null)
- {
- usoVeiculo = auto.UsoVeiculo;
- if (usoVeiculo.HasValue)
- {
- description = usoVeiculo.GetValueOrDefault().GetDescription();
- }
- else
- {
- description = null;
- }
- }
- else
- {
- description = null;
- }
- }
- observableCollection.Add(new Tuple<string, string, string>("USO VEICULO", description, ""));
- Gestor.Model.Common.Categoria? categoria = item.Auto.Categoria;
- if (!categoria.HasValue)
- {
- str = "";
- }
- else
- {
- categoria = item.Auto.Categoria;
- if (categoria.HasValue)
- {
- str = categoria.GetValueOrDefault().GetDescription();
- }
- else
- {
- str = null;
- }
- }
- observableCollection.Add(new Tuple<string, string, string>("CATEGORIA", str, ""));
- Gestor.Model.Common.Combustivel? combustivel = item.Auto.Combustivel;
- if (!combustivel.HasValue)
- {
- description1 = "";
- }
- else
- {
- combustivel = item.Auto.Combustivel;
- if (combustivel.HasValue)
- {
- description1 = combustivel.GetValueOrDefault().GetDescription();
- }
- else
- {
- description1 = null;
- }
- }
- observableCollection.Add(new Tuple<string, string, string>("COMBUSTÍVEL", description1, ""));
- Gestor.Model.Common.Cor? cor = item.Auto.Cor;
- if (!cor.HasValue)
- {
- str1 = "";
- }
- else
- {
- cor = item.Auto.Cor;
- if (cor.HasValue)
- {
- str1 = cor.GetValueOrDefault().GetDescription();
- }
- else
- {
- str1 = null;
- }
- }
- observableCollection.Add(new Tuple<string, string, string>("COR", str1, ""));
- observableCollection.Add(new Tuple<string, string, string>("RENAVAM", (string.IsNullOrWhiteSpace(item.Auto.Renavam) ? "" : item.Auto.Renavam.ToUpper()), ""));
- if (!item.Auto.ZeroKm.HasValue)
- {
- str2 = "";
- }
- else
- {
- str2 = (item.Auto.ZeroKm.Value ? "SIM" : "NÃO");
- }
- observableCollection.Add(new Tuple<string, string, string>("ZERO KM", str2, ""));
- observableCollection.Add(new Tuple<string, string, string>("ANO DE FABRICAÇÃO", (string.IsNullOrWhiteSpace(item.Auto.AnoFabricacao) ? "" : item.Auto.AnoFabricacao.ToUpper()), ""));
- observableCollection.Add(new Tuple<string, string, string>("ANO DO MODELO", (string.IsNullOrWhiteSpace(item.Auto.AnoModelo) ? "" : item.Auto.AnoModelo.ToUpper()), ""));
- observableCollection.Add(new Tuple<string, string, string>("PORTAS", (string.IsNullOrWhiteSpace(item.Auto.Portas) ? "" : item.Auto.Portas), ""));
- observableCollection.Add(new Tuple<string, string, string>("CAPACIDADE", (string.IsNullOrWhiteSpace(item.Auto.Capacidade) ? "" : item.Auto.Capacidade), ""));
- observableCollection.Add(new Tuple<string, string, string>("CEP DE CIRCULAÇÃO", (string.IsNullOrWhiteSpace(item.Auto.RegiaoCirculacao) ? "" : item.Auto.RegiaoCirculacao.ToUpper()), ""));
- observableCollection.Add(new Tuple<string, string, string>("CEP PERNOITE", (string.IsNullOrWhiteSpace(item.Auto.CepPernoite) ? "" : item.Auto.CepPernoite.ToUpper()), ""));
- Gestor.Model.Common.Correcao? correcao = item.Auto.Correcao;
- if (!correcao.HasValue)
- {
- description2 = "";
- }
- else
- {
- correcao = item.Auto.Correcao;
- if (correcao.HasValue)
- {
- description2 = correcao.GetValueOrDefault().GetDescription();
- }
- else
- {
- description2 = null;
- }
- }
- observableCollection.Add(new Tuple<string, string, string>("CORREÇÃO", description2, ""));
- Gestor.Model.Common.TabelaReferencia? tabelaReferencia = item.Auto.TabelaReferencia;
- if (!tabelaReferencia.HasValue)
- {
- description3 = "";
- }
- else
- {
- tabelaReferencia = item.Auto.TabelaReferencia;
- if (tabelaReferencia.HasValue)
- {
- description3 = tabelaReferencia.GetValueOrDefault().GetDescription();
- }
- else
- {
- description3 = null;
- }
- }
- observableCollection.Add(new Tuple<string, string, string>("REFERÊNCIA", description3, ""));
- decimal porcentagemReferencia = item.Auto.PorcentagemReferencia;
- observableCollection.Add(new Tuple<string, string, string>("PORCENTAGEM DE REFERÊNCIA", porcentagemReferencia.ToString(new CultureInfo("pt-BR")), ""));
- observableCollection.Add(new Tuple<string, string, string>("C.I.", (string.IsNullOrWhiteSpace(item.Auto.Ci) ? "" : item.Auto.Ci.ToUpper()), ""));
- if (!item.Auto.Financiado.HasValue)
- {
- str3 = "";
- }
- else
- {
- str3 = (item.Auto.Financiado.Value ? "SIM" : "NÃO");
- }
- observableCollection.Add(new Tuple<string, string, string>("FINANCEIRO/ALIENADO", str3, ""));
- if (!item.Auto.Pcd.HasValue)
- {
- str4 = "";
- }
- else
- {
- str4 = (item.Auto.Pcd.Value ? "SIM" : "NÃO");
- }
- observableCollection.Add(new Tuple<string, string, string>("PCD", str4, ""));
- if (!item.Auto.Blindagem.HasValue)
- {
- str5 = "";
- }
- else
- {
- str5 = (item.Auto.Blindagem.Value ? "SIM" : "NÃO");
- }
- observableCollection.Add(new Tuple<string, string, string>("BLINDAGEM", str5, ""));
- Gestor.Model.Common.Isencao? isencao = item.Auto.Isencao;
- if (!isencao.HasValue)
- {
- description4 = "";
- }
- else
- {
- isencao = item.Auto.Isencao;
- if (isencao.HasValue)
- {
- description4 = isencao.GetValueOrDefault().GetDescription();
- }
- else
- {
- description4 = null;
- }
- }
- observableCollection.Add(new Tuple<string, string, string>("ISENÇÃO", description4, ""));
- observableCollection.Add(new Tuple<string, string, string>("BÔNUS", (!item.Auto.Bonus.HasValue ? "" : item.Auto.Bonus.Value.ToString()), ""));
- Gestor.Model.Common.TipoCobertura? tipoCobertura = item.Auto.TipoCobertura;
- if (!tipoCobertura.HasValue)
- {
- description5 = "";
- }
- else
- {
- tipoCobertura = item.Auto.TipoCobertura;
- if (tipoCobertura.HasValue)
- {
- description5 = tipoCobertura.GetValueOrDefault().GetDescription();
- }
- else
- {
- description5 = null;
- }
- }
- observableCollection.Add(new Tuple<string, string, string>("TIPO DE COBERTURA", description5, ""));
- if (!item.Auto.Pcd.HasValue)
- {
- str6 = "";
- }
- else
- {
- str6 = (item.Auto.KitGas.Value ? "SIM" : "NÃO");
- }
- observableCollection.Add(new Tuple<string, string, string>("KIT GÁS", str6, ""));
- observableCollection.Add(new Tuple<string, string, string>("OBSERVAÇÕES", (string.IsNullOrWhiteSpace(item.Auto.Observacao) ? "" : item.Auto.Observacao.ToUpper()), ""));
- tupleList.Tuples = observableCollection;
- tupleLists.Add(tupleList);
- List<TupleList> tupleLists1 = tupleLists;
- ObservableCollection<Tuple<string, string, string>> observableCollection1 = new ObservableCollection<Tuple<string, string, string>>()
- {
- new Tuple<string, string, string>("COBERTURAS$", "", "")
- };
- foreach (Cobertura cobertura in item.Coberturas)
- {
- observableCollection1.Add(new Tuple<string, string, string>(string.Format(" COBERTURA {0}$", item.Coberturas.IndexOf(cobertura) + 1), "", ""));
- observableCollection1.Add(new Tuple<string, string, string>(" OBSERVAÇÃO", (string.IsNullOrWhiteSpace(cobertura.Observacao) ? "" : cobertura.Observacao.ToUpper()), ""));
- porcentagemReferencia = cobertura.Premio;
- observableCollection1.Add(new Tuple<string, string, string>(" PRÊMIO", porcentagemReferencia.ToString("C", new CultureInfo("pt-BR", false)), ""));
- porcentagemReferencia = cobertura.Franquia;
- observableCollection1.Add(new Tuple<string, string, string>(" FRANQUIA", porcentagemReferencia.ToString("C", new CultureInfo("pt-BR", false)), ""));
- porcentagemReferencia = cobertura.Lmi;
- observableCollection1.Add(new Tuple<string, string, string>(" L.M.I.", porcentagemReferencia.ToString("C", new CultureInfo("pt-BR", false)), ""));
- }
- tupleLists1.Add(new TupleList()
- {
- Tuples = observableCollection1
- });
- return tupleLists1;
- }
-
- public List<KeyValuePair<string, string>> Validate(bool chassiInvalido, bool fabricanteBranco)
- {
- this._chassiInvalido = chassiInvalido;
- this._fabricanteBranco = fabricanteBranco;
- return this.Validate();
- }
-
- public List<KeyValuePair<string, string>> Validate()
- {
- int num;
- int num1;
- List<KeyValuePair<string, string>> keyValuePairs = ValidationHelper.AddValue();
- if (string.IsNullOrWhiteSpace(this.Chassi))
- {
- keyValuePairs.AddValue<string, string>("Chassi", Messages.Obrigatorio, true);
- }
- else if (!this._chassiInvalido && !this.Chassi.ValidacaoChassi())
- {
- keyValuePairs.AddValue<string, string>("Chassi", Messages.Invalido, true);
- }
- if (!this._fabricanteBranco && (this.Fabricante == null || this.Fabricante.Id == 0))
- {
- keyValuePairs.AddValue<string, string>("Fabricante", Messages.Obrigatorio, true);
- }
- if (string.IsNullOrWhiteSpace(this.Modelo))
- {
- keyValuePairs.AddValue<string, string>("Modelo", Messages.Obrigatorio, true);
- }
- else if (this.Modelo.Length > 250)
- {
- keyValuePairs.AddValue<string, string>("Modelo", string.Format(Messages.MaiorQueLimite, 250), true);
- }
- if (!this.Categoria.HasValue)
- {
- keyValuePairs.AddValue<string, string>("Categoria", Messages.Obrigatorio, true);
- }
- if (!this.Combustivel.HasValue)
- {
- keyValuePairs.AddValue<string, string>("Combustivel|COMBUSTÍVEL", Messages.Obrigatorio, true);
- }
- if (!this.ZeroKm.HasValue)
- {
- keyValuePairs.AddValue<string, string>("ZeroKm|ZERO KM", Messages.Obrigatorio, true);
- }
- if (this.ZeroKm.HasValue && !this.ZeroKm.Value && string.IsNullOrWhiteSpace(this.Placa))
- {
- keyValuePairs.AddValue<string, string>("Placa", Messages.Obrigatorio, true);
- }
- else if (this.ZeroKm.HasValue && !this.ZeroKm.Value && !this.Placa.ValidacaoPlaca())
- {
- keyValuePairs.AddValue<string, string>("Placa", Messages.Invalido, true);
- }
- if (string.IsNullOrWhiteSpace(this.AnoFabricacao))
- {
- keyValuePairs.AddValue<string, string>("AnoFabricacao|ANO DE FABRICAÇÃO", Messages.Obrigatorio, true);
- }
- else if (!this.AnoFabricacao.ValidacaoFabricacao())
- {
- keyValuePairs.AddValue<string, string>("AnoFabricacao|ANO DE FABRICAÇÃO", Messages.Invalido, true);
- }
- if (string.IsNullOrWhiteSpace(this.AnoModelo))
- {
- keyValuePairs.AddValue<string, string>("AnoModelo|ANO DO MODELO", Messages.Obrigatorio, true);
- }
- else if (!this.AnoModelo.ValidacaoModelo())
- {
- keyValuePairs.AddValue<string, string>("AnoModelo|ANO DO MODELO", Messages.Invalido, true);
- }
- if (string.IsNullOrWhiteSpace(this.Portas))
- {
- if (this.Categoria.GetValueOrDefault() != Gestor.Model.Common.Categoria.Motocicleta)
- {
- keyValuePairs.AddValue<string, string>("Portas", Messages.Obrigatorio, true);
- }
- else
- {
- this.Portas = "0";
- }
- }
- else if (!int.TryParse(this.Portas, out num1))
- {
- keyValuePairs.AddValue<string, string>("Portas", Messages.Invalido, true);
- }
- if (string.IsNullOrWhiteSpace(this.Capacidade))
- {
- keyValuePairs.AddValue<string, string>("Capacidade", Messages.Obrigatorio, true);
- }
- else if (!int.TryParse(this.Capacidade, out num1))
- {
- keyValuePairs.AddValue<string, string>("Capacidade", Messages.Invalido, true);
- }
- if (!this.Financiado.HasValue)
- {
- keyValuePairs.AddValue<string, string>("Financiado", Messages.Obrigatorio, true);
- }
- if (!string.IsNullOrWhiteSpace(this.Ci) && this.Ci.Length > 20)
- {
- keyValuePairs.AddValue<string, string>("Ci|C.I.", string.Format(Messages.MaiorQueLimite, 20), true);
- }
- if (string.IsNullOrWhiteSpace(this.Fipe))
- {
- keyValuePairs.AddValue<string, string>("Fipe|CÓDIGO FIPE", Messages.Obrigatorio, true);
- }
- else if (!this.Fipe.ValidaFipe())
- {
- keyValuePairs.AddValue<string, string>("Fipe|CÓDIGO FIPE", Messages.Invalido, true);
- }
- if (int.TryParse(this.Capacidade, out num) && num > 99)
- {
- keyValuePairs.AddValue<string, string>("Capacidade", Messages.Invalido, true);
- }
- if (!this.UsoVeiculo.HasValue)
- {
- keyValuePairs.AddValue<string, string>("UsoVeiculo", Messages.Obrigatorio, true);
- }
- if (!string.IsNullOrEmpty(this.Renavam) && this.Renavam.Replace(".", "").Length > 11)
- {
- keyValuePairs.AddValue<string, string>("Renavam", Messages.Invalido, true);
- }
- return keyValuePairs;
- }
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/Cliente.cs b/Gestor.Model/Model.Domain.Seguros/Cliente.cs
deleted file mode 100644
index 7da5b5d..0000000
--- a/Gestor.Model/Model.Domain.Seguros/Cliente.cs
+++ /dev/null
@@ -1,1193 +0,0 @@
-using Gestor.Model.Attributes;
-using Gestor.Model.Common;
-using Gestor.Model.Domain.Common;
-using Gestor.Model.Domain.Ferramentas;
-using Gestor.Model.Domain.Generic;
-using Gestor.Model.Helper;
-using Gestor.Model.Resources;
-using Gestor.Model.Validation;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel;
-using System.Globalization;
-using System.Runtime.CompilerServices;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class Cliente : DomainBase, IDomain
- {
- private string _nome;
-
- private string _documento;
-
- private string _identidade;
-
- private string _emissor;
-
- private string _estadoEmissor;
-
- private string _habilitacao;
-
- private string _categoriaHabilitacao;
-
- private string _pasta;
-
- private string _cei;
-
- private string _rne;
-
- private string _agencia;
-
- private string _tipoConta;
-
- private string _conta;
-
- private string _caepf;
-
- private bool? _malaDireta = new bool?(true);
-
- private string _nomeSocialRg;
-
- [Description("AGÊNCIA")]
- [Log(true)]
- public string Agencia
- {
- get
- {
- string str = this._agencia;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._agencia = value;
- }
- }
-
- public Gestor.Model.Domain.Common.Atividade Atividade
- {
- get;
- set;
- }
-
- public Gestor.Model.Domain.Common.Banco Banco
- {
- get;
- set;
- }
-
- [Log(true)]
- public string Caepf
- {
- get
- {
- string str = this._caepf;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._caepf = value;
- }
- }
-
- [Description("CATEGORIA HABILITAÇÃO")]
- [Log(true)]
- public string CategoriaHabilitacao
- {
- get
- {
- string str = this._categoriaHabilitacao;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._categoriaHabilitacao = value;
- }
- }
-
- [Log(true)]
- public string Cei
- {
- get
- {
- string str = this._cei;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._cei = value;
- }
- }
-
- [Description("CLIENTE DESDE")]
- [Log(true)]
- public DateTime? ClienteDesde
- {
- get;
- set;
- }
-
- [Log(true)]
- public string Conta
- {
- get
- {
- string str = this._conta;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._conta = value;
- }
- }
-
- public ObservableCollection<MaisContato> Contatos
- {
- get;
- set;
- }
-
- [Log(true)]
- public string Documento
- {
- get
- {
- string str = this._documento;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._documento = value;
- }
- }
-
- [Description("DOCUMENTO PRINCIPAL")]
- [Log(true)]
- public TipoDocumento? DocumentoPrincipal
- {
- get;
- set;
- }
-
- public ObservableCollection<ClienteEmail> Emails
- {
- get;
- set;
- }
-
- [Log(true)]
- public string Emissor
- {
- get
- {
- string str = this._emissor;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._emissor = value;
- }
- }
-
- public ObservableCollection<ClienteEndereco> Enderecos
- {
- get;
- set;
- }
-
- [Description("ESTADO CIVIL")]
- [Log(true)]
- public Gestor.Model.Common.EstadoCivil? EstadoCivil
- {
- get;
- set;
- }
-
- [Description("ESTADO EMISSOR")]
- [Log(true)]
- public string EstadoEmissor
- {
- get
- {
- string str = this._estadoEmissor;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._estadoEmissor = value;
- }
- }
-
- public bool EstaNaCentralSegurado
- {
- get;
- set;
- }
-
- [Log(true)]
- public bool Excluido
- {
- get;
- set;
- }
-
- [Description("EXPEDIÇÃO")]
- [Log(true)]
- public DateTime? Expedicao
- {
- get;
- set;
- }
-
- [Log(true)]
- public bool Falecido
- {
- get;
- set;
- }
-
- [Description("HABILITAÇÃO")]
- [Log(true)]
- public string Habilitacao
- {
- get
- {
- string str = this._habilitacao;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._habilitacao = value;
- }
- }
-
- public long IdEmpresa
- {
- get;
- set;
- }
-
- [Log(true)]
- public string Identidade
- {
- get
- {
- string str = this._identidade;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._identidade = value;
- }
- }
-
- [Description("DESEJA RECEBER MALA DIRETA")]
- [Log(true)]
- public bool? MalaDireta
- {
- get
- {
- return new bool?(this._malaDireta.GetValueOrDefault(true));
- }
- set
- {
- this._malaDireta = new bool?(value.GetValueOrDefault(true));
- }
- }
-
- [Log(true)]
- public DateTime? Nascimento
- {
- get;
- set;
- }
-
- [Log(true)]
- [Name(true)]
- public string Nome
- {
- get
- {
- string str = this._nome;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- object upper;
- this._nome = value;
- if (value != null)
- {
- upper = value.ToUpper();
- }
- else
- {
- upper = null;
- }
- this.NomeSocial = string.Format("{0} - {1}", upper, base.Id);
- }
- }
-
- public string NomeSocial
- {
- get;
- set;
- }
-
- public string NomeSocialRg
- {
- get
- {
- string str = this._nomeSocialRg;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._nomeSocialRg = value;
- }
- }
-
- [Description("OBSERVAÇÃO")]
- [Log(true)]
- public string Observacao
- {
- get;
- set;
- }
-
- public List<OrigemCliente> Origens
- {
- get;
- set;
- }
-
- [Log(true)]
- public string Pasta
- {
- get
- {
- string str = this._pasta;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._pasta = value;
- }
- }
-
- public bool PessoaFisica
- {
- get
- {
- return this.Documento.Clear().Length < 12;
- }
- }
-
- [Description("PRIMEIRA HABILITAÇÃO")]
- [Log(true)]
- public DateTime? PrimeiraHabilitacao
- {
- get;
- set;
- }
-
- [Description("PROFISSÃO")]
- public Gestor.Model.Domain.Common.Profissao Profissao
- {
- get;
- set;
- }
-
- [Description("RENDA MENSAL")]
- [Log(true)]
- public decimal RendaMensal
- {
- get;
- set;
- }
-
- [Log(true)]
- public Gestor.Model.Domain.Seguros.ResponsavelAssinatura ResponsavelAssinatura
- {
- get;
- set;
- }
-
- [Log(true)]
- public string Rne
- {
- get
- {
- string str = this._rne;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._rne = value;
- }
- }
-
- [Log(true)]
- public Gestor.Model.Common.Sexo? Sexo
- {
- get;
- set;
- }
-
- [Log(true)]
- public string Status
- {
- get;
- set;
- }
-
- public ObservableCollection<ClienteTelefone> Telefones
- {
- get;
- set;
- }
-
- [Description("TIPO CONTA")]
- [Log(true)]
- public string TipoConta
- {
- get
- {
- string str = this._tipoConta;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._tipoConta = value;
- }
- }
-
- [JsonIgnore]
- public Func<List<KeyValuePair<string, string>>> ValidationEvent
- {
- get
- {
- Cliente cliente = this;
- return new Func<List<KeyValuePair<string, string>>>(cliente.Validate);
- }
- }
-
- [Description("VENCIMENTO HABILITAÇÃO")]
- [Log(true)]
- public DateTime? VencimentoHabilitacao
- {
- get;
- set;
- }
-
- public ObservableCollection<ClienteVinculo> Vinculos
- {
- get;
- set;
- }
-
- public Cliente()
- {
- }
-
- public List<TupleList> Log()
- {
- TipoTelefone? tipo;
- string description;
- string str;
- string shortDateString;
- string shortDateString1;
- string str1;
- string shortDateString2;
- string description1;
- string description2;
- string str2;
- string shortDateString3;
- string description3;
- string str3;
- string description4;
- List<TupleList> tupleLists = new List<TupleList>();
- TupleList tupleList = new TupleList();
- ObservableCollection<Tuple<string, string, string>> observableCollection = new ObservableCollection<Tuple<string, string, string>>();
- TipoDocumento? documentoPrincipal = this.DocumentoPrincipal;
- if (!documentoPrincipal.HasValue)
- {
- description = "";
- }
- else
- {
- documentoPrincipal = this.DocumentoPrincipal;
- if (documentoPrincipal.HasValue)
- {
- description = documentoPrincipal.GetValueOrDefault().GetDescription();
- }
- else
- {
- description = null;
- }
- }
- observableCollection.Add(new Tuple<string, string, string>("TIPO DO DOCUMENTO PRINCIPAL", description, ""));
- observableCollection.Add(new Tuple<string, string, string>("DOCUMENTO PRINCIPAL", (string.IsNullOrWhiteSpace(this.Documento) ? "" : this.Documento), ""));
- observableCollection.Add(new Tuple<string, string, string>("CLIENTE", (string.IsNullOrWhiteSpace(this.Nome) ? "" : this.Nome.ToUpper()), ""));
- str = (this.Documento.OnlyNumber().Length > 11 ? "FUNDAÇÃO" : "NASCIMENTO");
- DateTime? nascimento = this.Nascimento;
- if (!nascimento.HasValue)
- {
- shortDateString = "";
- }
- else
- {
- nascimento = this.Nascimento;
- if (nascimento.HasValue)
- {
- shortDateString = nascimento.GetValueOrDefault().ToShortDateString();
- }
- else
- {
- shortDateString = null;
- }
- }
- observableCollection.Add(new Tuple<string, string, string>(str, shortDateString, ""));
- tupleList.Tuples = observableCollection;
- tupleLists.Add(tupleList);
- List<TupleList> tupleLists1 = tupleLists;
- if (this.Documento == null || this.Documento.OnlyNumber().Length <= 11)
- {
- tupleLists1[0].Tuples.Add(new Tuple<string, string, string>("IDENTIDADE", (string.IsNullOrWhiteSpace(this.Identidade) ? "" : this.Identidade), ""));
- tupleLists1[0].Tuples.Add(new Tuple<string, string, string>("ÓRGÃO EMISSOR", (string.IsNullOrWhiteSpace(this.Emissor) ? "" : this.Emissor.ToUpper()), ""));
- tupleLists1[0].Tuples.Add(new Tuple<string, string, string>("ESTADO EMISSOR", (string.IsNullOrWhiteSpace(this.EstadoEmissor) ? "" : this.EstadoEmissor.ToUpper()), ""));
- ObservableCollection<Tuple<string, string, string>> tuples = tupleLists1[0].Tuples;
- nascimento = this.Expedicao;
- if (!nascimento.HasValue)
- {
- shortDateString1 = "";
- }
- else
- {
- nascimento = this.Expedicao;
- if (nascimento.HasValue)
- {
- shortDateString1 = nascimento.GetValueOrDefault().ToShortDateString();
- }
- else
- {
- shortDateString1 = null;
- }
- }
- tuples.Add(new Tuple<string, string, string>("DATA DE EXPEDIÇÃO", shortDateString1, ""));
- tupleLists1[0].Tuples.Add(new Tuple<string, string, string>("HABILITAÇÃO", (string.IsNullOrWhiteSpace(this.Habilitacao) ? "" : this.Habilitacao.ToUpper()), ""));
- tupleLists1[0].Tuples.Add(new Tuple<string, string, string>("CATEGORIA", (string.IsNullOrWhiteSpace(this.CategoriaHabilitacao) ? "" : this.CategoriaHabilitacao.ToUpper()), ""));
- ObservableCollection<Tuple<string, string, string>> tuples1 = tupleLists1[0].Tuples;
- nascimento = this.PrimeiraHabilitacao;
- if (!nascimento.HasValue)
- {
- str1 = "";
- }
- else
- {
- nascimento = this.PrimeiraHabilitacao;
- if (nascimento.HasValue)
- {
- str1 = nascimento.GetValueOrDefault().ToShortDateString();
- }
- else
- {
- str1 = null;
- }
- }
- tuples1.Add(new Tuple<string, string, string>("PRIMEIRA HABILITAÇÃO", str1, ""));
- ObservableCollection<Tuple<string, string, string>> observableCollection1 = tupleLists1[0].Tuples;
- nascimento = this.VencimentoHabilitacao;
- if (!nascimento.HasValue)
- {
- shortDateString2 = "";
- }
- else
- {
- nascimento = this.VencimentoHabilitacao;
- if (nascimento.HasValue)
- {
- shortDateString2 = nascimento.GetValueOrDefault().ToShortDateString();
- }
- else
- {
- shortDateString2 = null;
- }
- }
- observableCollection1.Add(new Tuple<string, string, string>("VENCIMENTO DA HABILITAÇÃO", shortDateString2, ""));
- ObservableCollection<Tuple<string, string, string>> tuples2 = tupleLists1[0].Tuples;
- Gestor.Model.Common.Sexo? sexo = this.Sexo;
- if (!sexo.HasValue)
- {
- description1 = "";
- }
- else
- {
- sexo = this.Sexo;
- if (sexo.HasValue)
- {
- description1 = sexo.GetValueOrDefault().GetDescription();
- }
- else
- {
- description1 = null;
- }
- }
- tuples2.Add(new Tuple<string, string, string>("SEXO", description1, ""));
- ObservableCollection<Tuple<string, string, string>> observableCollection2 = tupleLists1[0].Tuples;
- Gestor.Model.Common.EstadoCivil? estadoCivil = this.EstadoCivil;
- if (!estadoCivil.HasValue)
- {
- description2 = "";
- }
- else
- {
- estadoCivil = this.EstadoCivil;
- if (estadoCivil.HasValue)
- {
- description2 = estadoCivil.GetValueOrDefault().GetDescription();
- }
- else
- {
- description2 = null;
- }
- }
- observableCollection2.Add(new Tuple<string, string, string>("ESTADO CIVIL", description2, ""));
- tupleLists1[0].Tuples.Add(new Tuple<string, string, string>("PROFISSÃO DO CLIENTE", (this.Profissao == null ? "" : this.Profissao.Nome.ToUpper()), ""));
- }
- else
- {
- tupleLists1[0].Tuples.Add(new Tuple<string, string, string>("RAMO DE ATIVIDADE", (string.IsNullOrWhiteSpace(this.Atividade.Nome) ? "" : this.Atividade.Nome), ""));
- }
- ObservableCollection<Tuple<string, string, string>> tuples3 = tupleLists1[0].Tuples;
- nascimento = this.ClienteDesde;
- if (!nascimento.HasValue)
- {
- str2 = "";
- }
- else
- {
- nascimento = this.ClienteDesde;
- if (nascimento.HasValue)
- {
- str2 = nascimento.GetValueOrDefault().ToShortDateString();
- }
- else
- {
- str2 = null;
- }
- }
- tuples3.Add(new Tuple<string, string, string>("CLIENTE DESDE", str2, ""));
- tupleLists1[0].Tuples.Add(new Tuple<string, string, string>("PASTA", (string.IsNullOrWhiteSpace(this.Pasta) ? "" : this.Pasta.ToUpper()), ""));
- tupleLists1[0].Tuples.Add(new Tuple<string, string, string>("BANCO", (this.Banco == null ? "" : this.Banco.Nome.ToUpper()), ""));
- tupleLists1[0].Tuples.Add(new Tuple<string, string, string>("AGÊNCIA", (string.IsNullOrWhiteSpace(this.Agencia) ? "" : this.Agencia.ToUpper()), ""));
- tupleLists1[0].Tuples.Add(new Tuple<string, string, string>("TIPO DE CONTA", (string.IsNullOrWhiteSpace(this.TipoConta) ? "" : this.TipoConta.ToUpper()), ""));
- tupleLists1[0].Tuples.Add(new Tuple<string, string, string>("NÚMERO DA CONTA", (string.IsNullOrWhiteSpace(this.Conta) ? "" : this.Conta.ToUpper()), ""));
- tupleLists1[0].Tuples.Add(new Tuple<string, string, string>("FALECIDO", (this.Falecido ? "SIM" : "NÃO"), ""));
- tupleLists1[0].Tuples.Add(new Tuple<string, string, string>("ÓRGÃO EMISSOR", (string.IsNullOrWhiteSpace(this.Emissor) ? "" : this.Emissor.ToUpper()), ""));
- ObservableCollection<Tuple<string, string, string>> observableCollection3 = tupleLists1[0].Tuples;
- decimal rendaMensal = this.RendaMensal;
- observableCollection3.Add(new Tuple<string, string, string>("RENDA MENSAL", rendaMensal.ToString("C", new CultureInfo("pt-BR", false)), ""));
- ObservableCollection<Tuple<string, string, string>> observableCollection4 = new ObservableCollection<Tuple<string, string, string>>()
- {
- new Tuple<string, string, string>("TELEFONES$", "", "")
- };
- if (this.Telefones != null && this.Telefones.Count > 0)
- {
- foreach (ClienteTelefone telefone in this.Telefones)
- {
- observableCollection4.Add(new Tuple<string, string, string>(string.Format(" TELEFONE {0}$", this.Telefones.IndexOf(telefone) + 1), "", ""));
- ObservableCollection<Tuple<string, string, string>> observableCollection5 = observableCollection4;
- tipo = telefone.Tipo;
- if (!tipo.HasValue)
- {
- description4 = "";
- }
- else
- {
- tipo = telefone.Tipo;
- if (tipo.HasValue)
- {
- description4 = tipo.GetValueOrDefault().GetDescription();
- }
- else
- {
- description4 = null;
- }
- }
- observableCollection5.Add(new Tuple<string, string, string>(" TIPO", description4, ""));
- observableCollection4.Add(new Tuple<string, string, string>(" PREFIXO", (string.IsNullOrWhiteSpace(telefone.Prefixo) ? "" : telefone.Prefixo.ToUpper()), ""));
- observableCollection4.Add(new Tuple<string, string, string>(" NÚMERO", (string.IsNullOrWhiteSpace(telefone.Numero) ? "" : telefone.Numero), ""));
- observableCollection4.Add(new Tuple<string, string, string>(" ORDEM", (!telefone.Ordem.HasValue ? "" : telefone.Ordem.ToString()), ""));
- }
- }
- tupleLists1.Add(new TupleList()
- {
- Tuples = observableCollection4
- });
- ObservableCollection<Tuple<string, string, string>> observableCollection6 = new ObservableCollection<Tuple<string, string, string>>()
- {
- new Tuple<string, string, string>("EMAILS$", "", "")
- };
- if (this.Emails != null && this.Emails.Count > 0)
- {
- foreach (ClienteEmail email in this.Emails)
- {
- observableCollection6.Add(new Tuple<string, string, string>(string.Format(" EMAIL {0}$", this.Emails.IndexOf(email) + 1), "", ""));
- observableCollection6.Add(new Tuple<string, string, string>(" ENDEREÇO DE EMAIL", (string.IsNullOrWhiteSpace(email.Email) ? "" : email.Email), ""));
- observableCollection6.Add(new Tuple<string, string, string>(" ORDEM", (!email.Ordem.HasValue ? "" : email.Ordem.ToString()), ""));
- }
- }
- tupleLists1.Add(new TupleList()
- {
- Tuples = observableCollection6
- });
- ObservableCollection<Tuple<string, string, string>> observableCollection7 = new ObservableCollection<Tuple<string, string, string>>()
- {
- new Tuple<string, string, string>("ENDEREÇOS$", "", "")
- };
- if (this.Enderecos != null && this.Enderecos.Count > 0)
- {
- foreach (ClienteEndereco endereco in this.Enderecos)
- {
- observableCollection7.Add(new Tuple<string, string, string>(string.Format(" ENDEREÇO {0}$", this.Enderecos.IndexOf(endereco) + 1), "", ""));
- observableCollection7.Add(new Tuple<string, string, string>(" LOGRADOURO", (string.IsNullOrWhiteSpace(endereco.Endereco) ? "" : endereco.Endereco), ""));
- observableCollection7.Add(new Tuple<string, string, string>(" NÚMERO", (string.IsNullOrWhiteSpace(endereco.Numero) ? "" : endereco.Numero), ""));
- observableCollection7.Add(new Tuple<string, string, string>(" COMPLEMENTO", (string.IsNullOrWhiteSpace(endereco.Complemento) ? "" : endereco.Complemento), ""));
- observableCollection7.Add(new Tuple<string, string, string>(" BAIRRO", (string.IsNullOrWhiteSpace(endereco.Bairro) ? "" : endereco.Bairro), ""));
- observableCollection7.Add(new Tuple<string, string, string>(" CIDADE", (string.IsNullOrWhiteSpace(endereco.Cidade) ? "" : endereco.Cidade), ""));
- observableCollection7.Add(new Tuple<string, string, string>(" ESTADO", (string.IsNullOrWhiteSpace(endereco.Estado) ? "" : endereco.Estado), ""));
- observableCollection7.Add(new Tuple<string, string, string>(" CEP", (string.IsNullOrWhiteSpace(endereco.Cep) ? "" : endereco.Cep), ""));
- observableCollection7.Add(new Tuple<string, string, string>(" ORDEM", (!endereco.Ordem.HasValue ? "" : endereco.Ordem.ToString()), ""));
- }
- }
- tupleLists1.Add(new TupleList()
- {
- Tuples = observableCollection7
- });
- ObservableCollection<Tuple<string, string, string>> observableCollection8 = new ObservableCollection<Tuple<string, string, string>>()
- {
- new Tuple<string, string, string>("CONTATOS$", "", "")
- };
- if (this.Contatos != null && this.Contatos.Count > 0)
- {
- foreach (MaisContato contato in this.Contatos)
- {
- observableCollection8.Add(new Tuple<string, string, string>(string.Format(" CONTATO {0}$", this.Contatos.IndexOf(contato) + 1), "", ""));
- observableCollection8.Add(new Tuple<string, string, string>(" DOCUMENTO", (string.IsNullOrWhiteSpace(contato.Documento) ? "" : contato.Documento), ""));
- ObservableCollection<Tuple<string, string, string>> observableCollection9 = observableCollection8;
- nascimento = contato.Nascimento;
- if (!nascimento.HasValue)
- {
- shortDateString3 = "";
- }
- else
- {
- nascimento = contato.Nascimento;
- if (nascimento.HasValue)
- {
- shortDateString3 = nascimento.GetValueOrDefault().ToShortDateString();
- }
- else
- {
- shortDateString3 = null;
- }
- }
- observableCollection9.Add(new Tuple<string, string, string>(" NASCIMENTO", shortDateString3, ""));
- ObservableCollection<Tuple<string, string, string>> observableCollection10 = observableCollection8;
- Parentesco? parentesco = contato.Parentesco;
- if (!parentesco.HasValue)
- {
- description3 = "";
- }
- else
- {
- parentesco = contato.Parentesco;
- if (parentesco.HasValue)
- {
- description3 = parentesco.GetValueOrDefault().GetDescription();
- }
- else
- {
- description3 = null;
- }
- }
- observableCollection10.Add(new Tuple<string, string, string>(" PARENTESCO", description3, ""));
- observableCollection8.Add(new Tuple<string, string, string>(" BANCO", (string.IsNullOrWhiteSpace(contato.Banco) ? "" : contato.Banco), ""));
- observableCollection8.Add(new Tuple<string, string, string>(" AGÊNCIA", (string.IsNullOrWhiteSpace(contato.Agencia) ? "" : contato.Agencia), ""));
- observableCollection8.Add(new Tuple<string, string, string>(" CONTA", (string.IsNullOrWhiteSpace(contato.Conta) ? "" : contato.Conta), ""));
- ObservableCollection<Tuple<string, string, string>> observableCollection11 = observableCollection8;
- tipo = contato.Tipo;
- if (!tipo.HasValue)
- {
- str3 = "";
- }
- else
- {
- tipo = contato.Tipo;
- if (tipo.HasValue)
- {
- str3 = tipo.GetValueOrDefault().GetDescription();
- }
- else
- {
- str3 = null;
- }
- }
- observableCollection11.Add(new Tuple<string, string, string>(" TIPO DO TELEFONE", str3, ""));
- observableCollection8.Add(new Tuple<string, string, string>(" PREFIXO", (string.IsNullOrWhiteSpace(contato.Prefixo) ? "" : contato.Prefixo), ""));
- observableCollection8.Add(new Tuple<string, string, string>(" NÚMERO", (string.IsNullOrWhiteSpace(contato.Telefone) ? "" : contato.Telefone), ""));
- observableCollection8.Add(new Tuple<string, string, string>(" EMAIL", (string.IsNullOrWhiteSpace(contato.Email) ? "" : contato.Email), ""));
- }
- }
- tupleLists1.Add(new TupleList()
- {
- Tuples = observableCollection8
- });
- ObservableCollection<Tuple<string, string, string>> observableCollection12 = new ObservableCollection<Tuple<string, string, string>>()
- {
- new Tuple<string, string, string>("VÍNCULOS$", "", "")
- };
- if (this.Vinculos == null)
- {
- this.Vinculos = new ObservableCollection<ClienteVinculo>();
- }
- if (this.Vinculos != null && this.Vinculos.Count > 0)
- {
- foreach (ClienteVinculo vinculo in this.Vinculos)
- {
- observableCollection12.Add(new Tuple<string, string, string>(string.Format(" VÍNCULO {0}$", this.Vinculos.IndexOf(vinculo) + 1), "", ""));
- observableCollection12.Add(new Tuple<string, string, string>(" COM CLIENTE", (vinculo.Cliente1.Id != base.Id ? vinculo.Cliente1.Nome : vinculo.Cliente2.Nome), ""));
- observableCollection12.Add(new Tuple<string, string, string>(" PARENTESCO", (vinculo.Cliente1.Id == base.Id ? vinculo.Parentesco.GetDescription() : Funcoes.ParentescoInverso(vinculo.Parentesco).GetDescription()), ""));
- }
- }
- tupleLists1.Add(new TupleList()
- {
- Tuples = observableCollection12
- });
- return tupleLists1;
- }
-
- public List<KeyValuePair<string, string>> Validate()
- {
- int? nullable;
- DateTime? primeiraHabilitacao;
- int? nullable1;
- List<KeyValuePair<string, string>> keyValuePairs = ValidationHelper.AddValue();
- string nome = this.Nome;
- if (nome != null)
- {
- nullable1 = new int?((int)nome.Trim().Split(new char[] { ' ' }).Length);
- }
- else
- {
- nullable = null;
- nullable1 = nullable;
- }
- int? nullable2 = nullable1;
- if (nullable2.HasValue)
- {
- nullable = nullable2;
- if (nullable.GetValueOrDefault() <= 1 & nullable.HasValue)
- {
- keyValuePairs.AddValue<string, string>("Nome", Messages.NomeInvalido, true);
- }
- }
- else
- {
- keyValuePairs.AddValue<string, string>("Nome", Messages.Obrigatorio, true);
- }
- TipoDocumento? documentoPrincipal = this.DocumentoPrincipal;
- if (!documentoPrincipal.HasValue)
- {
- keyValuePairs.AddValue<string, string>("DocumentoPrincipal|DOCUMENTO PRINCIPAL", string.Format(Messages.Obrigatorio, Array.Empty<object>()), true);
- }
- DateTime? clienteDesde = this.ClienteDesde;
- if (clienteDesde.HasValue)
- {
- clienteDesde = this.ClienteDesde;
- if (DateTime.Compare(clienteDesde.Value, new DateTime(1753, 1, 1)) >= 0)
- {
- clienteDesde = this.ClienteDesde;
- if (DateTime.Compare(clienteDesde.Value, new DateTime(9999, 12, 31)) <= 0)
- {
- goto Label0;
- }
- }
- keyValuePairs.AddValue<string, string>("ClienteDesde|CLIENTE DESDE", string.Format(Messages.DataInvalida, Array.Empty<object>()), true);
- }
- Label0:
- DateTime networkTime = Funcoes.GetNetworkTime();
- DateTime date = networkTime.Date;
- clienteDesde = this.Nascimento;
- if (clienteDesde.HasValue)
- {
- clienteDesde = this.Nascimento;
- networkTime = date;
- if ((clienteDesde.HasValue ? clienteDesde.GetValueOrDefault() > networkTime : false))
- {
- keyValuePairs.AddValue<string, string>(string.Concat("Nascimento|", (this.Documento.OnlyNumber().Length > 11 ? "FUNDAÇÃO" : "NASCIMENTO")), Messages.Invalido, true);
- }
- }
- clienteDesde = this.Nascimento;
- if (clienteDesde.HasValue)
- {
- clienteDesde = this.Nascimento;
- if (DateTime.Compare(clienteDesde.Value, new DateTime(1753, 1, 1)) >= 0)
- {
- clienteDesde = this.Nascimento;
- if (DateTime.Compare(clienteDesde.Value, new DateTime(9999, 12, 31)) <= 0)
- {
- goto Label1;
- }
- }
- keyValuePairs.AddValue<string, string>(string.Concat("Nascimento|", (this.Documento.OnlyNumber().Length > 11 ? "FUNDAÇÃO" : "NASCIMENTO")), string.Format(Messages.DataInvalida, Array.Empty<object>()), true);
- }
- if (string.IsNullOrWhiteSpace(this.Documento))
- {
- keyValuePairs.AddValue<string, string>("Documento", Messages.Obrigatorio, true);
- }
- else if (!this.Documento.ValidacaoDocumento())
- {
- keyValuePairs.AddValue<string, string>("Documento", Messages.Invalido, true);
- }
- documentoPrincipal = this.DocumentoPrincipal;
- if (documentoPrincipal.HasValue)
- {
- switch (documentoPrincipal.GetValueOrDefault())
- {
- case TipoDocumento.Rne:
- {
- if (!string.IsNullOrWhiteSpace(this.Rne))
- {
- if (this.Rne.ValidacaoRne())
- {
- break;
- }
- keyValuePairs.AddValue<string, string>("Rne", Messages.Invalido, true);
- break;
- }
- else
- {
- keyValuePairs.AddValue<string, string>("Rne", Messages.Obrigatorio, true);
- break;
- }
- }
- case TipoDocumento.Cei:
- {
- if (!string.IsNullOrWhiteSpace(this.Cei))
- {
- if (this.Cei.ValidacaoCei())
- {
- break;
- }
- keyValuePairs.AddValue<string, string>("Cei", Messages.Invalido, true);
- break;
- }
- else
- {
- keyValuePairs.AddValue<string, string>("Cei", Messages.Obrigatorio, true);
- break;
- }
- }
- case TipoDocumento.Caepf:
- {
- if (!string.IsNullOrWhiteSpace(this.Caepf))
- {
- if (this.Caepf.ValidateCaepf())
- {
- break;
- }
- keyValuePairs.AddValue<string, string>("Caepf", Messages.Invalido, true);
- break;
- }
- else
- {
- keyValuePairs.AddValue<string, string>("Caepf", Messages.Obrigatorio, true);
- break;
- }
- }
- }
- }
- if (this.Documento == null || this.Documento.OnlyNumber().Length <= 11)
- {
- clienteDesde = this.PrimeiraHabilitacao;
- if (clienteDesde.HasValue)
- {
- clienteDesde = this.PrimeiraHabilitacao;
- networkTime = date;
- if ((clienteDesde.HasValue ? clienteDesde.GetValueOrDefault() > networkTime : false))
- {
- keyValuePairs.AddValue<string, string>("PrimeiraHabilitacao|PRIMEIRA HABILITAÇÃO", Messages.Invalido, true);
- }
- }
- clienteDesde = this.PrimeiraHabilitacao;
- if (clienteDesde.HasValue)
- {
- clienteDesde = this.PrimeiraHabilitacao;
- if (DateTime.Compare(clienteDesde.Value, new DateTime(1753, 1, 1)) >= 0)
- {
- clienteDesde = this.PrimeiraHabilitacao;
- if (DateTime.Compare(clienteDesde.Value, new DateTime(9999, 12, 31)) <= 0)
- {
- goto Label2;
- }
- }
- keyValuePairs.AddValue<string, string>("PrimeiraHabilitacao|PRIMEIRA HABILITAÇÃO", string.Format(Messages.DataInvalida, Array.Empty<object>()), true);
- }
- Label2:
- clienteDesde = this.VencimentoHabilitacao;
- if (clienteDesde.HasValue)
- {
- clienteDesde = this.VencimentoHabilitacao;
- primeiraHabilitacao = this.PrimeiraHabilitacao;
- if ((clienteDesde.HasValue & primeiraHabilitacao.HasValue ? clienteDesde.GetValueOrDefault() <= primeiraHabilitacao.GetValueOrDefault() : false))
- {
- keyValuePairs.AddValue<string, string>("VencimentoHabilitacao|VENCIMENTO HABILITAÇÃO", Messages.Invalido, true);
- }
- }
- primeiraHabilitacao = this.VencimentoHabilitacao;
- if (primeiraHabilitacao.HasValue)
- {
- primeiraHabilitacao = this.VencimentoHabilitacao;
- if (DateTime.Compare(primeiraHabilitacao.Value, new DateTime(1753, 1, 1)) >= 0)
- {
- primeiraHabilitacao = this.VencimentoHabilitacao;
- if (DateTime.Compare(primeiraHabilitacao.Value, new DateTime(9999, 12, 31)) <= 0)
- {
- goto Label3;
- }
- }
- keyValuePairs.AddValue<string, string>("VencimentoHabilitacao|VENCIMENTO HABILITAÇÃO", string.Format(Messages.DataInvalida, Array.Empty<object>()), true);
- }
- Label3:
- primeiraHabilitacao = this.Expedicao;
- if (primeiraHabilitacao.HasValue)
- {
- primeiraHabilitacao = this.Expedicao;
- if (DateTime.Compare(primeiraHabilitacao.Value, new DateTime(1753, 1, 1)) >= 0)
- {
- primeiraHabilitacao = this.Expedicao;
- if (DateTime.Compare(primeiraHabilitacao.Value, new DateTime(9999, 12, 31)) <= 0)
- {
- goto Label4;
- }
- }
- keyValuePairs.AddValue<string, string>("Expedicao|EXPEDIÇÃO", string.Format(Messages.DataInvalida, Array.Empty<object>()), true);
- }
- Label4:
- primeiraHabilitacao = this.Expedicao;
- if (primeiraHabilitacao.HasValue)
- {
- primeiraHabilitacao = this.Expedicao;
- networkTime = date;
- if ((primeiraHabilitacao.HasValue ? primeiraHabilitacao.GetValueOrDefault() > networkTime : false))
- {
- keyValuePairs.AddValue<string, string>("Expedicao|EXPEDIÇÃO", Messages.Invalido, true);
- }
- }
- if (!string.IsNullOrWhiteSpace(this.Identidade) && this.Identidade.Length > 14)
- {
- keyValuePairs.AddValue<string, string>("Identidade", string.Format(Messages.MaiorQueLimite, 14), true);
- }
- if (!string.IsNullOrWhiteSpace(this.Habilitacao) && this.Habilitacao.Length > 15)
- {
- keyValuePairs.AddValue<string, string>("Habilitacao|HABILITAÇÃO", string.Format(Messages.MaiorQueLimite, 15), true);
- }
- if (!string.IsNullOrWhiteSpace(this.CategoriaHabilitacao) && this.CategoriaHabilitacao.Length > 10)
- {
- keyValuePairs.AddValue<string, string>("CategoriaHabilitacao|CATEGORIA HABILITAÇÃO", string.Format(Messages.MaiorQueLimite, 10), true);
- }
- if (!string.IsNullOrWhiteSpace(this.Emissor) && !this.Emissor.ValidacaoOrgao())
- {
- keyValuePairs.AddValue<string, string>("Emissor|EMISSOR", string.Format(Messages.MaiorQueLimite, 6), true);
- }
- if (!string.IsNullOrWhiteSpace(this.EstadoEmissor) && !this.EstadoEmissor.ValidacaoEstado())
- {
- keyValuePairs.AddValue<string, string>("EstadoEmissor|ESTADO EMISSOR", Messages.Invalido, true);
- }
- }
- if (!string.IsNullOrWhiteSpace(this.Pasta) && this.Pasta.Length > 8)
- {
- keyValuePairs.AddValue<string, string>("Pasta", string.Format(Messages.MaiorQueLimite, 8), true);
- }
- if (!string.IsNullOrWhiteSpace(this.Agencia) && this.Agencia.Length > 8)
- {
- keyValuePairs.AddValue<string, string>("Agencia|AGÊNCIA", string.Format(Messages.MaiorQueLimite, 8), true);
- }
- if (!string.IsNullOrWhiteSpace(this.TipoConta) && this.TipoConta.Length > 20)
- {
- keyValuePairs.AddValue<string, string>("TipoConta|TIPO CONTA", string.Format(Messages.MaiorQueLimite, 20), true);
- }
- if (!string.IsNullOrWhiteSpace(this.Conta) && this.Conta.Length > 12)
- {
- keyValuePairs.AddValue<string, string>("Conta", string.Format(Messages.MaiorQueLimite, 12), true);
- }
- if (this.ResponsavelAssinatura != null)
- {
- keyValuePairs.AddRange(this.ResponsavelAssinatura.Validate());
- }
- return keyValuePairs;
- }
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/ClienteEmail.cs b/Gestor.Model/Model.Domain.Seguros/ClienteEmail.cs
deleted file mode 100644
index 0175f31..0000000
--- a/Gestor.Model/Model.Domain.Seguros/ClienteEmail.cs
+++ /dev/null
@@ -1,88 +0,0 @@
-using Gestor.Model.Attributes;
-using Gestor.Model.Domain.Generic;
-using Gestor.Model.Helper;
-using Gestor.Model.Resources;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.Runtime.CompilerServices;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class ClienteEmail : EmailBase, IDomain
- {
- private string _observacao;
-
- public Gestor.Model.Domain.Seguros.Cliente Cliente
- {
- get;
- set;
- }
-
- [Log(true)]
- public string Observacao
- {
- get
- {
- string str = this._observacao;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._observacao = value;
- }
- }
-
- public int? Ordem
- {
- get;
- set;
- }
-
- public bool Selecionado
- {
- get;
- set;
- }
-
- [JsonIgnore]
- public Func<List<KeyValuePair<string, string>>> ValidationEvent
- {
- get
- {
- ClienteEmail clienteEmail = this;
- return new Func<List<KeyValuePair<string, string>>>(clienteEmail.Validate);
- }
- }
-
- public ClienteEmail()
- {
- }
-
- public List<KeyValuePair<string, string>> Validate()
- {
- List<KeyValuePair<string, string>> keyValuePairs = ValidationHelper.AddValue();
- if (string.IsNullOrWhiteSpace(base.Email))
- {
- keyValuePairs.AddValue<string, string>("Email", Messages.Obrigatorio, true);
- }
- else if (base.Email.Length > 80)
- {
- keyValuePairs.AddValue<string, string>("Email", string.Format(Messages.MaiorQueLimite, 80), true);
- }
- else if (!base.Email.ValidacaoEmail())
- {
- keyValuePairs.AddValue<string, string>("Email", Messages.Invalido, true);
- }
- if (!string.IsNullOrWhiteSpace(this.Observacao) && this.Observacao.Length > 255)
- {
- keyValuePairs.AddValue<string, string>("Observacao", string.Format(Messages.MaiorQueLimite, 255), true);
- }
- return keyValuePairs;
- }
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/ClienteEndereco.cs b/Gestor.Model/Model.Domain.Seguros/ClienteEndereco.cs
deleted file mode 100644
index 5085632..0000000
--- a/Gestor.Model/Model.Domain.Seguros/ClienteEndereco.cs
+++ /dev/null
@@ -1,155 +0,0 @@
-using Gestor.Model.Attributes;
-using Gestor.Model.Domain.Generic;
-using Gestor.Model.Helper;
-using Gestor.Model.Resources;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Runtime.CompilerServices;
-using System.Threading;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class ClienteEndereco : EnderecoBase, IDomain, INotifyPropertyChanged
- {
- private bool _selecionado;
-
- private string _observacao;
-
- public Gestor.Model.Domain.Seguros.Cliente Cliente
- {
- get;
- set;
- }
-
- [Log(true)]
- public string Observacao
- {
- get
- {
- string str = this._observacao;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._observacao = value;
- }
- }
-
- public int? Ordem
- {
- get;
- set;
- }
-
- public bool Selecionado
- {
- get
- {
- return this._selecionado;
- }
- set
- {
- if (value == this._selecionado)
- {
- return;
- }
- this._selecionado = value;
- this.OnPropertyChanged("Selecionado");
- }
- }
-
- [JsonIgnore]
- public Func<List<KeyValuePair<string, string>>> ValidationEvent
- {
- get
- {
- ClienteEndereco clienteEndereco = this;
- return new Func<List<KeyValuePair<string, string>>>(clienteEndereco.Validate);
- }
- }
-
- public ClienteEndereco()
- {
- }
-
- protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
- {
- PropertyChangedEventHandler propertyChangedEventHandler = this.PropertyChanged;
- if (propertyChangedEventHandler == null)
- {
- return;
- }
- propertyChangedEventHandler(this, new PropertyChangedEventArgs(propertyName));
- }
-
- public List<KeyValuePair<string, string>> Validate()
- {
- List<KeyValuePair<string, string>> keyValuePairs = ValidationHelper.AddValue();
- if (string.IsNullOrWhiteSpace(base.Cep))
- {
- keyValuePairs.AddValue<string, string>("Cep", Messages.Obrigatorio, true);
- }
- else if (!base.Cep.ValidacaoCep())
- {
- keyValuePairs.AddValue<string, string>("Cep", Messages.Invalido, true);
- }
- if (string.IsNullOrWhiteSpace(base.Endereco))
- {
- keyValuePairs.AddValue<string, string>("Endereco", Messages.Obrigatorio, true);
- }
- else if (base.Endereco.Length > 150)
- {
- keyValuePairs.AddValue<string, string>("Endereco", string.Format(Messages.MaiorQueLimite, 150), true);
- }
- if (string.IsNullOrWhiteSpace(base.Numero))
- {
- keyValuePairs.AddValue<string, string>("Numero", Messages.Obrigatorio, true);
- }
- else if (base.Numero.Length > 6)
- {
- keyValuePairs.AddValue<string, string>("Numero", string.Format(Messages.MaiorQueLimite, 6), true);
- }
- if (!string.IsNullOrWhiteSpace(base.Complemento) && base.Complemento.Length > 45)
- {
- keyValuePairs.AddValue<string, string>("Complemento", string.Format(Messages.MaiorQueLimite, 45), true);
- }
- if (string.IsNullOrWhiteSpace(base.Bairro))
- {
- keyValuePairs.AddValue<string, string>("Bairro", Messages.Obrigatorio, true);
- }
- else if (base.Bairro.Length > 100)
- {
- keyValuePairs.AddValue<string, string>("Bairro", string.Format(Messages.MaiorQueLimite, 100), true);
- }
- if (string.IsNullOrWhiteSpace(base.Cidade))
- {
- keyValuePairs.AddValue<string, string>("Cidade", Messages.Obrigatorio, true);
- }
- else if (base.Cidade.Length > 50)
- {
- keyValuePairs.AddValue<string, string>("Cidade", string.Format(Messages.MaiorQueLimite, 50), true);
- }
- if (string.IsNullOrWhiteSpace(base.Estado))
- {
- keyValuePairs.AddValue<string, string>("Estado", Messages.Obrigatorio, true);
- }
- else if (!base.Estado.ValidacaoEstado())
- {
- keyValuePairs.AddValue<string, string>("Estado", Messages.Invalido, true);
- }
- if (!string.IsNullOrWhiteSpace(this.Observacao) && this.Observacao.Length > 255)
- {
- keyValuePairs.AddValue<string, string>("Observacao", string.Format(Messages.MaiorQueLimite, 255), true);
- }
- return keyValuePairs;
- }
-
- public event PropertyChangedEventHandler PropertyChanged;
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/ClienteTelefone.cs b/Gestor.Model/Model.Domain.Seguros/ClienteTelefone.cs
deleted file mode 100644
index 794790b..0000000
--- a/Gestor.Model/Model.Domain.Seguros/ClienteTelefone.cs
+++ /dev/null
@@ -1,82 +0,0 @@
-using Gestor.Model.Attributes;
-using Gestor.Model.Domain.Generic;
-using Gestor.Model.Helper;
-using Gestor.Model.Resources;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.Runtime.CompilerServices;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class ClienteTelefone : TelefoneBase, IDomain
- {
- private string _observacao;
-
- public Gestor.Model.Domain.Seguros.Cliente Cliente
- {
- get;
- set;
- }
-
- [Log(true)]
- public string Observacao
- {
- get
- {
- string str = this._observacao;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._observacao = value;
- }
- }
-
- public int? Ordem
- {
- get;
- set;
- }
-
- [JsonIgnore]
- public Func<List<KeyValuePair<string, string>>> ValidationEvent
- {
- get
- {
- ClienteTelefone clienteTelefone = this;
- return new Func<List<KeyValuePair<string, string>>>(clienteTelefone.Validate);
- }
- }
-
- public ClienteTelefone()
- {
- }
-
- public List<KeyValuePair<string, string>> Validate()
- {
- List<KeyValuePair<string, string>> keyValuePairs = base.ValidateBase(true);
- if (!string.IsNullOrWhiteSpace(this.Observacao) && this.Observacao.Length > 30)
- {
- keyValuePairs.AddValue<string, string>("Observacao", string.Format(Messages.MaiorQueLimite, 30), true);
- }
- if (string.IsNullOrWhiteSpace(base.Numero))
- {
- keyValuePairs.AddValue<string, string>("Numero", Messages.Obrigatorio, true);
- }
- if (string.IsNullOrWhiteSpace(base.Prefixo))
- {
- keyValuePairs.AddValue<string, string>("Prefixo", Messages.Obrigatorio, true);
- }
- if (!base.Tipo.HasValue)
- {
- keyValuePairs.AddValue<string, string>("Tipo", Messages.Obrigatorio, true);
- }
- return keyValuePairs;
- }
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/ClienteVinculo.cs b/Gestor.Model/Model.Domain.Seguros/ClienteVinculo.cs
deleted file mode 100644
index c8065fe..0000000
--- a/Gestor.Model/Model.Domain.Seguros/ClienteVinculo.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-using Gestor.Model.Common;
-using Gestor.Model.Domain.Generic;
-using Gestor.Model.Helper;
-using Gestor.Model.Resources;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.Runtime.CompilerServices;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class ClienteVinculo : DomainBase, IDomain
- {
- public Cliente Cliente1
- {
- get;
- set;
- }
-
- public Cliente Cliente2
- {
- get;
- set;
- }
-
- public ParentescoVinculo? Parentesco
- {
- get;
- set;
- }
-
- [JsonIgnore]
- public Func<List<KeyValuePair<string, string>>> ValidationEvent
- {
- get
- {
- ClienteVinculo clienteVinculo = this;
- return new Func<List<KeyValuePair<string, string>>>(clienteVinculo.Validate);
- }
- }
-
- public ClienteVinculo()
- {
- }
-
- public List<KeyValuePair<string, string>> Validate()
- {
- List<KeyValuePair<string, string>> keyValuePairs = ValidationHelper.AddValue();
- if (!this.Parentesco.HasValue)
- {
- keyValuePairs.AddValue<string, string>("Parentesco", Messages.Obrigatorio, true);
- }
- return keyValuePairs;
- }
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/Cobertura.cs b/Gestor.Model/Model.Domain.Seguros/Cobertura.cs
deleted file mode 100644
index f0b8c66..0000000
--- a/Gestor.Model/Model.Domain.Seguros/Cobertura.cs
+++ /dev/null
@@ -1,86 +0,0 @@
-using Gestor.Model.Domain.Generic;
-using Gestor.Model.Helper;
-using Gestor.Model.Resources;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.Runtime.CompilerServices;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class Cobertura : DomainBase, IDomain
- {
- private string _observacao;
-
- public Gestor.Model.Domain.Seguros.CoberturaPadrao CoberturaPadrao
- {
- get;
- set;
- }
-
- public decimal Franquia
- {
- get;
- set;
- }
-
- public Gestor.Model.Domain.Seguros.Item Item
- {
- get;
- set;
- }
-
- public decimal Lmi
- {
- get;
- set;
- }
-
- public string Observacao
- {
- get
- {
- string str = this._observacao;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._observacao = (!string.IsNullOrWhiteSpace(value) || this.CoberturaPadrao == null ? value : this.CoberturaPadrao.Descricao);
- }
- }
-
- public decimal Premio
- {
- get;
- set;
- }
-
- [JsonIgnore]
- public Func<List<KeyValuePair<string, string>>> ValidationEvent
- {
- get
- {
- Cobertura cobertura = this;
- return new Func<List<KeyValuePair<string, string>>>(cobertura.Validate);
- }
- }
-
- public Cobertura()
- {
- }
-
- public List<KeyValuePair<string, string>> Validate()
- {
- List<KeyValuePair<string, string>> keyValuePairs = ValidationHelper.AddValue();
- if ((this.Lmi != decimal.Zero || this.Premio != decimal.Zero || this.Franquia != decimal.Zero) && string.IsNullOrWhiteSpace(this.Observacao))
- {
- keyValuePairs.AddValue<string, string>("Observacao", Messages.Obrigatorio, true);
- }
- return keyValuePairs;
- }
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/CoberturaGranizo.cs b/Gestor.Model/Model.Domain.Seguros/CoberturaGranizo.cs
deleted file mode 100644
index c2af1c3..0000000
--- a/Gestor.Model/Model.Domain.Seguros/CoberturaGranizo.cs
+++ /dev/null
@@ -1,125 +0,0 @@
-using Gestor.Model.Domain.Generic;
-using Gestor.Model.Helper;
-using Gestor.Model.Resources;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.Runtime.CompilerServices;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class CoberturaGranizo : DomainBase, IDomain
- {
- private string _variedade;
-
- private string _quadra;
-
- public decimal? Area
- {
- get;
- set;
- }
-
- public Gestor.Model.Domain.Seguros.Granizo Granizo
- {
- get;
- set;
- }
-
- public Gestor.Model.Domain.Seguros.Item Item
- {
- get;
- set;
- }
-
- public decimal? Lmi
- {
- get;
- set;
- }
-
- public DateTime? Plantio
- {
- get;
- set;
- }
-
- public decimal? Premio
- {
- get;
- set;
- }
-
- public decimal? Produtividade
- {
- get;
- set;
- }
-
- public string Quadra
- {
- get
- {
- string str = this._quadra;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._quadra = value;
- }
- }
-
- [JsonIgnore]
- public Func<List<KeyValuePair<string, string>>> ValidationEvent
- {
- get
- {
- CoberturaGranizo coberturaGranizo = this;
- return new Func<List<KeyValuePair<string, string>>>(coberturaGranizo.Validate);
- }
- }
-
- public string Variedade
- {
- get
- {
- string str = this._variedade;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._variedade = value;
- }
- }
-
- public CoberturaGranizo()
- {
- }
-
- public List<KeyValuePair<string, string>> Validate()
- {
- List<KeyValuePair<string, string>> keyValuePairs = ValidationHelper.AddValue();
- if (this.Plantio.HasValue && (DateTime.Compare(this.Plantio.Value, new DateTime(1753, 1, 1)) < 0 || DateTime.Compare(this.Plantio.Value, new DateTime(9999, 12, 31)) > 0))
- {
- keyValuePairs.AddValue<string, string>("Plantio", string.Format(Messages.DataInvalida, Array.Empty<object>()), true);
- }
- if (string.IsNullOrWhiteSpace(this.Variedade) && this.Variedade.Length > 60)
- {
- keyValuePairs.AddValue<string, string>("Variedade", string.Format(Messages.MaiorQueLimite, 60), true);
- }
- if (string.IsNullOrWhiteSpace(this.Quadra) && this.Quadra.Length > 30)
- {
- keyValuePairs.AddValue<string, string>("Quadra", string.Format(Messages.MaiorQueLimite, 30), true);
- }
- return keyValuePairs;
- }
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/CoberturaPadrao.cs b/Gestor.Model/Model.Domain.Seguros/CoberturaPadrao.cs
deleted file mode 100644
index 81a4e23..0000000
--- a/Gestor.Model/Model.Domain.Seguros/CoberturaPadrao.cs
+++ /dev/null
@@ -1,67 +0,0 @@
-using Gestor.Model.Domain.Generic;
-using Gestor.Model.Helper;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.Runtime.CompilerServices;
-using System.Text.RegularExpressions;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class CoberturaPadrao : DomainBase, IDomain
- {
- private string _descricao;
-
- public string Descricao
- {
- get
- {
- if (!string.IsNullOrWhiteSpace(this._descricao))
- {
- this._descricao = Regex.Replace(this._descricao, "[\n\r]", "");
- }
- string str = this._descricao;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._descricao = value;
- }
- }
-
- public long IdRamo
- {
- get;
- set;
- }
-
- public bool Padrao
- {
- get;
- set;
- }
-
- [JsonIgnore]
- public Func<List<KeyValuePair<string, string>>> ValidationEvent
- {
- get
- {
- CoberturaPadrao coberturaPadrao = this;
- return new Func<List<KeyValuePair<string, string>>>(coberturaPadrao.Validate);
- }
- }
-
- public CoberturaPadrao()
- {
- }
-
- public List<KeyValuePair<string, string>> Validate()
- {
- return ValidationHelper.AddValue();
- }
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/CondicaoRepasse.cs b/Gestor.Model/Model.Domain.Seguros/CondicaoRepasse.cs
deleted file mode 100644
index c921485..0000000
--- a/Gestor.Model/Model.Domain.Seguros/CondicaoRepasse.cs
+++ /dev/null
@@ -1,49 +0,0 @@
-using Gestor.Model.Domain.Generic;
-using Gestor.Model.Helper;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.Runtime.CompilerServices;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class CondicaoRepasse : DomainBase, IDomain
- {
- public int Parcela
- {
- get;
- set;
- }
-
- public Gestor.Model.Domain.Seguros.Ramo Ramo
- {
- get;
- set;
- }
-
- public Gestor.Model.Domain.Seguros.Seguradora Seguradora
- {
- get;
- set;
- }
-
- [JsonIgnore]
- public Func<List<KeyValuePair<string, string>>> ValidationEvent
- {
- get
- {
- CondicaoRepasse condicaoRepasse = this;
- return new Func<List<KeyValuePair<string, string>>>(condicaoRepasse.Validate);
- }
- }
-
- public CondicaoRepasse()
- {
- }
-
- public List<KeyValuePair<string, string>> Validate()
- {
- return ValidationHelper.AddValue();
- }
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/ConfigExtratoImport.cs b/Gestor.Model/Model.Domain.Seguros/ConfigExtratoImport.cs
deleted file mode 100644
index 8a4cbbf..0000000
--- a/Gestor.Model/Model.Domain.Seguros/ConfigExtratoImport.cs
+++ /dev/null
@@ -1,50 +0,0 @@
-using Gestor.Model.Domain.Generic;
-using System;
-using System.Runtime.CompilerServices;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class ConfigExtratoImport : DomainBase
- {
- private string _descricao;
-
- public bool Ativo
- {
- get;
- set;
- }
-
- public string Codigo
- {
- get;
- set;
- }
-
- public string Descricao
- {
- get
- {
- string str = this._descricao;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._descricao = value;
- }
- }
-
- public long IdSeguradora
- {
- get;
- set;
- }
-
- public ConfigExtratoImport()
- {
- }
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/Consorcio.cs b/Gestor.Model/Model.Domain.Seguros/Consorcio.cs
deleted file mode 100644
index 3efd5ad..0000000
--- a/Gestor.Model/Model.Domain.Seguros/Consorcio.cs
+++ /dev/null
@@ -1,191 +0,0 @@
-using Gestor.Model.Domain.Generic;
-using Gestor.Model.Helper;
-using Gestor.Model.Resources;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Globalization;
-using System.Runtime.CompilerServices;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class Consorcio : DomainBase, IDomain
- {
- private string _bensConsorcio;
-
- private string _grupo;
-
- private string _cota;
-
- private decimal? _valorCredito;
-
- private string _observacao;
-
- public string BensConsorcio
- {
- get
- {
- string str = this._bensConsorcio;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._bensConsorcio = value;
- }
- }
-
- public string Cota
- {
- get
- {
- string str = this._cota;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._cota = value;
- }
- }
-
- public string Grupo
- {
- get
- {
- string str = this._grupo;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._grupo = value;
- }
- }
-
- public Gestor.Model.Domain.Seguros.Item Item
- {
- get;
- set;
- }
-
- public string Observacao
- {
- get
- {
- string str = this._observacao;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._observacao = value;
- }
- }
-
- [JsonIgnore]
- public Func<List<KeyValuePair<string, string>>> ValidationEvent
- {
- get
- {
- Consorcio consorcio = this;
- return new Func<List<KeyValuePair<string, string>>>(consorcio.Validate);
- }
- }
-
- public decimal? ValorCredito
- {
- get
- {
- return this._valorCredito;
- }
- set
- {
- this._valorCredito = value;
- }
- }
-
- public Consorcio()
- {
- }
-
- public static List<TupleList> Log(Gestor.Model.Domain.Seguros.Item item)
- {
- decimal valueOrDefault;
- string str;
- List<TupleList> tupleLists = new List<TupleList>();
- TupleList tupleList = new TupleList();
- ObservableCollection<Tuple<string, string, string>> observableCollection = new ObservableCollection<Tuple<string, string, string>>()
- {
- new Tuple<string, string, string>("DESCRIÇÃO", (string.IsNullOrWhiteSpace(item.Consorcio.BensConsorcio) ? "" : item.Consorcio.BensConsorcio), ""),
- new Tuple<string, string, string>("GRUPO", (string.IsNullOrWhiteSpace(item.Consorcio.Grupo) ? "" : item.Consorcio.Grupo), ""),
- new Tuple<string, string, string>("COTA", (string.IsNullOrWhiteSpace(item.Consorcio.Cota) ? "" : item.Consorcio.Cota), "")
- };
- decimal? valorCredito = item.Consorcio.ValorCredito;
- if (!valorCredito.HasValue)
- {
- str = "";
- }
- else
- {
- valorCredito = item.Consorcio.ValorCredito;
- if (valorCredito.HasValue)
- {
- valueOrDefault = valorCredito.GetValueOrDefault();
- str = valueOrDefault.ToString("C", new CultureInfo("pt-BR", false));
- }
- else
- {
- str = null;
- }
- }
- observableCollection.Add(new Tuple<string, string, string>("GRUPO", str, ""));
- tupleList.Tuples = observableCollection;
- tupleLists.Add(tupleList);
- List<TupleList> tupleLists1 = tupleLists;
- ObservableCollection<Tuple<string, string, string>> observableCollection1 = new ObservableCollection<Tuple<string, string, string>>()
- {
- new Tuple<string, string, string>("COBERTURAS$", "", "")
- };
- foreach (Cobertura cobertura in item.Coberturas)
- {
- observableCollection1.Add(new Tuple<string, string, string>(string.Format(" COBERTURA {0}$", item.Coberturas.IndexOf(cobertura) + 1), "", ""));
- observableCollection1.Add(new Tuple<string, string, string>(" OBSERVAÇÃO", (string.IsNullOrWhiteSpace(cobertura.Observacao) ? "" : cobertura.Observacao.ToUpper()), ""));
- valueOrDefault = cobertura.Premio;
- observableCollection1.Add(new Tuple<string, string, string>(" PRÊMIO", valueOrDefault.ToString("C", new CultureInfo("pt-BR", false)), ""));
- valueOrDefault = cobertura.Franquia;
- observableCollection1.Add(new Tuple<string, string, string>(" FRANQUIA", valueOrDefault.ToString("C", new CultureInfo("pt-BR", false)), ""));
- valueOrDefault = cobertura.Lmi;
- observableCollection1.Add(new Tuple<string, string, string>(" L.M.I.", valueOrDefault.ToString("C", new CultureInfo("pt-BR", false)), ""));
- }
- tupleLists1.Add(new TupleList()
- {
- Tuples = observableCollection1
- });
- return tupleLists1;
- }
-
- public List<KeyValuePair<string, string>> Validate()
- {
- List<KeyValuePair<string, string>> keyValuePairs = ValidationHelper.AddValue();
- if (string.IsNullOrWhiteSpace(this.BensConsorcio))
- {
- keyValuePairs.AddValue<string, string>("BensConsorcio", Messages.Obrigatorio, true);
- }
- return keyValuePairs;
- }
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/Controle.cs b/Gestor.Model/Model.Domain.Seguros/Controle.cs
deleted file mode 100644
index 3ae91c6..0000000
--- a/Gestor.Model/Model.Domain.Seguros/Controle.cs
+++ /dev/null
@@ -1,128 +0,0 @@
-using Gestor.Model.Attributes;
-using Gestor.Model.Domain.Generic;
-using Gestor.Model.Helper;
-using Gestor.Model.Resources;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Runtime.CompilerServices;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class Controle : DomainBase, IDomain
- {
- private long _idEmpresa;
-
- public string AssistenciaId
- {
- get;
- set;
- }
-
- [Log(false)]
- public Gestor.Model.Domain.Seguros.Cliente Cliente
- {
- get;
- set;
- }
-
- [Log(false)]
- public IList<Documento> Documentos
- {
- get;
- set;
- }
-
- public long IdEmpresa
- {
- get
- {
- return this._idEmpresa;
- }
- set
- {
- this._idEmpresa = (value == 0 ? (long)1 : value);
- }
- }
-
- [Log(false)]
- public Gestor.Model.Domain.Seguros.Item Item
- {
- get;
- set;
- }
-
- [Description("PRODUTO")]
- [Log(true)]
- [Name(true)]
- public Gestor.Model.Domain.Seguros.Produto Produto
- {
- get;
- set;
- }
-
- [Description("RAMO")]
- [Log(true)]
- [Name(true)]
- public Gestor.Model.Domain.Seguros.Ramo Ramo
- {
- get;
- set;
- }
-
- [Description("SEGURADORA")]
- [Log(true)]
- [Name(true)]
- public Gestor.Model.Domain.Seguros.Seguradora Seguradora
- {
- get;
- set;
- }
-
- [Description("SEGURADORA ANTERIOR")]
- [Log(true)]
- [Name(true)]
- public Gestor.Model.Domain.Seguros.Seguradora SeguradoraAnterior
- {
- get;
- set;
- }
-
- [JsonIgnore]
- public Func<List<KeyValuePair<string, string>>> ValidationEvent
- {
- get
- {
- Controle controle = this;
- return new Func<List<KeyValuePair<string, string>>>(controle.Validate);
- }
- }
-
- public Controle()
- {
- }
-
- public List<KeyValuePair<string, string>> Validate()
- {
- List<KeyValuePair<string, string>> keyValuePairs = ValidationHelper.AddValue();
- if (this.Cliente == null || this.Cliente.Id == 0)
- {
- keyValuePairs.AddValue<string, string>("Cliente", Messages.Obrigatorio, true);
- }
- if (this.Seguradora == null || this.Seguradora.Id == 0)
- {
- keyValuePairs.AddValue<string, string>("Seguradora", Messages.Obrigatorio, true);
- }
- if (this.Ramo == null || this.Ramo.Id == 0)
- {
- keyValuePairs.AddValue<string, string>("Ramo", Messages.Obrigatorio, true);
- }
- if (this.IdEmpresa == 0)
- {
- keyValuePairs.AddValue<string, string>("Empresa", Messages.Obrigatorio, true);
- }
- return keyValuePairs;
- }
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/ControleSinistro.cs b/Gestor.Model/Model.Domain.Seguros/ControleSinistro.cs
deleted file mode 100644
index 13207b6..0000000
--- a/Gestor.Model/Model.Domain.Seguros/ControleSinistro.cs
+++ /dev/null
@@ -1,118 +0,0 @@
-using Gestor.Model.Attributes;
-using Gestor.Model.Domain.Generic;
-using Gestor.Model.Helper;
-using Gestor.Model.Resources;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Runtime.CompilerServices;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class ControleSinistro : DomainBase, IDomain
- {
- private DateTime? _dataSinistro;
-
- private DateTime? _horaSinistro;
-
- [Description("DATA SINISTRO")]
- [Log(true)]
- [Name(true)]
- public DateTime? DataSinistro
- {
- get
- {
- return this._dataSinistro;
- }
- set
- {
- if (!value.HasValue)
- {
- this._dataSinistro = null;
- return;
- }
- if (!this.HoraSinistro.HasValue)
- {
- this.HoraSinistro = value;
- }
- object obj = value.Value;
- DateTime? horaSinistro = this.HoraSinistro;
- this._dataSinistro = new DateTime?(DateTime.Parse(string.Format("{0:d} {1:T}", obj, horaSinistro.Value)));
- }
- }
-
- public DateTime? HoraSinistro
- {
- get
- {
- return this._horaSinistro;
- }
- set
- {
- DateTime? nullable;
- this._horaSinistro = value;
- if (!value.HasValue)
- {
- return;
- }
- DateTime? dataSinistro = this.DataSinistro;
- if (!dataSinistro.HasValue || !value.HasValue)
- {
- dataSinistro = null;
- nullable = dataSinistro;
- }
- else
- {
- dataSinistro = this.DataSinistro;
- nullable = new DateTime?(DateTime.Parse(string.Format("{0:d} {1:T}", dataSinistro.Value, value)));
- }
- this.DataSinistro = nullable;
- }
- }
-
- public Gestor.Model.Domain.Seguros.Item Item
- {
- get;
- set;
- }
-
- public List<Sinistro> Sinistros
- {
- get;
- set;
- }
-
- [JsonIgnore]
- public Func<List<KeyValuePair<string, string>>> ValidationEvent
- {
- get
- {
- ControleSinistro controleSinistro = this;
- return new Func<List<KeyValuePair<string, string>>>(controleSinistro.Validate);
- }
- }
-
- public ControleSinistro()
- {
- }
-
- public List<KeyValuePair<string, string>> Validate()
- {
- List<KeyValuePair<string, string>> keyValuePairs = ValidationHelper.AddValue();
- if (!this.DataSinistro.HasValue)
- {
- keyValuePairs.AddValue<string, string>("DataSinistro", Messages.Obrigatorio, true);
- }
- if (this.DataSinistro.HasValue && (DateTime.Compare(this.DataSinistro.Value, new DateTime(1753, 1, 1)) < 0 || DateTime.Compare(this.DataSinistro.Value, new DateTime(9999, 12, 31)) > 0))
- {
- keyValuePairs.AddValue<string, string>("DataSinistro", string.Format(Messages.DataInvalida, Array.Empty<object>()), true);
- }
- if (this.HoraSinistro.HasValue && (DateTime.Compare(this.HoraSinistro.Value, new DateTime(1753, 1, 1)) < 0 || DateTime.Compare(this.HoraSinistro.Value, new DateTime(9999, 12, 31)) > 0))
- {
- keyValuePairs.AddValue<string, string>("HoraSinistro", string.Format(Messages.DataInvalida, Array.Empty<object>()), true);
- }
- return keyValuePairs;
- }
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/CriticaApolice.cs b/Gestor.Model/Model.Domain.Seguros/CriticaApolice.cs
deleted file mode 100644
index efdfa8c..0000000
--- a/Gestor.Model/Model.Domain.Seguros/CriticaApolice.cs
+++ /dev/null
@@ -1,116 +0,0 @@
-using Gestor.Model.Domain.Generic;
-using Gestor.Model.Helper;
-using Gestor.Model.Resources;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.Runtime.CompilerServices;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class CriticaApolice : DomainBase, IDomain
- {
- private string _naoEncontrados;
-
- private bool? _critica;
-
- public bool? Aggilizador
- {
- get;
- set;
- }
-
- public bool? Critica
- {
- get
- {
- return this._critica;
- }
- set
- {
- this._critica = new bool?(value.GetValueOrDefault());
- }
- }
-
- public DateTime? DataCritica
- {
- get;
- set;
- }
-
- public DateTime? DataImportacao
- {
- get;
- set;
- }
-
- public Gestor.Model.Domain.Seguros.Documento Documento
- {
- get;
- set;
- }
-
- public string NaoEncontrados
- {
- get
- {
- string str = this._naoEncontrados;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._naoEncontrados = value;
- }
- }
-
- public string Tipo
- {
- get;
- set;
- }
-
- public long? UsuarioCritica
- {
- get;
- set;
- }
-
- public Usuario UsuarioImportacao
- {
- get;
- set;
- }
-
- [JsonIgnore]
- public Func<List<KeyValuePair<string, string>>> ValidationEvent
- {
- get
- {
- CriticaApolice criticaApolouse = this;
- return new Func<List<KeyValuePair<string, string>>>(criticaApolouse.Validate);
- }
- }
-
- public CriticaApolice()
- {
- }
-
- public List<KeyValuePair<string, string>> Validate()
- {
- List<KeyValuePair<string, string>> keyValuePairs = ValidationHelper.AddValue();
- if (this.DataImportacao.HasValue && (DateTime.Compare(this.DataImportacao.Value, new DateTime(1753, 1, 1)) < 0 || DateTime.Compare(this.DataImportacao.Value, new DateTime(9999, 12, 31)) > 0))
- {
- keyValuePairs.AddValue<string, string>("DataImportacao", string.Format(Messages.DataInvalida, Array.Empty<object>()), true);
- }
- if (this.DataCritica.HasValue && (DateTime.Compare(this.DataCritica.Value, new DateTime(1753, 1, 1)) < 0 || DateTime.Compare(this.DataCritica.Value, new DateTime(9999, 12, 31)) > 0))
- {
- keyValuePairs.AddValue<string, string>("DataCritica", string.Format(Messages.DataInvalida, Array.Empty<object>()), true);
- }
- return keyValuePairs;
- }
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/DetalheExtrato.cs b/Gestor.Model/Model.Domain.Seguros/DetalheExtrato.cs
deleted file mode 100644
index c03bd40..0000000
--- a/Gestor.Model/Model.Domain.Seguros/DetalheExtrato.cs
+++ /dev/null
@@ -1,250 +0,0 @@
-using Gestor.Model.Common;
-using Gestor.Model.Domain.Generic;
-using Gestor.Model.Helper;
-using Gestor.Model.Resources;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Runtime.CompilerServices;
-using System.Threading;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class DetalheExtrato : DomainBase, IDomain, INotifyPropertyChanged
- {
- private bool _selecionado;
-
- private string _cliente;
-
- private string _apolice;
-
- private string _endosso;
-
- private string _numeroParcela;
-
- private string _historico;
-
- public bool IsNormal = true;
-
- public string Apolice
- {
- get
- {
- string str = this._apolice;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._apolice = value;
- }
- }
-
- public string Cliente
- {
- get
- {
- string str = this._cliente;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._cliente = value;
- }
- }
-
- public decimal? Comissao
- {
- get;
- set;
- }
-
- public bool Corrigir
- {
- get;
- set;
- }
-
- public DateTime? Credito
- {
- get;
- set;
- }
-
- public long? Documento
- {
- get;
- set;
- }
-
- public string Endosso
- {
- get
- {
- string str = this._endosso;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._endosso = value;
- }
- }
-
- public Gestor.Model.Domain.Seguros.Extrato Extrato
- {
- get;
- set;
- }
-
- public string Historico
- {
- get
- {
- string str = this._historico;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._historico = value;
- }
- }
-
- public string NumeroParcela
- {
- get
- {
- string str = this._numeroParcela;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._numeroParcela = value;
- }
- }
-
- public long? Parcela
- {
- get;
- set;
- }
-
- public DateTime? Recebimento
- {
- get;
- set;
- }
-
- public bool Selecionado
- {
- get
- {
- return this._selecionado;
- }
- set
- {
- this._selecionado = value;
- this.OnPropertyChanged("Selecionado");
- }
- }
-
- public StatusParcela? Status
- {
- get;
- set;
- }
-
- public Gestor.Model.Common.SubTipo? SubTipo
- {
- get;
- set;
- }
-
- [JsonIgnore]
- public Func<List<KeyValuePair<string, string>>> ValidationEvent
- {
- get
- {
- DetalheExtrato detalheExtrato = this;
- return new Func<List<KeyValuePair<string, string>>>(detalheExtrato.Validate);
- }
- }
-
- public decimal? Valor
- {
- get;
- set;
- }
-
- public decimal? ValorComissao
- {
- get;
- set;
- }
-
- public DetalheExtrato()
- {
- }
-
- protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
- {
- PropertyChangedEventHandler propertyChangedEventHandler = this.PropertyChanged;
- if (propertyChangedEventHandler == null)
- {
- return;
- }
- propertyChangedEventHandler(this, new PropertyChangedEventArgs(propertyName));
- }
-
- public List<KeyValuePair<string, string>> Validate()
- {
- List<KeyValuePair<string, string>> keyValuePairs = ValidationHelper.AddValue();
- if (this.Recebimento.HasValue && (DateTime.Compare(this.Recebimento.Value, new DateTime(1753, 1, 1)) < 0 || DateTime.Compare(this.Recebimento.Value, new DateTime(9999, 12, 31)) > 0))
- {
- keyValuePairs.AddValue<string, string>("Recebimento", string.Format(Messages.DataInvalida, Array.Empty<object>()), true);
- }
- if (this.Credito.HasValue && (DateTime.Compare(this.Credito.Value, new DateTime(1753, 1, 1)) < 0 || DateTime.Compare(this.Credito.Value, new DateTime(9999, 12, 31)) > 0))
- {
- keyValuePairs.AddValue<string, string>("Credito", string.Format(Messages.DataInvalida, Array.Empty<object>()), true);
- }
- if (string.IsNullOrWhiteSpace(this.Cliente) && this.Cliente.Length > 100)
- {
- keyValuePairs.AddValue<string, string>("Cliente", string.Format(Messages.MaiorQueLimite, 100), true);
- }
- if (string.IsNullOrWhiteSpace(this.Apolice) && this.Apolice.Length > 30)
- {
- keyValuePairs.AddValue<string, string>("Apolice", string.Format(Messages.MaiorQueLimite, 30), true);
- }
- if (string.IsNullOrWhiteSpace(this.Endosso) && this.Endosso.Length > 20)
- {
- keyValuePairs.AddValue<string, string>("Endosso", string.Format(Messages.MaiorQueLimite, 20), true);
- }
- if (string.IsNullOrWhiteSpace(this.NumeroParcela) && this.NumeroParcela.Length > 4)
- {
- keyValuePairs.AddValue<string, string>("NumeroParcela", string.Format(Messages.MaiorQueLimite, 4), true);
- }
- return keyValuePairs;
- }
-
- public event PropertyChangedEventHandler PropertyChanged;
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/Documento.cs b/Gestor.Model/Model.Domain.Seguros/Documento.cs
deleted file mode 100644
index 00ae7de..0000000
--- a/Gestor.Model/Model.Domain.Seguros/Documento.cs
+++ /dev/null
@@ -1,1426 +0,0 @@
-using Gestor.Model.Attributes;
-using Gestor.Model.Common;
-using Gestor.Model.Domain.Aggilizador;
-using Gestor.Model.Domain.Common;
-using Gestor.Model.Domain.Generic;
-using Gestor.Model.Helper;
-using Gestor.Model.Resources;
-using Gestor.Model.Validation;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel;
-using System.Globalization;
-using System.Runtime.CompilerServices;
-using System.Threading;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class Documento : DomainBase, IDomain
- {
- private bool _selecionado;
-
- private string _proposta;
-
- private string _propostaEndosso;
-
- private string _apoliceAnterior;
-
- private string _apolice;
-
- private string _endosso;
-
- private string _pasta;
-
- private string _agencia;
-
- private string _conta;
-
- private string _numeroCartao;
-
- private string _vencimentoCartao;
-
- private string _nomeProponente;
-
- private bool _isEndosso;
-
- private bool _vencimentoParcela;
-
- [Description("ADICIONAL DE COMISSÃO")]
- [Log(true)]
- public bool AdicionalComiss
- {
- get;
- set;
- }
-
- [Description("AGÊNCIA")]
- [Log(true)]
- public string Agencia
- {
- get
- {
- string str = this._agencia;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._agencia = value;
- }
- }
-
- [Description("APÓLICE")]
- [Log(true)]
- public string Apolice
- {
- get
- {
- string str = this._apolice;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._apolice = value;
- }
- }
-
- [Description("APÓLICE ANTERIOR")]
- [Log(true)]
- public string ApoliceAnterior
- {
- get
- {
- string str = this._apoliceAnterior;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._apoliceAnterior = value;
- }
- }
-
- [Description("APÓLICE CONFERIDA")]
- [Log(true)]
- public bool ApoliceConferida
- {
- get;
- set;
- }
-
- public bool AssinadaSiggner
- {
- get;
- set;
- }
-
- [Log(false)]
- public List<StatusDocumentoAssinado> Assinaturas
- {
- get;
- set;
- }
-
- [Log(true)]
- public Gestor.Model.Domain.Common.Banco Banco
- {
- get;
- set;
- }
-
- [Log(true)]
- public BandeiraCartao? Bandeira
- {
- get;
- set;
- }
-
- [Log(false)]
- public List<Calculo> Calculos
- {
- get;
- set;
- }
-
- [Description("COMISSÃO")]
- [Log(true)]
- public decimal Comissao
- {
- get;
- set;
- }
-
- public decimal? ComissaoTotal
- {
- get;
- set;
- }
-
- [Log(true)]
- public string Conta
- {
- get
- {
- string str = this._conta;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._conta = value;
- }
- }
-
- public Gestor.Model.Domain.Seguros.Controle Controle
- {
- get;
- set;
- }
-
- [Description("CUSTO DE EMISSÃO")]
- [Log(true)]
- public decimal Custo
- {
- get;
- set;
- }
-
- [Description("DATA DE CONTROLE")]
- [Log(true)]
- public DateTime? DataControle
- {
- get;
- set;
- }
-
- public DateTime? DataCriacao
- {
- get;
- set;
- }
-
- [Description("DIFERENÇA")]
- [Log(true)]
- public decimal Diferenca
- {
- get;
- set;
- }
-
- [Description("EMISSÃO")]
- [Log(true)]
- public DateTime? Emissao
- {
- get;
- set;
- }
-
- [Log(true)]
- public string Endosso
- {
- get
- {
- string str = this._endosso;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._endosso = value;
- }
- }
-
- [Description("ESTIPULANTE 1")]
- [Log(true)]
- public Estipulante Estipulante1
- {
- get;
- set;
- }
-
- [Description("ESTIPULANTE 2")]
- [Log(true)]
- public Estipulante Estipulante2
- {
- get;
- set;
- }
-
- [Description("ESTIPULANTE 3")]
- [Log(true)]
- public Estipulante Estipulante3
- {
- get;
- set;
- }
-
- [Description("ESTIPULANTE 4")]
- [Log(true)]
- public Estipulante Estipulante4
- {
- get;
- set;
- }
-
- [Description("ESTIPULANTE 5")]
- [Log(true)]
- public Estipulante Estipulante5
- {
- get;
- set;
- }
-
- public string Estipulantes
- {
- get;
- set;
- }
-
- public bool Excluido
- {
- get;
- set;
- }
-
- public bool FinalVigencia
- {
- get;
- set;
- }
-
- [Description("FORMA DE PAGAMENTO")]
- [Log(true)]
- public Gestor.Model.Common.FormaPagamento? FormaPagamento
- {
- get;
- set;
- }
-
- [Description("IOF")]
- [Log(true)]
- public decimal Iof
- {
- get;
- set;
- }
-
- [Log(false)]
- public List<Item> ItensAtivo
- {
- get;
- set;
- }
-
- [Log(false)]
- public Gestor.Model.Common.Negocio? Negocio
- {
- get;
- set;
- }
-
- [Description("NEGÓCIO CORRETORA")]
- [Log(true)]
- public Gestor.Model.Common.NegocioCorretora? NegocioCorretora
- {
- get;
- set;
- }
-
- [Description("PROPONENTE")]
- [Log(true)]
- public string NomeProponente
- {
- get
- {
- string str = this._nomeProponente;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._nomeProponente = value;
- }
- }
-
- [Description("NÚMERO CARTÃO")]
- [Log(true)]
- public string NumeroCartao
- {
- get
- {
- string str = this._numeroCartao;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._numeroCartao = value;
- }
- }
-
- [Description("QUANTIDADE DE PARCELAS")]
- [Log(true)]
- public decimal NumeroParcelas
- {
- get;
- set;
- }
-
- [Log(true)]
- public string Observacao
- {
- get;
- set;
- }
-
- public string ObsProtocolo
- {
- get;
- set;
- }
-
- public int Ordem
- {
- get;
- set;
- }
-
- [Log(false)]
- public List<VendedorParcela> Pagamentos
- {
- get;
- set;
- }
-
- [Log(false)]
- public ObservableCollection<Parcela> Parcelas
- {
- get;
- set;
- }
-
- [Log(true)]
- public string Pasta
- {
- get
- {
- string str = this._pasta;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._pasta = value;
- }
- }
-
- [Log(false)]
- public decimal? PercentualRepasse
- {
- get;
- set;
- }
-
- [Description("PRÊMIO ADICIONAL")]
- [Log(true)]
- public decimal PremioAdicional
- {
- get;
- set;
- }
-
- [Description("PRÊMIO LÍQUIDO")]
- [Log(true)]
- public decimal PremioLiquido
- {
- get;
- set;
- }
-
- [Description("PRÊMIO TOTAL")]
- [Log(true)]
- public decimal PremioTotal
- {
- get;
- set;
- }
-
- [Log(true)]
- public string Proposta
- {
- get
- {
- string str = this._proposta;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._proposta = value;
- }
- }
-
- [Log(true)]
- public bool PropostaAssinada
- {
- get;
- set;
- }
-
- [Description("PROPOSTA DE ENDOSSO")]
- [Log(true)]
- public string PropostaEndosso
- {
- get
- {
- string str = this._propostaEndosso;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._propostaEndosso = value;
- }
- }
-
- public bool ProtocoloEmail
- {
- get;
- set;
- }
-
- public bool ProtocoloEndereco
- {
- get;
- set;
- }
-
- public bool ProtocoloParcela
- {
- get;
- set;
- }
-
- public bool ProtocoloTelefone
- {
- get;
- set;
- }
-
- public bool ProtocoloVendedor
- {
- get;
- set;
- }
-
- [Description("TRANSMISSÃO DA PROPOSTA")]
- [Log(true)]
- public DateTime? Remessa
- {
- get;
- set;
- }
-
- public bool Selecionado
- {
- get
- {
- return this._selecionado;
- }
- set
- {
- if (value == this._selecionado)
- {
- return;
- }
- this._selecionado = value;
- this.OnPropertyChanged("Selecionado");
- }
- }
-
- [Log(false)]
- public bool Sinistro
- {
- get;
- set;
- }
-
- [Description("SITUAÇÃO")]
- [Log(true)]
- public TipoSeguro Situacao
- {
- get;
- set;
- }
-
- [Log(false)]
- public TipoSeguro? SituacaoAnterior
- {
- get;
- set;
- }
-
- [Description("STATUS INTERNO")]
- [Log(true)]
- public Gestor.Model.Domain.Seguros.Status Status
- {
- get;
- set;
- }
-
- public Gestor.Model.Common.StatusAssinatura StatusAssinatura
- {
- get;
- set;
- }
-
- [Log(false)]
- public bool TemEndosso
- {
- get;
- set;
- }
-
- public int Tipo
- {
- get;
- set;
- }
-
- [Description("TIPO DO ENDOSSO")]
- [Log(true)]
- public Gestor.Model.Common.TipoEndosso? TipoEndosso
- {
- get;
- set;
- }
-
- [Description("TIPO RECEBIMENTO")]
- [Log(true)]
- public Gestor.Model.Common.TipoRecebimento? TipoRecebimento
- {
- get;
- set;
- }
-
- [Log(false)]
- public Usuario UsuarioCriacao
- {
- get;
- set;
- }
-
- [JsonIgnore]
- public Func<List<KeyValuePair<string, string>>> ValidationEvent
- {
- get
- {
- Documento documento = this;
- return new Func<List<KeyValuePair<string, string>>>(documento.Validate);
- }
- }
-
- [Description("VENCIMENTO CARTÃO")]
- [Log(true)]
- public string VencimentoCartao
- {
- get
- {
- string str = this._vencimentoCartao;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._vencimentoCartao = value;
- }
- }
-
- [Log(false)]
- public List<Vendedor> Vendedores
- {
- get;
- set;
- }
-
- [Log(false)]
- public Vendedor VendedorPrincipal
- {
- get;
- set;
- }
-
- [Description("VIGÊNCIA INICIAL")]
- [Log(true)]
- public DateTime Vigencia1
- {
- get;
- set;
- }
-
- [Description("VIGÊNCIA FINAL")]
- [Log(true)]
- public DateTime? Vigencia2
- {
- get;
- set;
- }
-
- [Log(false)]
- public VinculoDocumento Vinculo
- {
- get;
- set;
- }
-
- public Documento()
- {
- }
-
- public Documento DeepCopy()
- {
- return JsonConvert.DeserializeObject<Documento>(JsonConvert.SerializeObject(this));
- }
-
- public List<TupleList> Log(bool restricaoComissao)
- {
- decimal comissao;
- string nome;
- string str;
- string nome1;
- string description;
- string description1;
- string str1;
- string shortDateString;
- string shortDateString1;
- string shortDateString2;
- string nome2;
- string description2;
- string str2;
- string str3;
- string shortDateString3;
- List<Tuple<string, string, string>> tuples = new List<Tuple<string, string, string>>();
- Gestor.Model.Domain.Seguros.Controle controle = this.Controle;
- if (controle != null)
- {
- Seguradora seguradora = controle.Seguradora;
- if (seguradora != null)
- {
- nome = seguradora.Nome;
- }
- else
- {
- nome = null;
- }
- }
- else
- {
- nome = null;
- }
- tuples.Add(new Tuple<string, string, string>("SEGURADORA", (string.IsNullOrWhiteSpace(nome) ? "" : this.Controle.Seguradora.Nome.ToUpper()), ""));
- Gestor.Model.Domain.Seguros.Controle controle1 = this.Controle;
- if (controle1 != null)
- {
- Ramo ramo = controle1.Ramo;
- if (ramo != null)
- {
- str = ramo.Nome;
- }
- else
- {
- str = null;
- }
- }
- else
- {
- str = null;
- }
- tuples.Add(new Tuple<string, string, string>("RAMO", (string.IsNullOrWhiteSpace(str) ? "" : this.Controle.Ramo.Nome.ToUpper()), ""));
- Gestor.Model.Domain.Seguros.Controle controle2 = this.Controle;
- if (controle2 != null)
- {
- Produto produto = controle2.Produto;
- if (produto != null)
- {
- nome1 = produto.Nome;
- }
- else
- {
- nome1 = null;
- }
- }
- else
- {
- nome1 = null;
- }
- tuples.Add(new Tuple<string, string, string>("PRODUTO", (string.IsNullOrWhiteSpace(nome1) ? "" : this.Controle.Produto.Nome.ToUpper()), ""));
- Gestor.Model.Common.NegocioCorretora? negocioCorretora = this.NegocioCorretora;
- if (!negocioCorretora.HasValue)
- {
- description = "";
- }
- else
- {
- negocioCorretora = this.NegocioCorretora;
- if (negocioCorretora.HasValue)
- {
- description = negocioCorretora.GetValueOrDefault().GetDescription();
- }
- else
- {
- description = null;
- }
- }
- tuples.Add(new Tuple<string, string, string>("NEGÓCIO CORRETORA", description, ""));
- tuples.Add(new Tuple<string, string, string>("STATUS DO SEGURO", this.Situacao.GetDescription(), ""));
- Gestor.Model.Common.TipoRecebimento? tipoRecebimento = this.TipoRecebimento;
- if (!tipoRecebimento.HasValue)
- {
- description1 = "";
- }
- else
- {
- tipoRecebimento = this.TipoRecebimento;
- if (tipoRecebimento.HasValue)
- {
- description1 = tipoRecebimento.GetValueOrDefault().GetDescription();
- }
- else
- {
- description1 = null;
- }
- }
- tuples.Add(new Tuple<string, string, string>("TIPO DE RECEBIMENTO", description1, ""));
- Gestor.Model.Common.TipoEndosso? tipoEndosso = this.TipoEndosso;
- if (!tipoEndosso.HasValue)
- {
- str1 = "";
- }
- else
- {
- tipoEndosso = this.TipoEndosso;
- if (tipoEndosso.HasValue)
- {
- str1 = tipoEndosso.GetValueOrDefault().GetDescription();
- }
- else
- {
- str1 = null;
- }
- }
- tuples.Add(new Tuple<string, string, string>("TIPO ENDOSSO", str1, ""));
- tuples.Add(new Tuple<string, string, string>("PROPOSTA", (string.IsNullOrWhiteSpace(this.Proposta) ? "" : this.Proposta.ToUpper()), ""));
- tuples.Add(new Tuple<string, string, string>("PROPOSTA ENDOSSO", (string.IsNullOrWhiteSpace(this.PropostaEndosso) ? "" : this.PropostaEndosso.ToUpper()), ""));
- tuples.Add(new Tuple<string, string, string>("APÓLICE", (string.IsNullOrWhiteSpace(this.Apolice) ? "" : this.Apolice.ToUpper()), ""));
- tuples.Add(new Tuple<string, string, string>("ENDOSSO", (string.IsNullOrWhiteSpace(this.Endosso) ? "" : this.Endosso.ToUpper()), ""));
- DateTime vigencia1 = this.Vigencia1;
- tuples.Add(new Tuple<string, string, string>("VIGÊNCIA INICIAL", vigencia1.ToShortDateString(), ""));
- DateTime? vigencia2 = this.Vigencia2;
- if (!vigencia2.HasValue)
- {
- shortDateString = "";
- }
- else
- {
- vigencia2 = this.Vigencia2;
- if (vigencia2.HasValue)
- {
- shortDateString = vigencia2.GetValueOrDefault().ToShortDateString();
- }
- else
- {
- shortDateString = null;
- }
- }
- tuples.Add(new Tuple<string, string, string>("VIGÊNCIA FINAL", shortDateString, ""));
- vigencia2 = this.Remessa;
- if (!vigencia2.HasValue)
- {
- shortDateString1 = "";
- }
- else
- {
- vigencia2 = this.Remessa;
- if (vigencia2.HasValue)
- {
- shortDateString1 = vigencia2.GetValueOrDefault().ToShortDateString();
- }
- else
- {
- shortDateString1 = null;
- }
- }
- tuples.Add(new Tuple<string, string, string>("TRANSMISSÃO DA PROPOSTA", shortDateString1, ""));
- vigencia2 = this.Emissao;
- if (!vigencia2.HasValue)
- {
- shortDateString2 = "";
- }
- else
- {
- vigencia2 = this.Emissao;
- if (vigencia2.HasValue)
- {
- shortDateString2 = vigencia2.GetValueOrDefault().ToShortDateString();
- }
- else
- {
- shortDateString2 = null;
- }
- }
- tuples.Add(new Tuple<string, string, string>("EMISSÃO DA APÓLICE", shortDateString2, ""));
- Gestor.Model.Domain.Seguros.Controle controle3 = this.Controle;
- if (controle3 != null)
- {
- Seguradora seguradoraAnterior = controle3.SeguradoraAnterior;
- if (seguradoraAnterior != null)
- {
- nome2 = seguradoraAnterior.Nome;
- }
- else
- {
- nome2 = null;
- }
- }
- else
- {
- nome2 = null;
- }
- tuples.Add(new Tuple<string, string, string>("SEGURADORA ANTERIOR", (string.IsNullOrWhiteSpace(nome2) ? "" : this.Controle.SeguradoraAnterior.Nome.ToUpper()), ""));
- tuples.Add(new Tuple<string, string, string>("APÓLICE ANTERIOR", (string.IsNullOrWhiteSpace(this.ApoliceAnterior) ? "" : this.ApoliceAnterior.ToUpper()), ""));
- Gestor.Model.Common.FormaPagamento? formaPagamento = this.FormaPagamento;
- if (!formaPagamento.HasValue)
- {
- description2 = "";
- }
- else
- {
- formaPagamento = this.FormaPagamento;
- if (formaPagamento.HasValue)
- {
- description2 = formaPagamento.GetValueOrDefault().GetDescription();
- }
- else
- {
- description2 = null;
- }
- }
- tuples.Add(new Tuple<string, string, string>("FORMA DE PAGAMENTO", description2, ""));
- tuples.Add(new Tuple<string, string, string>("PROPOSTA ASSINADA", (this.PropostaAssinada ? "SIM" : "NÃO"), ""));
- tuples.Add(new Tuple<string, string, string>("APÓLICE CONFERIDA", (this.ApoliceConferida ? "SIM" : "NÃO"), ""));
- tuples.Add(new Tuple<string, string, string>("ADICIONAL DE COMISSÃO", (this.AdicionalComiss ? "SIM" : "NÃO"), ""));
- List<Tuple<string, string, string>> tuples1 = tuples;
- if (!restricaoComissao)
- {
- comissao = this.Comissao / new decimal(100);
- tuples1.Add(new Tuple<string, string, string>("COMISSÃO", comissao.ToString("P", new CultureInfo("pt-BR", false)), ""));
- }
- List<Tuple<string, string, string>> tuples2 = tuples1;
- List<Tuple<string, string, string>> tuples3 = new List<Tuple<string, string, string>>();
- comissao = this.Comissao / new decimal(100);
- tuples3.Add(new Tuple<string, string, string>("COMISSÃO", comissao.ToString("P", new CultureInfo("pt-BR", false)), ""));
- comissao = this.PremioLiquido;
- tuples3.Add(new Tuple<string, string, string>("PRÊMIO LÍQUIDO", comissao.ToString("C", new CultureInfo("pt-BR", false)), ""));
- comissao = this.PremioAdicional;
- tuples3.Add(new Tuple<string, string, string>("PRÊMIO ADICIONAL", comissao.ToString("C", new CultureInfo("pt-BR", false)), ""));
- comissao = this.Iof;
- tuples3.Add(new Tuple<string, string, string>("I.O.F.", comissao.ToString("C", new CultureInfo("pt-BR", false)), ""));
- comissao = this.Diferenca;
- tuples3.Add(new Tuple<string, string, string>("DIFERENÇA", comissao.ToString("C", new CultureInfo("pt-BR", false)), ""));
- comissao = this.PremioTotal;
- tuples3.Add(new Tuple<string, string, string>("PRÊMIO TOTAL", comissao.ToString("C", new CultureInfo("pt-BR", false)), ""));
- int num = decimal.ToInt32(this.NumeroParcelas);
- tuples3.Add(new Tuple<string, string, string>("NÚMERO DE PARCELAS", num.ToString(), ""));
- tuples3.Add(new Tuple<string, string, string>("BANCO", (this.Banco == null ? "" : this.Banco.Nome.ToUpper()), ""));
- tuples3.Add(new Tuple<string, string, string>("AGÊNCIA", (string.IsNullOrWhiteSpace(this.Agencia) ? "" : this.Agencia.ToUpper()), ""));
- tuples3.Add(new Tuple<string, string, string>("CONTA", (string.IsNullOrWhiteSpace(this.Conta) ? "" : this.Conta.ToUpper()), ""));
- tuples3.Add(new Tuple<string, string, string>("CARTÃO DE CRÉDITO", (string.IsNullOrWhiteSpace(this.NumeroCartao) ? "" : this.NumeroCartao.ToUpper()), ""));
- BandeiraCartao? bandeira = this.Bandeira;
- if (!bandeira.HasValue)
- {
- str2 = "";
- }
- else
- {
- bandeira = this.Bandeira;
- if (bandeira.HasValue)
- {
- str2 = bandeira.GetValueOrDefault().GetDescription();
- }
- else
- {
- str2 = null;
- }
- }
- tuples3.Add(new Tuple<string, string, string>("BANDEIRA", str2, ""));
- tuples3.Add(new Tuple<string, string, string>("PROPONENTE", (string.IsNullOrWhiteSpace(this.NomeProponente) ? "" : this.NomeProponente.ToUpper()), ""));
- string vencimentoCartao = this.VencimentoCartao;
- if (vencimentoCartao != null)
- {
- str3 = vencimentoCartao.Replace("/", "");
- }
- else
- {
- str3 = null;
- }
- tuples3.Add(new Tuple<string, string, string>("VENCIMENTO DO CARTÃO", (string.IsNullOrWhiteSpace(str3) ? "" : this.VencimentoCartao.ToUpper()), ""));
- tuples3.Add(new Tuple<string, string, string>("PASTA", (string.IsNullOrWhiteSpace(this.Pasta) ? "" : this.Pasta.ToUpper()), ""));
- tuples3.Add(new Tuple<string, string, string>("ESTIPULANTE 1", (this.Estipulante1 == null ? "" : this.Estipulante1.Nome.ToUpper()), ""));
- tuples3.Add(new Tuple<string, string, string>("ESTIPULANTE 2", (this.Estipulante2 == null ? "" : this.Estipulante2.Nome.ToUpper()), ""));
- tuples3.Add(new Tuple<string, string, string>("ESTIPULANTE 3", (this.Estipulante3 == null ? "" : this.Estipulante3.Nome.ToUpper()), ""));
- tuples3.Add(new Tuple<string, string, string>("ESTIPULANTE 4", (this.Estipulante4 == null ? "" : this.Estipulante4.Nome.ToUpper()), ""));
- tuples3.Add(new Tuple<string, string, string>("ESTIPULANTE 5", (this.Estipulante5 == null ? "" : this.Estipulante5.Nome.ToUpper()), ""));
- tuples3.Add(new Tuple<string, string, string>("STATUS", (this.Status == null ? "" : this.Status.Nome.ToUpper()), ""));
- vigencia2 = this.DataControle;
- if (!vigencia2.HasValue)
- {
- shortDateString3 = "";
- }
- else
- {
- vigencia2 = this.DataControle;
- if (vigencia2.HasValue)
- {
- shortDateString3 = vigencia2.GetValueOrDefault().ToShortDateString();
- }
- else
- {
- shortDateString3 = null;
- }
- }
- tuples3.Add(new Tuple<string, string, string>("DATA DE CONTROLE", shortDateString3, ""));
- tuples3.Add(new Tuple<string, string, string>("ANOTAÇÕES", (string.IsNullOrWhiteSpace(this.Observacao) ? "" : this.Observacao.ToUpper()), ""));
- tuples2.AddRange(tuples3);
- return new List<TupleList>()
- {
- new TupleList()
- {
- Tuples = new ObservableCollection<Tuple<string, string, string>>(tuples1)
- }
- };
- }
-
- private List<KeyValuePair<string, string>> ObrigarValores(bool valores = true)
- {
- DateTime dateTime;
- List<KeyValuePair<string, string>> keyValuePairs = ValidationHelper.AddValue();
- if (valores)
- {
- if (this.Comissao <= decimal.Zero)
- {
- keyValuePairs.AddValue<string, string>("Comissao|COMISSÃO", Messages.Obrigatorio, true);
- }
- if (this.PremioLiquido == decimal.Zero)
- {
- keyValuePairs.AddValue<string, string>("PremioLiquido|PRÊMIO LÍQUIDO", Messages.Obrigatorio, true);
- }
- if (this.PremioTotal == decimal.Zero)
- {
- keyValuePairs.AddValue<string, string>("PremioTotal|PRÊMIO TOTAL", Messages.Obrigatorio, true);
- }
- if (this.NumeroParcelas <= decimal.Zero)
- {
- keyValuePairs.AddValue<string, string>("NumeroParcelas|NÚMERO DE PARCELAS", Messages.Obrigatorio, true);
- }
- if (!this._vencimentoParcela)
- {
- if (this.NumeroParcelas > decimal.Zero && this.NumeroParcelas < new decimal(998))
- {
- DateTime vigencia1 = this.Vigencia1;
- if (this.NumeroParcelas == decimal.One || vigencia1 == DateTime.MinValue)
- {
- dateTime = vigencia1;
- }
- else
- {
- decimal numeroParcelas = this.NumeroParcelas;
- dateTime = vigencia1.AddMonths(int.Parse(numeroParcelas.ToString(new CultureInfo("pt-BR"))) - 1);
- }
- DateTime dateTime1 = dateTime;
- DateTime? vigencia2 = this.Vigencia2;
- if ((vigencia2.HasValue ? dateTime1 > vigencia2.GetValueOrDefault() : false) && (this.Controle.Ramo == null || this.Controle.Ramo.Id != (long)23))
- {
- keyValuePairs.AddValue<string, string>("NumeroParcelas|NÚMERO DE PARCELAS", Messages.VencimentoParcela, true);
- }
- }
- else if (this.NumeroParcelas > new decimal(1000))
- {
- keyValuePairs.AddValue<string, string>("NumeroParcelas|NÚMERO DE PARCELAS", "NUMERO DE PARCELAS ESTA NO FORMATO INCORRETO", true);
- }
- }
- }
- if (!valores)
- {
- if (this.PremioLiquido != decimal.Zero)
- {
- keyValuePairs.AddValue<string, string>("PremioLiquido|PRÊMIO LÍQUIDO", Messages.Invalido, true);
- }
- if (this.PremioAdicional != decimal.Zero)
- {
- keyValuePairs.AddValue<string, string>("PremioAdicional|PRÊMIO ADICIONAL", Messages.Invalido, true);
- }
- if (this.Iof != decimal.Zero)
- {
- keyValuePairs.AddValue<string, string>("Iof", Messages.Invalido, true);
- }
- if (this.Diferenca != decimal.Zero)
- {
- keyValuePairs.AddValue<string, string>("Diferenca|DIFERÊNÇA", Messages.Invalido, true);
- }
- if (this.PremioTotal != decimal.Zero)
- {
- keyValuePairs.AddValue<string, string>("PremioTotal|PRÊMIO TOTAL", Messages.Invalido, true);
- }
- if (this.NumeroParcelas != decimal.Zero)
- {
- keyValuePairs.AddValue<string, string>("NumeroParcelas|NÚMERO DE PARCELAS", Messages.Invalido, true);
- }
- }
- return keyValuePairs;
- }
-
- protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
- {
- PropertyChangedEventHandler propertyChangedEventHandler = this.PropertyChanged;
- if (propertyChangedEventHandler == null)
- {
- return;
- }
- propertyChangedEventHandler(this, new PropertyChangedEventArgs(propertyName));
- }
-
- public List<KeyValuePair<string, string>> Validate(bool isEndosso, bool vencimentoParcela)
- {
- this._isEndosso = isEndosso;
- this._vencimentoParcela = vencimentoParcela;
- return this.Validate();
- }
-
- public List<KeyValuePair<string, string>> Validate()
- {
- Gestor.Model.Common.TipoEndosso? tipoEndosso;
- Gestor.Model.Common.TipoEndosso valueOrDefault;
- List<KeyValuePair<string, string>> keyValuePairs = ValidationHelper.AddValue();
- keyValuePairs.AddRange(this.Controle.Validate());
- if (!this.NegocioCorretora.HasValue)
- {
- keyValuePairs.AddValue<string, string>("NegocioCorretora|NEGÓCIO CORRETORA", Messages.Obrigatorio, true);
- }
- if (string.IsNullOrWhiteSpace(this.Proposta) && !this._isEndosso)
- {
- keyValuePairs.AddValue<string, string>("Proposta", Messages.Obrigatorio, true);
- }
- else if (!string.IsNullOrEmpty(this.Proposta) && this.Proposta.Length > 50)
- {
- keyValuePairs.AddValue<string, string>("Proposta", string.Format(Messages.MaiorQueLimite, 50), true);
- }
- if (!string.IsNullOrWhiteSpace(this.PropostaEndosso) && this.PropostaEndosso.Length > 50)
- {
- keyValuePairs.AddValue<string, string>("PropostaEndosso|PROPOSTA DE ENDOSSO", string.Format(Messages.MaiorQueLimite, 50), true);
- }
- if (!string.IsNullOrWhiteSpace(this.ApoliceAnterior) && this.ApoliceAnterior.Length > 50)
- {
- keyValuePairs.AddValue<string, string>("ApoliceAnterior|APÓLICE ANTERIOR", string.Format(Messages.MaiorQueLimite, 50), true);
- }
- if (!string.IsNullOrWhiteSpace(this.Endosso) && this.Endosso.Length > 30)
- {
- keyValuePairs.AddValue<string, string>("Endosso", string.Format(Messages.MaiorQueLimite, 30), true);
- }
- if (!string.IsNullOrWhiteSpace(this.Pasta) && this.Pasta.Length > 15)
- {
- keyValuePairs.AddValue<string, string>("Pasta", string.Format(Messages.MaiorQueLimite, 15), true);
- }
- if (!string.IsNullOrWhiteSpace(this.Agencia) && this.Agencia.Length > 10)
- {
- keyValuePairs.AddValue<string, string>("Agencia|AGÊNCIA", string.Format(Messages.MaiorQueLimite, 10), true);
- }
- if (!string.IsNullOrWhiteSpace(this.Conta) && this.Conta.Length > 15)
- {
- keyValuePairs.AddValue<string, string>("Conta", string.Format(Messages.MaiorQueLimite, 15), true);
- }
- if (!string.IsNullOrWhiteSpace(this.NumeroCartao) && this.NumeroCartao.Length > 20)
- {
- keyValuePairs.AddValue<string, string>("NumeroCartao|NÚMERO DO CARTÃO", string.Format(Messages.MaiorQueLimite, 20), true);
- }
- if (!string.IsNullOrWhiteSpace(this.VencimentoCartao) && this.VencimentoCartao.Length > 5)
- {
- keyValuePairs.AddValue<string, string>("VencimentoCartao|VENCIMENTO DO CARTÃO", string.Format(Messages.MaiorQueLimite, 5), true);
- }
- if (!string.IsNullOrWhiteSpace(this.NomeProponente) && this.NomeProponente.Length > 100)
- {
- keyValuePairs.AddValue<string, string>("NomeProponente|PROPONENTE", string.Format(Messages.MaiorQueLimite, 100), true);
- }
- DateTime? emissao = this.Emissao;
- if (emissao.HasValue)
- {
- emissao = this.Emissao;
- if (DateTime.Compare(emissao.Value, new DateTime(1753, 1, 1)) >= 0)
- {
- emissao = this.Emissao;
- if (DateTime.Compare(emissao.Value, new DateTime(9999, 12, 31)) <= 0)
- {
- goto Label0;
- }
- }
- keyValuePairs.AddValue<string, string>(string.Concat("Emissao|", (this._isEndosso ? "EMISSÃO DO ENDOSSO" : "EMISSÃO DA APÓLICE")), string.Format(Messages.DataInvalida, Array.Empty<object>()), true);
- }
- Label0:
- emissao = this.Remessa;
- if (emissao.HasValue)
- {
- emissao = this.Remessa;
- if (DateTime.Compare(emissao.Value, new DateTime(1753, 1, 1)) >= 0)
- {
- emissao = this.Remessa;
- if (DateTime.Compare(emissao.Value, new DateTime(9999, 12, 31)) <= 0)
- {
- goto Label1;
- }
- }
- keyValuePairs.AddValue<string, string>(string.Concat("Remessa|", (this._isEndosso ? "TRANSMISSÃO DA PROPOSTA DE ENDOSSO" : "TRANSMISSÃO DA PROPOSTA")), string.Format(Messages.DataInvalida, Array.Empty<object>()), true);
- }
- Label1:
- DateTime vigencia1 = this.Vigencia1;
- if (DateTime.Compare(this.Vigencia1, new DateTime(1753, 1, 1)) < 0 || DateTime.Compare(this.Vigencia1, new DateTime(9999, 12, 31)) > 0)
- {
- keyValuePairs.AddValue<string, string>("Vigencia1|VIGÊNCIA INICIAL", string.Format(Messages.DataInvalida, Array.Empty<object>()), true);
- }
- emissao = this.Vigencia2;
- if (emissao.HasValue)
- {
- emissao = this.Vigencia2;
- if (DateTime.Compare(emissao.Value, new DateTime(1753, 1, 1)) >= 0)
- {
- emissao = this.Vigencia2;
- if (DateTime.Compare(emissao.Value, new DateTime(9999, 12, 31)) <= 0)
- {
- goto Label2;
- }
- }
- keyValuePairs.AddValue<string, string>("Vigencia2|VIGÊNCIA FINAL", string.Format(Messages.DataInvalida, Array.Empty<object>()), true);
- }
- Label2:
- DateTime dateTime = this.Vigencia1;
- emissao = this.Vigencia2;
- if (emissao.HasValue)
- {
- DateTime vigencia11 = this.Vigencia1;
- emissao = this.Vigencia2;
- if ((emissao.HasValue ? vigencia11 > emissao.GetValueOrDefault() : false))
- {
- keyValuePairs.AddValue<string, string>("Vigencia2|VIGÊNCIA FINAL", "A DATA DE VIGÊNCIA FINAL NÃO PODE SER ANTERIOR A DATA DE VIGÊNCIA INCIAL", true);
- }
- }
- if (this.Tipo == 0)
- {
- if (string.IsNullOrWhiteSpace(this.Apolice))
- {
- emissao = this.Emissao;
- if (emissao.HasValue)
- {
- keyValuePairs.AddValue<string, string>("Apolice|APÓLICE", Messages.Obrigatorio, true);
- }
- }
- if (!string.IsNullOrWhiteSpace(this.Apolice))
- {
- emissao = this.Emissao;
- if (!emissao.HasValue)
- {
- keyValuePairs.AddValue<string, string>(string.Concat("Emissao|", (this._isEndosso ? "EMISSÃO DO ENDOSSO" : "EMISSÃO DA APÓLICE")), Messages.Obrigatorio, true);
- }
- }
- if (!string.IsNullOrWhiteSpace(this.Apolice) && this.Apolice.Length > 50)
- {
- keyValuePairs.AddValue<string, string>("Apolice|APÓLICE", string.Format(Messages.MaiorQueLimite, 50), true);
- }
- }
- if (this.Tipo > 0)
- {
- if (string.IsNullOrWhiteSpace(this.PropostaEndosso))
- {
- keyValuePairs.AddValue<string, string>("PropostaEndosso|PROPOSTA DE ENDOSSO", Messages.Obrigatorio, true);
- }
- else if (this.PropostaEndosso.Length > 30)
- {
- keyValuePairs.AddValue<string, string>("PropostaEndosso|PROPOSTA DE ENDOSSO", string.Format(Messages.MaiorQueLimite, 30), true);
- }
- if (!string.IsNullOrWhiteSpace(this.Endosso))
- {
- if (this.Endosso.Length > 30)
- {
- keyValuePairs.AddValue<string, string>("Endosso", string.Format(Messages.MaiorQueLimite, 30), true);
- }
- emissao = this.Emissao;
- if (!emissao.HasValue && this.Tipo > 0)
- {
- keyValuePairs.AddValue<string, string>(string.Concat("Emissao|", (this._isEndosso ? "EMISSÃO DO ENDOSSO" : "EMISSÃO DA APÓLICE")), Messages.Obrigatorio, true);
- }
- }
- else
- {
- emissao = this.Emissao;
- if (emissao.HasValue)
- {
- keyValuePairs.AddValue<string, string>("Endosso", Messages.Obrigatorio, true);
- }
- }
- }
- if (this.Tipo > 0)
- {
- tipoEndosso = this.TipoEndosso;
- if (!tipoEndosso.HasValue)
- {
- keyValuePairs.AddValue<string, string>("TipoEndosso|TIPO DE ENDOSSO", Messages.Obrigatorio, true);
- }
- }
- if (this.TipoRecebimento.GetValueOrDefault() == Gestor.Model.Common.TipoRecebimento.Parcela)
- {
- emissao = this.Vigencia2;
- if (!emissao.HasValue)
- {
- keyValuePairs.AddValue<string, string>("Vigencia2|VIGÊNCIA FINAL", Messages.Obrigatorio, true);
- }
- }
- if (this.TipoRecebimento.GetValueOrDefault() == Gestor.Model.Common.TipoRecebimento.Parcela && this.Tipo == 0)
- {
- keyValuePairs.AddRange(this.ObrigarValores(true));
- }
- if (this.TipoRecebimento.GetValueOrDefault() == Gestor.Model.Common.TipoRecebimento.Fatura && this.Tipo == 0)
- {
- keyValuePairs.AddRange(this.ObrigarValores(false));
- }
- tipoEndosso = this.TipoEndosso;
- if (tipoEndosso.GetValueOrDefault() == Gestor.Model.Common.TipoEndosso.Cancelamento && (this.PremioLiquido != decimal.Zero || this.Comissao != decimal.Zero) && this.NumeroParcelas == decimal.Zero)
- {
- keyValuePairs.AddValue<string, string>("NumeroParcelas|NÚMERO DE PARCELAS", Messages.Obrigatorio, true);
- }
- tipoEndosso = this.TipoEndosso;
- if (tipoEndosso.GetValueOrDefault() == Gestor.Model.Common.TipoEndosso.Cancelamento && (this.PremioLiquido != new decimal(0, 0, 0, false, 1) || this.NumeroParcelas != decimal.Zero))
- {
- if (this.Comissao == decimal.Zero)
- {
- keyValuePairs.AddValue<string, string>("Comissao|COMISSÃO", Messages.Obrigatorio, true);
- }
- if (this.NumeroParcelas == decimal.Zero)
- {
- keyValuePairs.AddValue<string, string>("NumeroParcelas|NÚMERO DE PARCELAS", Messages.Obrigatorio, true);
- }
- if (this.PremioLiquido == decimal.Zero)
- {
- keyValuePairs.AddValue<string, string>("PremioLiquido|PRÊMIO LÍQUID", Messages.Obrigatorio, true);
- }
- }
- long num = 10000000000L;
- if (this.PremioTotal > num)
- {
- keyValuePairs.AddValue<string, string>("PremioTotal|PRÊMIO TOTAL", Messages.Invalido, true);
- }
- if (this.PremioLiquido > num)
- {
- keyValuePairs.AddValue<string, string>("PremioLiquido|PRÊMIO LÍQUIDO", Messages.Invalido, true);
- }
- if (this.NumeroParcelas > new decimal(1000))
- {
- keyValuePairs.AddValue<string, string>("NumeroParcelas|NÚMERO DE PARCELAS", "NUMERO DE PARCELAS ESTA NO FORMATO INCORRETO", true);
- }
- if (this.Tipo > 0)
- {
- tipoEndosso = this.TipoEndosso;
- if (tipoEndosso.HasValue)
- {
- valueOrDefault = tipoEndosso.GetValueOrDefault();
- if (valueOrDefault != Gestor.Model.Common.TipoEndosso.ComMovimento)
- {
- goto Label4;
- }
- keyValuePairs.AddRange(this.ObrigarValores(true));
- return keyValuePairs;
- }
- Label5:
- if (this.PremioTotal == decimal.Zero && this.Comissao == decimal.Zero)
- {
- return keyValuePairs;
- }
- keyValuePairs.AddRange(this.ObrigarValores(true));
- }
- return keyValuePairs;
- Label4:
- if ((int)valueOrDefault - (int)Gestor.Model.Common.TipoEndosso.SemMovimento <= (int)Gestor.Model.Common.TipoEndosso.SemMovimento)
- {
- return keyValuePairs;
- }
- else
- {
- goto Label5;
- }
- }
-
- public List<KeyValuePair<string, string>> ValidateEndossar()
- {
- List<KeyValuePair<string, string>> keyValuePairs = ValidationHelper.AddValue();
- if (string.IsNullOrWhiteSpace(this.Proposta))
- {
- keyValuePairs.AddValue<string, string>("Proposta", Messages.Obrigatorio, true);
- }
- if (this.Emissao.HasValue && (DateTime.Compare(this.Emissao.Value, new DateTime(1753, 1, 1)) < 0 || DateTime.Compare(this.Emissao.Value, new DateTime(9999, 12, 31)) > 0))
- {
- keyValuePairs.AddValue<string, string>("Emissao|EMISSÃO DA APÓLICE", string.Format(Messages.DataInvalida, Array.Empty<object>()), true);
- }
- if (this.Remessa.HasValue && (DateTime.Compare(this.Remessa.Value, new DateTime(1753, 1, 1)) < 0 || DateTime.Compare(this.Remessa.Value, new DateTime(9999, 12, 31)) > 0))
- {
- keyValuePairs.AddValue<string, string>("Remessa|TRANSMISSÃO DA PROPOSTA", string.Format(Messages.DataInvalida, Array.Empty<object>()), true);
- }
- if (string.IsNullOrWhiteSpace(this.Apolice) && this.Emissao.HasValue)
- {
- keyValuePairs.AddValue<string, string>("Apolice|APÓLICE", Messages.Obrigatorio, true);
- }
- if (!string.IsNullOrWhiteSpace(this.Apolice) && !this.Emissao.HasValue)
- {
- keyValuePairs.AddValue<string, string>(string.Concat("Emissao|", (this._isEndosso ? "EMISSÃO DO ENDOSSO" : "EMISSÃO DA APÓLICE")), Messages.Obrigatorio, true);
- }
- if (string.IsNullOrWhiteSpace(this.Apolice) && !this.Emissao.HasValue)
- {
- keyValuePairs.AddValue<string, string>("Apolice|EMISSÃO DA APÓLICE", "NÃO É POSSÍVEL ENDOSSAR UM DOCUMENTO SEM EMISSÃO DE APÓLICE", true);
- }
- return keyValuePairs;
- }
-
- public event PropertyChangedEventHandler PropertyChanged;
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/Estipulante.cs b/Gestor.Model/Model.Domain.Seguros/Estipulante.cs
deleted file mode 100644
index 76976ea..0000000
--- a/Gestor.Model/Model.Domain.Seguros/Estipulante.cs
+++ /dev/null
@@ -1,373 +0,0 @@
-using Gestor.Model.Attributes;
-using Gestor.Model.Common;
-using Gestor.Model.Domain.Generic;
-using Gestor.Model.Helper;
-using Gestor.Model.Resources;
-using Gestor.Model.Validation;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel;
-using System.Runtime.CompilerServices;
-using System.Threading;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class Estipulante : EnderecoBase, IDomain, INotifyPropertyChanged
- {
- private bool _selecionado;
-
- private string _nome;
-
- private string _documento;
-
- private string _primeiroPrefixo;
-
- private string _primeiroTelefone;
-
- private string _segundoPrefixo;
-
- private string _segundoTelefone;
-
- private string _email;
-
- private string _observacao;
-
- [Log(true)]
- public bool Ativo
- {
- get;
- set;
- }
-
- [Log(true)]
- public string Documento
- {
- get
- {
- string str = this._documento;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._documento = value;
- }
- }
-
- [Log(true)]
- public string Email
- {
- get
- {
- string str = this._email;
- if (str == null)
- {
- return null;
- }
- return str.ToLower().Trim();
- }
- set
- {
- this._email = value;
- }
- }
-
- public long IdEmpresa
- {
- get;
- set;
- }
-
- [Log(true)]
- [Name(true)]
- public string Nome
- {
- get
- {
- string str = this._nome;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._nome = value;
- }
- }
-
- [Log(true)]
- public string Observacao
- {
- get
- {
- string str = this._observacao;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._observacao = value;
- }
- }
-
- [Description("PREFIXO")]
- [Log(true)]
- public string PrimeiroPrefixo
- {
- get
- {
- string str = this._primeiroPrefixo;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._primeiroPrefixo = value;
- }
- }
-
- [Description("TELEFONE")]
- [Log(true)]
- public string PrimeiroTelefone
- {
- get
- {
- string str = this._primeiroTelefone;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._primeiroTelefone = value;
- }
- }
-
- [Description("TIPO TELEFONE")]
- [Log(true)]
- public TipoTelefone? PrimeiroTipo
- {
- get;
- set;
- }
-
- [Description("PREFIXO")]
- [Log(true)]
- public string SegundoPrefixo
- {
- get
- {
- string str = this._segundoPrefixo;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._segundoPrefixo = value;
- }
- }
-
- [Description("TELEFONE")]
- [Log(true)]
- public string SegundoTelefone
- {
- get
- {
- string str = this._segundoTelefone;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._segundoTelefone = value;
- }
- }
-
- [Description("TIPO TELEFONE")]
- [Log(true)]
- public TipoTelefone? SegundoTipo
- {
- get;
- set;
- }
-
- public bool Selecionado
- {
- get
- {
- return this._selecionado;
- }
- set
- {
- if (value == this._selecionado)
- {
- return;
- }
- this._selecionado = value;
- this.OnPropertyChanged("Selecionado");
- }
- }
-
- [JsonIgnore]
- public Func<List<KeyValuePair<string, string>>> ValidationEvent
- {
- get
- {
- Estipulante estipulante = this;
- return new Func<List<KeyValuePair<string, string>>>(estipulante.Validate);
- }
- }
-
- public Estipulante()
- {
- }
-
- public List<TupleList> Log()
- {
- string description;
- string str;
- List<TupleList> tupleLists = new List<TupleList>();
- TupleList tupleList = new TupleList();
- ObservableCollection<Tuple<string, string, string>> observableCollection = new ObservableCollection<Tuple<string, string, string>>()
- {
- new Tuple<string, string, string>("NOME", (string.IsNullOrWhiteSpace(this.Nome) ? "" : this.Nome), ""),
- new Tuple<string, string, string>("CPF", (string.IsNullOrWhiteSpace(this.Documento) ? "" : this.Documento), ""),
- new Tuple<string, string, string>("ATIVO", (this.Ativo ? "SIM" : "NÃO"), "")
- };
- TipoTelefone? primeiroTipo = this.PrimeiroTipo;
- if (!primeiroTipo.HasValue)
- {
- description = "";
- }
- else
- {
- primeiroTipo = this.PrimeiroTipo;
- if (primeiroTipo.HasValue)
- {
- description = primeiroTipo.GetValueOrDefault().GetDescription();
- }
- else
- {
- description = null;
- }
- }
- observableCollection.Add(new Tuple<string, string, string>("PRIMEIRO TIPO", description, ""));
- observableCollection.Add(new Tuple<string, string, string>("PRIMEIRO PREFIXO", (string.IsNullOrWhiteSpace(this.PrimeiroPrefixo) ? "" : this.PrimeiroPrefixo), ""));
- observableCollection.Add(new Tuple<string, string, string>("PRIMEIRO TELEFONE", (string.IsNullOrWhiteSpace(this.PrimeiroTelefone) ? "" : this.PrimeiroTelefone), ""));
- primeiroTipo = this.SegundoTipo;
- if (!primeiroTipo.HasValue)
- {
- str = "";
- }
- else
- {
- primeiroTipo = this.SegundoTipo;
- if (primeiroTipo.HasValue)
- {
- str = primeiroTipo.GetValueOrDefault().GetDescription();
- }
- else
- {
- str = null;
- }
- }
- observableCollection.Add(new Tuple<string, string, string>("SEGUNDO TIPO", str, ""));
- observableCollection.Add(new Tuple<string, string, string>("SEGUNDO PREFIXO", (string.IsNullOrWhiteSpace(this.SegundoPrefixo) ? "" : this.SegundoPrefixo), ""));
- observableCollection.Add(new Tuple<string, string, string>("SEGUNDO TELEFONE", (string.IsNullOrWhiteSpace(this.SegundoTelefone) ? "" : this.SegundoTelefone), ""));
- observableCollection.Add(new Tuple<string, string, string>("E-MAIL", (string.IsNullOrWhiteSpace(this.Email) ? "" : this.Email), ""));
- observableCollection.Add(new Tuple<string, string, string>("CEP", (string.IsNullOrWhiteSpace(base.Cep) ? "" : base.Cep), ""));
- observableCollection.Add(new Tuple<string, string, string>("ENDEREÇO", (string.IsNullOrWhiteSpace(base.Endereco) ? "" : base.Endereco), ""));
- observableCollection.Add(new Tuple<string, string, string>("NÚMERO", (string.IsNullOrWhiteSpace(base.Numero) ? "" : base.Numero), ""));
- observableCollection.Add(new Tuple<string, string, string>("COMPLEMENTO", (string.IsNullOrWhiteSpace(base.Complemento) ? "" : base.Complemento), ""));
- observableCollection.Add(new Tuple<string, string, string>("BAIRRO", (string.IsNullOrWhiteSpace(base.Bairro) ? "" : base.Bairro), ""));
- observableCollection.Add(new Tuple<string, string, string>("CIDADE", (string.IsNullOrWhiteSpace(base.Cidade) ? "" : base.Cidade), ""));
- observableCollection.Add(new Tuple<string, string, string>("ESTADO", (string.IsNullOrWhiteSpace(base.Estado) ? "" : base.Estado), ""));
- tupleList.Tuples = observableCollection;
- tupleLists.Add(tupleList);
- return tupleLists;
- }
-
- protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
- {
- PropertyChangedEventHandler propertyChangedEventHandler = this.PropertyChanged;
- if (propertyChangedEventHandler == null)
- {
- return;
- }
- propertyChangedEventHandler(this, new PropertyChangedEventArgs(propertyName));
- }
-
- public List<KeyValuePair<string, string>> Validate()
- {
- List<KeyValuePair<string, string>> keyValuePairs = ValidationHelper.AddValue();
- if (string.IsNullOrEmpty(this.Nome))
- {
- keyValuePairs.AddValue<string, string>("Nome", Messages.Obrigatorio, true);
- }
- else if (this.Nome.Length > 100)
- {
- keyValuePairs.AddValue<string, string>("Nome", string.Format(Messages.MaiorQueLimite, 100), true);
- }
- if (!string.IsNullOrEmpty(this.Documento) && !this.Documento.ValidacaoDocumento())
- {
- keyValuePairs.AddValue<string, string>("Documento", Messages.Invalido, true);
- }
- if (!string.IsNullOrWhiteSpace(this.PrimeiroPrefixo) && !this.PrimeiroPrefixo.ValidacaoPrefixo())
- {
- keyValuePairs.AddValue<string, string>("PrimeiroPrefixo|PRIMEIRO DDD", Messages.Invalido, true);
- }
- if (!string.IsNullOrWhiteSpace(this.PrimeiroTelefone) && !this.PrimeiroTelefone.ValidacaoTelefone())
- {
- keyValuePairs.AddValue<string, string>("PrimeiroTelefone|PRIMEIRO TELEFONE", Messages.Invalido, true);
- }
- if (!string.IsNullOrWhiteSpace(this.SegundoPrefixo) && !this.SegundoPrefixo.ValidacaoPrefixo())
- {
- keyValuePairs.AddValue<string, string>("SegundoPrefixo|SEGUNDO DDD", Messages.Invalido, true);
- }
- if (!string.IsNullOrWhiteSpace(this.SegundoTelefone) && !this.SegundoTelefone.ValidacaoTelefone())
- {
- keyValuePairs.AddValue<string, string>("SegundoTelefone|SEGUNDO TELEFONE", Messages.Invalido, true);
- }
- if (!string.IsNullOrEmpty(this.Email) && this.Email.Length > 100)
- {
- keyValuePairs.AddValue<string, string>("Email|E-MAIL", string.Format(Messages.MaiorQueLimite, 100), true);
- }
- if (!string.IsNullOrEmpty(this.Email) && !this.Email.ValidacaoEmail())
- {
- keyValuePairs.AddValue<string, string>("Email|E-MAIL", Messages.Invalido, true);
- }
- if (!string.IsNullOrEmpty(base.Cep) && !base.Cep.ValidacaoCep())
- {
- keyValuePairs.AddValue<string, string>("Cep|CEP", Messages.Invalido, true);
- }
- if (!string.IsNullOrEmpty(base.Estado) && !base.Estado.ValidacaoEstado())
- {
- keyValuePairs.AddValue<string, string>("Estado|ESTADO", Messages.Invalido, true);
- }
- return keyValuePairs;
- }
-
- public event PropertyChangedEventHandler PropertyChanged;
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/Expedicao.cs b/Gestor.Model/Model.Domain.Seguros/Expedicao.cs
deleted file mode 100644
index 5dbd8f3..0000000
--- a/Gestor.Model/Model.Domain.Seguros/Expedicao.cs
+++ /dev/null
@@ -1,94 +0,0 @@
-using Gestor.Model.Domain.Generic;
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Runtime.CompilerServices;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class Expedicao : DomainBase
- {
- public Gestor.Model.Domain.Seguros.Documento Apolice
- {
- get;
- set;
- }
-
- public DateTime? DataAlteracao
- {
- get;
- set;
- }
-
- public DateTime? DataCriacao
- {
- get;
- set;
- }
-
- public DateTime? DataEnvio
- {
- get;
- set;
- }
-
- public DateTime? DataRecebimento
- {
- get;
- set;
- }
-
- public string Destino
- {
- get;
- set;
- }
-
- public string Documento
- {
- get;
- set;
- }
-
- public string Responsavel
- {
- get;
- set;
- }
-
- public long? UsuarioAlteracao
- {
- get;
- set;
- }
-
- public long? UsuarioCriacao
- {
- get;
- set;
- }
-
- public Expedicao()
- {
- }
-
- public List<TupleList> Log()
- {
- List<TupleList> tupleLists = new List<TupleList>();
- TupleList tupleList = new TupleList();
- ObservableCollection<Tuple<string, string, string>> observableCollection = new ObservableCollection<Tuple<string, string, string>>()
- {
- new Tuple<string, string, string>("DOCUMENTO", this.Documento, ""),
- new Tuple<string, string, string>("DESTINO", this.Destino, "")
- };
- DateTime? dataEnvio = this.DataEnvio;
- observableCollection.Add(new Tuple<string, string, string>("DATA ENVIO", dataEnvio.ToString(), ""));
- dataEnvio = this.DataRecebimento;
- observableCollection.Add(new Tuple<string, string, string>("DATA RECEBIMENTO", dataEnvio.ToString(), ""));
- observableCollection.Add(new Tuple<string, string, string>("RESPONSÁVEL", this.Responsavel, ""));
- tupleList.Tuples = observableCollection;
- tupleLists.Add(tupleList);
- return tupleLists;
- }
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/Extrato.cs b/Gestor.Model/Model.Domain.Seguros/Extrato.cs
deleted file mode 100644
index fcf3ccd..0000000
--- a/Gestor.Model/Model.Domain.Seguros/Extrato.cs
+++ /dev/null
@@ -1,177 +0,0 @@
-using Gestor.Model.Common;
-using Gestor.Model.Domain.Generic;
-using Gestor.Model.Helper;
-using Gestor.Model.Resources;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.Runtime.CompilerServices;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class Extrato : DomainBase, IDomain
- {
- private string _numero;
-
- private string _historico;
-
- private string _observacao;
-
- public decimal? Bruto
- {
- get;
- set;
- }
-
- public bool Completo
- {
- get;
- set;
- }
-
- public DateTime? Data
- {
- get;
- set;
- }
-
- public DateTime? DataCredito
- {
- get;
- set;
- }
-
- public string Historico
- {
- get
- {
- string str = this._historico;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._historico = value;
- }
- }
-
- public long IdEmpresa
- {
- get;
- set;
- }
-
- public virtual long IdUsuario
- {
- get;
- set;
- }
-
- public decimal? Ir
- {
- get;
- set;
- }
-
- public decimal? Iss
- {
- get;
- set;
- }
-
- public decimal? Liquido
- {
- get;
- set;
- }
-
- public string Numero
- {
- get
- {
- string str = this._numero;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._numero = value;
- }
- }
-
- public string Observacao
- {
- get
- {
- string str = this._observacao;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._observacao = value;
- }
- }
-
- public decimal? Outro
- {
- get;
- set;
- }
-
- public Gestor.Model.Domain.Seguros.Seguradora Seguradora
- {
- get;
- set;
- }
-
- public bool Selecionado
- {
- get;
- set;
- }
-
- public StatusExtrato Status
- {
- get;
- set;
- }
-
- [JsonIgnore]
- public Func<List<KeyValuePair<string, string>>> ValidationEvent
- {
- get
- {
- Extrato extrato = this;
- return new Func<List<KeyValuePair<string, string>>>(extrato.Validate);
- }
- }
-
- public Extrato()
- {
- }
-
- public List<KeyValuePair<string, string>> Validate()
- {
- List<KeyValuePair<string, string>> keyValuePairs = ValidationHelper.AddValue();
- if (!string.IsNullOrWhiteSpace(this.Numero) && this.Numero.Length > 50)
- {
- keyValuePairs.AddValue<string, string>("Numero", string.Format(Messages.MaiorQueLimite, 50), true);
- }
- if (this.Data.HasValue && (DateTime.Compare(this.Data.Value, new DateTime(1753, 1, 1)) < 0 || DateTime.Compare(this.Data.Value, new DateTime(9999, 12, 31)) > 0))
- {
- keyValuePairs.AddValue<string, string>("Data", string.Format(Messages.DataInvalida, Array.Empty<object>()), true);
- }
- return keyValuePairs;
- }
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/Fabricante.cs b/Gestor.Model/Model.Domain.Seguros/Fabricante.cs
deleted file mode 100644
index b20207d..0000000
--- a/Gestor.Model/Model.Domain.Seguros/Fabricante.cs
+++ /dev/null
@@ -1,62 +0,0 @@
-using Gestor.Model.Domain.Generic;
-using Gestor.Model.Helper;
-using Gestor.Model.Resources;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.Runtime.CompilerServices;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class Fabricante : IDomain
- {
- private string _descricao;
-
- public string Descricao
- {
- get
- {
- string str = this._descricao;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._descricao = value;
- }
- }
-
- public int Id
- {
- get;
- set;
- }
-
- [JsonIgnore]
- public Func<List<KeyValuePair<string, string>>> ValidationEvent
- {
- get
- {
- Fabricante fabricante = this;
- return new Func<List<KeyValuePair<string, string>>>(fabricante.Validate);
- }
- }
-
- public Fabricante()
- {
- }
-
- public List<KeyValuePair<string, string>> Validate()
- {
- List<KeyValuePair<string, string>> keyValuePairs = ValidationHelper.AddValue();
- if (!string.IsNullOrWhiteSpace(this.Descricao) && this.Descricao.Length > 150)
- {
- keyValuePairs.AddValue<string, string>("Descricao", string.Format(Messages.MaiorQueLimite, 150), true);
- }
- return keyValuePairs;
- }
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/Granizo.cs b/Gestor.Model/Model.Domain.Seguros/Granizo.cs
deleted file mode 100644
index 8f6036c..0000000
--- a/Gestor.Model/Model.Domain.Seguros/Granizo.cs
+++ /dev/null
@@ -1,247 +0,0 @@
-using Gestor.Model.Domain.Generic;
-using Gestor.Model.Helper;
-using Gestor.Model.Resources;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Globalization;
-using System.Runtime.CompilerServices;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class Granizo : EnderecoBase, IDomain
- {
- private string _cultura;
-
- private string _sitio;
-
- private string _observacao;
-
- public string Area
- {
- get;
- set;
- }
-
- public string Cultura
- {
- get
- {
- string str = this._cultura;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._cultura = value;
- }
- }
-
- public Gestor.Model.Domain.Seguros.Item Item
- {
- get;
- set;
- }
-
- public string Observacao
- {
- get
- {
- string str = this._observacao;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._observacao = value;
- }
- }
-
- public string Sitio
- {
- get
- {
- string str = this._sitio;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._sitio = value;
- }
- }
-
- public decimal? SubsidioEstadual
- {
- get;
- set;
- }
-
- public decimal? SubsidioFederal
- {
- get;
- set;
- }
-
- [JsonIgnore]
- public Func<List<KeyValuePair<string, string>>> ValidationEvent
- {
- get
- {
- Granizo granizo = this;
- return new Func<List<KeyValuePair<string, string>>>(granizo.Validate);
- }
- }
-
- public Granizo()
- {
- }
-
- public static List<TupleList> Log(Gestor.Model.Domain.Seguros.Item item)
- {
- decimal valueOrDefault;
- string str;
- string str1;
- List<TupleList> tupleLists = new List<TupleList>();
- TupleList tupleList = new TupleList();
- ObservableCollection<Tuple<string, string, string>> observableCollection = new ObservableCollection<Tuple<string, string, string>>()
- {
- new Tuple<string, string, string>("CEP", (string.IsNullOrWhiteSpace(item.Granizo.Cep) ? "" : item.Granizo.Cep), ""),
- new Tuple<string, string, string>("ENDEREÇO", (string.IsNullOrWhiteSpace(item.Granizo.Endereco) ? "" : item.Granizo.Endereco.ToUpper()), ""),
- new Tuple<string, string, string>("NÚMERO", (string.IsNullOrWhiteSpace(item.Granizo.Numero) ? "" : item.Granizo.Numero), ""),
- new Tuple<string, string, string>("COMPLEMENTO", (string.IsNullOrWhiteSpace(item.Granizo.Complemento) ? "" : item.Granizo.Complemento.ToUpper()), ""),
- new Tuple<string, string, string>("BAIRRO", (string.IsNullOrWhiteSpace(item.Granizo.Bairro) ? "" : item.Granizo.Bairro.ToUpper()), ""),
- new Tuple<string, string, string>("CIDADE", (string.IsNullOrWhiteSpace(item.Granizo.Cidade) ? "" : item.Granizo.Cidade.ToUpper()), ""),
- new Tuple<string, string, string>("ESTADO", (string.IsNullOrWhiteSpace(item.Granizo.Estado) ? "" : item.Granizo.Estado.ToUpper()), ""),
- new Tuple<string, string, string>("CULTURA", (string.IsNullOrWhiteSpace(item.Granizo.Cultura) ? "" : item.Granizo.Cultura.ToUpper()), ""),
- new Tuple<string, string, string>("SÍTIO", (string.IsNullOrWhiteSpace(item.Granizo.Sitio) ? "" : item.Granizo.Sitio.ToUpper()), "")
- };
- decimal? subsidioFederal = item.Granizo.SubsidioFederal;
- if (!subsidioFederal.HasValue)
- {
- str = "";
- }
- else
- {
- subsidioFederal = item.Granizo.SubsidioFederal;
- if (subsidioFederal.HasValue)
- {
- valueOrDefault = subsidioFederal.GetValueOrDefault();
- str = valueOrDefault.ToString("C", new CultureInfo("pt-BR", false));
- }
- else
- {
- str = null;
- }
- }
- observableCollection.Add(new Tuple<string, string, string>("SUBSÍDIO FEDERAL", str, ""));
- subsidioFederal = item.Granizo.SubsidioEstadual;
- if (!subsidioFederal.HasValue)
- {
- str1 = "";
- }
- else
- {
- subsidioFederal = item.Granizo.SubsidioEstadual;
- if (subsidioFederal.HasValue)
- {
- valueOrDefault = subsidioFederal.GetValueOrDefault();
- str1 = valueOrDefault.ToString("C", new CultureInfo("pt-BR", false));
- }
- else
- {
- str1 = null;
- }
- }
- observableCollection.Add(new Tuple<string, string, string>("SUBSÍDIO ESTADUAL", str1, ""));
- observableCollection.Add(new Tuple<string, string, string>("OBSERVAÇÕES", (string.IsNullOrWhiteSpace(item.Granizo.Observacao) ? "" : item.Granizo.Observacao.ToUpper()), ""));
- tupleList.Tuples = observableCollection;
- tupleLists.Add(tupleList);
- List<TupleList> tupleLists1 = tupleLists;
- ObservableCollection<Tuple<string, string, string>> observableCollection1 = new ObservableCollection<Tuple<string, string, string>>()
- {
- new Tuple<string, string, string>("COBERTURAS$", "", "")
- };
- foreach (Cobertura cobertura in item.Coberturas)
- {
- observableCollection1.Add(new Tuple<string, string, string>(string.Format(" COBERTURA {0}$", item.Coberturas.IndexOf(cobertura) + 1), "", ""));
- observableCollection1.Add(new Tuple<string, string, string>(" OBSERVAÇÃO", (string.IsNullOrWhiteSpace(cobertura.Observacao) ? "" : cobertura.Observacao.ToUpper()), ""));
- valueOrDefault = cobertura.Premio;
- observableCollection1.Add(new Tuple<string, string, string>(" PRÊMIO", valueOrDefault.ToString("C", new CultureInfo("pt-BR", false)), ""));
- valueOrDefault = cobertura.Franquia;
- observableCollection1.Add(new Tuple<string, string, string>(" FRANQUIA", valueOrDefault.ToString("C", new CultureInfo("pt-BR", false)), ""));
- valueOrDefault = cobertura.Lmi;
- observableCollection1.Add(new Tuple<string, string, string>(" L.M.I.", valueOrDefault.ToString("C", new CultureInfo("pt-BR", false)), ""));
- }
- tupleLists1.Add(new TupleList()
- {
- Tuples = observableCollection1
- });
- return tupleLists1;
- }
-
- public List<KeyValuePair<string, string>> Validate()
- {
- List<KeyValuePair<string, string>> keyValuePairs = ValidationHelper.AddValue();
- if (string.IsNullOrWhiteSpace(base.Cep))
- {
- keyValuePairs.AddValue<string, string>("Cep", Messages.Obrigatorio, true);
- }
- else if (!base.Cep.ValidacaoCep())
- {
- keyValuePairs.AddValue<string, string>("Cep", Messages.Invalido, true);
- }
- if (string.IsNullOrWhiteSpace(this.Cultura))
- {
- keyValuePairs.AddValue<string, string>("Cultura", Messages.Obrigatorio, true);
- }
- if (!string.IsNullOrWhiteSpace(this.Cultura) && this.Cultura.Length > 60)
- {
- keyValuePairs.AddValue<string, string>("Cultura", string.Format(Messages.MaiorQueLimite, 60), true);
- }
- if (string.IsNullOrWhiteSpace(this.Sitio))
- {
- keyValuePairs.AddValue<string, string>("Sitio", Messages.Obrigatorio, true);
- }
- if (!string.IsNullOrWhiteSpace(this.Sitio) && this.Sitio.Length > 100)
- {
- keyValuePairs.AddValue<string, string>("Sitio", string.Format(Messages.MaiorQueLimite, 100), true);
- }
- if (string.IsNullOrWhiteSpace(base.Endereco))
- {
- keyValuePairs.AddValue<string, string>("Endereco", Messages.Obrigatorio, true);
- }
- if (string.IsNullOrWhiteSpace(base.Numero))
- {
- keyValuePairs.AddValue<string, string>("Numero", Messages.Obrigatorio, true);
- }
- if (string.IsNullOrWhiteSpace(base.Bairro))
- {
- keyValuePairs.AddValue<string, string>("Bairro", Messages.Obrigatorio, true);
- }
- if (string.IsNullOrWhiteSpace(base.Cidade))
- {
- keyValuePairs.AddValue<string, string>("Cidade", Messages.Obrigatorio, true);
- }
- if (string.IsNullOrWhiteSpace(base.Estado))
- {
- keyValuePairs.AddValue<string, string>("Estado", Messages.Obrigatorio, true);
- }
- else if (!base.Estado.ValidacaoEstado())
- {
- keyValuePairs.AddValue<string, string>("Estado", Messages.Invalido, true);
- }
- return keyValuePairs;
- }
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/Item.cs b/Gestor.Model/Model.Domain.Seguros/Item.cs
deleted file mode 100644
index 7adcea9..0000000
--- a/Gestor.Model/Model.Domain.Seguros/Item.cs
+++ /dev/null
@@ -1,505 +0,0 @@
-using Gestor.Model.Common;
-using Gestor.Model.Domain.Generic;
-using Gestor.Model.Helper;
-using Gestor.Model.Resources;
-using Newtonsoft.Json;
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Runtime.CompilerServices;
-using System.Threading;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class Item : DomainBase, IDomain, INotifyPropertyChanged
- {
- private bool _selecionado;
-
- private string _descricao;
-
- private string _status;
-
- private string _statusInclusao;
-
- private string _observacao;
-
- private string _valorCredito;
-
- private bool _config = true;
-
- private bool _fabricanteBranco;
-
- public Gestor.Model.Domain.Seguros.Aeronautico Aeronautico
- {
- get;
- set;
- }
-
- public Gestor.Model.Domain.Seguros.Auto Auto
- {
- get;
- set;
- }
-
- public bool Cancelado
- {
- get;
- set;
- }
-
- public IList<Cobertura> Coberturas
- {
- get;
- set;
- }
-
- public Gestor.Model.Domain.Seguros.Consorcio Consorcio
- {
- get;
- set;
- }
-
- public string Descricao
- {
- get
- {
- string str = this._descricao;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._descricao = value;
- }
- }
-
- public Gestor.Model.Domain.Seguros.Documento Documento
- {
- get;
- set;
- }
-
- public long? Endosso
- {
- get;
- set;
- }
-
- public Gestor.Model.Domain.Seguros.Granizo Granizo
- {
- get;
- set;
- }
-
- public long? IdDocumentoCancelado
- {
- get;
- set;
- }
-
- public string Observacao
- {
- get
- {
- string str = this._observacao;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._observacao = value;
- }
- }
-
- public int? Ordem
- {
- get;
- set;
- }
-
- public Gestor.Model.Domain.Seguros.Patrimonial Patrimonial
- {
- get;
- set;
- }
-
- public Gestor.Model.Domain.Seguros.RiscosDiversos RiscosDiversos
- {
- get;
- set;
- }
-
- public bool Selecionado
- {
- get
- {
- return this._selecionado;
- }
- set
- {
- if (value == this._selecionado)
- {
- return;
- }
- this._selecionado = value;
- this.OnPropertyChanged("Selecionado");
- }
- }
-
- public bool Sinistrado
- {
- get;
- set;
- }
-
- public Gestor.Model.Domain.Seguros.Sinistro Sinistro
- {
- get;
- set;
- }
-
- public IList<ControleSinistro> Sinistros
- {
- get;
- set;
- }
-
- public string Status
- {
- get
- {
- string str = this._status;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._status = value;
- }
- }
-
- public string StatusInclusao
- {
- get
- {
- string str = this._statusInclusao;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._statusInclusao = value;
- }
- }
-
- public long? Substituicao
- {
- get;
- set;
- }
-
- public long? Substituido
- {
- get;
- set;
- }
-
- public Gestor.Model.Common.TipoEndosso? TipoEndosso
- {
- get;
- set;
- }
-
- public IList<TitularesVida> Titulares
- {
- get;
- set;
- }
-
- [JsonIgnore]
- public Func<List<KeyValuePair<string, string>>> ValidationEvent
- {
- get
- {
- Item item = this;
- return new Func<List<KeyValuePair<string, string>>>(item.Validate);
- }
- }
-
- public Gestor.Model.Domain.Seguros.Vida Vida
- {
- get;
- set;
- }
-
- public Item()
- {
- }
-
- protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
- {
- PropertyChangedEventHandler propertyChangedEventHandler = this.PropertyChanged;
- if (propertyChangedEventHandler == null)
- {
- return;
- }
- propertyChangedEventHandler(this, new PropertyChangedEventArgs(propertyName));
- }
-
- public List<KeyValuePair<string, string>> Validate(bool config, bool fabricanteBranco = false)
- {
- this._config = config;
- this._fabricanteBranco = fabricanteBranco;
- return this.Validate();
- }
-
- public List<KeyValuePair<string, string>> Validate()
- {
- List<KeyValuePair<string, string>> keyValuePairs = ValidationHelper.AddValue();
- int? ordem = this.Ordem;
- if (ordem.HasValue)
- {
- ordem = this.Ordem;
- if (!(ordem.GetValueOrDefault() == 0 & ordem.HasValue))
- {
- goto Label0;
- }
- }
- keyValuePairs.AddValue<string, string>("Ordem", Messages.Invalido, true);
- if (string.IsNullOrWhiteSpace(this.Descricao))
- {
- keyValuePairs.AddValue<string, string>("Descricao", Messages.Obrigatorio, true);
- }
- else if (this.Descricao.Length > 250)
- {
- keyValuePairs.AddValue<string, string>("Descricao", string.Format(Messages.MaiorQueLimite, 250), true);
- }
- if (this.Documento == null)
- {
- return keyValuePairs;
- }
- long id = this.Documento.Controle.Ramo.Id;
- if (id > (long)38)
- {
- if (id == (long)47 || id == (long)53 || id == (long)66)
- {
- goto Label1;
- }
- goto Label2;
- }
- else
- {
- long num = id - (long)1;
- if (num <= (long)19)
- {
- switch ((uint)num)
- {
- case 0:
- case 1:
- case 2:
- case 14:
- case 17:
- {
- goto Label4;
- }
- case 3:
- case 7:
- case 10:
- case 11:
- case 13:
- case 15:
- case 16:
- case 18:
- {
- goto Label2;
- }
- case 4:
- {
- goto Label5;
- }
- case 5:
- case 6:
- case 8:
- case 9:
- {
- goto Label1;
- }
- case 12:
- {
- if (this.Aeronautico != null)
- {
- keyValuePairs.AddRange(this.Aeronautico.Validate());
- return keyValuePairs;
- }
- else
- {
- keyValuePairs.AddValue<string, string>("Aeronautico", Messages.Obrigatorio, true);
- return keyValuePairs;
- }
- }
- case 19:
- {
- if (this.Granizo != null)
- {
- keyValuePairs.AddRange(this.Granizo.Validate());
- return keyValuePairs;
- }
- else
- {
- keyValuePairs.AddValue<string, string>("Granizo", Messages.Obrigatorio, true);
- return keyValuePairs;
- }
- }
- }
- }
- else
- {
- }
- long num1 = id - (long)30;
- if (num1 <= (long)8)
- {
- switch ((uint)num1)
- {
- case 0:
- {
- break;
- }
- case 1:
- {
- if (this.RiscosDiversos != null)
- {
- keyValuePairs.AddRange(this.RiscosDiversos.Validate());
- }
- else
- {
- keyValuePairs.AddValue<string, string>("RiscosDiversos", Messages.Obrigatorio, true);
- }
- if (this.Titulares == null || this.Titulares.Count <= 0)
- {
- return keyValuePairs;
- }
- using (IEnumerator<TitularesVida> enumerator = this.Titulares.GetEnumerator())
- {
- while (enumerator.MoveNext())
- {
- keyValuePairs.AddRange(enumerator.Current.Validate());
- }
- return keyValuePairs;
- }
- break;
- }
- case 6:
- {
- if (this.Consorcio != null)
- {
- keyValuePairs.AddRange(this.Consorcio.Validate());
- return keyValuePairs;
- }
- else
- {
- keyValuePairs.AddValue<string, string>("Consorcio", Messages.Obrigatorio, true);
- return keyValuePairs;
- }
- }
- case 7:
- {
- goto Label5;
- }
- case 8:
- {
- if (this.Patrimonial != null)
- {
- keyValuePairs.AddRange(this.Patrimonial.ValidateGarantia());
- return keyValuePairs;
- }
- else
- {
- keyValuePairs.AddValue<string, string>("Patrimonial", Messages.Obrigatorio, true);
- return keyValuePairs;
- }
- }
- default:
- {
- goto Label2;
- }
- }
- }
- else
- {
- goto Label2;
- }
- Label4:
- if (this.Patrimonial != null)
- {
- keyValuePairs.AddRange(this.Patrimonial.Validate());
- }
- else
- {
- keyValuePairs.AddValue<string, string>("Patrimonial", Messages.Obrigatorio, true);
- }
- }
- return keyValuePairs;
- Label1:
- if (this.Vida != null)
- {
- keyValuePairs.AddRange(this.Vida.Validate());
- }
- else
- {
- keyValuePairs.AddValue<string, string>("Vida", Messages.Obrigatorio, true);
- }
- if (this.Titulares != null && this.Titulares.Count > 0 && this.Documento.Controle.Ramo.Id != (long)6)
- {
- using (enumerator = this.Titulares.GetEnumerator())
- {
- while (enumerator.MoveNext())
- {
- keyValuePairs.AddRange(enumerator.Current.Validate());
- }
- return keyValuePairs;
- }
- }
- else
- {
- return keyValuePairs;
- }
- Label2:
- if (this.RiscosDiversos != null)
- {
- keyValuePairs.AddRange(this.RiscosDiversos.Validate());
- return keyValuePairs;
- }
- else
- {
- keyValuePairs.AddValue<string, string>("RiscosDiversos", Messages.Obrigatorio, true);
- return keyValuePairs;
- }
- Label5:
- if (this.Auto != null)
- {
- keyValuePairs.AddRange(this.Auto.Validate(this._config, this._fabricanteBranco));
- return keyValuePairs;
- }
- else
- {
- keyValuePairs.AddValue<string, string>("Auto", Messages.Obrigatorio, true);
- return keyValuePairs;
- }
- }
-
- public event PropertyChangedEventHandler PropertyChanged;
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/MaisContato.cs b/Gestor.Model/Model.Domain.Seguros/MaisContato.cs
deleted file mode 100644
index 6266547..0000000
--- a/Gestor.Model/Model.Domain.Seguros/MaisContato.cs
+++ /dev/null
@@ -1,340 +0,0 @@
-using Gestor.Model.Attributes;
-using Gestor.Model.Common;
-using Gestor.Model.Domain.Common;
-using Gestor.Model.Domain.Generic;
-using Gestor.Model.Helper;
-using Gestor.Model.Resources;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.Runtime.CompilerServices;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class MaisContato : DomainBase, IDomain
- {
- private string _nome;
-
- private string _documento;
-
- private string _identidade;
-
- private string _prefixo;
-
- private string _telefone;
-
- private string _email;
-
- private string _habilitacao;
-
- private string _banco;
-
- private string _agencia;
-
- private string _conta;
-
- [Log(true)]
- public string Agencia
- {
- get
- {
- string str = this._agencia;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._agencia = value;
- }
- }
-
- public string Banco
- {
- get
- {
- string str = this._banco;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._banco = value;
- }
- }
-
- public Gestor.Model.Domain.Seguros.Cliente Cliente
- {
- get;
- set;
- }
-
- [Log(true)]
- public string Conta
- {
- get
- {
- string str = this._conta;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._conta = value;
- }
- }
-
- [Log(true)]
- public string Documento
- {
- get
- {
- string str = this._documento;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._documento = value;
- }
- }
-
- [Log(true)]
- public string Email
- {
- get
- {
- string str = this._email;
- if (str == null)
- {
- return null;
- }
- return str.ToLower().Trim();
- }
- set
- {
- this._email = value;
- }
- }
-
- public bool Excluido
- {
- get;
- set;
- }
-
- [Log(true)]
- public DateTime? Expedicao
- {
- get;
- set;
- }
-
- [Log(true)]
- public string Habilitacao
- {
- get
- {
- string str = this._habilitacao;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._habilitacao = value;
- }
- }
-
- [Log(true)]
- public string Identidade
- {
- get
- {
- string str = this._identidade;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._identidade = value;
- }
- }
-
- [Log(true)]
- public DateTime? Nascimento
- {
- get;
- set;
- }
-
- [Log(true)]
- public string Nome
- {
- get
- {
- string str = this._nome;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._nome = value;
- }
- }
-
- [Log(true)]
- public Gestor.Model.Common.Parentesco? Parentesco
- {
- get;
- set;
- }
-
- [Log(true)]
- public string Prefixo
- {
- get
- {
- string str = this._prefixo;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._prefixo = value;
- }
- }
-
- [Log(true)]
- public DateTime? PrimeiraHabilitacao
- {
- get;
- set;
- }
-
- [Log(true)]
- public Gestor.Model.Domain.Common.Profissao Profissao
- {
- get;
- set;
- }
-
- [Log(true)]
- public string Telefone
- {
- get
- {
- string str = this._telefone;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._telefone = value;
- }
- }
-
- public TipoTelefone? Tipo
- {
- get;
- set;
- }
-
- [JsonIgnore]
- public Func<List<KeyValuePair<string, string>>> ValidationEvent
- {
- get
- {
- MaisContato maisContato = this;
- return new Func<List<KeyValuePair<string, string>>>(maisContato.Validate);
- }
- }
-
- public MaisContato()
- {
- }
-
- public List<KeyValuePair<string, string>> Validate()
- {
- List<KeyValuePair<string, string>> keyValuePairs = ValidationHelper.AddValue();
- if (!string.IsNullOrWhiteSpace(this.Nome) && this.Nome.Length > 90)
- {
- keyValuePairs.AddValue<string, string>("Nome", string.Format(Messages.MaiorQueLimite, 90), true);
- }
- if (this.PrimeiraHabilitacao.HasValue && (DateTime.Compare(this.PrimeiraHabilitacao.Value, new DateTime(1753, 1, 1)) < 0 || DateTime.Compare(this.PrimeiraHabilitacao.Value, new DateTime(9999, 12, 31)) > 0))
- {
- keyValuePairs.AddValue<string, string>("PrimeiraHabilitacao|PRIMEIRA HABILITAÇÃO", string.Format(Messages.DataInvalida, Array.Empty<object>()), true);
- }
- if (this.Expedicao.HasValue && (DateTime.Compare(this.Expedicao.Value, new DateTime(1753, 1, 1)) < 0 || DateTime.Compare(this.Expedicao.Value, new DateTime(9999, 12, 31)) > 0))
- {
- keyValuePairs.AddValue<string, string>("Expedicao|EXPEDIÇÃO", string.Format(Messages.DataInvalida, Array.Empty<object>()), true);
- }
- if (this.Nascimento.HasValue && (DateTime.Compare(this.Nascimento.Value, new DateTime(1753, 1, 1)) < 0 || DateTime.Compare(this.Nascimento.Value, new DateTime(9999, 12, 31)) > 0))
- {
- keyValuePairs.AddValue<string, string>("Nascimento", string.Format(Messages.DataInvalida, Array.Empty<object>()), true);
- }
- if (!string.IsNullOrWhiteSpace(this.Documento) && this.Documento.Length > 30)
- {
- keyValuePairs.AddValue<string, string>("Documento", string.Format(Messages.MaiorQueLimite, 30), true);
- }
- if (!string.IsNullOrWhiteSpace(this.Identidade) && this.Identidade.Length > 40)
- {
- keyValuePairs.AddValue<string, string>("Identidade", string.Format(Messages.MaiorQueLimite, 40), true);
- }
- if (!string.IsNullOrWhiteSpace(this.Prefixo) && this.Prefixo.Length > 6)
- {
- keyValuePairs.AddValue<string, string>("Prefixo", string.Format(Messages.MaiorQueLimite, 6), true);
- }
- if (!string.IsNullOrWhiteSpace(this.Telefone) && this.Telefone.Length > 11)
- {
- keyValuePairs.AddValue<string, string>("Telefone", string.Format(Messages.MaiorQueLimite, 11), true);
- }
- if (!string.IsNullOrWhiteSpace(this.Email) && this.Email.Length > 80)
- {
- keyValuePairs.AddValue<string, string>("Email|E-MAIL", string.Format(Messages.MaiorQueLimite, 80), true);
- }
- if (!string.IsNullOrWhiteSpace(this.Habilitacao) && this.Habilitacao.Length > 40)
- {
- keyValuePairs.AddValue<string, string>("Habilitacao|HABILITAÇÃO", string.Format(Messages.MaiorQueLimite, 40), true);
- }
- if (!string.IsNullOrWhiteSpace(this.Banco) && this.Banco.Length > 15)
- {
- keyValuePairs.AddValue<string, string>("Banco", string.Format(Messages.MaiorQueLimite, 15), true);
- }
- if (!string.IsNullOrWhiteSpace(this.Agencia) && this.Agencia.Length > 15)
- {
- keyValuePairs.AddValue<string, string>("Agencia|AGÊNCIA", string.Format(Messages.MaiorQueLimite, 15), true);
- }
- if (!string.IsNullOrWhiteSpace(this.Conta) && this.Conta.Length > 20)
- {
- keyValuePairs.AddValue<string, string>("Conta", string.Format(Messages.MaiorQueLimite, 20), true);
- }
- return keyValuePairs;
- }
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/MetaSeguradora.cs b/Gestor.Model/Model.Domain.Seguros/MetaSeguradora.cs
deleted file mode 100644
index 4b628e7..0000000
--- a/Gestor.Model/Model.Domain.Seguros/MetaSeguradora.cs
+++ /dev/null
@@ -1,60 +0,0 @@
-using Gestor.Model.Common;
-using Gestor.Model.Domain.Generic;
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Runtime.CompilerServices;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class MetaSeguradora : DomainBase
- {
- public long Ano
- {
- get;
- set;
- }
-
- public Gestor.Model.Common.Mes Mes
- {
- get;
- set;
- }
-
- public bool Recorrente { get; set; } = true;
-
- public Gestor.Model.Domain.Seguros.Seguradora Seguradora
- {
- get;
- set;
- }
-
- public int TipoCalculo { get; set; } = 1;
-
- public decimal Valor
- {
- get;
- set;
- }
-
- public MetaSeguradora()
- {
- }
-
- public List<TupleList> Log()
- {
- List<TupleList> tupleLists = new List<TupleList>();
- TupleList tupleList = new TupleList();
- ObservableCollection<Tuple<string, string, string>> observableCollection = new ObservableCollection<Tuple<string, string, string>>();
- decimal valor = this.Valor;
- observableCollection.Add(new Tuple<string, string, string>("VALOR DA META", valor.ToString(), ""));
- Gestor.Model.Common.Mes mes = this.Mes;
- observableCollection.Add(new Tuple<string, string, string>("MÊS", mes.ToString(), ""));
- long ano = this.Ano;
- observableCollection.Add(new Tuple<string, string, string>("ANO", ano.ToString(), ""));
- tupleList.Tuples = observableCollection;
- tupleLists.Add(tupleList);
- return tupleLists;
- }
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/MetaVendedor.cs b/Gestor.Model/Model.Domain.Seguros/MetaVendedor.cs
deleted file mode 100644
index 6483feb..0000000
--- a/Gestor.Model/Model.Domain.Seguros/MetaVendedor.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-using Gestor.Model.Common;
-using Gestor.Model.Domain.Generic;
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Runtime.CompilerServices;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class MetaVendedor : DomainBase
- {
- public long Ano
- {
- get;
- set;
- }
-
- public Gestor.Model.Common.Mes Mes
- {
- get;
- set;
- }
-
- public decimal Valor
- {
- get;
- set;
- }
-
- public Gestor.Model.Domain.Seguros.Vendedor Vendedor
- {
- get;
- set;
- }
-
- public MetaVendedor()
- {
- }
-
- public List<TupleList> Log()
- {
- List<TupleList> tupleLists = new List<TupleList>();
- TupleList tupleList = new TupleList();
- ObservableCollection<Tuple<string, string, string>> observableCollection = new ObservableCollection<Tuple<string, string, string>>();
- decimal valor = this.Valor;
- observableCollection.Add(new Tuple<string, string, string>("VALOR DA META", valor.ToString("c2"), ""));
- Gestor.Model.Common.Mes mes = this.Mes;
- observableCollection.Add(new Tuple<string, string, string>("MÊS", mes.ToString(), ""));
- long ano = this.Ano;
- observableCollection.Add(new Tuple<string, string, string>("ANO", ano.ToString(), ""));
- tupleList.Tuples = observableCollection;
- tupleLists.Add(tupleList);
- return tupleLists;
- }
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/Parceiro.cs b/Gestor.Model/Model.Domain.Seguros/Parceiro.cs
deleted file mode 100644
index 16bbdaf..0000000
--- a/Gestor.Model/Model.Domain.Seguros/Parceiro.cs
+++ /dev/null
@@ -1,528 +0,0 @@
-using Gestor.Model.Attributes;
-using Gestor.Model.Common;
-using Gestor.Model.Domain.Generic;
-using Gestor.Model.Helper;
-using Gestor.Model.Resources;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel;
-using System.Linq;
-using System.Runtime.CompilerServices;
-using System.Text.RegularExpressions;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class Parceiro : DomainBase, IDomain
- {
- private string _nome;
-
- private string _cep;
-
- private string _endereco;
-
- private string _numero;
-
- private string _complemento;
-
- private string _bairro;
-
- private string _cidade;
-
- private string _uf;
-
- private string _cgccpf;
-
- private string _contato;
-
- private string _email;
-
- private string _ddd1;
-
- private string _telefone1;
-
- private string _ddd2;
-
- private string _telefone2;
-
- private string _ddd3;
-
- private string _telefone3;
-
- private string _obs;
-
- [Log(true)]
- public string Bairro
- {
- get
- {
- string str = this._bairro;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._bairro = value;
- }
- }
-
- [Log(true)]
- public string Cep
- {
- get
- {
- if (this._cep == null || !Regex.IsMatch(this._cep, "[0-9]+"))
- {
- return "";
- }
- return this._cep.Trim();
- }
- set
- {
- this._cep = value;
- }
- }
-
- [Description("DOCUMENTO")]
- [Log(true)]
- public string Cgccpf
- {
- get
- {
- string str = this._cgccpf;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._cgccpf = value;
- }
- }
-
- [Log(true)]
- public string Cidade
- {
- get
- {
- string str = this._cidade;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._cidade = value;
- }
- }
-
- [Log(true)]
- public string Complemento
- {
- get
- {
- string str = this._complemento;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._complemento = value;
- }
- }
-
- [Log(true)]
- public string Contato
- {
- get
- {
- string str = this._contato;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._contato = value;
- }
- }
-
- [Description("PREFIXO 1")]
- [Log(true)]
- public string Ddd1
- {
- get
- {
- string str = this._ddd1;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._ddd1 = value;
- }
- }
-
- [Description("PREFIXO 2")]
- [Log(true)]
- public string Ddd2
- {
- get
- {
- string str = this._ddd2;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._ddd2 = value;
- }
- }
-
- [Description("PREFIXO 3")]
- [Log(true)]
- public string Ddd3
- {
- get
- {
- string str = this._ddd3;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._ddd3 = value;
- }
- }
-
- [Log(true)]
- public string Email
- {
- get
- {
- string str = this._email;
- if (str == null)
- {
- return null;
- }
- return str.ToLower().Trim();
- }
- set
- {
- this._email = value;
- }
- }
-
- [Log(true)]
- public string Endereco
- {
- get
- {
- string str = this._endereco;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._endereco = value;
- }
- }
-
- [Log(true)]
- [Name(true)]
- public string Nome
- {
- get
- {
- string str = this._nome;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._nome = value;
- }
- }
-
- [Description("NÚMERO")]
- [Log(true)]
- public string Numero
- {
- get
- {
- string str = this._numero;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._numero = value;
- }
- }
-
- [Description("OBSERVAÇÃO")]
- [Log(true)]
- public string Obs
- {
- get
- {
- string str = this._obs;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._obs = value;
- }
- }
-
- [Description("TELEFONE 1")]
- [Log(true)]
- public string Telefone1
- {
- get
- {
- string str = this._telefone1;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._telefone1 = value;
- }
- }
-
- [Description("TELEFONE 2")]
- [Log(true)]
- public string Telefone2
- {
- get
- {
- string str = this._telefone2;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._telefone2 = value;
- }
- }
-
- [Description("TELEFONE 3")]
- [Log(true)]
- public string Telefone3
- {
- get
- {
- string str = this._telefone3;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._telefone3 = value;
- }
- }
-
- public Gestor.Model.Common.TipoPerda? TipoPerda
- {
- get;
- set;
- }
-
- [Description("ESTADO")]
- [Log(true)]
- public string Uf
- {
- get
- {
- string str = this._uf;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._uf = value;
- }
- }
-
- [JsonIgnore]
- public Func<List<KeyValuePair<string, string>>> ValidationEvent
- {
- get
- {
- Parceiro parceiro = this;
- return new Func<List<KeyValuePair<string, string>>>(parceiro.Validate);
- }
- }
-
- public Parceiro()
- {
- }
-
- public List<TupleList> Log()
- {
- return new List<TupleList>()
- {
- new TupleList()
- {
- Tuples = new ObservableCollection<Tuple<string, string, string>>()
- {
- new Tuple<string, string, string>("NOME", (string.IsNullOrWhiteSpace(this.Nome) ? "" : this.Nome), ""),
- new Tuple<string, string, string>("DOCUMENTO", (string.IsNullOrWhiteSpace(this.Cgccpf) ? "" : this.Cgccpf), ""),
- new Tuple<string, string, string>("PRIMEIRO PREFIXO", (string.IsNullOrWhiteSpace(this.Ddd1) ? "" : this.Ddd1), ""),
- new Tuple<string, string, string>("PRIMEIRO TELEFONE", (string.IsNullOrWhiteSpace(this.Telefone1) ? "" : this.Telefone1), ""),
- new Tuple<string, string, string>("SEGUNDO PREFIXO", (string.IsNullOrWhiteSpace(this.Ddd2) ? "" : this.Ddd2), ""),
- new Tuple<string, string, string>("SEGUNDO TELEFONE", (string.IsNullOrWhiteSpace(this.Telefone2) ? "" : this.Telefone2), ""),
- new Tuple<string, string, string>("TERCEIRO PREFIXO", (string.IsNullOrWhiteSpace(this.Ddd3) ? "" : this.Ddd3), ""),
- new Tuple<string, string, string>("TERCEIRO TELEFONE", (string.IsNullOrWhiteSpace(this.Telefone3) ? "" : this.Telefone3), ""),
- new Tuple<string, string, string>("E-MAIL", (string.IsNullOrWhiteSpace(this.Email) ? "" : this.Email), ""),
- new Tuple<string, string, string>("CEP", (string.IsNullOrWhiteSpace(this.Cep) ? "" : this.Cep), ""),
- new Tuple<string, string, string>("ENDEREÇO", (string.IsNullOrWhiteSpace(this.Endereco) ? "" : this.Endereco), ""),
- new Tuple<string, string, string>("NÚMERO", (string.IsNullOrWhiteSpace(this.Numero) ? "" : this.Numero), ""),
- new Tuple<string, string, string>("COMPLEMENTO", (string.IsNullOrWhiteSpace(this.Complemento) ? "" : this.Complemento), ""),
- new Tuple<string, string, string>("BAIRRO", (string.IsNullOrWhiteSpace(this.Bairro) ? "" : this.Bairro), ""),
- new Tuple<string, string, string>("CIDADE", (string.IsNullOrWhiteSpace(this.Cidade) ? "" : this.Cidade), ""),
- new Tuple<string, string, string>("ESTADO", (string.IsNullOrWhiteSpace(this.Uf) ? "" : this.Uf), "")
- }
- }
- };
- }
-
- public List<KeyValuePair<string, string>> Validate()
- {
- int num;
- int? nullable;
- bool flag;
- List<KeyValuePair<string, string>> keyValuePairs = ValidationHelper.AddValue();
- string nome = this.Nome;
- if (nome != null)
- {
- nullable = new int?((int)nome.Trim().Split(new char[] { ' ' }).Length);
- }
- else
- {
- nullable = null;
- }
- if (!nullable.HasValue)
- {
- keyValuePairs.AddValue<string, string>("Nome", Messages.Obrigatorio, true);
- }
- else if (this.Nome.Length > 100)
- {
- keyValuePairs.AddValue<string, string>("Nome", string.Format(Messages.MaiorQueLimite, 100), true);
- }
- if (!string.IsNullOrEmpty(this.Cgccpf) && !this.Cgccpf.ValidacaoDocumento())
- {
- keyValuePairs.AddValue<string, string>("Cgccpf", Messages.Invalido, true);
- }
- if (!string.IsNullOrWhiteSpace(this.Ddd1) && !this.Ddd1.ValidacaoPrefixo())
- {
- keyValuePairs.AddValue<string, string>("Ddd1|PRIMEIRO DDD", Messages.Invalido, true);
- }
- if (!string.IsNullOrWhiteSpace(this.Telefone1) && !this.Telefone1.ValidacaoTelefone())
- {
- keyValuePairs.AddValue<string, string>("Telefone1|PRIMEIRO TELEFONE", Messages.Invalido, true);
- }
- if (!string.IsNullOrWhiteSpace(this.Ddd2) && !this.Ddd2.ValidacaoPrefixo())
- {
- keyValuePairs.AddValue<string, string>("Ddd2|SEGUNDO DDD", Messages.Invalido, true);
- }
- if (!string.IsNullOrWhiteSpace(this.Telefone2) && !this.Telefone2.ValidacaoTelefone())
- {
- keyValuePairs.AddValue<string, string>("Telefone2|SEGUNDO TELEFONE", Messages.Invalido, true);
- }
- if (!string.IsNullOrWhiteSpace(this.Ddd3) && !this.Ddd3.ValidacaoPrefixo())
- {
- keyValuePairs.AddValue<string, string>("Ddd3|TERCEIRO DDD", Messages.Invalido, true);
- }
- if (!string.IsNullOrWhiteSpace(this.Telefone3) && !this.Telefone3.ValidacaoTelefone())
- {
- keyValuePairs.AddValue<string, string>("Telefone3|TERCEIRO TELEFONE", Messages.Invalido, true);
- }
- if (!string.IsNullOrEmpty(this.Email) && this.Email.Length > 100)
- {
- keyValuePairs.AddValue<string, string>("Email|E-MAIL", string.Format(Messages.MaiorQueLimite, 100), true);
- }
- if (!string.IsNullOrEmpty(this.Email) && !this.Email.ValidacaoEmail())
- {
- keyValuePairs.AddValue<string, string>("Email|E-MAIL", Messages.Invalido, true);
- }
- if (!string.IsNullOrEmpty(this.Cep) && !this.Cep.ValidacaoCep())
- {
- keyValuePairs.AddValue<string, string>("Cep|CEP", Messages.Invalido, true);
- }
- if (!string.IsNullOrEmpty(this.Uf) && !this.Uf.ValidacaoEstado())
- {
- keyValuePairs.AddValue<string, string>("Uf|ESTADO", Messages.Invalido, true);
- }
- if (!string.IsNullOrEmpty(this.Numero) && !int.TryParse(this.Numero, out num))
- {
- keyValuePairs.AddValue<string, string>("Numero|NÚMERO", Messages.Invalido, true);
- }
- if (!string.IsNullOrEmpty(this.Numero))
- {
- string numero = this.Numero;
- if (numero != null)
- {
- flag = numero.Count<char>() > 5;
- }
- else
- {
- flag = false;
- }
- if (flag)
- {
- keyValuePairs.AddValue<string, string>("Numero|NÚMERO", Messages.Invalido, true);
- }
- }
- return keyValuePairs;
- }
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/Parcela.cs b/Gestor.Model/Model.Domain.Seguros/Parcela.cs
deleted file mode 100644
index d97f5c8..0000000
--- a/Gestor.Model/Model.Domain.Seguros/Parcela.cs
+++ /dev/null
@@ -1,789 +0,0 @@
-using Gestor.Model.Attributes;
-using Gestor.Model.Common;
-using Gestor.Model.Domain.Generic;
-using Gestor.Model.Helper;
-using Gestor.Model.Resources;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel;
-using System.Linq;
-using System.Runtime.CompilerServices;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class Parcela : DomainBase, IDomain
- {
- private string _extrato;
-
- private string _fatura;
-
- [Description("STATUS PAGAMENTO")]
- [ForceLog(true)]
- [Log(true)]
- private Gestor.Model.Common.StatusPagamento? _statusPagamento;
-
- private bool _percentualmaiorque100;
-
- private bool _alteracao;
-
- private bool _permitirVencimentoMenor;
-
- private bool _permitirVencimentoMaior;
-
- public bool Baixando
- {
- get;
- set;
- }
-
- [Description("COMISSÃO")]
- [ForceLog(true)]
- [Log(true)]
- public decimal Comissao
- {
- get;
- set;
- }
-
- [Description("CONTROLE")]
- [ForceLog(true)]
- [Log(true)]
- public DateTime? DataControle
- {
- get;
- set;
- }
-
- [Description("CRÉDITO")]
- [ForceLog(true)]
- [Log(true)]
- public DateTime? DataCredito
- {
- get;
- set;
- }
-
- [Log(false)]
- public DateTime? DataCriacao
- {
- get;
- set;
- }
-
- [Description("QUITAÇÃO")]
- [ForceLog(true)]
- [Log(true)]
- public DateTime? DataQuitacao
- {
- get;
- set;
- }
-
- [Description("RECEBIMENTO")]
- [ForceLog(true)]
- [Log(true)]
- public DateTime? DataRecebimento
- {
- get;
- set;
- }
-
- [Description("DESCONTO")]
- [ForceLog(true)]
- [Log(true)]
- public decimal Desconto
- {
- get;
- set;
- }
-
- [ForceLog(true)]
- [Log(false)]
- public Gestor.Model.Domain.Seguros.Documento Documento
- {
- get;
- set;
- }
-
- [Description("EMISSÃO FATURA")]
- [ForceLog(true)]
- [Log(true)]
- public DateTime? Emissao
- {
- get;
- set;
- }
-
- [Description("EXTRATO")]
- [ForceLog(true)]
- [Log(true)]
- public string Extrato
- {
- get
- {
- string str = this._extrato;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._extrato = value;
- }
- }
-
- [Description("FATURA")]
- [ForceLog(true)]
- [Log(true)]
- public string Fatura
- {
- get
- {
- string str = this._fatura;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._fatura = value;
- }
- }
-
- public long IdEmpresa
- {
- get;
- set;
- }
-
- [Log(false)]
- public long IdParcelaPendente
- {
- get;
- set;
- }
-
- [Description("IR")]
- [ForceLog(true)]
- [Log(true)]
- public decimal Irr
- {
- get;
- set;
- }
-
- [Description("ISS")]
- [ForceLog(true)]
- [Log(true)]
- public decimal Iss
- {
- get;
- set;
- }
-
- [Description("PARCELA")]
- [ForceLog(true)]
- [Log(true)]
- public int NumeroParcela
- {
- get;
- set;
- }
-
- public string Observacao
- {
- get;
- set;
- }
-
- [Description("OUTROS")]
- [ForceLog(true)]
- [Log(true)]
- public decimal Outros
- {
- get;
- set;
- }
-
- [Log(false)]
- public Gestor.Model.Common.StatusPagamento? StatusPagamento
- {
- get
- {
- return this._statusPagamento;
- }
- set
- {
- this._statusPagamento = new Gestor.Model.Common.StatusPagamento?(value.GetValueOrDefault());
- }
- }
-
- [Description("TIPO DA PARCELA")]
- [ForceLog(true)]
- [Log(true)]
- public Gestor.Model.Common.SubTipo SubTipo
- {
- get;
- set;
- }
-
- public Gestor.Model.Common.TipoPagamento TipoPagamento
- {
- get;
- set;
- }
-
- [Log(false)]
- public long UsuarioCriacao
- {
- get;
- set;
- }
-
- [JsonIgnore]
- public Func<List<KeyValuePair<string, string>>> ValidationEvent
- {
- get
- {
- Parcela parcela = this;
- return new Func<List<KeyValuePair<string, string>>>(parcela.Validate);
- }
- }
-
- [Description("VALOR")]
- [ForceLog(true)]
- [Log(true)]
- public decimal Valor
- {
- get;
- set;
- }
-
- [Description("COMISSÃO LÍQUIDA")]
- [ForceLog(true)]
- [Log(true)]
- public decimal ValorComDesconto
- {
- get;
- set;
- }
-
- [Description("VALOR DE COMISSÃO")]
- [ForceLog(true)]
- [Log(true)]
- public decimal ValorComissao
- {
- get;
- set;
- }
-
- public decimal ValorExtrato
- {
- get;
- set;
- }
-
- [Description("VALOR LÍQUIDO FATURA")]
- [ForceLog(true)]
- [Log(true)]
- public decimal ValorLiquidoFatura
- {
- get;
- set;
- }
-
- public decimal ValorPago
- {
- get;
- set;
- }
-
- [Description("VALOR PARCELA EXTRATO")]
- [ForceLog(true)]
- [Log(true)]
- public decimal ValorRealizado
- {
- get;
- set;
- }
-
- [Description("VENCIMENTO")]
- [ForceLog(true)]
- [Log(true)]
- public DateTime Vencimento
- {
- get;
- set;
- }
-
- [Log(false)]
- public ObservableCollection<VendedorParcela> Vendedores
- {
- get;
- set;
- }
-
- [Description("FIM FATURA")]
- [ForceLog(true)]
- [Log(true)]
- public DateTime? VigenciaFinal
- {
- get;
- set;
- }
-
- [Description("INÍCIO FATURA")]
- [ForceLog(true)]
- [Log(true)]
- public DateTime? VigenciaIncial
- {
- get;
- set;
- }
-
- public Parcela()
- {
- }
-
- public List<KeyValuePair<string, string>> Validate(bool permitirVencimentoMenor, bool permitirVencimentoMaior, bool alteracao = false, bool percentualmaiorque100 = false)
- {
- this._permitirVencimentoMenor = permitirVencimentoMenor;
- this._permitirVencimentoMaior = permitirVencimentoMaior;
- this._alteracao = alteracao;
- this._percentualmaiorque100 = percentualmaiorque100;
- return this.Validate();
- }
-
- public List<KeyValuePair<string, string>> Validate()
- {
- decimal? nullable;
- decimal numeroParcelas;
- decimal? nullable1;
- decimal? nullable2;
- decimal? nullable3;
- DateTime vencimento;
- DateTime? vigencia2;
- int num;
- decimal? tolerancia;
- decimal? tolerancia1;
- decimal? nullable4;
- decimal? nullable5;
- decimal? tolerancia2;
- decimal? tolerancia3;
- decimal? nullable6;
- List<KeyValuePair<string, string>> keyValuePairs = ValidationHelper.AddValue();
- DateTime? emissao = this.Emissao;
- if (emissao.HasValue)
- {
- emissao = this.Emissao;
- if (DateTime.Compare(emissao.Value, new DateTime(1753, 1, 1)) >= 0)
- {
- emissao = this.Emissao;
- if (DateTime.Compare(emissao.Value, new DateTime(9999, 12, 31)) <= 0)
- {
- goto Label0;
- }
- }
- keyValuePairs.AddValue<string, string>("Emissao|EMISSÃO", string.Format(Messages.DataInvalida, Array.Empty<object>()), true);
- }
- Label0:
- emissao = this.VigenciaFinal;
- if (emissao.HasValue)
- {
- emissao = this.VigenciaFinal;
- if (DateTime.Compare(emissao.Value, new DateTime(1753, 1, 1)) >= 0)
- {
- emissao = this.VigenciaFinal;
- if (DateTime.Compare(emissao.Value, new DateTime(9999, 12, 31)) <= 0)
- {
- goto Label1;
- }
- }
- keyValuePairs.AddValue<string, string>("VigenciaFinal|VIGÊNCIA FINAL", string.Format(Messages.DataInvalida, Array.Empty<object>()), true);
- }
- Label1:
- emissao = this.VigenciaIncial;
- if (emissao.HasValue)
- {
- emissao = this.VigenciaIncial;
- if (DateTime.Compare(emissao.Value, new DateTime(1753, 1, 1)) >= 0)
- {
- emissao = this.VigenciaIncial;
- if (DateTime.Compare(emissao.Value, new DateTime(9999, 12, 31)) <= 0)
- {
- goto Label2;
- }
- }
- keyValuePairs.AddValue<string, string>("VigenciaIncial|VIGÊNCIA INICIAL", string.Format(Messages.DataInvalida, Array.Empty<object>()), true);
- }
- Label2:
- emissao = this.DataCredito;
- if (emissao.HasValue)
- {
- emissao = this.DataCredito;
- if (DateTime.Compare(emissao.Value, new DateTime(1753, 1, 1)) >= 0)
- {
- emissao = this.DataCredito;
- if (DateTime.Compare(emissao.Value, new DateTime(9999, 12, 31)) <= 0)
- {
- goto Label3;
- }
- }
- keyValuePairs.AddValue<string, string>("DataCredito|DATA DE CRÉDITO", string.Format(Messages.DataInvalida, Array.Empty<object>()), true);
- }
- Label3:
- emissao = this.DataRecebimento;
- if (emissao.HasValue)
- {
- emissao = this.DataRecebimento;
- if (DateTime.Compare(emissao.Value, new DateTime(1753, 1, 1)) >= 0)
- {
- emissao = this.DataRecebimento;
- if (DateTime.Compare(emissao.Value, new DateTime(9999, 12, 31)) <= 0)
- {
- goto Label4;
- }
- }
- keyValuePairs.AddValue<string, string>("DataRecebimento|DATA RECEBIMENTO", string.Format(Messages.DataInvalida, Array.Empty<object>()), true);
- }
- Label4:
- if (DateTime.Compare(this.Vencimento, new DateTime(1753, 1, 1)) < 0 || DateTime.Compare(this.Vencimento, new DateTime(9999, 12, 31)) > 0)
- {
- keyValuePairs.AddValue<string, string>("Vencimento", string.Format(Messages.DataInvalida, Array.Empty<object>()), true);
- }
- if (this.NumeroParcela == 0)
- {
- keyValuePairs.AddValue<string, string>("NumeroParcela|NÚMERO DA PARCELA", Messages.Obrigatorio, true);
- }
- if (this.Valor == decimal.Zero)
- {
- keyValuePairs.AddValue<string, string>("Valor", Messages.Obrigatorio, true);
- }
- if (this.Comissao == decimal.Zero && this.Documento.TipoRecebimento.GetValueOrDefault() != TipoRecebimento.Fatura)
- {
- keyValuePairs.AddValue<string, string>("Comissao|COMISSÃO", Messages.Obrigatorio, true);
- }
- if (this.Comissao > new decimal(100) && (this.Documento.TipoRecebimento.GetValueOrDefault() != TipoRecebimento.Fatura || !this._percentualmaiorque100))
- {
- keyValuePairs.AddValue<string, string>("Comissao|% COMISSÃO", "MAIOR QUE 100%", true);
- }
- emissao = this.DataRecebimento;
- if (emissao.HasValue)
- {
- emissao = this.DataCredito;
- if (!emissao.HasValue)
- {
- keyValuePairs.AddValue<string, string>("DataCredito|DATA DE CRÉDITO", Messages.Obrigatorio, true);
- }
- }
- emissao = this.DataCredito;
- if (emissao.HasValue)
- {
- emissao = this.DataRecebimento;
- if (!emissao.HasValue)
- {
- keyValuePairs.AddValue<string, string>("DataRecebimento|DATA RECEBIMENTO", Messages.Obrigatorio, true);
- }
- }
- if (this.Baixando)
- {
- emissao = this.DataRecebimento;
- if (!emissao.HasValue)
- {
- keyValuePairs.AddValue<string, string>("DataRecebimento|DATA DE RECEBIMENTO", Messages.Obrigatorio, true);
- }
- emissao = this.DataCredito;
- if (!emissao.HasValue)
- {
- keyValuePairs.AddValue<string, string>("DataCredito|DATA DE CRÉDITO", Messages.Obrigatorio, true);
- }
- }
- if (!this._alteracao)
- {
- emissao = this.DataCredito;
- if (!emissao.HasValue)
- {
- emissao = this.DataRecebimento;
- if (!emissao.HasValue)
- {
- goto Label5;
- }
- }
- if (this.ValorRealizado == decimal.Zero)
- {
- keyValuePairs.AddValue<string, string>("ValorRealizado|VALOR REALIZADO", Messages.Obrigatorio, true);
- }
- }
- Label5:
- if (this.Documento.TipoRecebimento.GetValueOrDefault() != TipoRecebimento.Fatura && this.SubTipo == Gestor.Model.Common.SubTipo.ParcelaNormal)
- {
- if (this.Documento.NumeroParcelas != decimal.One)
- {
- decimal num1 = Math.Abs(this.Valor);
- decimal num2 = Math.Abs(this.Documento.PremioTotal);
- Controle controle = this.Documento.Controle;
- if (controle != null)
- {
- Seguradora seguradora = controle.Seguradora;
- if (seguradora != null)
- {
- tolerancia1 = seguradora.Tolerancia;
- }
- else
- {
- nullable3 = null;
- tolerancia1 = nullable3;
- }
- }
- else
- {
- nullable3 = null;
- tolerancia1 = nullable3;
- }
- nullable2 = tolerancia1;
- if (nullable2.HasValue)
- {
- nullable4 = new decimal?(num2 + nullable2.GetValueOrDefault());
- }
- else
- {
- nullable3 = null;
- nullable4 = nullable3;
- }
- nullable1 = nullable4;
- numeroParcelas = this.Documento.NumeroParcelas;
- if (nullable1.HasValue)
- {
- nullable5 = new decimal?(nullable1.GetValueOrDefault() - numeroParcelas);
- }
- else
- {
- nullable2 = null;
- nullable5 = nullable2;
- }
- nullable = nullable5;
- if ((num1 > nullable.GetValueOrDefault()) & nullable.HasValue)
- {
- decimal valor = this.Valor;
- Controle controle1 = this.Documento.Controle;
- if (controle1 != null)
- {
- Seguradora seguradora1 = controle1.Seguradora;
- if (seguradora1 != null)
- {
- tolerancia2 = seguradora1.Tolerancia;
- }
- else
- {
- nullable1 = null;
- tolerancia2 = nullable1;
- }
- }
- else
- {
- nullable1 = null;
- tolerancia2 = nullable1;
- }
- nullable = tolerancia2;
- if ((valor > nullable.GetValueOrDefault()) & nullable.HasValue)
- {
- keyValuePairs.AddValue<string, string>("Valor", Messages.ValorParcelaInvalido, true);
- }
- }
- }
- else
- {
- decimal num3 = Math.Abs(this.Valor);
- numeroParcelas = Math.Abs(this.Documento.PremioTotal);
- Controle controle2 = this.Documento.Controle;
- if (controle2 != null)
- {
- Seguradora seguradora2 = controle2.Seguradora;
- if (seguradora2 != null)
- {
- tolerancia3 = seguradora2.Tolerancia;
- }
- else
- {
- nullable2 = null;
- tolerancia3 = nullable2;
- }
- }
- else
- {
- nullable2 = null;
- tolerancia3 = nullable2;
- }
- nullable1 = tolerancia3;
- if (nullable1.HasValue)
- {
- nullable6 = new decimal?(numeroParcelas + nullable1.GetValueOrDefault());
- }
- else
- {
- nullable2 = null;
- nullable6 = nullable2;
- }
- nullable = nullable6;
- if ((num3 > nullable.GetValueOrDefault()) & nullable.HasValue)
- {
- keyValuePairs.AddValue<string, string>("Valor", Messages.ValorParcelaInvalido, true);
- }
- }
- }
- if (this.Documento.TipoRecebimento.GetValueOrDefault() != TipoRecebimento.Fatura && this.SubTipo == Gestor.Model.Common.SubTipo.ParcelaNormal && this.Documento.Parcelas != null && this.Documento.NumeroParcelas == this.Documento.Parcelas.Count)
- {
- decimal num4 = Math.Abs((
- from x in this.Documento.Parcelas
- where x.SubTipo == Gestor.Model.Common.SubTipo.ParcelaNormal
- select x).Sum<Parcela>((Parcela x) => x.Valor));
- decimal num5 = Math.Abs(this.Documento.PremioTotal);
- Controle controle3 = this.Documento.Controle;
- if (controle3 != null)
- {
- Seguradora seguradora3 = controle3.Seguradora;
- if (seguradora3 != null)
- {
- tolerancia = seguradora3.Tolerancia;
- }
- else
- {
- nullable = null;
- tolerancia = nullable;
- }
- }
- else
- {
- nullable = null;
- tolerancia = nullable;
- }
- nullable = tolerancia;
- if (num4 > (num5 + nullable.GetValueOrDefault()) && this.NumeroParcela == this.Documento.NumeroParcelas)
- {
- keyValuePairs.AddValue<string, string>("Valor", Messages.ValorParcelaInvalido, true);
- }
- }
- if (!this._permitirVencimentoMaior)
- {
- emissao = this.Documento.Vigencia2;
- if (emissao.HasValue)
- {
- vencimento = this.Vencimento;
- emissao = this.Documento.Vigencia2;
- if ((emissao.HasValue ? vencimento > emissao.GetValueOrDefault() : false) && this.Documento.Controle.Ramo.Id != (long)23)
- {
- keyValuePairs.AddValue<string, string>("Vencimento", Messages.VencimentoMaior, true);
- }
- }
- }
- if (!this._permitirVencimentoMenor)
- {
- if (this.Documento.Vigencia1 > DateTime.MinValue && this.NumeroParcela == 1)
- {
- DateTime dateTime = this.Vencimento;
- vencimento = this.Documento.Vigencia1;
- if (dateTime < vencimento.AddDays(-30))
- {
- goto Label6;
- }
- }
- if (this.NumeroParcela == 1 || !(this.Vencimento < this.Documento.Vigencia1))
- {
- goto Label7;
- }
- Label6:
- keyValuePairs.AddValue<string, string>("Vencimento", Messages.VencimentoMenor, true);
- }
- Label7:
- if (this.Documento == null || this.Documento.TipoRecebimento.GetValueOrDefault() != TipoRecebimento.Fatura)
- {
- return keyValuePairs;
- }
- if (string.IsNullOrWhiteSpace(this.Fatura))
- {
- keyValuePairs.AddValue<string, string>("Fatura", Messages.Obrigatorio, true);
- }
- else if (this.Fatura.Length > 50)
- {
- keyValuePairs.AddValue<string, string>("Fatura", string.Format(Messages.MaiorQueLimite, 255), true);
- }
- if (this.ValorLiquidoFatura == decimal.Zero)
- {
- keyValuePairs.AddValue<string, string>("ValorLiquidoFatura|VALOR LÍQUIDO DA FATURA", Messages.Obrigatorio, true);
- }
- emissao = this.VigenciaIncial;
- if (!emissao.HasValue)
- {
- keyValuePairs.AddValue<string, string>("VigenciaIncial|VIGÊNCIA INICIAL", Messages.Obrigatorio, true);
- }
- emissao = this.VigenciaFinal;
- if (!emissao.HasValue)
- {
- keyValuePairs.AddValue<string, string>("VigenciaFinal|VIGÊNCIA FINAL", Messages.Obrigatorio, true);
- }
- emissao = this.Emissao;
- if (!emissao.HasValue)
- {
- keyValuePairs.AddValue<string, string>("Emissao|EMISSÃO", Messages.Obrigatorio, true);
- }
- if (!string.IsNullOrWhiteSpace(this.Extrato) && this.Extrato.Length > 50)
- {
- keyValuePairs.AddValue<string, string>("Extrato", string.Format(Messages.MaiorQueLimite, 50), true);
- }
- emissao = this.VigenciaFinal;
- if (emissao.HasValue)
- {
- emissao = this.Documento.Vigencia2;
- if (emissao.HasValue)
- {
- emissao = this.VigenciaFinal;
- vigencia2 = this.Documento.Vigencia2;
- if ((emissao.HasValue & vigencia2.HasValue ? emissao.GetValueOrDefault() > vigencia2.GetValueOrDefault() : false) && !this._permitirVencimentoMaior)
- {
- keyValuePairs.AddValue<string, string>("VigenciaFinal|VIGÊNCIA FINAL", Messages.VencimentoMaior, true);
- }
- }
- }
- vigencia2 = this.DataRecebimento;
- if (!vigencia2.HasValue && this.ValorComissao != decimal.Zero && this.Documento.TipoRecebimento.GetValueOrDefault() == TipoRecebimento.Fatura)
- {
- keyValuePairs.AddValue<string, string>("DataRecebimento|DATA RECEBIMENTO", Messages.Obrigatorio, true);
- }
- if (this.Documento.TipoRecebimento.GetValueOrDefault() != TipoRecebimento.Fatura && this.Documento.Parcelas != null && this.Documento.Parcelas.Any<Parcela>((Parcela x) => {
- if (x.NumeroParcela >= this.NumeroParcela)
- {
- return false;
- }
- return !x.DataRecebimento.HasValue;
- }))
- {
- keyValuePairs.AddValue<string, string>("DataRecebimento|DATA RECEBIMENTO", Messages.BaixaInvalida, true);
- }
- vigencia2 = this.DataRecebimento;
- if (vigencia2.HasValue && this.ValorComissao != decimal.Zero && this.Documento.TipoRecebimento.GetValueOrDefault() == TipoRecebimento.Fatura)
- {
- decimal num6 = (this.ValorExtrato == decimal.Zero ? this.ValorLiquidoFatura : this.ValorExtrato);
- if (num6 > decimal.Zero)
- {
- num = num6.CompareTo(this.ValorComissao);
- }
- else
- {
- numeroParcelas = this.ValorComissao;
- num = numeroParcelas.CompareTo(num6);
- }
- if (num < 0)
- {
- keyValuePairs.AddValue<string, string>("ValorComissao|RECEBIDO", "VALOR RECEBIDO MAIOR QUE VALOR PARCELA", true);
- }
- }
- return keyValuePairs;
- }
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/Parcelas.cs b/Gestor.Model/Model.Domain.Seguros/Parcelas.cs
deleted file mode 100644
index aa31cbb..0000000
--- a/Gestor.Model/Model.Domain.Seguros/Parcelas.cs
+++ /dev/null
@@ -1,204 +0,0 @@
-using Gestor.Model.Common;
-using Gestor.Model.Domain.Generic;
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Globalization;
-using System.Runtime.CompilerServices;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class Parcelas : DomainBase
- {
- public ObservableCollection<Parcela> ParcelasList
- {
- get;
- set;
- }
-
- public Gestor.Model.Common.TipoRecebimento? TipoRecebimento
- {
- get;
- set;
- }
-
- public Parcelas()
- {
- }
-
- public List<TupleList> Log(bool restricaoComissao, bool restricaoComissaoPorcentagem)
- {
- DateTime? vigenciaIncial;
- string shortDateString;
- string str;
- string shortDateString1;
- string str1;
- string shortDateString2;
- string str2;
- ObservableCollection<Tuple<string, string, string>> observableCollection = new ObservableCollection<Tuple<string, string, string>>()
- {
- new Tuple<string, string, string>("PARCELAS$", "", "")
- };
- if (this.ParcelasList != null)
- {
- foreach (Parcela parcelasList in this.ParcelasList)
- {
- observableCollection.Add(new Tuple<string, string, string>(string.Format(" PARCELA {0}$", parcelasList.NumeroParcela), "", ""));
- if (this.TipoRecebimento.GetValueOrDefault() == Gestor.Model.Common.TipoRecebimento.Fatura)
- {
- observableCollection.Add(new Tuple<string, string, string>(" FATURA", (string.IsNullOrWhiteSpace(parcelasList.Fatura) ? "" : parcelasList.Fatura.ToUpper()), ""));
- ObservableCollection<Tuple<string, string, string>> observableCollection1 = observableCollection;
- vigenciaIncial = parcelasList.VigenciaIncial;
- if (!vigenciaIncial.HasValue)
- {
- str1 = "";
- }
- else
- {
- vigenciaIncial = parcelasList.VigenciaIncial;
- if (vigenciaIncial.HasValue)
- {
- str1 = vigenciaIncial.GetValueOrDefault().ToShortDateString();
- }
- else
- {
- str1 = null;
- }
- }
- observableCollection1.Add(new Tuple<string, string, string>(" INÍCIO", str1, ""));
- ObservableCollection<Tuple<string, string, string>> observableCollection2 = observableCollection;
- vigenciaIncial = parcelasList.VigenciaFinal;
- if (!vigenciaIncial.HasValue)
- {
- shortDateString2 = "";
- }
- else
- {
- vigenciaIncial = parcelasList.VigenciaFinal;
- if (vigenciaIncial.HasValue)
- {
- shortDateString2 = vigenciaIncial.GetValueOrDefault().ToShortDateString();
- }
- else
- {
- shortDateString2 = null;
- }
- }
- observableCollection2.Add(new Tuple<string, string, string>(" FIM", shortDateString2, ""));
- ObservableCollection<Tuple<string, string, string>> observableCollection3 = observableCollection;
- vigenciaIncial = parcelasList.Emissao;
- if (!vigenciaIncial.HasValue)
- {
- str2 = "";
- }
- else
- {
- vigenciaIncial = parcelasList.Emissao;
- if (vigenciaIncial.HasValue)
- {
- str2 = vigenciaIncial.GetValueOrDefault().ToShortDateString();
- }
- else
- {
- str2 = null;
- }
- }
- observableCollection3.Add(new Tuple<string, string, string>(" EMISSÃO", str2, ""));
- }
- DateTime vencimento = parcelasList.Vencimento;
- observableCollection.Add(new Tuple<string, string, string>(" VENCIMENTO", vencimento.ToShortDateString(), ""));
- ObservableCollection<Tuple<string, string, string>> observableCollection4 = observableCollection;
- vigenciaIncial = parcelasList.DataRecebimento;
- if (!vigenciaIncial.HasValue)
- {
- shortDateString = "";
- }
- else
- {
- vigenciaIncial = parcelasList.DataRecebimento;
- if (vigenciaIncial.HasValue)
- {
- shortDateString = vigenciaIncial.GetValueOrDefault().ToShortDateString();
- }
- else
- {
- shortDateString = null;
- }
- }
- observableCollection4.Add(new Tuple<string, string, string>(" RECEBIMENTO", shortDateString, ""));
- ObservableCollection<Tuple<string, string, string>> observableCollection5 = observableCollection;
- vigenciaIncial = parcelasList.DataQuitacao;
- if (!vigenciaIncial.HasValue)
- {
- str = "";
- }
- else
- {
- vigenciaIncial = parcelasList.DataQuitacao;
- if (vigenciaIncial.HasValue)
- {
- str = vigenciaIncial.GetValueOrDefault().ToShortDateString();
- }
- else
- {
- str = null;
- }
- }
- observableCollection5.Add(new Tuple<string, string, string>(" QUITAÇÃO", str, ""));
- ObservableCollection<Tuple<string, string, string>> observableCollection6 = observableCollection;
- vigenciaIncial = parcelasList.DataControle;
- if (!vigenciaIncial.HasValue)
- {
- shortDateString1 = "";
- }
- else
- {
- vigenciaIncial = parcelasList.DataControle;
- if (vigenciaIncial.HasValue)
- {
- shortDateString1 = vigenciaIncial.GetValueOrDefault().ToShortDateString();
- }
- else
- {
- shortDateString1 = null;
- }
- }
- observableCollection6.Add(new Tuple<string, string, string>(" DATA PARCELA CONTROLE", shortDateString1, ""));
- decimal valor = parcelasList.Valor;
- observableCollection.Add(new Tuple<string, string, string>(" VALOR", valor.ToString("C", new CultureInfo("pt-BR", false)), ""));
- valor = parcelasList.ValorLiquidoFatura;
- observableCollection.Add(new Tuple<string, string, string>(" LÍQUIDO", valor.ToString("C", new CultureInfo("pt-BR", false)), ""));
- if (!restricaoComissao)
- {
- valor = parcelasList.ValorRealizado;
- observableCollection.Add(new Tuple<string, string, string>(" REALIZADO", valor.ToString("C", new CultureInfo("pt-BR", false)), ""));
- valor = parcelasList.Comissao / new decimal(100);
- observableCollection.Add(new Tuple<string, string, string>(" COMISSÃO", valor.ToString("P", new CultureInfo("pt-BR", false)), ""));
- valor = parcelasList.ValorComissao;
- observableCollection.Add(new Tuple<string, string, string>(" RECEBIDO", valor.ToString("C", new CultureInfo("pt-BR", false)), ""));
- }
- else if (!restricaoComissaoPorcentagem)
- {
- observableCollection.Add(new Tuple<string, string, string>(" REALIZADO", "", ""));
- observableCollection.Add(new Tuple<string, string, string>(" COMISSÃO", "", ""));
- observableCollection.Add(new Tuple<string, string, string>(" RECEBIDO", "", ""));
- }
- else
- {
- observableCollection.Add(new Tuple<string, string, string>(" REALIZADO", "", ""));
- valor = parcelasList.Comissao / new decimal(100);
- observableCollection.Add(new Tuple<string, string, string>(" COMISSÃO", valor.ToString("P", new CultureInfo("pt-BR", false)), ""));
- observableCollection.Add(new Tuple<string, string, string>(" RECEBIDO", "", ""));
- }
- }
- }
- return new List<TupleList>()
- {
- new TupleList()
- {
- Tuples = observableCollection
- }
- };
- }
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/Patrimonial.cs b/Gestor.Model/Model.Domain.Seguros/Patrimonial.cs
deleted file mode 100644
index c54f32b..0000000
--- a/Gestor.Model/Model.Domain.Seguros/Patrimonial.cs
+++ /dev/null
@@ -1,574 +0,0 @@
-using Gestor.Model.Common;
-using Gestor.Model.Domain.Generic;
-using Gestor.Model.Helper;
-using Gestor.Model.Resources;
-using Gestor.Model.Validation;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Globalization;
-using System.Runtime.CompilerServices;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class Patrimonial : EnderecoBase, IDomain
- {
- private string _bens;
-
- private string _imobiliaria;
-
- private string _locatario;
-
- private string _locatario2;
-
- private string _locatario3;
-
- private string _cpfLocatario1;
-
- private string _cpfLocatario2;
-
- private string _cpfLocatario3;
-
- private string _contato;
-
- private string _prefixo;
-
- private string _telefone;
-
- private Gestor.Model.Common.TipoMoradia _tipoResidencia;
-
- public string Bens
- {
- get
- {
- string str = this._bens;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._bens = value;
- }
- }
-
- public string Contato
- {
- get
- {
- string str = this._contato;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._contato = value;
- }
- }
-
- public string CpfLocatario1
- {
- get
- {
- string str = this._cpfLocatario1;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._cpfLocatario1 = value;
- }
- }
-
- public string CpfLocatario2
- {
- get
- {
- string str = this._cpfLocatario2;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._cpfLocatario2 = value;
- }
- }
-
- public string CpfLocatario3
- {
- get
- {
- string str = this._cpfLocatario3;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._cpfLocatario3 = value;
- }
- }
-
- public string Imobiliaria
- {
- get
- {
- string str = this._imobiliaria;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._imobiliaria = value;
- }
- }
-
- public Gestor.Model.Domain.Seguros.Item Item
- {
- get;
- set;
- }
-
- public string Locatario1
- {
- get
- {
- string str = this._locatario;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._locatario = value;
- }
- }
-
- public string Locatario2
- {
- get
- {
- string str = this._locatario2;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._locatario2 = value;
- }
- }
-
- public string Locatario3
- {
- get
- {
- string str = this._locatario3;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._locatario3 = value;
- }
- }
-
- public string Prefixo
- {
- get
- {
- string str = this._prefixo;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._prefixo = value;
- }
- }
-
- public string PrefixoLocatario1
- {
- get;
- set;
- }
-
- public string PrefixoLocatario2
- {
- get;
- set;
- }
-
- public string PrefixoLocatario3
- {
- get;
- set;
- }
-
- public string Telefone
- {
- get
- {
- string str = this._telefone;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._telefone = value;
- }
- }
-
- public string TelefoneLocatario1
- {
- get;
- set;
- }
-
- public string TelefoneLocatario2
- {
- get;
- set;
- }
-
- public string TelefoneLocatario3
- {
- get;
- set;
- }
-
- public TipoTelefone? Tipo
- {
- get;
- set;
- }
-
- public Gestor.Model.Common.TipoMoradia TipoMoradia
- {
- get
- {
- return this._tipoResidencia;
- }
- set
- {
- this._tipoResidencia = value;
- }
- }
-
- public Gestor.Model.Common.Utilizacao? Utilizacao
- {
- get;
- set;
- }
-
- [JsonIgnore]
- public Func<List<KeyValuePair<string, string>>> ValidationEvent
- {
- get
- {
- Patrimonial patrimonial = this;
- return new Func<List<KeyValuePair<string, string>>>(patrimonial.Validate);
- }
- }
-
- public Patrimonial()
- {
- }
-
- public static List<TupleList> Log(Gestor.Model.Domain.Seguros.Item item)
- {
- string description;
- string str;
- List<TupleList> tupleLists = new List<TupleList>()
- {
- new TupleList()
- {
- Tuples = new ObservableCollection<Tuple<string, string, string>>()
- {
- new Tuple<string, string, string>("CEP", (string.IsNullOrWhiteSpace(item.Patrimonial.Cep) ? "" : item.Patrimonial.Cep), ""),
- new Tuple<string, string, string>("ENDEREÇO", (string.IsNullOrWhiteSpace(item.Patrimonial.Endereco) ? "" : item.Patrimonial.Endereco.ToUpper()), ""),
- new Tuple<string, string, string>("NÚMERO", (string.IsNullOrWhiteSpace(item.Patrimonial.Numero) ? "" : item.Patrimonial.Numero), ""),
- new Tuple<string, string, string>("COMPLEMENTO", (string.IsNullOrWhiteSpace(item.Patrimonial.Complemento) ? "" : item.Patrimonial.Complemento.ToUpper()), ""),
- new Tuple<string, string, string>("BAIRRO", (string.IsNullOrWhiteSpace(item.Patrimonial.Bairro) ? "" : item.Patrimonial.Bairro.ToUpper()), ""),
- new Tuple<string, string, string>("CIDADE", (string.IsNullOrWhiteSpace(item.Patrimonial.Cidade) ? "" : item.Patrimonial.Cidade.ToUpper()), ""),
- new Tuple<string, string, string>("ESTADO", (string.IsNullOrWhiteSpace(item.Patrimonial.Estado) ? "" : item.Patrimonial.Estado.ToUpper()), ""),
- new Tuple<string, string, string>("BENS", (string.IsNullOrWhiteSpace(item.Patrimonial.Bens) ? "" : item.Patrimonial.Bens.ToUpper()), ""),
- new Tuple<string, string, string>("OBSERVAÇÕES", (string.IsNullOrWhiteSpace(item.Patrimonial.Item.Observacao) ? "" : item.Patrimonial.Item.Observacao.ToUpper()), "")
- }
- }
- };
- if (item.Documento.Controle.Ramo.Id == (long)15)
- {
- ObservableCollection<Tuple<string, string, string>> tuples = tupleLists[0].Tuples;
- Gestor.Model.Common.Utilizacao? utilizacao = item.Patrimonial.Utilizacao;
- if (!utilizacao.HasValue)
- {
- description = "";
- }
- else
- {
- utilizacao = item.Patrimonial.Utilizacao;
- if (utilizacao.HasValue)
- {
- description = utilizacao.GetValueOrDefault().GetDescription();
- }
- else
- {
- description = null;
- }
- }
- tuples.Add(new Tuple<string, string, string>("UTILIZAÇÃO", description, ""));
- tupleLists[0].Tuples.Add(new Tuple<string, string, string>("IMOBILIÁRIA", (string.IsNullOrWhiteSpace(item.Patrimonial.Imobiliaria) ? "" : item.Patrimonial.Imobiliaria.ToUpper()), ""));
- tupleLists[0].Tuples.Add(new Tuple<string, string, string>("CONTATO", (string.IsNullOrWhiteSpace(item.Patrimonial.Contato) ? "" : item.Patrimonial.Contato.ToUpper()), ""));
- ObservableCollection<Tuple<string, string, string>> observableCollection = tupleLists[0].Tuples;
- TipoTelefone? tipo = item.Patrimonial.Tipo;
- if (!tipo.HasValue)
- {
- str = "";
- }
- else
- {
- tipo = item.Patrimonial.Tipo;
- if (tipo.HasValue)
- {
- str = tipo.GetValueOrDefault().GetDescription();
- }
- else
- {
- str = null;
- }
- }
- observableCollection.Add(new Tuple<string, string, string>("TIPO TELEFONE", str, ""));
- tupleLists[0].Tuples.Add(new Tuple<string, string, string>("PREFIXO", (string.IsNullOrWhiteSpace(item.Patrimonial.Prefixo) ? "" : item.Patrimonial.Prefixo.ToUpper()), ""));
- tupleLists[0].Tuples.Add(new Tuple<string, string, string>("NÚMERO", (string.IsNullOrWhiteSpace(item.Patrimonial.Telefone) ? "" : item.Patrimonial.Telefone.ToUpper()), ""));
- tupleLists[0].Tuples.Add(new Tuple<string, string, string>("LOCATÁRIO 1", (string.IsNullOrWhiteSpace(item.Patrimonial.Locatario1) ? "" : item.Patrimonial.Locatario1.ToUpper()), ""));
- tupleLists[0].Tuples.Add(new Tuple<string, string, string>("PREFIXO LOCATÁRIO 1", (string.IsNullOrWhiteSpace(item.Patrimonial.PrefixoLocatario1) ? "" : item.Patrimonial.PrefixoLocatario1), ""));
- tupleLists[0].Tuples.Add(new Tuple<string, string, string>("NÚMERO LOCATÁRIO 1", (string.IsNullOrWhiteSpace(item.Patrimonial.TelefoneLocatario1) ? "" : item.Patrimonial.TelefoneLocatario1), ""));
- tupleLists[0].Tuples.Add(new Tuple<string, string, string>("LOCATÁRIO 2", (string.IsNullOrWhiteSpace(item.Patrimonial.Locatario2) ? "" : item.Patrimonial.Locatario2.ToUpper()), ""));
- tupleLists[0].Tuples.Add(new Tuple<string, string, string>("PREFIXO LOCATÁRIO 2", (string.IsNullOrWhiteSpace(item.Patrimonial.PrefixoLocatario2) ? "" : item.Patrimonial.PrefixoLocatario2), ""));
- tupleLists[0].Tuples.Add(new Tuple<string, string, string>("NÚMERO LOCATÁRIO 2", (string.IsNullOrWhiteSpace(item.Patrimonial.TelefoneLocatario2) ? "" : item.Patrimonial.TelefoneLocatario2), ""));
- tupleLists[0].Tuples.Add(new Tuple<string, string, string>("LOCATÁRIO 3", (string.IsNullOrWhiteSpace(item.Patrimonial.Locatario3) ? "" : item.Patrimonial.Locatario3.ToUpper()), ""));
- tupleLists[0].Tuples.Add(new Tuple<string, string, string>("PREFIXO LOCATÁRIO 3", (string.IsNullOrWhiteSpace(item.Patrimonial.PrefixoLocatario3) ? "" : item.Patrimonial.PrefixoLocatario3), ""));
- tupleLists[0].Tuples.Add(new Tuple<string, string, string>("NÚMERO LOCATÁRIO 3", (string.IsNullOrWhiteSpace(item.Patrimonial.TelefoneLocatario3) ? "" : item.Patrimonial.TelefoneLocatario3), ""));
- }
- ObservableCollection<Tuple<string, string, string>> observableCollection1 = new ObservableCollection<Tuple<string, string, string>>()
- {
- new Tuple<string, string, string>("COBERTURAS$", "", "")
- };
- foreach (Cobertura cobertura in item.Coberturas)
- {
- observableCollection1.Add(new Tuple<string, string, string>(string.Format(" COBERTURA {0}$", item.Coberturas.IndexOf(cobertura) + 1), "", ""));
- observableCollection1.Add(new Tuple<string, string, string>(" OBSERVAÇÃO", (string.IsNullOrWhiteSpace(cobertura.Observacao) ? "" : cobertura.Observacao.ToUpper()), ""));
- decimal premio = cobertura.Premio;
- observableCollection1.Add(new Tuple<string, string, string>(" PRÊMIO", premio.ToString("C", new CultureInfo("pt-BR", false)), ""));
- premio = cobertura.Franquia;
- observableCollection1.Add(new Tuple<string, string, string>(" FRANQUIA", premio.ToString("C", new CultureInfo("pt-BR", false)), ""));
- premio = cobertura.Lmi;
- observableCollection1.Add(new Tuple<string, string, string>(" L.M.I.", premio.ToString("C", new CultureInfo("pt-BR", false)), ""));
- }
- tupleLists.Add(new TupleList()
- {
- Tuples = observableCollection1
- });
- return tupleLists;
- }
-
- public List<KeyValuePair<string, string>> Validate()
- {
- List<KeyValuePair<string, string>> keyValuePairs = ValidationHelper.AddValue();
- if (!string.IsNullOrWhiteSpace(this.Imobiliaria) && this.Imobiliaria.Length > 60)
- {
- keyValuePairs.AddValue<string, string>("Imobiliaria", string.Format(Messages.MaiorQueLimite, 60), true);
- }
- if (!string.IsNullOrWhiteSpace(this.Locatario1) && this.Locatario1.Length > 100)
- {
- keyValuePairs.AddValue<string, string>("Locatario1", string.Format(Messages.MaiorQueLimite, 100), true);
- }
- if (!string.IsNullOrWhiteSpace(this.Locatario2) && this.Locatario2.Length > 100)
- {
- keyValuePairs.AddValue<string, string>("Locatario2", string.Format(Messages.MaiorQueLimite, 100), true);
- }
- if (!string.IsNullOrWhiteSpace(this.Locatario3) && this.Locatario3.Length > 100)
- {
- keyValuePairs.AddValue<string, string>("Locatario3", string.Format(Messages.MaiorQueLimite, 100), true);
- }
- if (!string.IsNullOrWhiteSpace(this.CpfLocatario1) && !this.CpfLocatario1.ValidacaoDocumento())
- {
- keyValuePairs.AddValue<string, string>("CpfLocatario1", Messages.Invalido, true);
- }
- if (!string.IsNullOrWhiteSpace(this.CpfLocatario2) && !this.CpfLocatario2.ValidacaoDocumento())
- {
- keyValuePairs.AddValue<string, string>("CpfLocatario2", Messages.Invalido, true);
- }
- if (!string.IsNullOrWhiteSpace(this.CpfLocatario3) && !this.CpfLocatario3.ValidacaoDocumento())
- {
- keyValuePairs.AddValue<string, string>("CpfLocatario3", Messages.Invalido, true);
- }
- if (!string.IsNullOrWhiteSpace(this.Contato) && this.Contato.Length > 60)
- {
- keyValuePairs.AddValue<string, string>("Contato", string.Format(Messages.MaiorQueLimite, 60), true);
- }
- if (!string.IsNullOrWhiteSpace(this.Prefixo) && !this.Prefixo.ValidacaoPrefixo())
- {
- keyValuePairs.AddValue<string, string>("Prefixo", Messages.Invalido, true);
- }
- if (!string.IsNullOrWhiteSpace(this.Telefone) && !this.Telefone.ValidacaoTelefone())
- {
- keyValuePairs.AddValue<string, string>("Telefone", Messages.Invalido, true);
- }
- if (!string.IsNullOrWhiteSpace(this.PrefixoLocatario1) && !this.PrefixoLocatario1.ValidacaoPrefixo())
- {
- keyValuePairs.AddValue<string, string>("PrefixoLocatario1", Messages.Invalido, true);
- }
- if (!string.IsNullOrWhiteSpace(this.TelefoneLocatario1) && !this.TelefoneLocatario1.ValidacaoTelefone())
- {
- keyValuePairs.AddValue<string, string>("TelefoneLocatario1", Messages.Invalido, true);
- }
- if (!string.IsNullOrWhiteSpace(this.PrefixoLocatario2) && !this.PrefixoLocatario2.ValidacaoPrefixo())
- {
- keyValuePairs.AddValue<string, string>("PrefixoLocatario2", Messages.Invalido, true);
- }
- if (!string.IsNullOrWhiteSpace(this.TelefoneLocatario2) && !this.TelefoneLocatario2.ValidacaoTelefone())
- {
- keyValuePairs.AddValue<string, string>("TelefoneLocatario2", Messages.Invalido, true);
- }
- if (!string.IsNullOrWhiteSpace(this.PrefixoLocatario3) && !this.PrefixoLocatario3.ValidacaoPrefixo())
- {
- keyValuePairs.AddValue<string, string>("PrefixoLocatario3", Messages.Invalido, true);
- }
- if (!string.IsNullOrWhiteSpace(this.TelefoneLocatario3) && !this.TelefoneLocatario3.ValidacaoTelefone())
- {
- keyValuePairs.AddValue<string, string>("TelefoneLocatario3", Messages.Invalido, true);
- }
- if (!string.IsNullOrWhiteSpace(base.Bairro) && base.Bairro.Length > 60)
- {
- keyValuePairs.AddValue<string, string>("Bairro", string.Format(Messages.MaiorQueLimite, 60), true);
- }
- if (!string.IsNullOrWhiteSpace(base.Cidade) && base.Cidade.Length > 30)
- {
- keyValuePairs.AddValue<string, string>("Cidade", string.Format(Messages.MaiorQueLimite, 30), true);
- }
- if (!string.IsNullOrWhiteSpace(base.Numero) && base.Numero.Length > 10)
- {
- keyValuePairs.AddValue<string, string>("Numero", string.Format(Messages.MaiorQueLimite, 10), true);
- }
- if (string.IsNullOrWhiteSpace(base.Cep))
- {
- keyValuePairs.AddValue<string, string>("Cep", Messages.Obrigatorio, true);
- }
- else if (!base.Cep.ValidacaoCep())
- {
- keyValuePairs.AddValue<string, string>("Cep", Messages.Invalido, true);
- }
- if (string.IsNullOrWhiteSpace(base.Endereco))
- {
- keyValuePairs.AddValue<string, string>("Endereco", Messages.Obrigatorio, true);
- }
- if (string.IsNullOrWhiteSpace(base.Numero))
- {
- keyValuePairs.AddValue<string, string>("Numero", Messages.Obrigatorio, true);
- }
- if (string.IsNullOrWhiteSpace(base.Bairro))
- {
- keyValuePairs.AddValue<string, string>("Bairro", Messages.Obrigatorio, true);
- }
- if (string.IsNullOrWhiteSpace(base.Cidade))
- {
- keyValuePairs.AddValue<string, string>("Cidade", Messages.Obrigatorio, true);
- }
- if (string.IsNullOrWhiteSpace(base.Estado))
- {
- keyValuePairs.AddValue<string, string>("Estado", Messages.Obrigatorio, true);
- }
- else if (!base.Estado.ValidacaoEstado())
- {
- keyValuePairs.AddValue<string, string>("Estado", Messages.Invalido, true);
- }
- return keyValuePairs;
- }
-
- public List<KeyValuePair<string, string>> ValidateGarantia()
- {
- List<KeyValuePair<string, string>> keyValuePairs = ValidationHelper.AddValue();
- if (!string.IsNullOrWhiteSpace(this.Locatario1) && this.Locatario1.Length > 100)
- {
- keyValuePairs.AddValue<string, string>("Locatario1", string.Format(Messages.MaiorQueLimite, 100), true);
- }
- if (!string.IsNullOrWhiteSpace(this.Locatario2) && this.Locatario2.Length > 100)
- {
- keyValuePairs.AddValue<string, string>("Locatario2", string.Format(Messages.MaiorQueLimite, 100), true);
- }
- if (!string.IsNullOrWhiteSpace(this.Locatario3) && this.Locatario3.Length > 100)
- {
- keyValuePairs.AddValue<string, string>("Locatario3", string.Format(Messages.MaiorQueLimite, 100), true);
- }
- if (!string.IsNullOrWhiteSpace(this.CpfLocatario1) && !this.CpfLocatario1.ValidacaoDocumento())
- {
- keyValuePairs.AddValue<string, string>("CpfLocatario1", Messages.Invalido, true);
- }
- if (!string.IsNullOrWhiteSpace(this.CpfLocatario2) && !this.CpfLocatario2.ValidacaoDocumento())
- {
- keyValuePairs.AddValue<string, string>("CpfLocatario2", Messages.Invalido, true);
- }
- if (!string.IsNullOrWhiteSpace(this.CpfLocatario3) && !this.CpfLocatario3.ValidacaoDocumento())
- {
- keyValuePairs.AddValue<string, string>("CpfLocatario3", Messages.Invalido, true);
- }
- if (!string.IsNullOrWhiteSpace(this.PrefixoLocatario1) && !this.PrefixoLocatario1.ValidacaoPrefixo())
- {
- keyValuePairs.AddValue<string, string>("PrefixoLocatario1", Messages.Invalido, true);
- }
- if (!string.IsNullOrWhiteSpace(this.TelefoneLocatario1) && !this.TelefoneLocatario1.ValidacaoTelefone())
- {
- keyValuePairs.AddValue<string, string>("TelefoneLocatario1", Messages.Invalido, true);
- }
- if (!string.IsNullOrWhiteSpace(this.PrefixoLocatario2) && !this.PrefixoLocatario2.ValidacaoPrefixo())
- {
- keyValuePairs.AddValue<string, string>("PrefixoLocatario2", Messages.Invalido, true);
- }
- if (!string.IsNullOrWhiteSpace(this.TelefoneLocatario2) && !this.TelefoneLocatario2.ValidacaoTelefone())
- {
- keyValuePairs.AddValue<string, string>("TelefoneLocatario2", Messages.Invalido, true);
- }
- if (!string.IsNullOrWhiteSpace(this.PrefixoLocatario3) && !this.PrefixoLocatario3.ValidacaoPrefixo())
- {
- keyValuePairs.AddValue<string, string>("PrefixoLocatario3", Messages.Invalido, true);
- }
- if (!string.IsNullOrWhiteSpace(this.TelefoneLocatario3) && !this.TelefoneLocatario3.ValidacaoTelefone())
- {
- keyValuePairs.AddValue<string, string>("TelefoneLocatario3", Messages.Invalido, true);
- }
- return keyValuePairs;
- }
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/Perfil.cs b/Gestor.Model/Model.Domain.Seguros/Perfil.cs
deleted file mode 100644
index e9113b8..0000000
--- a/Gestor.Model/Model.Domain.Seguros/Perfil.cs
+++ /dev/null
@@ -1,275 +0,0 @@
-using Gestor.Model.Common;
-using Gestor.Model.Domain.Generic;
-using Gestor.Model.Helper;
-using Gestor.Model.Resources;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.Runtime.CompilerServices;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class Perfil : DomainBase, IDomain
- {
- private string _nome;
-
- private string _cepCirculacao;
-
- private string _cepPernoite;
-
- public Antifurto? AntiFurto
- {
- get;
- set;
- }
-
- public string CepCirculacao
- {
- get
- {
- return this._cepCirculacao;
- }
- set
- {
- this._cepCirculacao = value;
- }
- }
-
- public string CepPernoite
- {
- get
- {
- return this._cepPernoite;
- }
- set
- {
- this._cepPernoite = value;
- }
- }
-
- public Gestor.Model.Domain.Seguros.Cliente Cliente
- {
- get;
- set;
- }
-
- public Gestor.Model.Domain.Seguros.Controle Controle
- {
- get;
- set;
- }
-
- public string Cpf
- {
- get;
- set;
- }
-
- public DistanciaTrabalho? DistanciaResidenciaTrabalho
- {
- get;
- set;
- }
-
- public Gestor.Model.Common.EstadoCivil? EstadoCivil
- {
- get;
- set;
- }
-
- public bool? EstenderCobertura
- {
- get;
- set;
- }
-
- public GaragemTrabalhoEstudo? GaragemEstudo
- {
- get;
- set;
- }
-
- public Gestor.Model.Common.GaragemResidencia? GaragemResidencia
- {
- get;
- set;
- }
-
- public GaragemTrabalhoEstudo? GaragemTrabalho
- {
- get;
- set;
- }
-
- public string Habilitacao
- {
- get;
- set;
- }
-
- public bool? Isencao
- {
- get;
- set;
- }
-
- public string KmMensal
- {
- get;
- set;
- }
-
- public DateTime? Nascimento
- {
- get;
- set;
- }
-
- public string Nome
- {
- get
- {
- string str = this._nome;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._nome = value;
- }
- }
-
- public Gestor.Model.Common.Ocupacao? Ocupacao
- {
- get;
- set;
- }
-
- public Gestor.Model.Common.Relacao? Relacao
- {
- get;
- set;
- }
-
- public bool? SeguroVida
- {
- get;
- set;
- }
-
- public Gestor.Model.Common.Sexo? Sexo
- {
- get;
- set;
- }
-
- public Gestor.Model.Common.TempoHabilitacao? TempoHabilitacao
- {
- get;
- set;
- }
-
- public Gestor.Model.Common.TipoResidencia? TipoResidencia
- {
- get;
- set;
- }
-
- public UsoDependetes? UsoDependentes
- {
- get;
- set;
- }
-
- public bool? UsoProfissional
- {
- get;
- set;
- }
-
- [JsonIgnore]
- public Func<List<KeyValuePair<string, string>>> ValidationEvent
- {
- get
- {
- Perfil perfil = this;
- return new Func<List<KeyValuePair<string, string>>>(perfil.Validate);
- }
- }
-
- public int? VeiculoResidencia
- {
- get;
- set;
- }
-
- public Perfil()
- {
- }
-
- public List<KeyValuePair<string, string>> Validate()
- {
- bool length;
- bool flag;
- List<KeyValuePair<string, string>> keyValuePairs = ValidationHelper.AddValue();
- if (this.Nascimento.HasValue && (DateTime.Compare(this.Nascimento.Value, new DateTime(1753, 1, 1)) < 0 || DateTime.Compare(this.Nascimento.Value, new DateTime(9999, 12, 31)) > 0))
- {
- keyValuePairs.AddValue<string, string>("Nascimento", string.Format(Messages.DataInvalida, Array.Empty<object>()), true);
- }
- if (string.IsNullOrWhiteSpace(this.Nome))
- {
- keyValuePairs.AddValue<string, string>("Nome", Messages.Obrigatorio, true);
- }
- else if (this.Nome.Length > 255)
- {
- keyValuePairs.AddValue<string, string>("Nome", string.Format(Messages.MaiorQueLimite, 255), true);
- }
- string kmMensal = this.KmMensal;
- if (kmMensal != null)
- {
- length = kmMensal.Length > 5;
- }
- else
- {
- length = false;
- }
- if (length)
- {
- keyValuePairs.AddValue<string, string>("KmMensal", string.Format(Messages.MaiorQueLimite, 5), true);
- }
- string habilitacao = this.Habilitacao;
- if (habilitacao != null)
- {
- flag = habilitacao.Length > 15;
- }
- else
- {
- flag = false;
- }
- if (flag)
- {
- keyValuePairs.AddValue<string, string>("Habilitacao", string.Format(Messages.MaiorQueLimite, 15), true);
- }
- if (!this.Relacao.HasValue)
- {
- keyValuePairs.AddValue<string, string>("Relacao", Messages.Obrigatorio, true);
- }
- if (!string.IsNullOrWhiteSpace(this.Cpf) && !this.Cpf.ValidacaoDocumento())
- {
- keyValuePairs.AddValue<string, string>("Cpf", Messages.Invalido, true);
- }
- if (!string.IsNullOrWhiteSpace(this.CepPernoite) && !this.CepPernoite.FormataCep().ValidacaoCep())
- {
- keyValuePairs.AddValue<string, string>("CepPernoite", Messages.Invalido, true);
- }
- if (!string.IsNullOrWhiteSpace(this.CepCirculacao) && !this.CepCirculacao.FormataCep().ValidacaoCep())
- {
- keyValuePairs.AddValue<string, string>("CepCirculacao", Messages.Invalido, true);
- }
- return keyValuePairs;
- }
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/PerfilEmpresa.cs b/Gestor.Model/Model.Domain.Seguros/PerfilEmpresa.cs
deleted file mode 100644
index e772c5d..0000000
--- a/Gestor.Model/Model.Domain.Seguros/PerfilEmpresa.cs
+++ /dev/null
@@ -1,141 +0,0 @@
-using Gestor.Model.Common;
-using Gestor.Model.Domain.Generic;
-using Gestor.Model.Helper;
-using Gestor.Model.Resources;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.Runtime.CompilerServices;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class PerfilEmpresa : DomainBase, IDomain
- {
- public DateTime? AnoConstrucao
- {
- get;
- set;
- }
-
- public Gestor.Model.Common.AtividadeEmpresa? AtividadeEmpresa
- {
- get;
- set;
- }
-
- public string AtividadePrincipal
- {
- get;
- set;
- }
-
- public bool? CaixasEletronicos
- {
- get;
- set;
- }
-
- public Gestor.Model.Domain.Seguros.Cliente Cliente
- {
- get;
- set;
- }
-
- public bool? ConstrucaoReforma
- {
- get;
- set;
- }
-
- public Gestor.Model.Domain.Seguros.Controle Controle
- {
- get;
- set;
- }
-
- public bool? DivisaTerrenoBaldio
- {
- get;
- set;
- }
-
- public string EquipamentoIncendio
- {
- get;
- set;
- }
-
- public string EquipamentoSeguranca
- {
- get;
- set;
- }
-
- public bool? ExclusivoDeposito
- {
- get;
- set;
- }
-
- public bool? Isopainel
- {
- get;
- set;
- }
-
- public Gestor.Model.Common.Localizacao? Localizacao
- {
- get;
- set;
- }
-
- public bool? PatrimonioHistorio
- {
- get;
- set;
- }
-
- public bool? PossuiTelhado
- {
- get;
- set;
- }
-
- public Gestor.Model.Common.TipoConstrucao? TipoConstrucao
- {
- get;
- set;
- }
-
- public TipoPavimentacao? TipoPavimento
- {
- get;
- set;
- }
-
- [JsonIgnore]
- public Func<List<KeyValuePair<string, string>>> ValidationEvent
- {
- get
- {
- PerfilEmpresa perfilEmpresa = this;
- return new Func<List<KeyValuePair<string, string>>>(perfilEmpresa.Validate);
- }
- }
-
- public PerfilEmpresa()
- {
- }
-
- public List<KeyValuePair<string, string>> Validate()
- {
- List<KeyValuePair<string, string>> keyValuePairs = ValidationHelper.AddValue();
- Gestor.Model.Common.AtividadeEmpresa? atividadeEmpresa = this.AtividadeEmpresa;
- if (atividadeEmpresa.GetValueOrDefault() == Gestor.Model.Common.AtividadeEmpresa.Outro & atividadeEmpresa.HasValue && (this.AtividadePrincipal == null || this.AtividadePrincipal == ""))
- {
- keyValuePairs.AddValue<string, string>("Atividade Empresa", Messages.Invalido, true);
- }
- return keyValuePairs;
- }
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/PermissaoArquivoDigital.cs b/Gestor.Model/Model.Domain.Seguros/PermissaoArquivoDigital.cs
deleted file mode 100644
index 39ab35a..0000000
--- a/Gestor.Model/Model.Domain.Seguros/PermissaoArquivoDigital.cs
+++ /dev/null
@@ -1,69 +0,0 @@
-using Gestor.Model.Attributes;
-using Gestor.Model.Common;
-using Gestor.Model.Domain.Generic;
-using Gestor.Model.Validation;
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Runtime.CompilerServices;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class PermissaoArquivoDigital : DomainBase
- {
- [Log(true)]
- public bool Consultar
- {
- get;
- set;
- }
-
- [Log(true)]
- public bool Excluir
- {
- get;
- set;
- }
-
- [Log(true)]
- public bool Incluir
- {
- get;
- set;
- }
-
- [ForceLog(true)]
- [Log(true)]
- public TipoArquivoDigital Tela
- {
- get;
- set;
- }
-
- public Gestor.Model.Domain.Seguros.Usuario Usuario
- {
- get;
- set;
- }
-
- public PermissaoArquivoDigital()
- {
- }
-
- public List<TupleList> Log()
- {
- return new List<TupleList>()
- {
- new TupleList()
- {
- Tuples = new ObservableCollection<Tuple<string, string, string>>()
- {
- new Tuple<string, string, string>("$TELA", this.Tela.GetDescription(), ""),
- new Tuple<string, string, string>(" INCLUIR", (this.Incluir ? "SIM" : "NÃO"), ""),
- new Tuple<string, string, string>(" EXCLUIR", (this.Excluir ? "SIM" : "NÃO"), "")
- }
- }
- };
- }
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/PermissaoUsuario.cs b/Gestor.Model/Model.Domain.Seguros/PermissaoUsuario.cs
deleted file mode 100644
index 92ea6f6..0000000
--- a/Gestor.Model/Model.Domain.Seguros/PermissaoUsuario.cs
+++ /dev/null
@@ -1,57 +0,0 @@
-using Gestor.Model.Attributes;
-using Gestor.Model.Common;
-using Gestor.Model.Domain.Generic;
-using System;
-using System.Runtime.CompilerServices;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class PermissaoUsuario : DomainBase
- {
- [Log(true)]
- public bool Alterar
- {
- get;
- set;
- }
-
- [Log(true)]
- public bool Consultar
- {
- get;
- set;
- }
-
- [Log(true)]
- public bool Excluir
- {
- get;
- set;
- }
-
- [Log(true)]
- public bool Incluir
- {
- get;
- set;
- }
-
- [ForceLog(true)]
- [Log(true)]
- public TipoTela Tela
- {
- get;
- set;
- }
-
- public Gestor.Model.Domain.Seguros.Usuario Usuario
- {
- get;
- set;
- }
-
- public PermissaoUsuario()
- {
- }
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/Produto.cs b/Gestor.Model/Model.Domain.Seguros/Produto.cs
deleted file mode 100644
index 85f07c5..0000000
--- a/Gestor.Model/Model.Domain.Seguros/Produto.cs
+++ /dev/null
@@ -1,120 +0,0 @@
-using Gestor.Model.Attributes;
-using Gestor.Model.Domain.Generic;
-using Gestor.Model.Helper;
-using Gestor.Model.Resources;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel;
-using System.Runtime.CompilerServices;
-using System.Threading;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class Produto : DomainBase, IDomain, INotifyPropertyChanged
- {
- private bool _selecionado;
-
- private string _nome;
-
- [Log(true)]
- public bool Ativo
- {
- get;
- set;
- }
-
- [Description("PRODUTO")]
- [Log(true)]
- [Name(true)]
- public string Nome
- {
- get
- {
- string str = this._nome;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._nome = value;
- }
- }
-
- public bool Selecionado
- {
- get
- {
- return this._selecionado;
- }
- set
- {
- if (value == this._selecionado)
- {
- return;
- }
- this._selecionado = value;
- this.OnPropertyChanged("Selecionado");
- }
- }
-
- [JsonIgnore]
- public Func<List<KeyValuePair<string, string>>> ValidationEvent
- {
- get
- {
- Produto produto = this;
- return new Func<List<KeyValuePair<string, string>>>(produto.Validate);
- }
- }
-
- public Produto()
- {
- }
-
- public List<TupleList> Log()
- {
- return new List<TupleList>()
- {
- new TupleList()
- {
- Tuples = new ObservableCollection<Tuple<string, string, string>>()
- {
- new Tuple<string, string, string>("NOME", (string.IsNullOrWhiteSpace(this.Nome) ? "" : this.Nome), ""),
- new Tuple<string, string, string>("ATIVO", (this.Ativo ? "SIM" : "NÃO"), "")
- }
- }
- };
- }
-
- protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
- {
- PropertyChangedEventHandler propertyChangedEventHandler = this.PropertyChanged;
- if (propertyChangedEventHandler == null)
- {
- return;
- }
- propertyChangedEventHandler(this, new PropertyChangedEventArgs(propertyName));
- }
-
- public List<KeyValuePair<string, string>> Validate()
- {
- List<KeyValuePair<string, string>> keyValuePairs = ValidationHelper.AddValue();
- if (string.IsNullOrWhiteSpace(this.Nome))
- {
- keyValuePairs.AddValue<string, string>("Nome", Messages.Obrigatorio, true);
- }
- else if (this.Nome.Length > 60)
- {
- keyValuePairs.AddValue<string, string>("Nome", string.Format(Messages.MaiorQueLimite, 60), true);
- }
- return keyValuePairs;
- }
-
- public event PropertyChangedEventHandler PropertyChanged;
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/Prospeccao.cs b/Gestor.Model/Model.Domain.Seguros/Prospeccao.cs
deleted file mode 100644
index 059b612..0000000
--- a/Gestor.Model/Model.Domain.Seguros/Prospeccao.cs
+++ /dev/null
@@ -1,400 +0,0 @@
-using Gestor.Model.Attributes;
-using Gestor.Model.Common;
-using Gestor.Model.Domain.Common;
-using Gestor.Model.Domain.Ferramentas;
-using Gestor.Model.Domain.Generic;
-using Gestor.Model.Helper;
-using Gestor.Model.Resources;
-using Gestor.Model.Validation;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel;
-using System.Runtime.CompilerServices;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class Prospeccao : DomainBase, IDomain
- {
- private string _nome;
-
- private string _item;
-
- private string _observacao;
-
- public bool AbrirTarefa
- {
- get;
- set;
- }
-
- public List<ArquivoDigital> Anexos
- {
- get;
- set;
- }
-
- public bool CriarTarefa
- {
- get;
- set;
- }
-
- public DateTime? DataCriacao
- {
- get;
- set;
- }
-
- [Description("DOCUMENTO")]
- public string Documento
- {
- get;
- set;
- }
-
- [Description("E-MAIL")]
- public string Email
- {
- get;
- set;
- }
-
- public bool Excluido
- {
- get;
- set;
- }
-
- public long IdEmpresa
- {
- get;
- set;
- }
-
- [Description("ITEM")]
- public string Item
- {
- get
- {
- string str = this._item;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._item = value;
- }
- }
-
- [Description("NASCIMENTO")]
- [Tipo("DATA?")]
- public DateTime? Nascimento
- {
- get;
- set;
- }
-
- [Description("CLIENTE")]
- public string Nome
- {
- get
- {
- string str = this._nome;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._nome = value;
- }
- }
-
- public string Observacao
- {
- get
- {
- string str = this._observacao;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._observacao = value;
- }
- }
-
- [Description("DDD")]
- public string Prefixo1
- {
- get;
- set;
- }
-
- [Description("DDD")]
- public string Prefixo2
- {
- get;
- set;
- }
-
- public Gestor.Model.Domain.Seguros.Produto Produto
- {
- get;
- set;
- }
-
- public Gestor.Model.Domain.Seguros.Ramo Ramo
- {
- get;
- set;
- }
-
- public bool Renovacao
- {
- get;
- set;
- }
-
- [Description("STATUS")]
- [Tipo("ENUM?")]
- public StatusProspeccao? Status
- {
- get;
- set;
- }
-
- [Description("STATUS PERSONALIZADO")]
- public StatusDeProspeccao StatusPersonalizado
- {
- get;
- set;
- }
-
- public Gestor.Model.Domain.Ferramentas.Tarefa Tarefa
- {
- get;
- set;
- }
-
- [Description("TELEFONE")]
- public string Telefone1
- {
- get;
- set;
- }
-
- [Description("TELEFONE")]
- public string Telefone2
- {
- get;
- set;
- }
-
- [Description("TIPO")]
- public string Tipo
- {
- get;
- set;
- }
-
- public long UsuarioCriacao
- {
- get;
- set;
- }
-
- [JsonIgnore]
- public Func<List<KeyValuePair<string, string>>> ValidationEvent
- {
- get
- {
- Prospeccao prospeccao = this;
- return new Func<List<KeyValuePair<string, string>>>(prospeccao.Validate);
- }
- }
-
- [Description("VALOR")]
- public decimal Valor
- {
- get;
- set;
- }
-
- public Gestor.Model.Domain.Seguros.Vendedor Vendedor
- {
- get;
- set;
- }
-
- [Description("VIGÊNCIA FINAL")]
- [Tipo("DATA?")]
- public DateTime? VigenciaFinal
- {
- get;
- set;
- }
-
- public Prospeccao()
- {
- }
-
- public List<TupleList> Log()
- {
- string shortDateString;
- string nome;
- string str;
- string nome1;
- string description;
- List<TupleList> tupleLists = new List<TupleList>();
- TupleList tupleList = new TupleList();
- ObservableCollection<Tuple<string, string, string>> observableCollection = new ObservableCollection<Tuple<string, string, string>>()
- {
- new Tuple<string, string, string>("NOME", (string.IsNullOrWhiteSpace(this.Nome) ? "" : this.Nome), ""),
- new Tuple<string, string, string>("DOCUMENTO", (string.IsNullOrWhiteSpace(this.Documento) ? "" : this.Documento), "")
- };
- DateTime? nascimento = this.Nascimento;
- if (!nascimento.HasValue)
- {
- shortDateString = "";
- }
- else
- {
- nascimento = this.Nascimento;
- if (nascimento.HasValue)
- {
- shortDateString = nascimento.GetValueOrDefault().ToShortDateString();
- }
- else
- {
- shortDateString = null;
- }
- }
- observableCollection.Add(new Tuple<string, string, string>("NASCIMENTO", shortDateString, ""));
- observableCollection.Add(new Tuple<string, string, string>("PRIMEIRO PREFIXO", (string.IsNullOrWhiteSpace(this.Prefixo1) ? "" : this.Prefixo1), ""));
- observableCollection.Add(new Tuple<string, string, string>("PRIMEIRO TELEFONE", (string.IsNullOrWhiteSpace(this.Telefone1) ? "" : this.Telefone1), ""));
- observableCollection.Add(new Tuple<string, string, string>("SEGUNDO PREFIXO", (string.IsNullOrWhiteSpace(this.Prefixo2) ? "" : this.Prefixo2), ""));
- observableCollection.Add(new Tuple<string, string, string>("SEGUNDO TELEFONE", (string.IsNullOrWhiteSpace(this.Telefone2) ? "" : this.Telefone2), ""));
- observableCollection.Add(new Tuple<string, string, string>("E-MAIL", (string.IsNullOrWhiteSpace(this.Email) ? "" : this.Email), ""));
- observableCollection.Add(new Tuple<string, string, string>("ITEM", (string.IsNullOrWhiteSpace(this.Item) ? "" : this.Item), ""));
- Gestor.Model.Domain.Seguros.Produto produto = this.Produto;
- if (produto != null)
- {
- nome = produto.Nome;
- }
- else
- {
- nome = null;
- }
- observableCollection.Add(new Tuple<string, string, string>("PRODUTO", (string.IsNullOrWhiteSpace(nome) ? "" : this.Produto.Nome), ""));
- nascimento = this.VigenciaFinal;
- if (!nascimento.HasValue)
- {
- str = "";
- }
- else
- {
- nascimento = this.VigenciaFinal;
- if (nascimento.HasValue)
- {
- str = nascimento.GetValueOrDefault().ToShortDateString();
- }
- else
- {
- str = null;
- }
- }
- observableCollection.Add(new Tuple<string, string, string>("VENCIMENTO", str, ""));
- Gestor.Model.Domain.Seguros.Vendedor vendedor = this.Vendedor;
- if (vendedor != null)
- {
- nome1 = vendedor.Nome;
- }
- else
- {
- nome1 = null;
- }
- observableCollection.Add(new Tuple<string, string, string>("VENDEDOR", (string.IsNullOrWhiteSpace(nome1) ? "" : this.Vendedor.Nome), ""));
- StatusProspeccao? status = this.Status;
- if (!status.HasValue)
- {
- description = "";
- }
- else
- {
- status = this.Status;
- if (status.HasValue)
- {
- description = status.GetValueOrDefault().GetDescription();
- }
- else
- {
- description = null;
- }
- }
- observableCollection.Add(new Tuple<string, string, string>("STATUS", description, ""));
- observableCollection.Add(new Tuple<string, string, string>("STATUS PERSONALIZADO", (this.StatusPersonalizado == null ? "" : this.StatusPersonalizado.Nome), ""));
- observableCollection.Add(new Tuple<string, string, string>("OBSERVAÇÃO", (string.IsNullOrWhiteSpace(this.Observacao) ? "" : this.Observacao), ""));
- tupleList.Tuples = observableCollection;
- tupleLists.Add(tupleList);
- List<TupleList> tupleLists1 = tupleLists;
- if (this.Tarefa != null)
- {
- ObservableCollection<Tuple<string, string, string>> observableCollection1 = new ObservableCollection<Tuple<string, string, string>>()
- {
- new Tuple<string, string, string>("TAREFA$", "", ""),
- new Tuple<string, string, string>(" RESPONSÁVEL", (string.IsNullOrWhiteSpace(this.Tarefa.Usuario.Nome) ? "" : this.Tarefa.Usuario.Nome), "")
- };
- DateTime agendamento = this.Tarefa.Agendamento;
- observableCollection1.Add(new Tuple<string, string, string>(" DATA DO AGENDAMENTO", agendamento.ToShortDateString(), ""));
- agendamento = this.Tarefa.Agendamento;
- observableCollection1.Add(new Tuple<string, string, string>(" HORA DO AGENDAMENTO", agendamento.ToShortTimeString(), ""));
- tupleLists1.Add(new TupleList()
- {
- Tuples = observableCollection1
- });
- }
- return tupleLists1;
- }
-
- public List<KeyValuePair<string, string>> Validate()
- {
- List<KeyValuePair<string, string>> keyValuePairs = ValidationHelper.AddValue();
- if (this.Nascimento.HasValue && (DateTime.Compare(this.Nascimento.Value, new DateTime(1753, 1, 1)) < 0 || DateTime.Compare(this.Nascimento.Value, new DateTime(9999, 12, 31)) > 0))
- {
- keyValuePairs.AddValue<string, string>("Nascimento", string.Format(Messages.DataInvalida, Array.Empty<object>()), true);
- }
- if (this.VigenciaFinal.HasValue && (DateTime.Compare(this.VigenciaFinal.Value, new DateTime(1753, 1, 1)) < 0 || DateTime.Compare(this.VigenciaFinal.Value, new DateTime(9999, 12, 31)) > 0))
- {
- keyValuePairs.AddValue<string, string>("VigenciaFinal|VENCIMENTO", string.Format(Messages.DataInvalida, Array.Empty<object>()), true);
- }
- if (string.IsNullOrWhiteSpace(this.Nome))
- {
- keyValuePairs.AddValue<string, string>("Nome", Messages.Obrigatorio, true);
- }
- if (string.IsNullOrWhiteSpace(this.Telefone1) && string.IsNullOrWhiteSpace(this.Telefone2) && string.IsNullOrWhiteSpace(this.Email))
- {
- keyValuePairs.AddValue<string, string>("Telefone1|TELEFONE 1", Messages.Obrigatorio, true);
- }
- if (!this.VigenciaFinal.HasValue)
- {
- keyValuePairs.AddValue<string, string>("VigenciaFinal|VENCIMENTO", Messages.Obrigatorio, true);
- }
- if (string.IsNullOrWhiteSpace(this.Item))
- {
- keyValuePairs.AddValue<string, string>("Item", Messages.Obrigatorio, true);
- }
- return keyValuePairs;
- }
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/ProspeccaoToPrint.cs b/Gestor.Model/Model.Domain.Seguros/ProspeccaoToPrint.cs
deleted file mode 100644
index 389234b..0000000
--- a/Gestor.Model/Model.Domain.Seguros/ProspeccaoToPrint.cs
+++ /dev/null
@@ -1,149 +0,0 @@
-using Gestor.Model.Attributes;
-using Gestor.Model.Common;
-using System;
-using System.ComponentModel;
-using System.Runtime.CompilerServices;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class ProspeccaoToPrint
- {
- private string _nome;
-
- private string _item;
-
- [Description("DOCUMENTO")]
- public string Documento
- {
- get;
- set;
- }
-
- [Description("E-MAIL")]
- public string Email
- {
- get;
- set;
- }
-
- [Description("ITEM")]
- public string Item
- {
- get
- {
- string str = this._item;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._item = value;
- }
- }
-
- [Description("NASCIMENTO")]
- [Tipo("DATA?")]
- public DateTime? Nascimento
- {
- get;
- set;
- }
-
- [Description("CLIENTE")]
- public string Nome
- {
- get
- {
- string str = this._nome;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._nome = value;
- }
- }
-
- [Description("DDD")]
- public string Prefixo1
- {
- get;
- set;
- }
-
- [Description("DDD")]
- public string Prefixo2
- {
- get;
- set;
- }
-
- [Description("STATUS")]
- [Tipo("ENUM?")]
- public StatusProspeccao? Status
- {
- get;
- set;
- }
-
- [Description("STATUS PERSONALIZADO")]
- public string StatusPersonalizadotoPrint
- {
- get;
- set;
- }
-
- [Description("TELEFONE")]
- public string Telefone1
- {
- get;
- set;
- }
-
- [Description("TELEFONE")]
- public string Telefone2
- {
- get;
- set;
- }
-
- [Description("TIPO")]
- public string Tipo
- {
- get;
- set;
- }
-
- [Description("VALOR")]
- public decimal Valor
- {
- get;
- set;
- }
-
- [Description("VENDEDOR")]
- public string Vendedor
- {
- get;
- set;
- }
-
- [Description("VIGÊNCIA FINAL")]
- [Tipo("DATA?")]
- public DateTime? VigenciaFinal
- {
- get;
- set;
- }
-
- public ProspeccaoToPrint()
- {
- }
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/Qualificacao.cs b/Gestor.Model/Model.Domain.Seguros/Qualificacao.cs
deleted file mode 100644
index 06e84ed..0000000
--- a/Gestor.Model/Model.Domain.Seguros/Qualificacao.cs
+++ /dev/null
@@ -1,152 +0,0 @@
-using Gestor.Model.Attributes;
-using Gestor.Model.Domain.Generic;
-using Gestor.Model.Helper;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel;
-using System.Globalization;
-using System.Runtime.CompilerServices;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class Qualificacao : DomainBase, IDomain
- {
- [Description("MÉDIA DE COMISSÃO BRONZE")]
- [Log(true)]
- public decimal Comissao1
- {
- get;
- set;
- }
-
- [Description("MÉDIA DE COMISSÃO PRATA")]
- [Log(true)]
- public decimal Comissao2
- {
- get;
- set;
- }
-
- [Description("MÉDIA DE COMISSÃO OURO")]
- [Log(true)]
- public decimal Comissao3
- {
- get;
- set;
- }
-
- [Description("PRÊMIO LÍQUIDO BROZE")]
- [Log(true)]
- public decimal Liquido1
- {
- get;
- set;
- }
-
- [Description("PRÊMIO LÍQUIDO PRATA")]
- [Log(true)]
- public decimal Liquido2
- {
- get;
- set;
- }
-
- [Description("PRÊMIO LÍQUIDO OURO")]
- [Log(true)]
- public decimal Liquido3
- {
- get;
- set;
- }
-
- [Description("RESULTADO BRONZE")]
- [Log(true)]
- public decimal Resultado1
- {
- get;
- set;
- }
-
- [Description("RESULTADO PRATA")]
- [Log(true)]
- public decimal Resultado2
- {
- get;
- set;
- }
-
- [Description("RESULTADO OURO")]
- [Log(true)]
- public decimal Resultado3
- {
- get;
- set;
- }
-
- [JsonIgnore]
- public Func<List<KeyValuePair<string, string>>> ValidationEvent
- {
- get
- {
- Qualificacao qualificacao = this;
- return new Func<List<KeyValuePair<string, string>>>(qualificacao.Validate);
- }
- }
-
- public Qualificacao()
- {
- }
-
- public List<TupleList> Log()
- {
- List<TupleList> tupleLists = new List<TupleList>();
- TupleList tupleList = new TupleList();
- ObservableCollection<Tuple<string, string, string>> observableCollection = new ObservableCollection<Tuple<string, string, string>>()
- {
- new Tuple<string, string, string>("PRÊMIO LÍQUIDO$", "", "")
- };
- decimal liquido1 = this.Liquido1;
- observableCollection.Add(new Tuple<string, string, string>(" BRONZE", liquido1.ToString(new CultureInfo("pt-BR")), ""));
- liquido1 = this.Liquido2;
- observableCollection.Add(new Tuple<string, string, string>(" PRATA", liquido1.ToString(new CultureInfo("pt-BR")), ""));
- liquido1 = this.Liquido3;
- observableCollection.Add(new Tuple<string, string, string>(" OURO", liquido1.ToString(new CultureInfo("pt-BR")), ""));
- tupleList.Tuples = observableCollection;
- tupleLists.Add(tupleList);
- TupleList tupleList1 = new TupleList();
- ObservableCollection<Tuple<string, string, string>> observableCollection1 = new ObservableCollection<Tuple<string, string, string>>()
- {
- new Tuple<string, string, string>("MÉDIA DE COMISSÃO$", "", "")
- };
- liquido1 = this.Comissao1;
- observableCollection1.Add(new Tuple<string, string, string>(" BRONZE", liquido1.ToString(new CultureInfo("pt-BR")), ""));
- liquido1 = this.Comissao2;
- observableCollection1.Add(new Tuple<string, string, string>(" PRATA", liquido1.ToString(new CultureInfo("pt-BR")), ""));
- liquido1 = this.Comissao3;
- observableCollection1.Add(new Tuple<string, string, string>(" OURO", liquido1.ToString(new CultureInfo("pt-BR")), ""));
- tupleList1.Tuples = observableCollection1;
- tupleLists.Add(tupleList1);
- TupleList tupleList2 = new TupleList();
- ObservableCollection<Tuple<string, string, string>> observableCollection2 = new ObservableCollection<Tuple<string, string, string>>()
- {
- new Tuple<string, string, string>("RESULTADO$", "", "")
- };
- liquido1 = this.Resultado1;
- observableCollection2.Add(new Tuple<string, string, string>(" BRONZE", liquido1.ToString(new CultureInfo("pt-BR")), ""));
- liquido1 = this.Resultado2;
- observableCollection2.Add(new Tuple<string, string, string>(" PRATA", liquido1.ToString(new CultureInfo("pt-BR")), ""));
- liquido1 = this.Resultado3;
- observableCollection2.Add(new Tuple<string, string, string>(" OURO", liquido1.ToString(new CultureInfo("pt-BR")), ""));
- tupleList2.Tuples = observableCollection2;
- tupleLists.Add(tupleList2);
- return tupleLists;
- }
-
- public List<KeyValuePair<string, string>> Validate()
- {
- return ValidationHelper.AddValue();
- }
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/Ramo.cs b/Gestor.Model/Model.Domain.Seguros/Ramo.cs
deleted file mode 100644
index 32f3099..0000000
--- a/Gestor.Model/Model.Domain.Seguros/Ramo.cs
+++ /dev/null
@@ -1,165 +0,0 @@
-using Gestor.Model.Attributes;
-using Gestor.Model.Domain.Generic;
-using Gestor.Model.Helper;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel;
-using System.Globalization;
-using System.Runtime.CompilerServices;
-using System.Threading;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class Ramo : DomainBase, IDomain, INotifyPropertyChanged
- {
- private bool _selecionado;
-
- private string _nome;
-
- private string _ramoSusep;
-
- [Log(true)]
- public bool Ativo
- {
- get;
- set;
- }
-
- public long CodigoSusep
- {
- get;
- set;
- }
-
- public bool Fatura
- {
- get;
- set;
- }
-
- [Log(true)]
- public decimal Iof
- {
- get;
- set;
- }
-
- [Description("RAMO")]
- [Log(true)]
- [Name(true)]
- public string Nome
- {
- get
- {
- string str = this._nome;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._nome = value;
- }
- }
-
- public string RamoSusep
- {
- get
- {
- string str = this._ramoSusep;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._ramoSusep = value;
- }
- }
-
- public bool Selecionado
- {
- get
- {
- return this._selecionado;
- }
- set
- {
- if (value == this._selecionado)
- {
- return;
- }
- this._selecionado = value;
- this.OnPropertyChanged("Selecionado");
- }
- }
-
- [JsonIgnore]
- public Func<List<KeyValuePair<string, string>>> ValidationEvent
- {
- get
- {
- Ramo ramo = this;
- return new Func<List<KeyValuePair<string, string>>>(ramo.Validate);
- }
- }
-
- public Ramo()
- {
- }
-
- public List<TupleList> Log(List<CoberturaPadrao> listCoberturas)
- {
- List<TupleList> tupleLists = new List<TupleList>();
- TupleList tupleList = new TupleList();
- ObservableCollection<Tuple<string, string, string>> observableCollection = new ObservableCollection<Tuple<string, string, string>>()
- {
- new Tuple<string, string, string>("NOME", (string.IsNullOrWhiteSpace(this.Nome) ? "" : this.Nome), "")
- };
- decimal iof = this.Iof / new decimal(100);
- observableCollection.Add(new Tuple<string, string, string>("I.O.F.", iof.ToString("P", new CultureInfo("pt-BR", false)), ""));
- observableCollection.Add(new Tuple<string, string, string>("ATIVO", (this.Ativo ? "SIM" : "NÃO"), ""));
- tupleList.Tuples = observableCollection;
- tupleLists.Add(tupleList);
- List<TupleList> tupleLists1 = tupleLists;
- ObservableCollection<Tuple<string, string, string>> observableCollection1 = new ObservableCollection<Tuple<string, string, string>>()
- {
- new Tuple<string, string, string>("COBERTURAS$", "", "")
- };
- foreach (CoberturaPadrao listCobertura in listCoberturas)
- {
- observableCollection1.Add(new Tuple<string, string, string>(string.Format(" COBERTURA {0}$", listCoberturas.IndexOf(listCobertura) + 1), "", ""));
- observableCollection1.Add(new Tuple<string, string, string>(" DESCRIÇÃO", (string.IsNullOrWhiteSpace(listCobertura.Descricao) ? "" : listCobertura.Descricao.ToUpper()), ""));
- observableCollection1.Add(new Tuple<string, string, string>(" PADRÃO", (listCobertura.Padrao ? "SIM" : "NÃO"), ""));
- }
- tupleLists1.Add(new TupleList()
- {
- Tuples = observableCollection1
- });
- return tupleLists1;
- }
-
- protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
- {
- PropertyChangedEventHandler propertyChangedEventHandler = this.PropertyChanged;
- if (propertyChangedEventHandler == null)
- {
- return;
- }
- propertyChangedEventHandler(this, new PropertyChangedEventArgs(propertyName));
- }
-
- public List<KeyValuePair<string, string>> Validate()
- {
- return ValidationHelper.AddValue();
- }
-
- public event PropertyChangedEventHandler PropertyChanged;
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/Repasse.cs b/Gestor.Model/Model.Domain.Seguros/Repasse.cs
deleted file mode 100644
index 691586a..0000000
--- a/Gestor.Model/Model.Domain.Seguros/Repasse.cs
+++ /dev/null
@@ -1,187 +0,0 @@
-using Gestor.Model.Common;
-using Gestor.Model.Domain.Generic;
-using Gestor.Model.Helper;
-using Gestor.Model.Resources;
-using Gestor.Model.Validation;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Runtime.CompilerServices;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class Repasse : DomainBase, IDomain
- {
- private string _incidenciaVendedor = "";
-
- private string _pgtoVendedor = "";
-
- public bool Ativo
- {
- get;
- set;
- }
-
- public BaseRepasse? Base
- {
- get;
- set;
- }
-
- public FormaRepasse? Forma
- {
- get;
- set;
- }
-
- public TipoIncidencia? Incidencia
- {
- get;
- set;
- }
-
- public string IncidenciaVendedor
- {
- get
- {
- string description = this.Incidencia.GetDescription();
- string str = description;
- this._incidenciaVendedor = description;
- return str;
- }
- }
-
- public string PagtoVendedor
- {
- get
- {
- string description = this.Forma.GetDescription();
- string str = description;
- this._pgtoVendedor = description;
- return str;
- }
- }
-
- public Gestor.Model.Domain.Seguros.Ramo Ramo
- {
- get;
- set;
- }
-
- public long? Seguradora
- {
- get;
- set;
- }
-
- public TipoRepasse? Tipo
- {
- get;
- set;
- }
-
- [JsonIgnore]
- public Func<List<KeyValuePair<string, string>>> ValidationEvent
- {
- get
- {
- Repasse repasse = this;
- return new Func<List<KeyValuePair<string, string>>>(repasse.Validate);
- }
- }
-
- public decimal ValorNovo
- {
- get;
- set;
- }
-
- public decimal ValorRenovacao
- {
- get;
- set;
- }
-
- public Gestor.Model.Domain.Seguros.Vendedor Vendedor
- {
- get;
- set;
- }
-
- public List<VinculoRepasse> Vinculo
- {
- get;
- set;
- }
-
- public Repasse()
- {
- }
-
- public List<TupleList> Log()
- {
- return new List<TupleList>()
- {
- new TupleList()
- {
- Tuples = new ObservableCollection<Tuple<string, string, string>>()
- {
- new Tuple<string, string, string>("TIPO", this.Tipo.GetDescription(), ""),
- new Tuple<string, string, string>("VALOR NOVO", string.Format("{0:##.00}", this.ValorNovo), ""),
- new Tuple<string, string, string>("VALOR RENOVAÇÃO", string.Format("{0:##.00}", this.ValorRenovacao), ""),
- new Tuple<string, string, string>("INCIDÊNCIA", this.Incidencia.GetDescription(), ""),
- new Tuple<string, string, string>("FORMA PAGAMENTO", this.Forma.GetDescription(), ""),
- new Tuple<string, string, string>("BASE PAGAMENTO", this.Base.GetDescription(), ""),
- new Tuple<string, string, string>("ATIVO", (this.Ativo ? "SIM" : "NÃO"), "")
- }
- }
- };
- }
-
- public List<KeyValuePair<string, string>> Validate()
- {
- List<KeyValuePair<string, string>> keyValuePairs = ValidationHelper.AddValue();
- if (this.Vendedor == null)
- {
- keyValuePairs.AddValue<string, string>("Vendedor", Messages.Obrigatorio, true);
- }
- if (TipoRepasse.CoCorretagem != this.Tipo.GetValueOrDefault() && this.ValorNovo == decimal.Zero)
- {
- keyValuePairs.AddValue<string, string>("ValorNovo", Messages.Obrigatorio, true);
- }
- if (TipoRepasse.CoCorretagem != this.Tipo.GetValueOrDefault() && this.ValorRenovacao == decimal.Zero)
- {
- keyValuePairs.AddValue<string, string>("ValorRenovacao", Messages.Obrigatorio, true);
- }
- if (!this.Tipo.HasValue)
- {
- keyValuePairs.AddValue<string, string>("Tipo", Messages.Obrigatorio, true);
- }
- if (!this.Incidencia.HasValue && this.Forma.HasValue && this.Forma.GetValueOrDefault() == FormaRepasse.Recebimento)
- {
- keyValuePairs.AddValue<string, string>("Incidencia", Messages.Obrigatorio, true);
- }
- if (!this.Forma.HasValue)
- {
- keyValuePairs.AddValue<string, string>("Forma", Messages.Obrigatorio, true);
- }
- if (this.Forma.HasValue && this.Forma.GetValueOrDefault() != FormaRepasse.Recebimento)
- {
- if (!this.Base.HasValue)
- {
- keyValuePairs.AddValue<string, string>("Base", Messages.Obrigatorio, true);
- }
- if (this.Forma.GetValueOrDefault() == FormaRepasse.Prazo && this.Base.GetValueOrDefault() != BaseRepasse.Vencimento)
- {
- keyValuePairs.AddValue<string, string>("Base", Messages.Invalido, true);
- }
- }
- if (this.Forma.HasValue && this.Forma.GetValueOrDefault() == FormaRepasse.Recebimento && this.Base.HasValue)
- {
- keyValuePairs.AddValue<string, string>("Base", Messages.Invalido, true);
- }
- return keyValuePairs;
- }
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/ResponsavelAssinatura.cs b/Gestor.Model/Model.Domain.Seguros/ResponsavelAssinatura.cs
deleted file mode 100644
index 6896680..0000000
--- a/Gestor.Model/Model.Domain.Seguros/ResponsavelAssinatura.cs
+++ /dev/null
@@ -1,109 +0,0 @@
-using Gestor.Model.Domain.Generic;
-using Gestor.Model.Helper;
-using Gestor.Model.Resources;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.Runtime.CompilerServices;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class ResponsavelAssinatura : DomainBase, IDomain
- {
- public string DocumentoResponsavel
- {
- get;
- set;
- }
-
- public string EmailResponsavel
- {
- get;
- set;
- }
-
- public long IdCliente
- {
- get;
- set;
- }
-
- public string NomeResponsavel
- {
- get;
- set;
- }
-
- [JsonIgnore]
- public Func<List<KeyValuePair<string, string>>> ValidationEvent
- {
- get
- {
- ResponsavelAssinatura responsavelAssinatura = this;
- return new Func<List<KeyValuePair<string, string>>>(responsavelAssinatura.Validate);
- }
- }
-
- public ResponsavelAssinatura()
- {
- }
-
- public List<KeyValuePair<string, string>> Validate()
- {
- int? nullable;
- int? nullable1;
- List<KeyValuePair<string, string>> keyValuePairs = ValidationHelper.AddValue();
- if (string.IsNullOrWhiteSpace(this.NomeResponsavel))
- {
- nullable = null;
- nullable1 = nullable;
- }
- else
- {
- string nomeResponsavel = this.NomeResponsavel;
- if (nomeResponsavel != null)
- {
- nullable1 = new int?((int)nomeResponsavel.Trim().Split(new char[] { ' ' }).Length);
- }
- else
- {
- nullable = null;
- nullable1 = nullable;
- }
- }
- int? nullable2 = nullable1;
- if (nullable2.HasValue)
- {
- nullable = nullable2;
- if (nullable.GetValueOrDefault() <= 1 & nullable.HasValue)
- {
- keyValuePairs.AddValue<string, string>("NomeResponsavel", Messages.NomeInvalido, true);
- }
- }
- if (!string.IsNullOrWhiteSpace(this.DocumentoResponsavel) && !this.DocumentoResponsavel.ValidacaoDocumento())
- {
- keyValuePairs.AddValue<string, string>("DocumentoResponsavel", Messages.Invalido, true);
- }
- if (!string.IsNullOrWhiteSpace(this.EmailResponsavel) && !this.EmailResponsavel.ValidacaoEmail())
- {
- keyValuePairs.AddValue<string, string>("EmailResponsavel", Messages.Invalido, true);
- }
- if (nullable2.HasValue || !string.IsNullOrWhiteSpace(this.DocumentoResponsavel) || !string.IsNullOrWhiteSpace(this.EmailResponsavel))
- {
- if (!nullable2.HasValue)
- {
- keyValuePairs.AddValue<string, string>("NomeResponsavel", Messages.Obrigatorio, true);
- }
- if (string.IsNullOrWhiteSpace(this.DocumentoResponsavel))
- {
- keyValuePairs.AddValue<string, string>("DocumentoResponsavel", Messages.Obrigatorio, true);
- }
- if (string.IsNullOrWhiteSpace(this.EmailResponsavel))
- {
- keyValuePairs.AddValue<string, string>("EmailResponsavel", Messages.Obrigatorio, true);
- }
- }
- return keyValuePairs;
- }
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/RestricaoUsuario.cs b/Gestor.Model/Model.Domain.Seguros/RestricaoUsuario.cs
deleted file mode 100644
index 0912cb2..0000000
--- a/Gestor.Model/Model.Domain.Seguros/RestricaoUsuario.cs
+++ /dev/null
@@ -1,60 +0,0 @@
-using Gestor.Model.Attributes;
-using Gestor.Model.Common;
-using Gestor.Model.Domain.Generic;
-using Gestor.Model.Validation;
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Runtime.CompilerServices;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class RestricaoUsuario : DomainBase
- {
- public string Ajuda
- {
- get;
- set;
- }
-
- [Log(true)]
- public bool Restricao
- {
- get;
- set;
- }
-
- [ForceLog(true)]
- [Log(true)]
- public TipoRestricao Tipo
- {
- get;
- set;
- }
-
- public Gestor.Model.Domain.Seguros.Usuario Usuario
- {
- get;
- set;
- }
-
- public RestricaoUsuario()
- {
- }
-
- public List<TupleList> Log()
- {
- return new List<TupleList>()
- {
- new TupleList()
- {
- Tuples = new ObservableCollection<Tuple<string, string, string>>()
- {
- new Tuple<string, string, string>("$TIPO DE RESTRIÇÃO", this.Tipo.GetDescription(), ""),
- new Tuple<string, string, string>(" RESTRIÇÃO ATIVA?", (this.Restricao ? "SIM" : "NÃO"), "")
- }
- }
- };
- }
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/RestricaoUsuarioCamposRelatorios.cs b/Gestor.Model/Model.Domain.Seguros/RestricaoUsuarioCamposRelatorios.cs
deleted file mode 100644
index 450780e..0000000
--- a/Gestor.Model/Model.Domain.Seguros/RestricaoUsuarioCamposRelatorios.cs
+++ /dev/null
@@ -1,61 +0,0 @@
-using Gestor.Model.Attributes;
-using Gestor.Model.Common;
-using Gestor.Model.Domain.Generic;
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Runtime.CompilerServices;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class RestricaoUsuarioCamposRelatorios : DomainBase
- {
- [ForceLog(true)]
- [Log(true)]
- public string Campo
- {
- get;
- set;
- }
-
- [ForceLog(true)]
- [Log(true)]
- public Gestor.Model.Common.Relatorio Relatorio
- {
- get;
- set;
- }
-
- [Log(true)]
- public bool Restricao
- {
- get;
- set;
- }
-
- public Gestor.Model.Domain.Seguros.Usuario Usuario
- {
- get;
- set;
- }
-
- public RestricaoUsuarioCamposRelatorios()
- {
- }
-
- public List<TupleList> Log()
- {
- return new List<TupleList>()
- {
- new TupleList()
- {
- Tuples = new ObservableCollection<Tuple<string, string, string>>()
- {
- new Tuple<string, string, string>("$TIPO DE RESTRIÇÃO", this.Campo, ""),
- new Tuple<string, string, string>(" RESTRIÇÃO ATIVA?", (this.Restricao ? "SIM" : "NÃO"), "")
- }
- }
- };
- }
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/RiscosDiversos.cs b/Gestor.Model/Model.Domain.Seguros/RiscosDiversos.cs
deleted file mode 100644
index 1f8772f..0000000
--- a/Gestor.Model/Model.Domain.Seguros/RiscosDiversos.cs
+++ /dev/null
@@ -1,130 +0,0 @@
-using Gestor.Model.Domain.Generic;
-using Gestor.Model.Helper;
-using Gestor.Model.Resources;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Globalization;
-using System.Runtime.CompilerServices;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class RiscosDiversos : DomainBase, IDomain
- {
- private string _observacao;
-
- public string Area
- {
- get;
- set;
- }
-
- public Gestor.Model.Domain.Seguros.Item Item
- {
- get;
- set;
- }
-
- public string Observacao
- {
- get
- {
- string str = this._observacao;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._observacao = value;
- }
- }
-
- public decimal? SubsidioEstadual
- {
- get;
- set;
- }
-
- public decimal? SubsidioFederal
- {
- get;
- set;
- }
-
- [JsonIgnore]
- public Func<List<KeyValuePair<string, string>>> ValidationEvent
- {
- get
- {
- RiscosDiversos riscosDiverso = this;
- return new Func<List<KeyValuePair<string, string>>>(riscosDiverso.Validate);
- }
- }
-
- public RiscosDiversos()
- {
- }
-
- public static List<TupleList> Log(Gestor.Model.Domain.Seguros.Item item)
- {
- List<TupleList> tupleLists = new List<TupleList>()
- {
- new TupleList()
- {
- Tuples = new ObservableCollection<Tuple<string, string, string>>()
- {
- new Tuple<string, string, string>("DESCRIÇÃO", (string.IsNullOrWhiteSpace(item.Descricao) ? "" : item.Descricao), ""),
- new Tuple<string, string, string>("OBSERVAÇÕES", (string.IsNullOrWhiteSpace(item.RiscosDiversos.Observacao) ? "" : item.RiscosDiversos.Observacao.ToUpper()), "")
- }
- }
- };
- ObservableCollection<Tuple<string, string, string>> observableCollection = new ObservableCollection<Tuple<string, string, string>>()
- {
- new Tuple<string, string, string>("COBERTURAS$", "", "")
- };
- foreach (Cobertura cobertura in item.Coberturas)
- {
- observableCollection.Add(new Tuple<string, string, string>(string.Format(" COBERTURA {0}$", item.Coberturas.IndexOf(cobertura) + 1), "", ""));
- observableCollection.Add(new Tuple<string, string, string>(" OBSERVAÇÃO", (string.IsNullOrWhiteSpace(cobertura.Observacao) ? "" : cobertura.Observacao.ToUpper()), ""));
- decimal premio = cobertura.Premio;
- observableCollection.Add(new Tuple<string, string, string>(" PRÊMIO", premio.ToString("C", new CultureInfo("pt-BR", false)), ""));
- premio = cobertura.Franquia;
- observableCollection.Add(new Tuple<string, string, string>(" FRANQUIA", premio.ToString("C", new CultureInfo("pt-BR", false)), ""));
- premio = cobertura.Lmi;
- observableCollection.Add(new Tuple<string, string, string>(" L.M.I.", premio.ToString("C", new CultureInfo("pt-BR", false)), ""));
- }
- tupleLists.Add(new TupleList()
- {
- Tuples = observableCollection
- });
- return tupleLists;
- }
-
- public List<KeyValuePair<string, string>> Validate()
- {
- bool id;
- List<KeyValuePair<string, string>> keyValuePairs = ValidationHelper.AddValue();
- if (string.IsNullOrWhiteSpace(this.Observacao))
- {
- Gestor.Model.Domain.Seguros.Item item = this.Item;
- if (item != null)
- {
- id = item.Documento.Controle.Ramo.Id != (long)23;
- }
- else
- {
- id = true;
- }
- if (id)
- {
- keyValuePairs.AddValue<string, string>("Observacao", Messages.Obrigatorio, true);
- }
- }
- return keyValuePairs;
- }
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/Seguradora.cs b/Gestor.Model/Model.Domain.Seguros/Seguradora.cs
deleted file mode 100644
index d036a66..0000000
--- a/Gestor.Model/Model.Domain.Seguros/Seguradora.cs
+++ /dev/null
@@ -1,1804 +0,0 @@
-using Gestor.Model.Attributes;
-using Gestor.Model.Common;
-using Gestor.Model.Domain.Generic;
-using Gestor.Model.Helper;
-using Gestor.Model.Resources;
-using Gestor.Model.Validation;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel;
-using System.Runtime.CompilerServices;
-using System.Threading;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class Seguradora : DomainBase, IDomain, INotifyPropertyChanged
- {
- private bool _selecionado;
-
- private string _nome;
-
- private string _susep;
-
- private string _assistencia;
-
- private string _documento;
-
- private string _observacao;
-
- private string _codigo;
-
- private string _codigoSusep;
-
- private string _codigoSeguradora;
-
- private string _nomeSocial;
-
- private string _nomeSocialBanco;
-
- [Log(true)]
- public string Assistencia
- {
- get
- {
- string str = this._assistencia;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._assistencia = value;
- }
- }
-
- [Log(true)]
- public bool Ativo
- {
- get;
- set;
- }
-
- public string Codigo
- {
- get
- {
- string str = this._codigo;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._codigo = value;
- }
- }
-
- public string CodigoSeguradora
- {
- get
- {
- string str = this._codigoSeguradora;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._codigoSeguradora = value;
- }
- }
-
- public string CodigoSusep
- {
- get
- {
- string str = this._codigoSusep;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._codigoSusep = value;
- }
- }
-
- public List<SeguradoraContato> Contatos
- {
- get;
- set;
- }
-
- public string CustomId
- {
- get;
- set;
- }
-
- [Log(true)]
- public string Documento
- {
- get
- {
- string str = this._documento;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._documento = value;
- }
- }
-
- public List<SeguradoraEndereco> Enderecos
- {
- get;
- set;
- }
-
- public long? IdAggilizador
- {
- get;
- set;
- }
-
- [Description("LINK APP ANDROID")]
- [Log(true)]
- public string LinkAppAndroid
- {
- get;
- set;
- }
-
- [Description("LINK APP IOS")]
- [Log(true)]
- public string LinkAppIos
- {
- get;
- set;
- }
-
- [Description("SEGURADORA")]
- [Log(true)]
- [Name(true)]
- public string Nome
- {
- get
- {
- string str = this._nome;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._nome = value;
- }
- }
-
- public string NomeSocial
- {
- get
- {
- string str = this._nomeSocial;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- string str;
- string nome;
- this._nomeSocial = value;
- if (!string.IsNullOrWhiteSpace(value))
- {
- this.NomeSocialBanco = (this.NomeSocialBanco == " " ? "" : value);
- return;
- }
- long id = base.Id;
- if (id <= (long)694)
- {
- if (id <= (long)678)
- {
- long num = id - (long)1;
- if (num <= (long)606)
- {
- switch ((uint)num)
- {
- case 0:
- {
- this.NomeSocial = "ABSOLUTA";
- return;
- }
- case 1:
- case 2:
- case 3:
- case 4:
- {
- this.NomeSocial = "ACE";
- return;
- }
- case 5:
- case 6:
- case 7:
- case 19:
- case 20:
- case 21:
- case 22:
- case 23:
- case 28:
- case 29:
- case 30:
- case 31:
- case 35:
- case 36:
- case 37:
- case 38:
- case 42:
- case 43:
- case 44:
- case 45:
- case 46:
- case 47:
- case 49:
- case 50:
- case 51:
- case 57:
- case 58:
- case 61:
- case 62:
- case 66:
- case 67:
- case 68:
- case 70:
- case 71:
- case 72:
- case 73:
- case 74:
- case 75:
- case 76:
- case 77:
- case 78:
- case 79:
- case 80:
- case 81:
- case 82:
- case 83:
- case 84:
- case 85:
- case 86:
- case 87:
- case 97:
- case 101:
- case 102:
- case 103:
- case 104:
- case 109:
- case 110:
- case 113:
- case 114:
- case 118:
- case 121:
- case 122:
- case 123:
- case 124:
- case 127:
- case 131:
- case 132:
- case 133:
- case 134:
- case 135:
- case 136:
- case 137:
- case 138:
- case 139:
- case 140:
- case 141:
- case 142:
- case 143:
- case 146:
- case 147:
- case 148:
- case 149:
- case 150:
- case 153:
- case 154:
- case 155:
- case 156:
- case 157:
- case 158:
- case 159:
- case 162:
- case 163:
- case 164:
- case 165:
- case 166:
- case 167:
- case 168:
- case 169:
- case 170:
- case 171:
- case 172:
- case 173:
- case 174:
- case 175:
- case 179:
- case 182:
- case 183:
- case 186:
- case 187:
- case 189:
- case 190:
- case 191:
- case 192:
- case 193:
- case 194:
- case 195:
- case 198:
- case 199:
- case 202:
- case 203:
- case 204:
- case 207:
- case 208:
- case 209:
- case 210:
- case 211:
- case 214:
- case 219:
- case 220:
- case 223:
- case 224:
- case 227:
- case 228:
- case 229:
- case 233:
- case 234:
- case 237:
- case 238:
- case 239:
- case 240:
- case 244:
- case 245:
- case 246:
- case 247:
- case 250:
- case 252:
- case 253:
- case 256:
- case 261:
- case 262:
- case 263:
- case 270:
- case 276:
- case 277:
- case 278:
- case 279:
- case 280:
- case 281:
- case 282:
- case 286:
- case 287:
- case 288:
- case 300:
- case 301:
- case 302:
- case 303:
- case 304:
- case 305:
- case 306:
- case 312:
- case 313:
- case 314:
- case 315:
- case 316:
- case 329:
- case 331:
- case 332:
- case 333:
- case 334:
- case 335:
- case 338:
- case 339:
- case 341:
- case 342:
- case 343:
- case 344:
- case 350:
- case 357:
- case 358:
- case 359:
- case 360:
- case 361:
- case 362:
- case 363:
- case 366:
- case 367:
- case 368:
- case 369:
- case 370:
- case 371:
- case 373:
- case 376:
- case 377:
- case 381:
- case 382:
- case 383:
- case 388:
- case 389:
- case 390:
- case 391:
- case 392:
- case 393:
- case 396:
- case 397:
- case 402:
- case 403:
- case 404:
- case 405:
- case 406:
- case 407:
- case 408:
- case 409:
- case 410:
- case 413:
- case 414:
- case 415:
- case 419:
- case 420:
- case 421:
- case 422:
- case 425:
- case 433:
- case 434:
- case 442:
- case 443:
- case 444:
- case 451:
- case 452:
- case 453:
- case 454:
- case 457:
- case 460:
- case 461:
- case 462:
- case 463:
- case 464:
- case 467:
- case 468:
- case 469:
- case 470:
- case 472:
- case 473:
- case 488:
- case 495:
- case 496:
- case 502:
- case 504:
- case 505:
- case 506:
- case 510:
- case 511:
- case 512:
- case 519:
- case 524:
- case 525:
- case 526:
- case 529:
- case 530:
- case 531:
- case 532:
- case 533:
- case 534:
- case 535:
- case 536:
- case 552:
- case 555:
- case 562:
- case 563:
- case 564:
- case 565:
- case 566:
- case 567:
- case 568:
- case 575:
- case 576:
- case 577:
- case 578:
- case 580:
- case 585:
- case 586:
- case 587:
- case 588:
- case 589:
- case 592:
- case 596:
- case 598:
- case 599:
- case 600:
- case 601:
- {
- str = (base.Id == 0 ? " " : this.NomeSocial);
- this.NomeSocialBanco = str;
- nome = this.Nome ?? "";
- this.NomeSocial = nome;
- return;
- }
- case 8:
- case 9:
- case 517:
- case 518:
- {
- this.NomeSocial = "AIG";
- return;
- }
- case 10:
- {
- this.NomeSocial = "AJAX";
- return;
- }
- case 11:
- case 12:
- case 13:
- {
- this.NomeSocial = "ALFA";
- return;
- }
- case 14:
- case 15:
- case 16:
- case 176:
- case 177:
- {
- this.NomeSocial = "ALIANÇA";
- return;
- }
- case 17:
- case 18:
- {
- this.NomeSocial = "ALLIANZ";
- return;
- }
- case 24:
- case 25:
- case 26:
- case 180:
- {
- this.NomeSocial = "ALLSEG";
- return;
- }
- case 27:
- case 590:
- case 591:
- case 593:
- {
- this.NomeSocial = "AMIL";
- return;
- }
- case 32:
- case 33:
- case 34:
- {
- this.NomeSocial = "APLUB";
- return;
- }
- case 39:
- case 40:
- {
- this.NomeSocial = "ARCH";
- return;
- }
- case 41:
- {
- this.NomeSocial = "ARGO";
- return;
- }
- case 48:
- case 243:
- {
- this.NomeSocial = "GENERALI";
- return;
- }
- case 52:
- case 53:
- case 54:
- case 55:
- case 56:
- {
- this.NomeSocial = "ATLANTICA";
- return;
- }
- case 59:
- case 60:
- {
- this.NomeSocial = "AUSTRAL";
- return;
- }
- case 63:
- case 64:
- case 65:
- case 602:
- {
- this.NomeSocial = "AXA";
- return;
- }
- case 69:
- {
- this.NomeSocial = "AZUL";
- return;
- }
- case 88:
- case 89:
- case 90:
- case 91:
- case 92:
- case 583:
- {
- this.NomeSocial = "BRADESCO";
- return;
- }
- case 93:
- {
- this.NomeSocial = "BRASIL LIBANO";
- return;
- }
- case 94:
- {
- this.NomeSocial = "BRASILCAP";
- return;
- }
- case 95:
- case 96:
- {
- this.NomeSocial = "BRASILPREV";
- return;
- }
- case 98:
- case 100:
- {
- this.NomeSocial = "BRASILUSITANA";
- return;
- }
- case 99:
- {
- this.NomeSocial = "BRASIL VEÍCULOS";
- return;
- }
- case 105:
- case 106:
- case 107:
- case 108:
- case 372:
- {
- this.NomeSocial = "CAIXA";
- return;
- }
- case 111:
- case 112:
- {
- this.NomeSocial = "CAPEMISA";
- return;
- }
- case 115:
- case 116:
- case 117:
- {
- this.NomeSocial = "CARDIF";
- return;
- }
- case 119:
- case 120:
- {
- this.NomeSocial = "CASTELLO";
- return;
- }
- case 125:
- case 126:
- {
- this.NomeSocial = "CESCEBRASIL";
- return;
- }
- case 128:
- case 129:
- {
- this.NomeSocial = "CHARTIS";
- return;
- }
- case 130:
- {
- this.NomeSocial = "CHUBB";
- return;
- }
- case 144:
- case 184:
- case 185:
- {
- this.NomeSocial = "INTERNACIONAL";
- return;
- }
- case 145:
- case 289:
- case 292:
- case 293:
- case 294:
- {
- this.NomeSocial = "ITAÉ";
- return;
- }
- case 151:
- case 152:
- case 188:
- case 416:
- case 417:
- case 418:
- {
- this.NomeSocial = "REAL";
- return;
- }
- case 160:
- case 161:
- {
- this.NomeSocial = "URBANIA";
- return;
- }
- case 178:
- case 251:
- {
- this.NomeSocial = "GRALHA AZUL";
- return;
- }
- case 181:
- {
- this.NomeSocial = "EXCELSIOR";
- return;
- }
- case 196:
- case 197:
- {
- this.NomeSocial = "CREDITO Y CAUCIAN";
- return;
- }
- case 200:
- case 201:
- {
- this.NomeSocial = "CRUZEIRO DO SUL";
- return;
- }
- case 205:
- case 206:
- {
- this.NomeSocial = "ECC";
- return;
- }
- case 212:
- case 213:
- {
- this.NomeSocial = "EQUITATIVA";
- return;
- }
- case 215:
- {
- this.NomeSocial = "ESSOR";
- return;
- }
- case 216:
- case 217:
- case 218:
- {
- this.NomeSocial = "EULER HERMES";
- return;
- }
- case 221:
- case 222:
- {
- this.NomeSocial = "EVEREST";
- return;
- }
- case 225:
- case 226:
- {
- this.NomeSocial = "FACTORY";
- return;
- }
- case 230:
- case 231:
- case 232:
- {
- this.NomeSocial = "FEDERAL";
- return;
- }
- case 235:
- case 236:
- {
- this.NomeSocial = "FINANCIAL";
- return;
- }
- case 241:
- case 242:
- {
- this.NomeSocial = "GENERAL";
- return;
- }
- case 248:
- case 249:
- {
- this.NomeSocial = "GNPP";
- return;
- }
- case 254:
- case 255:
- {
- this.NomeSocial = "HANNOVER";
- return;
- }
- case 257:
- case 258:
- case 259:
- case 260:
- case 569:
- case 597:
- {
- this.NomeSocial = "HDI";
- return;
- }
- case 264:
- case 265:
- case 266:
- case 267:
- case 268:
- case 269:
- {
- this.NomeSocial = "HSBC";
- return;
- }
- case 271:
- case 272:
- {
- this.NomeSocial = "ICATU";
- return;
- }
- case 273:
- case 274:
- {
- this.NomeSocial = "IF P&C INSURANCE";
- return;
- }
- case 275:
- {
- this.NomeSocial = "INDIANA";
- return;
- }
- case 283:
- case 284:
- case 285:
- case 603:
- {
- this.NomeSocial = "KOVR";
- return;
- }
- case 290:
- case 291:
- case 295:
- case 296:
- {
- this.NomeSocial = "ITAÚ";
- return;
- }
- case 297:
- case 298:
- case 299:
- {
- this.NomeSocial = "J. MALUCELLI";
- return;
- }
- case 307:
- case 308:
- case 309:
- {
- this.NomeSocial = "YELUM";
- return;
- }
- case 310:
- case 311:
- {
- this.NomeSocial = "LIDERANÇA";
- return;
- }
- case 317:
- case 318:
- case 319:
- case 320:
- case 321:
- case 322:
- case 323:
- case 324:
- case 325:
- case 326:
- case 327:
- case 328:
- {
- this.NomeSocial = "MAPFRE";
- return;
- }
- case 330:
- case 542:
- case 561:
- {
- this.NomeSocial = "YASUDA MARITIMA";
- return;
- }
- case 336:
- case 337:
- {
- this.NomeSocial = "MBM";
- return;
- }
- case 340:
- {
- this.NomeSocial = "METLIFE";
- return;
- }
- case 345:
- case 346:
- case 347:
- {
- this.NomeSocial = "MITSUI";
- return;
- }
- case 348:
- case 349:
- {
- this.NomeSocial = "MONGERAL";
- return;
- }
- case 351:
- case 352:
- case 353:
- case 354:
- case 355:
- case 356:
- {
- this.NomeSocial = "MONTEPIO";
- return;
- }
- case 364:
- case 365:
- case 380:
- {
- this.NomeSocial = "NATIONAL";
- return;
- }
- case 374:
- case 375:
- {
- this.NomeSocial = "NOVA YORK";
- return;
- }
- case 378:
- case 379:
- {
- this.NomeSocial = "ODYSSEY";
- return;
- }
- case 384:
- case 385:
- {
- this.NomeSocial = "PARANÁ";
- return;
- }
- case 386:
- case 387:
- {
- this.NomeSocial = "PARIS";
- return;
- }
- case 394:
- case 395:
- {
- this.NomeSocial = "PLANALTO";
- return;
- }
- case 398:
- case 399:
- case 400:
- case 401:
- case 553:
- case 554:
- case 573:
- {
- this.NomeSocial = "PORTO SEGURO";
- return;
- }
- case 411:
- case 412:
- {
- this.NomeSocial = "PRUDENTIAL";
- return;
- }
- case 423:
- case 424:
- {
- this.NomeSocial = "ROYAL & SUN ALLIANCE";
- return;
- }
- case 426:
- case 427:
- case 428:
- {
- this.NomeSocial = "SABEMI";
- return;
- }
- case 429:
- case 430:
- case 431:
- case 432:
- {
- this.NomeSocial = "SAFRA";
- return;
- }
- case 435:
- case 436:
- case 437:
- {
- this.NomeSocial = "SANTANDER";
- return;
- }
- case 438:
- case 439:
- {
- this.NomeSocial = "SANTOS";
- return;
- }
- case 440:
- case 441:
- {
- this.NomeSocial = "SANTOS";
- return;
- }
- case 445:
- case 446:
- case 447:
- case 448:
- {
- this.NomeSocial = "SCOR";
- return;
- }
- case 449:
- case 450:
- {
- this.NomeSocial = "SDB";
- return;
- }
- case 455:
- case 456:
- {
- this.NomeSocial = "MINEIRA";
- return;
- }
- case 458:
- case 459:
- {
- this.NomeSocial = "PONTUAL";
- return;
- }
- case 465:
- case 466:
- {
- this.NomeSocial = "SIRIUS";
- return;
- }
- case 471:
- case 594:
- {
- this.NomeSocial = "SOMPO";
- return;
- }
- case 474:
- case 475:
- case 476:
- case 477:
- case 478:
- case 479:
- case 480:
- case 481:
- case 482:
- case 483:
- case 484:
- case 485:
- case 486:
- case 487:
- case 557:
- case 579:
- {
- this.NomeSocial = "SULAMERICA";
- return;
- }
- case 489:
- case 490:
- case 491:
- case 492:
- case 493:
- case 494:
- {
- this.NomeSocial = "SWISS";
- return;
- }
- case 497:
- case 498:
- case 499:
- case 500:
- case 501:
- {
- this.NomeSocial = "TOKIO";
- return;
- }
- case 503:
- {
- this.NomeSocial = "TOTAL";
- return;
- }
- case 507:
- case 508:
- case 509:
- {
- this.NomeSocial = "TREVO";
- return;
- }
- case 513:
- case 514:
- case 515:
- case 516:
- {
- this.NomeSocial = "UNIÃO";
- return;
- }
- case 520:
- case 521:
- case 584:
- case 595:
- {
- this.NomeSocial = "UNIMED";
- return;
- }
- case 522:
- case 523:
- {
- this.NomeSocial = "UNIVERSAL";
- return;
- }
- case 527:
- case 528:
- {
- this.NomeSocial = "VALOR CAPITALIZAÇÃO";
- return;
- }
- case 537:
- case 538:
- case 539:
- case 540:
- case 541:
- {
- this.NomeSocial = "XL";
- return;
- }
- case 543:
- case 544:
- case 545:
- case 546:
- case 547:
- case 548:
- case 549:
- case 550:
- case 551:
- {
- this.NomeSocial = "ZURICH";
- return;
- }
- case 556:
- {
- this.NomeSocial = "SUHAI";
- return;
- }
- case 558:
- {
- this.NomeSocial = "SANCOR";
- return;
- }
- case 559:
- {
- this.NomeSocial = "AGROBRASIL";
- return;
- }
- case 560:
- case 570:
- {
- this.NomeSocial = "SURA";
- return;
- }
- case 571:
- case 572:
- case 574:
- case 605:
- case 606:
- {
- this.NomeSocial = "SÃO FRANCISCO";
- return;
- }
- case 581:
- {
- this.NomeSocial = "SANTA CASA";
- return;
- }
- case 582:
- {
- this.NomeSocial = "AMEX";
- return;
- }
- case 604:
- {
- this.NomeSocial = "BANCO DO BRASIL";
- return;
- }
- }
- }
- else
- {
- }
- long num1 = id - (long)621;
- if (num1 <= (long)57)
- {
- switch ((uint)num1)
- {
- case 0:
- case 3:
- case 24:
- case 32:
- case 33:
- case 34:
- case 35:
- case 36:
- case 37:
- case 41:
- case 42:
- {
- this.NomeSocial = "UNIMED";
- return;
- }
- case 1:
- case 2:
- case 4:
- case 5:
- case 6:
- case 7:
- case 8:
- case 12:
- case 13:
- case 16:
- case 17:
- case 19:
- case 23:
- case 25:
- case 26:
- case 27:
- case 30:
- case 31:
- case 38:
- case 39:
- case 40:
- case 44:
- case 47:
- case 48:
- case 49:
- case 50:
- case 51:
- case 54:
- {
- str = (base.Id == 0 ? " " : this.NomeSocial);
- this.NomeSocialBanco = str;
- nome = this.Nome ?? "";
- this.NomeSocial = nome;
- return;
- }
- case 9:
- case 18:
- {
- this.NomeSocial = "ALIRO";
- return;
- }
- case 10:
- {
- break;
- }
- case 11:
- {
- this.NomeSocial = "VR";
- return;
- }
- case 14:
- {
- this.NomeSocial = "ALLIANZ";
- return;
- }
- case 15:
- {
- this.NomeSocial = "HS";
- return;
- }
- case 20:
- case 22:
- case 53:
- {
- this.NomeSocial = "PORTO SEGURO";
- return;
- }
- case 21:
- {
- this.NomeSocial = "SURA";
- return;
- }
- case 28:
- {
- this.NomeSocial = "AMIL";
- return;
- }
- case 29:
- {
- this.NomeSocial = "YELUM";
- return;
- }
- case 43:
- {
- this.NomeSocial = "SULAMERICA";
- return;
- }
- case 45:
- {
- this.NomeSocial = "AFFINITY";
- return;
- }
- case 46:
- {
- this.NomeSocial = "BR";
- return;
- }
- case 52:
- {
- this.NomeSocial = "YAMAHA";
- return;
- }
- case 55:
- {
- this.NomeSocial = "SÃO FRANCISCO";
- return;
- }
- case 56:
- {
- this.NomeSocial = "EMBRACON";
- return;
- }
- case 57:
- {
- this.NomeSocial = "MAPFRE";
- return;
- }
- default:
- {
- str = (base.Id == 0 ? " " : this.NomeSocial);
- this.NomeSocialBanco = str;
- nome = this.Nome ?? "";
- this.NomeSocial = nome;
- return;
- }
- }
- }
- else
- {
- str = (base.Id == 0 ? " " : this.NomeSocial);
- this.NomeSocialBanco = str;
- nome = this.Nome ?? "";
- this.NomeSocial = nome;
- return;
- }
- this.NomeSocial = "METLIFE";
- return;
- }
- else if (id != (long)683)
- {
- long num2 = id - (long)687;
- if (num2 <= (long)3)
- {
- switch ((uint)num2)
- {
- case 0:
- {
- this.NomeSocial = "ITAÚ";
- return;
- }
- case 1:
- {
- str = (base.Id == 0 ? " " : this.NomeSocial);
- this.NomeSocialBanco = str;
- nome = this.Nome ?? "";
- this.NomeSocial = nome;
- return;
- }
- case 2:
- {
- this.NomeSocial = "SÃO LUCAS";
- return;
- }
- case 3:
- {
- this.NomeSocial = "UNIMED";
- return;
- }
- }
- }
- else
- {
- }
- if (id == (long)694)
- {
- this.NomeSocial = "PORTO SEGURO";
- return;
- }
- str = (base.Id == 0 ? " " : this.NomeSocial);
- this.NomeSocialBanco = str;
- nome = this.Nome ?? "";
- this.NomeSocial = nome;
- return;
- }
- else
- {
- this.NomeSocial = "UNIMED";
- return;
- }
- this.NomeSocial = "PORTO SEGURO";
- return;
- }
- else if (id > (long)716)
- {
- if (id == (long)717)
- {
- this.NomeSocial = "CHUBB";
- return;
- }
- if (id == (long)734)
- {
- this.NomeSocial = "RC";
- return;
- }
- if (id == (long)741)
- {
- this.NomeSocial = "SOMPO";
- return;
- }
- }
- else
- {
- long num3 = id - (long)703;
- if (num3 <= (long)8)
- {
- switch ((uint)num3)
- {
- case 0:
- case 6:
- {
- this.NomeSocial = "UNIMED";
- return;
- }
- case 1:
- case 4:
- case 8:
- {
- this.NomeSocial = "MAPFRE";
- return;
- }
- case 2:
- case 3:
- case 5:
- case 7:
- {
- str = (base.Id == 0 ? " " : this.NomeSocial);
- this.NomeSocialBanco = str;
- nome = this.Nome ?? "";
- this.NomeSocial = nome;
- return;
- }
- }
- }
- else
- {
- }
- if (id == (long)716)
- {
- this.NomeSocial = "UNIMED";
- return;
- }
- }
- str = (base.Id == 0 ? " " : this.NomeSocial);
- this.NomeSocialBanco = str;
- nome = this.Nome ?? "";
- this.NomeSocial = nome;
- }
- }
-
- [Description("APELIDO")]
- [Log(true)]
- public string NomeSocialBanco
- {
- get
- {
- string str = this._nomeSocialBanco;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._nomeSocialBanco = value;
- }
- }
-
- [Log(true)]
- public string Observacao
- {
- get
- {
- return this._observacao;
- }
- set
- {
- this._observacao = value;
- }
- }
-
- public bool Selecionado
- {
- get
- {
- return this._selecionado;
- }
- set
- {
- if (value == this._selecionado)
- {
- return;
- }
- this._selecionado = value;
- this.OnPropertyChanged("Selecionado");
- }
- }
-
- public string Senha
- {
- get;
- set;
- }
-
- [Log(true)]
- public string Susep
- {
- get
- {
- string str = this._susep;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._susep = value;
- }
- }
-
- [Log(true)]
- public decimal? Tolerancia
- {
- get;
- set;
- }
-
- [Log(true)]
- public decimal? ToleranciaPremio
- {
- get;
- set;
- }
-
- public string Usuario
- {
- get;
- set;
- }
-
- [JsonIgnore]
- public Func<List<KeyValuePair<string, string>>> ValidationEvent
- {
- get
- {
- Seguradora seguradora = this;
- return new Func<List<KeyValuePair<string, string>>>(seguradora.Validate);
- }
- }
-
- public Seguradora()
- {
- }
-
- public List<TupleList> Log()
- {
- string str;
- string str1;
- string description;
- List<TupleList> tupleLists = new List<TupleList>();
- TupleList tupleList = new TupleList();
- ObservableCollection<Tuple<string, string, string>> observableCollection = new ObservableCollection<Tuple<string, string, string>>()
- {
- new Tuple<string, string, string>("SEGURADORA", (string.IsNullOrWhiteSpace(this.Nome) ? "" : this.Nome), ""),
- new Tuple<string, string, string>("CNPJ", (string.IsNullOrWhiteSpace(this.Documento) ? "" : this.Documento), ""),
- new Tuple<string, string, string>("ASSISTÊNCIA 24 HORAS", (string.IsNullOrWhiteSpace(this.Assistencia) ? "" : this.Assistencia), ""),
- new Tuple<string, string, string>("SUSEP", (string.IsNullOrWhiteSpace(this.Susep) ? "" : this.Susep), ""),
- new Tuple<string, string, string>("CÓDIGO COMPANHIA", (string.IsNullOrWhiteSpace(this.Codigo) ? "" : this.Codigo), "")
- };
- decimal? tolerancia = this.Tolerancia;
- if (!tolerancia.HasValue)
- {
- str = "";
- }
- else
- {
- tolerancia = this.Tolerancia;
- if (tolerancia.HasValue)
- {
- str = tolerancia.GetValueOrDefault().ToString();
- }
- else
- {
- str = null;
- }
- }
- observableCollection.Add(new Tuple<string, string, string>("TOLERÂNCIA DE COMISSÃO", str, ""));
- tolerancia = this.ToleranciaPremio;
- if (!tolerancia.HasValue)
- {
- str1 = "";
- }
- else
- {
- tolerancia = this.ToleranciaPremio;
- if (tolerancia.HasValue)
- {
- str1 = tolerancia.GetValueOrDefault().ToString();
- }
- else
- {
- str1 = null;
- }
- }
- observableCollection.Add(new Tuple<string, string, string>("TOLERÂNCIA DE PRÊMIO", str1, ""));
- observableCollection.Add(new Tuple<string, string, string>("SEGURADORA ATIVA", (this.Ativo ? "SIM" : "NÃO"), ""));
- observableCollection.Add(new Tuple<string, string, string>("OBSERVAÇÃO", (string.IsNullOrWhiteSpace(this.Observacao) ? "" : this.Observacao), ""));
- tupleList.Tuples = observableCollection;
- tupleLists.Add(tupleList);
- List<TupleList> tupleLists1 = tupleLists;
- if (this.Contatos != null)
- {
- ObservableCollection<Tuple<string, string, string>> observableCollection1 = new ObservableCollection<Tuple<string, string, string>>()
- {
- new Tuple<string, string, string>("CONTATOS$", "", "")
- };
- foreach (SeguradoraContato contato in this.Contatos)
- {
- observableCollection1.Add(new Tuple<string, string, string>(string.Format(" CONTATO {0}$", this.Contatos.IndexOf(contato) + 1), "", ""));
- observableCollection1.Add(new Tuple<string, string, string>(" NOME", (string.IsNullOrWhiteSpace(contato.NomeContato) ? "" : contato.NomeContato.ToUpper()), ""));
- ObservableCollection<Tuple<string, string, string>> observableCollection2 = observableCollection1;
- TipoTelefone? tipo = contato.Tipo;
- if (!tipo.HasValue)
- {
- description = "";
- }
- else
- {
- tipo = contato.Tipo;
- if (tipo.HasValue)
- {
- description = tipo.GetValueOrDefault().GetDescription();
- }
- else
- {
- description = null;
- }
- }
- observableCollection2.Add(new Tuple<string, string, string>(" TIPO TELEFONE", description, ""));
- observableCollection1.Add(new Tuple<string, string, string>(" PREFIXO", (string.IsNullOrWhiteSpace(contato.Prefixo) ? "" : contato.Prefixo), ""));
- observableCollection1.Add(new Tuple<string, string, string>(" TELEFONE", (string.IsNullOrWhiteSpace(contato.Numero) ? "" : contato.Numero), ""));
- }
- tupleLists1.Add(new TupleList()
- {
- Tuples = observableCollection1
- });
- }
- if (this.Enderecos != null)
- {
- ObservableCollection<Tuple<string, string, string>> observableCollection3 = new ObservableCollection<Tuple<string, string, string>>()
- {
- new Tuple<string, string, string>("ENDEREÇOS$", "", "")
- };
- foreach (SeguradoraEndereco endereco in this.Enderecos)
- {
- observableCollection3.Add(new Tuple<string, string, string>(string.Format(" ENDEREÇO {0}$", this.Enderecos.IndexOf(endereco) + 1), "", ""));
- observableCollection3.Add(new Tuple<string, string, string>(" TIPO DO ENDEREÇO", endereco.Tipo.GetDescription(), ""));
- observableCollection3.Add(new Tuple<string, string, string>(" CEP", (string.IsNullOrWhiteSpace(endereco.Cep) ? "" : endereco.Cep), ""));
- observableCollection3.Add(new Tuple<string, string, string>(" ENDEREÇO", (string.IsNullOrWhiteSpace(endereco.Endereco) ? "" : endereco.Endereco), ""));
- observableCollection3.Add(new Tuple<string, string, string>(" NÚMERO", (string.IsNullOrWhiteSpace(endereco.Numero) ? "" : endereco.Numero), ""));
- observableCollection3.Add(new Tuple<string, string, string>(" COMPLEMENTO", (string.IsNullOrWhiteSpace(endereco.Complemento) ? "" : endereco.Complemento), ""));
- observableCollection3.Add(new Tuple<string, string, string>(" BAIRRO", (string.IsNullOrWhiteSpace(endereco.Bairro) ? "" : endereco.Bairro), ""));
- observableCollection3.Add(new Tuple<string, string, string>(" CIDADE", (string.IsNullOrWhiteSpace(endereco.Cidade) ? "" : endereco.Cidade), ""));
- observableCollection3.Add(new Tuple<string, string, string>(" ESTADO", (string.IsNullOrWhiteSpace(endereco.Estado) ? "" : endereco.Estado), ""));
- }
- tupleLists1.Add(new TupleList()
- {
- Tuples = observableCollection3
- });
- }
- return tupleLists1;
- }
-
- protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
- {
- PropertyChangedEventHandler propertyChangedEventHandler = this.PropertyChanged;
- if (propertyChangedEventHandler == null)
- {
- return;
- }
- propertyChangedEventHandler(this, new PropertyChangedEventArgs(propertyName));
- }
-
- public List<KeyValuePair<string, string>> Validate()
- {
- List<KeyValuePair<string, string>> keyValuePairs = ValidationHelper.AddValue();
- if (!string.IsNullOrWhiteSpace(this.Documento) && !this.Documento.ValidacaoDocumento())
- {
- keyValuePairs.AddValue<string, string>("Documento", Messages.Invalido, true);
- }
- decimal? tolerancia = this.Tolerancia;
- decimal num = 999;
- if ((tolerancia.GetValueOrDefault() > num) & tolerancia.HasValue)
- {
- keyValuePairs.AddValue<string, string>("Tolerancia", Messages.Invalido, true);
- }
- tolerancia = this.ToleranciaPremio;
- num = 999999;
- if ((tolerancia.GetValueOrDefault() > num) & tolerancia.HasValue)
- {
- keyValuePairs.AddValue<string, string>("ToleranciaPremio", Messages.Invalido, true);
- }
- return keyValuePairs;
- }
-
- public event PropertyChangedEventHandler PropertyChanged;
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/SeguradoraContato.cs b/Gestor.Model/Model.Domain.Seguros/SeguradoraContato.cs
deleted file mode 100644
index 61caa17..0000000
--- a/Gestor.Model/Model.Domain.Seguros/SeguradoraContato.cs
+++ /dev/null
@@ -1,90 +0,0 @@
-using Gestor.Model.Common;
-using Gestor.Model.Domain.Common;
-using Gestor.Model.Domain.Generic;
-using Gestor.Model.Helper;
-using Gestor.Model.Resources;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.Runtime.CompilerServices;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class SeguradoraContato : TelefoneBase, IDomain
- {
- private string _nome;
-
- private string _email;
-
- public string Email
- {
- get
- {
- string str = this._email;
- if (str != null)
- {
- return str.ToLower();
- }
- return null;
- }
- set
- {
- this._email = value;
- }
- }
-
- public Gestor.Model.Domain.Common.Empresa Empresa
- {
- get;
- set;
- }
-
- public string NomeContato
- {
- get
- {
- return this._nome;
- }
- set
- {
- this._nome = value;
- }
- }
-
- public Gestor.Model.Domain.Seguros.Seguradora Seguradora
- {
- get;
- set;
- }
-
- public TipoContatoSeguradora TipoContato
- {
- get;
- set;
- }
-
- [JsonIgnore]
- public Func<List<KeyValuePair<string, string>>> ValidationEvent
- {
- get
- {
- SeguradoraContato seguradoraContato = this;
- return new Func<List<KeyValuePair<string, string>>>(seguradoraContato.Validate);
- }
- }
-
- public SeguradoraContato()
- {
- }
-
- public List<KeyValuePair<string, string>> Validate()
- {
- List<KeyValuePair<string, string>> keyValuePairs = base.ValidateBase(true);
- if (string.IsNullOrWhiteSpace(this.NomeContato) && this.TipoContato == TipoContatoSeguradora.Contato)
- {
- keyValuePairs.AddValue<string, string>("NomeContato|NOME CONTATO", Messages.Obrigatorio, true);
- }
- return keyValuePairs;
- }
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/SeguradoraEndereco.cs b/Gestor.Model/Model.Domain.Seguros/SeguradoraEndereco.cs
deleted file mode 100644
index f103e05..0000000
--- a/Gestor.Model/Model.Domain.Seguros/SeguradoraEndereco.cs
+++ /dev/null
@@ -1,115 +0,0 @@
-using Gestor.Model.Common;
-using Gestor.Model.Domain.Common;
-using Gestor.Model.Domain.Generic;
-using Gestor.Model.Helper;
-using Gestor.Model.Resources;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.Runtime.CompilerServices;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class SeguradoraEndereco : EnderecoBase, IDomain
- {
- public Gestor.Model.Domain.Common.Empresa Empresa
- {
- get;
- set;
- }
-
- public Gestor.Model.Domain.Seguros.Seguradora Seguradora
- {
- get;
- set;
- }
-
- public TipoEndereco Tipo
- {
- get;
- set;
- }
-
- [JsonIgnore]
- public Func<List<KeyValuePair<string, string>>> ValidationEvent
- {
- get
- {
- SeguradoraEndereco seguradoraEndereco = this;
- return new Func<List<KeyValuePair<string, string>>>(seguradoraEndereco.Validate);
- }
- }
-
- public SeguradoraEndereco()
- {
- }
-
- public List<KeyValuePair<string, string>> Validate()
- {
- bool length;
- List<KeyValuePair<string, string>> keyValuePairs = ValidationHelper.AddValue();
- if (string.IsNullOrWhiteSpace(base.Cep))
- {
- keyValuePairs.AddValue<string, string>("Cep", Messages.Obrigatorio, true);
- }
- else if (!base.Cep.ValidacaoCep())
- {
- keyValuePairs.AddValue<string, string>("Cep", Messages.Invalido, true);
- }
- if (string.IsNullOrWhiteSpace(base.Estado))
- {
- keyValuePairs.AddValue<string, string>("Estado", Messages.Obrigatorio, true);
- }
- else if (!base.Estado.ValidacaoEstado())
- {
- keyValuePairs.AddValue<string, string>("Estado", Messages.Invalido, true);
- }
- if (string.IsNullOrWhiteSpace(base.Endereco))
- {
- keyValuePairs.AddValue<string, string>("Endereco", Messages.Obrigatorio, true);
- }
- else if (base.Endereco.Length > 60)
- {
- keyValuePairs.AddValue<string, string>("Endereco", string.Format(Messages.MaiorQueLimite, 60), true);
- }
- if (string.IsNullOrWhiteSpace(base.Numero))
- {
- keyValuePairs.AddValue<string, string>("Numero", Messages.Obrigatorio, true);
- }
- else if (base.Numero.Length > 5)
- {
- keyValuePairs.AddValue<string, string>("Numero", string.Format(Messages.MaiorQueLimite, 5), true);
- }
- if (string.IsNullOrWhiteSpace(base.Bairro))
- {
- keyValuePairs.AddValue<string, string>("Bairro", Messages.Obrigatorio, true);
- }
- else if (base.Bairro.Length > 60)
- {
- keyValuePairs.AddValue<string, string>("Bairro", string.Format(Messages.MaiorQueLimite, 60), true);
- }
- if (string.IsNullOrWhiteSpace(base.Cidade))
- {
- keyValuePairs.AddValue<string, string>("Cidade", Messages.Obrigatorio, true);
- }
- else if (base.Cidade.Length > 30)
- {
- keyValuePairs.AddValue<string, string>("Cidade", string.Format(Messages.MaiorQueLimite, 30), true);
- }
- string complemento = base.Complemento;
- if (complemento != null)
- {
- length = complemento.Length > 30;
- }
- else
- {
- length = false;
- }
- if (length)
- {
- keyValuePairs.AddValue<string, string>("Complemento", string.Format(Messages.MaiorQueLimite, 30), true);
- }
- return keyValuePairs;
- }
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/Sinistro.cs b/Gestor.Model/Model.Domain.Seguros/Sinistro.cs
deleted file mode 100644
index 21cb5c2..0000000
--- a/Gestor.Model/Model.Domain.Seguros/Sinistro.cs
+++ /dev/null
@@ -1,1132 +0,0 @@
-using Gestor.Model.Attributes;
-using Gestor.Model.Common;
-using Gestor.Model.Domain.Generic;
-using Gestor.Model.Helper;
-using Gestor.Model.Resources;
-using Gestor.Model.Validation;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel;
-using System.Globalization;
-using System.Runtime.CompilerServices;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class Sinistro : DomainBase, IDomain
- {
- private string _numero;
-
- private DateTime? _dataReclamacao;
-
- private string _itemSinistrado;
-
- private string _descricao;
-
- private string _observacao;
-
- private string _motivo;
-
- private string _auxiliar;
-
- private string _observacaoInterna;
-
- private DateTime? _horaReclamacao;
-
- public bool Ativo
- {
- get;
- set;
- }
-
- [Description("AUXILIAR")]
- [Log(true)]
- public string Auxiliar
- {
- get
- {
- string str = this._auxiliar;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._auxiliar = value;
- }
- }
-
- public Gestor.Model.Domain.Seguros.ControleSinistro ControleSinistro
- {
- get;
- set;
- }
-
- [Description("DATA CRIAÇÃO")]
- [Log(true)]
- public DateTime? DataAlteracao
- {
- get;
- set;
- }
-
- [Description("DATA CRIACAO")]
- [Log(true)]
- public DateTime? DataCriacao
- {
- get;
- set;
- }
-
- [Description("DATA LIQUIDAÇÃO")]
- [Log(true)]
- public DateTime? DataLiquidacao
- {
- get;
- set;
- }
-
- [Description("DATA RECLAMAÇÃO")]
- [Log(true)]
- public DateTime? DataReclamacao
- {
- get
- {
- return this._dataReclamacao;
- }
- set
- {
- if (!value.HasValue)
- {
- this._dataReclamacao = null;
- return;
- }
- if (!this.HoraReclamacao.HasValue)
- {
- this.HoraReclamacao = value;
- }
- object obj = value.Value;
- DateTime? horaReclamacao = this.HoraReclamacao;
- this._dataReclamacao = new DateTime?(DateTime.Parse(string.Format("{0:d} {1:T}", obj, horaReclamacao.Value)));
- }
- }
-
- [Description("DESCRIÇÃO")]
- [Log(true)]
- public string Descricao
- {
- get
- {
- string str = this._descricao;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._descricao = value;
- }
- }
-
- public DateTime? HoraReclamacao
- {
- get
- {
- return this._horaReclamacao;
- }
- set
- {
- DateTime? nullable;
- this._horaReclamacao = value;
- if (!value.HasValue)
- {
- return;
- }
- DateTime? dataReclamacao = this.DataReclamacao;
- if (dataReclamacao.HasValue)
- {
- dataReclamacao = this.DataReclamacao;
- nullable = new DateTime?(DateTime.Parse(string.Format("{0:d} {1:T}", dataReclamacao.Value, value)));
- }
- else
- {
- dataReclamacao = null;
- nullable = dataReclamacao;
- }
- this.DataReclamacao = nullable;
- }
- }
-
- [Description("USUARIO ALTERACAO")]
- [Log(true)]
- public long IdUsuarioAlteracao
- {
- get;
- set;
- }
-
- [Description("USUARIO CRIACAO")]
- [Log(true)]
- public long IdUsuarioCriacao
- {
- get;
- set;
- }
-
- [Description("ITEM SINISTRADO")]
- [Log(true)]
- public string ItemSinistrado
- {
- get
- {
- string str = this._itemSinistrado;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._itemSinistrado = value;
- }
- }
-
- [Description("MOTIVO")]
- [Log(true)]
- public string Motivo
- {
- get
- {
- string str = this._motivo;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._motivo = value;
- }
- }
-
- [Log(true)]
- public string Numero
- {
- get
- {
- string str = this._numero;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._numero = value;
- }
- }
-
- public string Observacao
- {
- get
- {
- return this._observacao;
- }
- set
- {
- this._observacao = value;
- }
- }
-
- public string ObservacaoInterna
- {
- get
- {
- return this._observacaoInterna;
- }
- set
- {
- this._observacaoInterna = value;
- }
- }
-
- [Log(true)]
- public Gestor.Model.Domain.Seguros.SinistroAuto SinistroAuto
- {
- get;
- set;
- }
-
- [Log(true)]
- public Gestor.Model.Domain.Seguros.SinistroVida SinistroVida
- {
- get;
- set;
- }
-
- [Description("STATUS PERSONALIZADO")]
- [Log(true)]
- public string StatusPersonalizado
- {
- get;
- set;
- }
-
- [Description("STATUS")]
- [Log(true)]
- public Gestor.Model.Common.StatusSinistro? StatusSinistro
- {
- get;
- set;
- }
-
- [Description("TIPO")]
- [Log(true)]
- public Gestor.Model.Common.TipoSinistro? TipoSinistro
- {
- get;
- set;
- }
-
- [JsonIgnore]
- public Func<List<KeyValuePair<string, string>>> ValidationEvent
- {
- get
- {
- Sinistro sinistro = this;
- return new Func<List<KeyValuePair<string, string>>>(sinistro.Validate);
- }
- }
-
- [Description("VALOR")]
- [Log(true)]
- public decimal Valor
- {
- get;
- set;
- }
-
- [Description("VALOR FRANQUIA")]
- [Log(true)]
- public decimal ValorFranquia
- {
- get;
- set;
- }
-
- [Description("VALOR LIBERADO")]
- [Log(true)]
- public decimal ValorLiberado
- {
- get;
- set;
- }
-
- [Description("VALOR ORÇADO")]
- [Log(true)]
- public decimal ValorOrcado
- {
- get;
- set;
- }
-
- [Description("VALOR PAGO")]
- [Log(true)]
- public decimal ValorPago
- {
- get;
- set;
- }
-
- [Description("VALOR SALVADO")]
- [Log(true)]
- public decimal? ValorSalvado
- {
- get;
- set;
- }
-
- public Sinistro()
- {
- }
-
- public List<TupleList> Log()
- {
- DateTime? dataSinistro;
- TipoPerda? tipoPerda;
- bool? culpado;
- EstadoCivil? estadoCivil;
- string description;
- string shortDateString;
- string shortTimeString;
- string str;
- string shortTimeString1;
- string shortDateString1;
- string description1;
- bool hasValue;
- string str1;
- bool flag;
- string str2;
- bool hasValue1;
- string description2;
- string certObito;
- string certObito1;
- string beneficiario;
- string beneficiario1;
- bool? nullable;
- string numeroBo;
- string numeroBo1;
- string description3;
- string str3;
- string shortDateString2;
- string endereco;
- string endereco1;
- string envolvido;
- string envolvido1;
- string motorista;
- string motorista1;
- string ddd;
- string ddd1;
- string telefone;
- string telefone1;
- string email;
- string email1;
- string str4;
- bool parceiroMecanica;
- string nome;
- string str5;
- bool parceiroFunilaria;
- string nome1;
- bool valueOrDefault;
- List<TupleList> tupleLists = new List<TupleList>();
- TupleList tupleList = new TupleList();
- ObservableCollection<Tuple<string, string, string>> observableCollection = new ObservableCollection<Tuple<string, string, string>>();
- Gestor.Model.Common.TipoSinistro? tipoSinistro = this.TipoSinistro;
- if (!tipoSinistro.HasValue)
- {
- description = "";
- }
- else
- {
- tipoSinistro = this.TipoSinistro;
- if (tipoSinistro.HasValue)
- {
- description = tipoSinistro.GetValueOrDefault().GetDescription();
- }
- else
- {
- description = null;
- }
- }
- observableCollection.Add(new Tuple<string, string, string>("TIPO DO SINISTRO", description, ""));
- observableCollection.Add(new Tuple<string, string, string>("ITEM SINISTRADO", (string.IsNullOrWhiteSpace(this.ItemSinistrado) ? "" : this.ItemSinistrado), ""));
- observableCollection.Add(new Tuple<string, string, string>("NÚMERO DO SINISTRO", (string.IsNullOrWhiteSpace(this.Numero) ? "" : this.Numero), ""));
- if (this.ControleSinistro == null)
- {
- shortDateString = "";
- }
- else
- {
- Gestor.Model.Domain.Seguros.ControleSinistro controleSinistro = this.ControleSinistro;
- if (controleSinistro != null)
- {
- dataSinistro = controleSinistro.DataSinistro;
- if (dataSinistro.HasValue)
- {
- shortDateString = dataSinistro.GetValueOrDefault().ToShortDateString();
- }
- else
- {
- shortDateString = null;
- }
- }
- else
- {
- shortDateString = null;
- }
- }
- observableCollection.Add(new Tuple<string, string, string>("DATA DO SINISTRO", shortDateString, ""));
- if (this.ControleSinistro == null)
- {
- shortTimeString = "";
- }
- else
- {
- Gestor.Model.Domain.Seguros.ControleSinistro controleSinistro1 = this.ControleSinistro;
- if (controleSinistro1 != null)
- {
- dataSinistro = controleSinistro1.HoraSinistro;
- if (dataSinistro.HasValue)
- {
- shortTimeString = dataSinistro.GetValueOrDefault().ToShortTimeString();
- }
- else
- {
- shortTimeString = null;
- }
- }
- else
- {
- shortTimeString = null;
- }
- }
- observableCollection.Add(new Tuple<string, string, string>("HORA DO SINISTRO", shortTimeString, ""));
- dataSinistro = this.DataReclamacao;
- if (!dataSinistro.HasValue)
- {
- str = "";
- }
- else
- {
- dataSinistro = this.DataReclamacao;
- if (dataSinistro.HasValue)
- {
- str = dataSinistro.GetValueOrDefault().ToShortDateString();
- }
- else
- {
- str = null;
- }
- }
- observableCollection.Add(new Tuple<string, string, string>("DATA DA RECLAMAÇÃO", str, ""));
- dataSinistro = this.HoraReclamacao;
- if (!dataSinistro.HasValue)
- {
- shortTimeString1 = "";
- }
- else
- {
- dataSinistro = this.HoraReclamacao;
- if (dataSinistro.HasValue)
- {
- shortTimeString1 = dataSinistro.GetValueOrDefault().ToShortTimeString();
- }
- else
- {
- shortTimeString1 = null;
- }
- }
- observableCollection.Add(new Tuple<string, string, string>("HORA DA RECLAMAÇÃO", shortTimeString1, ""));
- dataSinistro = this.DataLiquidacao;
- if (!dataSinistro.HasValue)
- {
- shortDateString1 = "";
- }
- else
- {
- dataSinistro = this.DataLiquidacao;
- if (dataSinistro.HasValue)
- {
- shortDateString1 = dataSinistro.GetValueOrDefault().ToShortDateString();
- }
- else
- {
- shortDateString1 = null;
- }
- }
- observableCollection.Add(new Tuple<string, string, string>("DATA DE LIQUIDAÇÃO", shortDateString1, ""));
- Gestor.Model.Common.StatusSinistro? statusSinistro = this.StatusSinistro;
- if (!statusSinistro.HasValue)
- {
- description1 = "";
- }
- else
- {
- statusSinistro = this.StatusSinistro;
- if (statusSinistro.HasValue)
- {
- description1 = statusSinistro.GetValueOrDefault().GetDescription();
- }
- else
- {
- description1 = null;
- }
- }
- observableCollection.Add(new Tuple<string, string, string>("SITUAÇÃO", description1, ""));
- decimal valor = this.Valor;
- observableCollection.Add(new Tuple<string, string, string>("VALOR", valor.ToString(new CultureInfo("pt-BR")), ""));
- valor = this.ValorOrcado;
- observableCollection.Add(new Tuple<string, string, string>("VALOR ORÇADO", valor.ToString(new CultureInfo("pt-BR")), ""));
- valor = this.ValorLiberado;
- observableCollection.Add(new Tuple<string, string, string>("VALOR LIBERADO", valor.ToString(new CultureInfo("pt-BR")), ""));
- valor = this.ValorPago;
- observableCollection.Add(new Tuple<string, string, string>("VALOR PAGO", valor.ToString(new CultureInfo("pt-BR")), ""));
- decimal? valorSalvado = this.ValorSalvado;
- observableCollection.Add(new Tuple<string, string, string>("VALOR SALVADO", valorSalvado.ToString(), ""));
- valor = this.ValorFranquia;
- observableCollection.Add(new Tuple<string, string, string>("VALOR FRANQUIA", valor.ToString(new CultureInfo("pt-BR")), ""));
- observableCollection.Add(new Tuple<string, string, string>("MOTIVO", (string.IsNullOrWhiteSpace(this.Motivo) ? "" : this.Motivo), ""));
- observableCollection.Add(new Tuple<string, string, string>("AUXILIAR", (string.IsNullOrWhiteSpace(this.Auxiliar) ? "" : this.Auxiliar), ""));
- observableCollection.Add(new Tuple<string, string, string>("DESCRIÇÃO", (string.IsNullOrWhiteSpace(this.Descricao) ? "" : this.Descricao), ""));
- tupleList.Tuples = observableCollection;
- tupleLists.Add(tupleList);
- List<TupleList> tupleLists1 = tupleLists;
- if (this.SinistroAuto != null)
- {
- ObservableCollection<Tuple<string, string, string>> tuples = tupleLists1[0].Tuples;
- Gestor.Model.Domain.Seguros.SinistroAuto sinistroAuto = this.SinistroAuto;
- if (sinistroAuto != null)
- {
- numeroBo = sinistroAuto.NumeroBo;
- }
- else
- {
- numeroBo = null;
- }
- if (string.IsNullOrWhiteSpace(numeroBo))
- {
- numeroBo1 = "";
- }
- else
- {
- Gestor.Model.Domain.Seguros.SinistroAuto sinistroAuto1 = this.SinistroAuto;
- if (sinistroAuto1 != null)
- {
- numeroBo1 = sinistroAuto1.NumeroBo;
- }
- else
- {
- numeroBo1 = null;
- }
- }
- tuples.Add(new Tuple<string, string, string>("NÚMERO DO B.O.", numeroBo1, ""));
- ObservableCollection<Tuple<string, string, string>> tuples1 = tupleLists1[0].Tuples;
- tipoPerda = this.SinistroAuto.TipoPerda;
- if (!tipoPerda.HasValue)
- {
- description3 = "";
- }
- else
- {
- Gestor.Model.Domain.Seguros.SinistroAuto sinistroAuto2 = this.SinistroAuto;
- if (sinistroAuto2 != null)
- {
- tipoPerda = sinistroAuto2.TipoPerda;
- if (tipoPerda.HasValue)
- {
- description3 = tipoPerda.GetValueOrDefault().GetDescription();
- }
- else
- {
- description3 = null;
- }
- }
- else
- {
- description3 = null;
- }
- }
- tuples1.Add(new Tuple<string, string, string>("TIPO DE PERDA", description3, ""));
- ObservableCollection<Tuple<string, string, string>> observableCollection1 = tupleLists1[0].Tuples;
- culpado = this.SinistroAuto.Culpado;
- if (culpado.HasValue)
- {
- Gestor.Model.Domain.Seguros.SinistroAuto sinistroAuto3 = this.SinistroAuto;
- if (sinistroAuto3 != null)
- {
- culpado = sinistroAuto3.Culpado;
- bool flag1 = false;
- valueOrDefault = culpado.GetValueOrDefault() == flag1 & culpado.HasValue;
- }
- else
- {
- valueOrDefault = false;
- }
- if (valueOrDefault)
- {
- goto Label1;
- }
- str3 = "SIM";
- goto Label0;
- }
- Label1:
- str3 = "NÃO";
- Label0:
- observableCollection1.Add(new Tuple<string, string, string>("CONSIDERA-SE CULPADO?", str3, ""));
- ObservableCollection<Tuple<string, string, string>> tuples2 = tupleLists1[0].Tuples;
- dataSinistro = this.SinistroAuto.UltimoDocEnviado;
- if (!dataSinistro.HasValue)
- {
- shortDateString2 = "";
- }
- else
- {
- Gestor.Model.Domain.Seguros.SinistroAuto sinistroAuto4 = this.SinistroAuto;
- if (sinistroAuto4 != null)
- {
- dataSinistro = sinistroAuto4.UltimoDocEnviado;
- if (dataSinistro.HasValue)
- {
- shortDateString2 = dataSinistro.GetValueOrDefault().ToShortDateString();
- }
- else
- {
- shortDateString2 = null;
- }
- }
- else
- {
- shortDateString2 = null;
- }
- }
- tuples2.Add(new Tuple<string, string, string>("ÚLTIMO DOC. ENVIADO", shortDateString2, ""));
- ObservableCollection<Tuple<string, string, string>> observableCollection2 = tupleLists1[0].Tuples;
- Gestor.Model.Domain.Seguros.SinistroAuto sinistroAuto5 = this.SinistroAuto;
- if (sinistroAuto5 != null)
- {
- endereco = sinistroAuto5.Endereco;
- }
- else
- {
- endereco = null;
- }
- if (string.IsNullOrWhiteSpace(endereco))
- {
- endereco1 = "";
- }
- else
- {
- Gestor.Model.Domain.Seguros.SinistroAuto sinistroAuto6 = this.SinistroAuto;
- if (sinistroAuto6 != null)
- {
- endereco1 = sinistroAuto6.Endereco;
- }
- else
- {
- endereco1 = null;
- }
- }
- observableCollection2.Add(new Tuple<string, string, string>("ENDEREÇO", endereco1, ""));
- ObservableCollection<Tuple<string, string, string>> tuples3 = tupleLists1[0].Tuples;
- Gestor.Model.Domain.Seguros.SinistroAuto sinistroAuto7 = this.SinistroAuto;
- if (sinistroAuto7 != null)
- {
- envolvido = sinistroAuto7.Envolvido;
- }
- else
- {
- envolvido = null;
- }
- if (string.IsNullOrWhiteSpace(envolvido))
- {
- envolvido1 = "";
- }
- else
- {
- Gestor.Model.Domain.Seguros.SinistroAuto sinistroAuto8 = this.SinistroAuto;
- if (sinistroAuto8 != null)
- {
- envolvido1 = sinistroAuto8.Envolvido;
- }
- else
- {
- envolvido1 = null;
- }
- }
- tuples3.Add(new Tuple<string, string, string>("ENVOLVIDO/PROPRIETÁRIO", envolvido1, ""));
- ObservableCollection<Tuple<string, string, string>> observableCollection3 = tupleLists1[0].Tuples;
- Gestor.Model.Domain.Seguros.SinistroAuto sinistroAuto9 = this.SinistroAuto;
- if (sinistroAuto9 != null)
- {
- motorista = sinistroAuto9.Motorista;
- }
- else
- {
- motorista = null;
- }
- if (string.IsNullOrWhiteSpace(motorista))
- {
- motorista1 = "";
- }
- else
- {
- Gestor.Model.Domain.Seguros.SinistroAuto sinistroAuto10 = this.SinistroAuto;
- if (sinistroAuto10 != null)
- {
- motorista1 = sinistroAuto10.Motorista;
- }
- else
- {
- motorista1 = null;
- }
- }
- observableCollection3.Add(new Tuple<string, string, string>("MOTORISTA", motorista1, ""));
- ObservableCollection<Tuple<string, string, string>> tuples4 = tupleLists1[0].Tuples;
- Gestor.Model.Domain.Seguros.SinistroAuto sinistroAuto11 = this.SinistroAuto;
- if (sinistroAuto11 != null)
- {
- ddd = sinistroAuto11.Ddd;
- }
- else
- {
- ddd = null;
- }
- if (string.IsNullOrWhiteSpace(ddd))
- {
- ddd1 = "";
- }
- else
- {
- Gestor.Model.Domain.Seguros.SinistroAuto sinistroAuto12 = this.SinistroAuto;
- if (sinistroAuto12 != null)
- {
- ddd1 = sinistroAuto12.Ddd;
- }
- else
- {
- ddd1 = null;
- }
- }
- tuples4.Add(new Tuple<string, string, string>("DDD", ddd1, ""));
- ObservableCollection<Tuple<string, string, string>> observableCollection4 = tupleLists1[0].Tuples;
- Gestor.Model.Domain.Seguros.SinistroAuto sinistroAuto13 = this.SinistroAuto;
- if (sinistroAuto13 != null)
- {
- telefone = sinistroAuto13.Telefone;
- }
- else
- {
- telefone = null;
- }
- if (string.IsNullOrWhiteSpace(telefone))
- {
- telefone1 = "";
- }
- else
- {
- Gestor.Model.Domain.Seguros.SinistroAuto sinistroAuto14 = this.SinistroAuto;
- if (sinistroAuto14 != null)
- {
- telefone1 = sinistroAuto14.Telefone;
- }
- else
- {
- telefone1 = null;
- }
- }
- observableCollection4.Add(new Tuple<string, string, string>("TELEFONE", telefone1, ""));
- ObservableCollection<Tuple<string, string, string>> tuples5 = tupleLists1[0].Tuples;
- Gestor.Model.Domain.Seguros.SinistroAuto sinistroAuto15 = this.SinistroAuto;
- if (sinistroAuto15 != null)
- {
- email = sinistroAuto15.Email;
- }
- else
- {
- email = null;
- }
- if (string.IsNullOrWhiteSpace(email))
- {
- email1 = "";
- }
- else
- {
- Gestor.Model.Domain.Seguros.SinistroAuto sinistroAuto16 = this.SinistroAuto;
- if (sinistroAuto16 != null)
- {
- email1 = sinistroAuto16.Email;
- }
- else
- {
- email1 = null;
- }
- }
- tuples5.Add(new Tuple<string, string, string>("E-MAIL", email1, ""));
- ObservableCollection<Tuple<string, string, string>> observableCollection5 = tupleLists1[0].Tuples;
- Gestor.Model.Domain.Seguros.SinistroAuto sinistroAuto17 = this.SinistroAuto;
- if (sinistroAuto17 != null)
- {
- valor = sinistroAuto17.ValorMecanica;
- str4 = valor.ToString(new CultureInfo("pt-BR"));
- }
- else
- {
- str4 = null;
- }
- observableCollection5.Add(new Tuple<string, string, string>("VALOR MECÂNICA", str4, ""));
- ObservableCollection<Tuple<string, string, string>> tuples6 = tupleLists1[0].Tuples;
- Gestor.Model.Domain.Seguros.SinistroAuto sinistroAuto18 = this.SinistroAuto;
- if (sinistroAuto18 != null)
- {
- parceiroMecanica = sinistroAuto18.ParceiroMecanica;
- }
- else
- {
- parceiroMecanica = false;
- }
- if (!parceiroMecanica)
- {
- nome = "";
- }
- else
- {
- Gestor.Model.Domain.Seguros.SinistroAuto sinistroAuto19 = this.SinistroAuto;
- if (sinistroAuto19 != null)
- {
- Parceiro parceiro = sinistroAuto19.ParceiroMecanica;
- if (parceiro != null)
- {
- nome = parceiro.Nome;
- }
- else
- {
- nome = null;
- }
- }
- else
- {
- nome = null;
- }
- }
- tuples6.Add(new Tuple<string, string, string>("PARCEIRO MECÂNICA", nome, ""));
- ObservableCollection<Tuple<string, string, string>> observableCollection6 = tupleLists1[0].Tuples;
- Gestor.Model.Domain.Seguros.SinistroAuto sinistroAuto20 = this.SinistroAuto;
- if (sinistroAuto20 != null)
- {
- valor = sinistroAuto20.ValorFunilaria;
- str5 = valor.ToString(new CultureInfo("pt-BR"));
- }
- else
- {
- str5 = null;
- }
- observableCollection6.Add(new Tuple<string, string, string>("VALOR FUNILARIA", str5, ""));
- ObservableCollection<Tuple<string, string, string>> tuples7 = tupleLists1[0].Tuples;
- Gestor.Model.Domain.Seguros.SinistroAuto sinistroAuto21 = this.SinistroAuto;
- if (sinistroAuto21 != null)
- {
- parceiroFunilaria = sinistroAuto21.ParceiroFunilaria;
- }
- else
- {
- parceiroFunilaria = false;
- }
- if (!parceiroFunilaria)
- {
- nome1 = "";
- }
- else
- {
- Gestor.Model.Domain.Seguros.SinistroAuto sinistroAuto22 = this.SinistroAuto;
- if (sinistroAuto22 != null)
- {
- Parceiro parceiroFunilaria1 = sinistroAuto22.ParceiroFunilaria;
- if (parceiroFunilaria1 != null)
- {
- nome1 = parceiroFunilaria1.Nome;
- }
- else
- {
- nome1 = null;
- }
- }
- else
- {
- nome1 = null;
- }
- }
- tuples7.Add(new Tuple<string, string, string>("PARCEIRO FUNILARIA", nome1, ""));
- }
- if (this.SinistroVida != null)
- {
- ObservableCollection<Tuple<string, string, string>> observableCollection7 = tupleLists1[0].Tuples;
- Gestor.Model.Domain.Seguros.SinistroVida sinistroVida = this.SinistroVida;
- if (sinistroVida != null)
- {
- tipoPerda = sinistroVida.TipoPerda;
- hasValue = !tipoPerda.HasValue;
- }
- else
- {
- hasValue = true;
- }
- if (hasValue)
- {
- str1 = "";
- }
- else
- {
- Gestor.Model.Domain.Seguros.SinistroVida sinistroVida1 = this.SinistroVida;
- if (sinistroVida1 != null)
- {
- tipoPerda = sinistroVida1.TipoPerda;
- if (tipoPerda.HasValue)
- {
- str1 = tipoPerda.GetValueOrDefault().GetDescription();
- }
- else
- {
- str1 = null;
- }
- }
- else
- {
- str1 = null;
- }
- }
- observableCollection7.Add(new Tuple<string, string, string>("TIPO DE PERDA", str1, ""));
- ObservableCollection<Tuple<string, string, string>> tuples8 = tupleLists1[0].Tuples;
- Gestor.Model.Domain.Seguros.SinistroVida sinistroVida2 = this.SinistroVida;
- if (sinistroVida2 != null)
- {
- culpado = sinistroVida2.AuxFuneral;
- flag = !culpado.HasValue;
- }
- else
- {
- flag = true;
- }
- if (flag)
- {
- str2 = "";
- }
- else
- {
- Gestor.Model.Domain.Seguros.SinistroVida sinistroVida3 = this.SinistroVida;
- if (sinistroVida3 != null)
- {
- culpado = sinistroVida3.AuxFuneral;
- nullable = new bool?(culpado.Value);
- }
- else
- {
- culpado = null;
- nullable = culpado;
- }
- culpado = nullable;
- str2 = (culpado.Value ? "SIM" : "NÃO");
- }
- tuples8.Add(new Tuple<string, string, string>("AUXÍLIO FUNERAL", str2, ""));
- ObservableCollection<Tuple<string, string, string>> observableCollection8 = tupleLists1[0].Tuples;
- Gestor.Model.Domain.Seguros.SinistroVida sinistroVida4 = this.SinistroVida;
- if (sinistroVida4 != null)
- {
- estadoCivil = sinistroVida4.EstadoCivil;
- hasValue1 = !estadoCivil.HasValue;
- }
- else
- {
- hasValue1 = true;
- }
- if (hasValue1)
- {
- description2 = "";
- }
- else
- {
- Gestor.Model.Domain.Seguros.SinistroVida sinistroVida5 = this.SinistroVida;
- if (sinistroVida5 != null)
- {
- estadoCivil = sinistroVida5.EstadoCivil;
- if (estadoCivil.HasValue)
- {
- description2 = estadoCivil.GetValueOrDefault().GetDescription();
- }
- else
- {
- description2 = null;
- }
- }
- else
- {
- description2 = null;
- }
- }
- observableCollection8.Add(new Tuple<string, string, string>("ESTADO CIVIL", description2, ""));
- ObservableCollection<Tuple<string, string, string>> tuples9 = tupleLists1[0].Tuples;
- Gestor.Model.Domain.Seguros.SinistroVida sinistroVida6 = this.SinistroVida;
- if (sinistroVida6 != null)
- {
- certObito = sinistroVida6.CertObito;
- }
- else
- {
- certObito = null;
- }
- if (string.IsNullOrWhiteSpace(certObito))
- {
- certObito1 = "";
- }
- else
- {
- Gestor.Model.Domain.Seguros.SinistroVida sinistroVida7 = this.SinistroVida;
- if (sinistroVida7 != null)
- {
- certObito1 = sinistroVida7.CertObito;
- }
- else
- {
- certObito1 = null;
- }
- }
- tuples9.Add(new Tuple<string, string, string>("CERTIDÃO DE ÓBITO", certObito1, ""));
- ObservableCollection<Tuple<string, string, string>> observableCollection9 = tupleLists1[0].Tuples;
- Gestor.Model.Domain.Seguros.SinistroVida sinistroVida8 = this.SinistroVida;
- if (sinistroVida8 != null)
- {
- beneficiario = sinistroVida8.Beneficiario;
- }
- else
- {
- beneficiario = null;
- }
- if (string.IsNullOrWhiteSpace(beneficiario))
- {
- beneficiario1 = "";
- }
- else
- {
- Gestor.Model.Domain.Seguros.SinistroVida sinistroVida9 = this.SinistroVida;
- if (sinistroVida9 != null)
- {
- beneficiario1 = sinistroVida9.Beneficiario;
- }
- else
- {
- beneficiario1 = null;
- }
- }
- observableCollection9.Add(new Tuple<string, string, string>("BENEFICIÁRIO", beneficiario1, ""));
- }
- return tupleLists1;
- }
-
- public List<KeyValuePair<string, string>> Validate()
- {
- List<KeyValuePair<string, string>> keyValuePairs = ValidationHelper.AddValue();
- if (this.DataReclamacao.HasValue && (DateTime.Compare(this.DataReclamacao.Value, new DateTime(1753, 1, 1)) < 0 || DateTime.Compare(this.DataReclamacao.Value, new DateTime(9999, 12, 31)) > 0))
- {
- keyValuePairs.AddValue<string, string>("DataReclamacao", string.Format(Messages.DataInvalida, Array.Empty<object>()), true);
- }
- if (this.HoraReclamacao.HasValue && (DateTime.Compare(this.HoraReclamacao.Value, new DateTime(1753, 1, 1)) < 0 || DateTime.Compare(this.HoraReclamacao.Value, new DateTime(9999, 12, 31)) > 0))
- {
- keyValuePairs.AddValue<string, string>("HoraReclamacao", string.Format(Messages.DataInvalida, Array.Empty<object>()), true);
- }
- if (this.DataLiquidacao.HasValue && (DateTime.Compare(this.DataLiquidacao.Value, new DateTime(1753, 1, 1)) < 0 || DateTime.Compare(this.DataLiquidacao.Value, new DateTime(9999, 12, 31)) > 0))
- {
- keyValuePairs.AddValue<string, string>("DataLiquidacao", string.Format(Messages.DataInvalida, Array.Empty<object>()), true);
- }
- if (this.ControleSinistro != null)
- {
- keyValuePairs.AddRange(this.ControleSinistro.Validate());
- }
- if (!this.DataReclamacao.HasValue)
- {
- keyValuePairs.AddValue<string, string>("DataReclamacao", Messages.Obrigatorio, true);
- }
- if (this.StatusSinistro.GetValueOrDefault() != Gestor.Model.Common.StatusSinistro.EmAndamento && !this.DataLiquidacao.HasValue)
- {
- keyValuePairs.AddValue<string, string>("DataLiquidacao", Messages.Obrigatorio, true);
- }
- return keyValuePairs;
- }
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/SinistroAuto.cs b/Gestor.Model/Model.Domain.Seguros/SinistroAuto.cs
deleted file mode 100644
index 65cc4cd..0000000
--- a/Gestor.Model/Model.Domain.Seguros/SinistroAuto.cs
+++ /dev/null
@@ -1,284 +0,0 @@
-using Gestor.Model.Attributes;
-using Gestor.Model.Common;
-using Gestor.Model.Domain.Generic;
-using Gestor.Model.Helper;
-using Gestor.Model.Resources;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Runtime.CompilerServices;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class SinistroAuto : DomainBase, IDomain
- {
- private string _numeroBo;
-
- private string _endereco;
-
- private string _envolvido;
-
- private string _motorista;
-
- private string _ddd;
-
- private string _telefone;
-
- private string _email;
-
- private string _cnh;
-
- [Log(true)]
- [Name(true)]
- public string Cnh
- {
- get
- {
- string str = this._cnh;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._cnh = value;
- }
- }
-
- [Description("DECLARA-SE CULPADO")]
- [Log(true)]
- [Name(true)]
- public bool? Culpado
- {
- get;
- set;
- }
-
- [Description("PREFIXO")]
- [Log(true)]
- [Name(true)]
- public string Ddd
- {
- get
- {
- string str = this._ddd;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._ddd = value;
- }
- }
-
- [Description("E-MAIL")]
- [Log(true)]
- [Name(true)]
- public string Email
- {
- get
- {
- string str = this._email;
- if (str == null)
- {
- return null;
- }
- return str.ToLower().Trim();
- }
- set
- {
- this._email = value;
- }
- }
-
- [Description("ENDEREÇO")]
- [Log(true)]
- [Name(true)]
- public string Endereco
- {
- get
- {
- string str = this._endereco;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._endereco = value;
- }
- }
-
- [Log(true)]
- [Name(true)]
- public string Envolvido
- {
- get
- {
- string str = this._envolvido;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._envolvido = value;
- }
- }
-
- [Log(true)]
- [Name(true)]
- public string Motorista
- {
- get
- {
- string str = this._motorista;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._motorista = value;
- }
- }
-
- [Description("NUMERO B.O.")]
- [Log(true)]
- [Name(true)]
- public string NumeroBo
- {
- get
- {
- string str = this._numeroBo;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._numeroBo = value;
- }
- }
-
- [Description("FUNILARIA")]
- [Log(true)]
- public Parceiro ParceiroFunilaria
- {
- get;
- set;
- }
-
- [Description("MECÂNICA")]
- [Log(true)]
- public Parceiro ParceiroMecanica
- {
- get;
- set;
- }
-
- public Gestor.Model.Domain.Seguros.Sinistro Sinistro
- {
- get;
- set;
- }
-
- [Description("TELEFONE")]
- [Log(true)]
- [Name(true)]
- public string Telefone
- {
- get
- {
- string str = this._telefone;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._telefone = value;
- }
- }
-
- [Description("TIPO PERDA")]
- [Log(true)]
- [Name(true)]
- public Gestor.Model.Common.TipoPerda? TipoPerda
- {
- get;
- set;
- }
-
- [Description("DATA ÚLTIMO DOC. ENVIADO")]
- [Log(true)]
- [Name(true)]
- public DateTime? UltimoDocEnviado
- {
- get;
- set;
- }
-
- [JsonIgnore]
- public Func<List<KeyValuePair<string, string>>> ValidationEvent
- {
- get
- {
- SinistroAuto sinistroAuto = this;
- return new Func<List<KeyValuePair<string, string>>>(sinistroAuto.Validate);
- }
- }
-
- [Description("VALOR FINILARIA")]
- [Log(true)]
- [Name(true)]
- public decimal ValorFunilaria
- {
- get;
- set;
- }
-
- [Description("VALOR MECÂNICA")]
- [Log(true)]
- [Name(true)]
- public decimal ValorMecanica
- {
- get;
- set;
- }
-
- public SinistroAuto()
- {
- }
-
- public List<KeyValuePair<string, string>> Validate()
- {
- List<KeyValuePair<string, string>> keyValuePairs = ValidationHelper.AddValue();
- if (this.Sinistro != null)
- {
- keyValuePairs.AddRange(this.Sinistro.Validate());
- }
- if (this.UltimoDocEnviado.HasValue && (DateTime.Compare(this.UltimoDocEnviado.Value, new DateTime(1753, 1, 1)) < 0 || DateTime.Compare(this.UltimoDocEnviado.Value, new DateTime(9999, 12, 31)) > 0))
- {
- keyValuePairs.AddValue<string, string>("UltimoDocEnviado", string.Format(Messages.DataInvalida, Array.Empty<object>()), true);
- }
- return keyValuePairs;
- }
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/SinistroVida.cs b/Gestor.Model/Model.Domain.Seguros/SinistroVida.cs
deleted file mode 100644
index bdd167c..0000000
--- a/Gestor.Model/Model.Domain.Seguros/SinistroVida.cs
+++ /dev/null
@@ -1,138 +0,0 @@
-using Gestor.Model.Attributes;
-using Gestor.Model.Common;
-using Gestor.Model.Domain.Generic;
-using Gestor.Model.Helper;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Runtime.CompilerServices;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class SinistroVida : DomainBase, IDomain
- {
- private string _certObito;
-
- private string _beneficiario;
-
- private string _observacao;
-
- [Description("AUXÍLIO FUNERAL")]
- [Log(true)]
- [Name(true)]
- public bool? AuxFuneral
- {
- get;
- set;
- }
-
- [Description("BENEFICIÁRIO")]
- [Log(true)]
- [Name(true)]
- public string Beneficiario
- {
- get
- {
- string str = this._beneficiario;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._beneficiario = value;
- }
- }
-
- [Description("CERT. ÓBITO")]
- [Log(true)]
- [Name(true)]
- public string CertObito
- {
- get
- {
- string str = this._certObito;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._certObito = value;
- }
- }
-
- [Description("ESTADO CÍVIL")]
- [Log(true)]
- [Name(true)]
- public Gestor.Model.Common.EstadoCivil? EstadoCivil
- {
- get;
- set;
- }
-
- [Description("OBSERVAÇÃO")]
- [Log(true)]
- [Name(true)]
- public string Observacao
- {
- get
- {
- string str = this._observacao;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._observacao = value;
- }
- }
-
- public Gestor.Model.Domain.Seguros.Sinistro Sinistro
- {
- get;
- set;
- }
-
- [Description("TIPO PERDA")]
- [Log(true)]
- [Name(true)]
- public Gestor.Model.Common.TipoPerda? TipoPerda
- {
- get;
- set;
- }
-
- [JsonIgnore]
- public Func<List<KeyValuePair<string, string>>> ValidationEvent
- {
- get
- {
- SinistroVida sinistroVida = this;
- return new Func<List<KeyValuePair<string, string>>>(sinistroVida.Validate);
- }
- }
-
- public SinistroVida()
- {
- }
-
- public List<KeyValuePair<string, string>> Validate()
- {
- List<KeyValuePair<string, string>> keyValuePairs = ValidationHelper.AddValue();
- if (this.Sinistro != null)
- {
- keyValuePairs.AddRange(this.Sinistro.Validate());
- }
- return keyValuePairs;
- }
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/Status.cs b/Gestor.Model/Model.Domain.Seguros/Status.cs
deleted file mode 100644
index 3649416..0000000
--- a/Gestor.Model/Model.Domain.Seguros/Status.cs
+++ /dev/null
@@ -1,86 +0,0 @@
-using Gestor.Model.Attributes;
-using Gestor.Model.Domain.Generic;
-using Gestor.Model.Helper;
-using Gestor.Model.Resources;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Runtime.CompilerServices;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class Status : DomainBase, IDomain
- {
- private string _nome;
-
- [Log(true)]
- public bool Ativo
- {
- get;
- set;
- }
-
- [Log(true)]
- [Name(true)]
- public string Nome
- {
- get
- {
- string str = this._nome;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._nome = value;
- }
- }
-
- [JsonIgnore]
- public Func<List<KeyValuePair<string, string>>> ValidationEvent
- {
- get
- {
- Status statu = this;
- return new Func<List<KeyValuePair<string, string>>>(statu.Validate);
- }
- }
-
- public Status()
- {
- }
-
- public List<TupleList> Log()
- {
- return new List<TupleList>()
- {
- new TupleList()
- {
- Tuples = new ObservableCollection<Tuple<string, string, string>>()
- {
- new Tuple<string, string, string>("NOME", (string.IsNullOrWhiteSpace(this.Nome) ? "" : this.Nome), ""),
- new Tuple<string, string, string>("ATIVO", (this.Ativo ? "SIM" : "NÃO"), "")
- }
- }
- };
- }
-
- public List<KeyValuePair<string, string>> Validate()
- {
- List<KeyValuePair<string, string>> keyValuePairs = ValidationHelper.AddValue();
- if (string.IsNullOrWhiteSpace(this.Nome))
- {
- keyValuePairs.AddValue<string, string>("Nome", Messages.Obrigatorio, true);
- }
- else if (this.Nome.Length > 60)
- {
- keyValuePairs.AddValue<string, string>("Nome", string.Format(Messages.MaiorQueLimite, 60), true);
- }
- return keyValuePairs;
- }
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/TipoVendedor.cs b/Gestor.Model/Model.Domain.Seguros/TipoVendedor.cs
deleted file mode 100644
index 47d2048..0000000
--- a/Gestor.Model/Model.Domain.Seguros/TipoVendedor.cs
+++ /dev/null
@@ -1,138 +0,0 @@
-using Gestor.Model.Attributes;
-using Gestor.Model.Domain.Generic;
-using Gestor.Model.Helper;
-using Gestor.Model.Resources;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel;
-using System.Runtime.CompilerServices;
-using System.Threading;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class TipoVendedor : DomainBase, IDomain
- {
- private bool _selecionado;
-
- private string _descricao;
-
- private bool? _ativo;
-
- [Log(true)]
- public bool? Ativo
- {
- get
- {
- return this._ativo;
- }
- set
- {
- this._ativo = new bool?(value.GetValueOrDefault(true));
- }
- }
-
- [Description("DESCRIÇÃO")]
- [Log(true)]
- [Name(true)]
- public string Descricao
- {
- get
- {
- string str = this._descricao;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._descricao = value;
- }
- }
-
- public bool? Inserido
- {
- get;
- set;
- }
-
- public bool Selecionado
- {
- get
- {
- return this._selecionado;
- }
- set
- {
- if (value == this._selecionado)
- {
- return;
- }
- this._selecionado = value;
- this.OnPropertyChanged("Selecionado");
- }
- }
-
- [JsonIgnore]
- public Func<List<KeyValuePair<string, string>>> ValidationEvent
- {
- get
- {
- TipoVendedor tipoVendedor = this;
- return new Func<List<KeyValuePair<string, string>>>(tipoVendedor.Validate);
- }
- }
-
- public TipoVendedor()
- {
- }
-
- public List<TupleList> Log()
- {
- string str;
- List<TupleList> tupleLists = new List<TupleList>();
- TupleList tupleList = new TupleList();
- ObservableCollection<Tuple<string, string, string>> observableCollection = new ObservableCollection<Tuple<string, string, string>>()
- {
- new Tuple<string, string, string>("DESCRIÇÃO", (string.IsNullOrWhiteSpace(this.Descricao) ? "" : this.Descricao), "")
- };
- if (!this.Ativo.HasValue)
- {
- str = "";
- }
- else
- {
- str = (this.Ativo.Value ? "SIM" : "NÃO");
- }
- observableCollection.Add(new Tuple<string, string, string>("ATIVO", str, ""));
- tupleList.Tuples = observableCollection;
- tupleLists.Add(tupleList);
- return tupleLists;
- }
-
- protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
- {
- PropertyChangedEventHandler propertyChangedEventHandler = this.PropertyChanged;
- if (propertyChangedEventHandler == null)
- {
- return;
- }
- propertyChangedEventHandler(this, new PropertyChangedEventArgs(propertyName));
- }
-
- public List<KeyValuePair<string, string>> Validate()
- {
- List<KeyValuePair<string, string>> keyValuePairs = ValidationHelper.AddValue();
- if (string.IsNullOrWhiteSpace(this.Descricao))
- {
- keyValuePairs.AddValue<string, string>("Descricao", Messages.Obrigatorio, true);
- }
- return keyValuePairs;
- }
-
- public event PropertyChangedEventHandler PropertyChanged;
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/TitularesVida.cs b/Gestor.Model/Model.Domain.Seguros/TitularesVida.cs
deleted file mode 100644
index 3956270..0000000
--- a/Gestor.Model/Model.Domain.Seguros/TitularesVida.cs
+++ /dev/null
@@ -1,269 +0,0 @@
-using Gestor.Model.Common;
-using Gestor.Model.Domain.Generic;
-using Gestor.Model.Helper;
-using Gestor.Model.Resources;
-using Gestor.Model.Validation;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Runtime.CompilerServices;
-using System.Threading;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class TitularesVida : DomainBase, IDomain, INotifyPropertyChanged
- {
- private string _codigo;
-
- private string _fatura;
-
- private string _nome;
-
- private string _observacao;
-
- private string _matricula;
-
- private decimal? _premio;
-
- private decimal? _capital;
-
- private bool _selecionado;
-
- public decimal? Capital
- {
- get
- {
- return new decimal?(this._capital.GetValueOrDefault());
- }
- set
- {
- this._capital = value;
- }
- }
-
- public string Codigo
- {
- get
- {
- string str = this._codigo;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._codigo = value;
- }
- }
-
- public string Cpf
- {
- get;
- set;
- }
-
- public TitularesVida Dependente
- {
- get;
- set;
- }
-
- public string Fatura
- {
- get
- {
- string str = this._fatura;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._fatura = value;
- }
- }
-
- public DateTime? Fim
- {
- get;
- set;
- }
-
- public long IdItem
- {
- get;
- set;
- }
-
- public DateTime? Inicio
- {
- get;
- set;
- }
-
- public string Matricula
- {
- get
- {
- string str = this._matricula;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._matricula = value;
- }
- }
-
- public DateTime? Nascimento
- {
- get;
- set;
- }
-
- public string Nome
- {
- get
- {
- string str = this._nome;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._nome = value;
- }
- }
-
- public string Observacao
- {
- get
- {
- string str = this._observacao;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._observacao = value;
- }
- }
-
- public decimal? Premio
- {
- get
- {
- return new decimal?(this._premio.GetValueOrDefault());
- }
- set
- {
- this._premio = value;
- }
- }
-
- public bool Selecionado
- {
- get
- {
- return this._selecionado;
- }
- set
- {
- if (value == this._selecionado)
- {
- return;
- }
- this._selecionado = value;
- this.OnPropertyChanged("Selecionado");
- }
- }
-
- public TipoTitular? Tipo
- {
- get;
- set;
- }
-
- [JsonIgnore]
- public Func<List<KeyValuePair<string, string>>> ValidationEvent
- {
- get
- {
- TitularesVida titularesVida = this;
- return new Func<List<KeyValuePair<string, string>>>(titularesVida.Validate);
- }
- }
-
- public TitularesVida()
- {
- }
-
- protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
- {
- PropertyChangedEventHandler propertyChangedEventHandler = this.PropertyChanged;
- if (propertyChangedEventHandler == null)
- {
- return;
- }
- propertyChangedEventHandler(this, new PropertyChangedEventArgs(propertyName));
- }
-
- public List<KeyValuePair<string, string>> Validate()
- {
- List<KeyValuePair<string, string>> keyValuePairs = ValidationHelper.AddValue();
- if (string.IsNullOrWhiteSpace(this.Nome))
- {
- keyValuePairs.AddValue<string, string>("Nome", Messages.Obrigatorio, true);
- }
- else if (this.Nome.Length > 150)
- {
- keyValuePairs.AddValue<string, string>("Nome", string.Format(Messages.MaiorQueLimite, 150), true);
- }
- if (!this.Inicio.HasValue)
- {
- keyValuePairs.AddValue<string, string>("Inicio|INÍCIO", Messages.Obrigatorio, true);
- }
- else if (DateTime.Compare(this.Inicio.Value, new DateTime(1753, 1, 1)) < 0 || DateTime.Compare(this.Inicio.Value, new DateTime(9999, 12, 31)) > 0)
- {
- keyValuePairs.AddValue<string, string>("Inicio|INÍCIO", string.Format(Messages.DataInvalida, Array.Empty<object>()), true);
- }
- if (this.Fim.HasValue && (DateTime.Compare(this.Fim.Value, new DateTime(1753, 1, 1)) < 0 || DateTime.Compare(this.Fim.Value, new DateTime(9999, 12, 31)) > 0))
- {
- keyValuePairs.AddValue<string, string>("Fim", string.Format(Messages.DataInvalida, Array.Empty<object>()), true);
- }
- if (this.Nascimento.HasValue && (DateTime.Compare(this.Nascimento.Value, new DateTime(1753, 1, 1)) < 0 || DateTime.Compare(this.Nascimento.Value, new DateTime(9999, 12, 31)) > 0))
- {
- keyValuePairs.AddValue<string, string>("Nascimento", string.Format(Messages.DataInvalida, Array.Empty<object>()), true);
- }
- if ((!this.Nascimento.HasValue || Funcoes.GetAge(this.Nascimento.Value) >= 18) && !string.IsNullOrWhiteSpace(this.Cpf) && !this.Cpf.ValidacaoDocumento())
- {
- keyValuePairs.AddValue<string, string>("Cpf", Messages.Invalido, true);
- }
- if (!this.Tipo.HasValue)
- {
- keyValuePairs.AddValue<string, string>("Tipo", Messages.Obrigatorio, true);
- }
- if (this.Tipo.GetValueOrDefault() == TipoTitular.Dependente && this.Dependente == null)
- {
- keyValuePairs.AddValue<string, string>("Dependente", "OBRIGATÓRIO. PESQUISE POR UM DOS TITULARES\nQUE SEJA DO TIPO SÓCIO OU FUNCIONÁRIO", true);
- }
- return keyValuePairs;
- }
-
- public event PropertyChangedEventHandler PropertyChanged;
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/TupleList.cs b/Gestor.Model/Model.Domain.Seguros/TupleList.cs
deleted file mode 100644
index 406b072..0000000
--- a/Gestor.Model/Model.Domain.Seguros/TupleList.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-using System;
-using System.Collections.ObjectModel;
-using System.Runtime.CompilerServices;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class TupleList
- {
- public ObservableCollection<Tuple<string, string, string>> Tuples
- {
- get;
- set;
- }
-
- public TupleList()
- {
- }
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/Usuario.cs b/Gestor.Model/Model.Domain.Seguros/Usuario.cs
deleted file mode 100644
index 39c6cc1..0000000
--- a/Gestor.Model/Model.Domain.Seguros/Usuario.cs
+++ /dev/null
@@ -1,872 +0,0 @@
-using Gestor.Model.API;
-using Gestor.Model.Attributes;
-using Gestor.Model.Common;
-using Gestor.Model.Domain.Common;
-using Gestor.Model.Domain.Generic;
-using Gestor.Model.Helper;
-using Gestor.Model.Resources;
-using Gestor.Model.Validation;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel;
-using System.Runtime.CompilerServices;
-using System.Text.RegularExpressions;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class Usuario : EnderecoBase, IDomain
- {
- private string _nome;
-
- private string _prefixo;
-
- private string _telefone;
-
- private string _prefixo2;
-
- private string _telefone2;
-
- private string _email;
-
- private string _documento;
-
- private string _identidade;
-
- private string _estadoEmissor;
-
- private string _agencia;
-
- private string _conta;
-
- private string _login;
-
- private bool? _segunda;
-
- private bool? _terca;
-
- private bool? _quarta;
-
- private bool? _quinta;
-
- private bool? _sexta;
-
- private bool? _sabado;
-
- private bool? _domingo;
-
- private bool? _dashboard;
-
- private TipoTelaInicial? _telaInicial;
-
- [Log(true)]
- public bool Administrador
- {
- get;
- set;
- }
-
- [Description("PERMISSÃO ADMINISTRADOR CENTRAL SEGURADO")]
- [Log(true)]
- public bool AdministradorCentralSegurado
- {
- get;
- set;
- }
-
- [Description("AGÊNCIA")]
- [Log(true)]
- public string Agencia
- {
- get
- {
- string str = this._agencia;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._agencia = value;
- }
- }
-
- public bool Aggilizador
- {
- get;
- set;
- }
-
- [Log(true)]
- public Gestor.Model.Domain.Common.Banco Banco
- {
- get;
- set;
- }
-
- [Log(true)]
- public string Cargo
- {
- get;
- set;
- }
-
- [Log(true)]
- public string Conta
- {
- get
- {
- string str = this._conta;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._conta = value;
- }
- }
-
- [Description("ACESSO AO DASHBOARD")]
- [Log(true)]
- public bool? Dashboard
- {
- get
- {
- return this._dashboard;
- }
- set
- {
- this._dashboard = new bool?(value.GetValueOrDefault(true));
- }
- }
-
- [Log(true)]
- public string Documento
- {
- get
- {
- string str = this._documento;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._documento = value;
- }
- }
-
- [Description("ACESSO AOS DOMINGOS")]
- [Log(true)]
- public bool? Domingo
- {
- get
- {
- return this._domingo;
- }
- set
- {
- this._domingo = new bool?(value.GetValueOrDefault(true));
- }
- }
-
- [Log(true)]
- public string Email
- {
- get
- {
- string str = this._email;
- if (str == null)
- {
- return null;
- }
- return str.ToLower().Trim();
- }
- set
- {
- this._email = value;
- }
- }
-
- [Description("ESTADO EMISSOR")]
- [Log(true)]
- public string EstadoEmissor
- {
- get
- {
- string str = this._estadoEmissor;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._estadoEmissor = value;
- }
- }
-
- public bool Excluido
- {
- get;
- set;
- }
-
- [Description("DATA DE EXPEDIÇÃO")]
- [Log(true)]
- public DateTime? Expedicao
- {
- get;
- set;
- }
-
- [Description("FILTRO INICIAL")]
- [Log(true)]
- public TipoFiltroCliente? FiltroInicial
- {
- get;
- set;
- }
-
- [Description("FIM DO ACESSO")]
- public DateTime? FimAcesso
- {
- get;
- set;
- }
-
- public long IdEmpresa
- {
- get;
- set;
- }
-
- [Log(true)]
- public string Identidade
- {
- get
- {
- string str = this._identidade;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._identidade = value;
- }
- }
-
- [Description("INÍCIO DO ACESSO")]
- public DateTime? InicioAcesso
- {
- get;
- set;
- }
-
- [Log(true)]
- public string Login
- {
- get
- {
- string str = this._login;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._login = value;
- }
- }
-
- [Description("ACESSO AO MOBILE")]
- [Log(true)]
- public bool Mobile
- {
- get;
- set;
- }
-
- [Description("DATA DE NASCIMENTO")]
- [Log(true)]
- public DateTime? Nascimento
- {
- get;
- set;
- }
-
- [Log(true)]
- [Name(true)]
- public string Nome
- {
- get
- {
- return this._nome;
- }
- set
- {
- this._nome = value;
- }
- }
-
- [Description("PERMISSÃO ACESSO AGGILIZADOR")]
- [Log(true)]
- public long? PermissaoAggilizador
- {
- get;
- set;
- }
-
- [Description("PREFIXO TELEFONE 1")]
- [Log(true)]
- public string Prefixo
- {
- get
- {
- string str = this._prefixo;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._prefixo = value;
- }
- }
-
- [Description("PREFIXO TELEFONE 2")]
- [Log(true)]
- public string Prefixo2
- {
- get
- {
- string str = this._prefixo2;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._prefixo2 = value;
- }
- }
-
- [Description("ACESSO ÁS QUARTAS-FEIRAS")]
- [Log(true)]
- public bool? Quarta
- {
- get
- {
- return this._quarta;
- }
- set
- {
- this._quarta = new bool?(value.GetValueOrDefault(true));
- }
- }
-
- [Description("ACESSO ÁS QUINTAS-FEIRAS")]
- [Log(true)]
- public bool? Quinta
- {
- get
- {
- return this._quinta;
- }
- set
- {
- this._quinta = new bool?(value.GetValueOrDefault(true));
- }
- }
-
- [Description("ACESSO AOS RESULTADOS MOBILE")]
- [Log(true)]
- public bool Resultados
- {
- get;
- set;
- }
-
- [Description("ACESSO AOS SÁBADOS")]
- [Log(true)]
- public bool? Sabado
- {
- get
- {
- return this._sabado;
- }
- set
- {
- this._sabado = new bool?(value.GetValueOrDefault(true));
- }
- }
-
- [Description("ACESSO ÀS SEGUNDAS-FEIRAS")]
- [Log(true)]
- public bool? Segunda
- {
- get
- {
- return this._segunda;
- }
- set
- {
- this._segunda = new bool?(value.GetValueOrDefault(true));
- }
- }
-
- public bool Selecionado
- {
- get;
- set;
- }
-
- public string Senha
- {
- get;
- set;
- }
-
- public string SenhaAnterior { get; set; } = string.Empty;
-
- [Log(true)]
- public Gestor.Model.Common.Sexo Sexo
- {
- get;
- set;
- }
-
- [Description("ACESSO ÁS SEXTAS-FEIRAS")]
- [Log(true)]
- public bool? Sexta
- {
- get
- {
- return this._sexta;
- }
- set
- {
- this._sexta = new bool?(value.GetValueOrDefault(true));
- }
- }
-
- public string SsoId
- {
- get;
- set;
- }
-
- [Log(true)]
- public TipoTelaInicial? TelaInicial
- {
- get
- {
- return new TipoTelaInicial?(this._telaInicial.GetValueOrDefault());
- }
- set
- {
- this._telaInicial = new TipoTelaInicial?(value.GetValueOrDefault());
- }
- }
-
- [Description("TELEFONE 1")]
- [Log(true)]
- public string Telefone
- {
- get
- {
- string str = this._telefone;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._telefone = value;
- }
- }
-
- [Description("TELEFONE 2")]
- [Log(true)]
- public string Telefone2
- {
- get
- {
- string str = this._telefone2;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._telefone2 = value;
- }
- }
-
- [Description("ACESSO ÀS TERÇAS-FEIRAS")]
- [Log(true)]
- public bool? Terca
- {
- get
- {
- return this._terca;
- }
- set
- {
- this._terca = new bool?(value.GetValueOrDefault(true));
- }
- }
-
- [Description("TIPO DO TELEFONE 1")]
- [Log(true)]
- public Gestor.Model.Common.TipoTelefone? TipoTelefone
- {
- get;
- set;
- }
-
- [Description("TIPO DO TELEFONE 2")]
- [Log(true)]
- public Gestor.Model.Common.TipoTelefone? TipoTelefone2
- {
- get;
- set;
- }
-
- public string TokenSso
- {
- get;
- set;
- }
-
- [JsonIgnore]
- public Func<List<KeyValuePair<string, string>>> ValidationEvent
- {
- get
- {
- Usuario usuario = this;
- return new Func<List<KeyValuePair<string, string>>>(usuario.Validate);
- }
- }
-
- public string Visita
- {
- get;
- set;
- }
-
- public Usuario()
- {
- }
-
- public List<TupleList> Log()
- {
- string shortDateString;
- string str;
- string nome;
- string shortTimeString;
- string shortTimeString1;
- List<TupleList> tupleLists = new List<TupleList>();
- TupleList tupleList = new TupleList();
- ObservableCollection<Tuple<string, string, string>> observableCollection = new ObservableCollection<Tuple<string, string, string>>()
- {
- new Tuple<string, string, string>("NOME", (string.IsNullOrWhiteSpace(this.Nome) ? "" : this.Nome), ""),
- new Tuple<string, string, string>("CPF/CNPJ", (string.IsNullOrWhiteSpace(this.Documento) ? "" : this.Documento), ""),
- new Tuple<string, string, string>("USUÁRIO", (string.IsNullOrWhiteSpace(this.Login) ? "" : this.Login), ""),
- new Tuple<string, string, string>("IDENTIDADE", (string.IsNullOrWhiteSpace(this.Identidade) ? "" : this.Identidade), ""),
- new Tuple<string, string, string>("ESTADO EMISSOR", (string.IsNullOrWhiteSpace(this.EstadoEmissor) ? "" : this.EstadoEmissor), "")
- };
- DateTime? expedicao = this.Expedicao;
- if (!expedicao.HasValue)
- {
- shortDateString = "";
- }
- else
- {
- expedicao = this.Expedicao;
- if (expedicao.HasValue)
- {
- shortDateString = expedicao.GetValueOrDefault().ToShortDateString();
- }
- else
- {
- shortDateString = null;
- }
- }
- observableCollection.Add(new Tuple<string, string, string>("DATA DE EXPEDIÇÃO", shortDateString, ""));
- observableCollection.Add(new Tuple<string, string, string>("SEXO", this.Sexo.GetDescription(), ""));
- expedicao = this.Nascimento;
- if (!expedicao.HasValue)
- {
- str = "";
- }
- else
- {
- expedicao = this.Nascimento;
- if (expedicao.HasValue)
- {
- str = expedicao.GetValueOrDefault().ToShortDateString();
- }
- else
- {
- str = null;
- }
- }
- observableCollection.Add(new Tuple<string, string, string>("DATA DE NASCIMENTO", str, ""));
- if (this.Banco == null)
- {
- nome = "";
- }
- else
- {
- Gestor.Model.Domain.Common.Banco banco = this.Banco;
- if (banco != null)
- {
- nome = banco.Nome;
- }
- else
- {
- nome = null;
- }
- }
- observableCollection.Add(new Tuple<string, string, string>("BANCO", nome, ""));
- observableCollection.Add(new Tuple<string, string, string>("AGÊNCIA", (string.IsNullOrWhiteSpace(this.Agencia) ? "" : this.Agencia), ""));
- observableCollection.Add(new Tuple<string, string, string>("CONTA", (string.IsNullOrWhiteSpace(this.Conta) ? "" : this.Conta), ""));
- observableCollection.Add(new Tuple<string, string, string>("ENDEREÇO", (string.IsNullOrWhiteSpace(base.Endereco) ? "" : base.Endereco), ""));
- observableCollection.Add(new Tuple<string, string, string>("NÚMERO", (string.IsNullOrWhiteSpace(base.Numero) ? "" : base.Numero), ""));
- observableCollection.Add(new Tuple<string, string, string>("COMPLEMENTO", (string.IsNullOrWhiteSpace(base.Complemento) ? "" : base.Complemento), ""));
- observableCollection.Add(new Tuple<string, string, string>("BAIRRO", (string.IsNullOrWhiteSpace(base.Bairro) ? "" : base.Bairro), ""));
- observableCollection.Add(new Tuple<string, string, string>("CIDADE", (string.IsNullOrWhiteSpace(base.Cidade) ? "" : base.Cidade), ""));
- observableCollection.Add(new Tuple<string, string, string>("ESTADO", (string.IsNullOrWhiteSpace(base.Estado) ? "" : base.Estado), ""));
- observableCollection.Add(new Tuple<string, string, string>("CEP", (string.IsNullOrWhiteSpace(base.Cep) ? "" : base.Cep), ""));
- observableCollection.Add(new Tuple<string, string, string>("TIPO TELEFONE", (!this.TipoTelefone.HasValue ? "" : this.TipoTelefone.GetDescription()), ""));
- observableCollection.Add(new Tuple<string, string, string>("PRIMEIRO PREFIXO", (string.IsNullOrWhiteSpace(this.Prefixo) ? "" : this.Prefixo), ""));
- observableCollection.Add(new Tuple<string, string, string>("PRIMEIRO TELEFONE", (string.IsNullOrWhiteSpace(this.Telefone) ? "" : this.Telefone), ""));
- observableCollection.Add(new Tuple<string, string, string>("TIPO TELEFONE", (!this.TipoTelefone2.HasValue ? "" : this.TipoTelefone2.GetDescription()), ""));
- observableCollection.Add(new Tuple<string, string, string>("SEGUNDO PREFIXO", (string.IsNullOrWhiteSpace(this.Prefixo2) ? "" : this.Prefixo2), ""));
- observableCollection.Add(new Tuple<string, string, string>("SEGUNDO TELEFONE", (string.IsNullOrWhiteSpace(this.Telefone2) ? "" : this.Telefone2), ""));
- observableCollection.Add(new Tuple<string, string, string>("EMAIL", (string.IsNullOrWhiteSpace(this.Email) ? "" : this.Email), ""));
- observableCollection.Add(new Tuple<string, string, string>("ACESSO MOBILE", (this.Mobile ? "SIM" : "NÃO"), ""));
- observableCollection.Add(new Tuple<string, string, string>("ACESSO RESULTADOS", (this.Resultados ? "SIM" : "NÃO"), ""));
- observableCollection.Add(new Tuple<string, string, string>("ACESSO INDIVIDUAL AGGILIZADOR", (this.Aggilizador ? "SIM" : "NÃO"), ""));
- expedicao = this.InicioAcesso;
- if (!expedicao.HasValue)
- {
- shortTimeString = "";
- }
- else
- {
- expedicao = this.InicioAcesso;
- if (expedicao.HasValue)
- {
- shortTimeString = expedicao.GetValueOrDefault().ToShortTimeString();
- }
- else
- {
- shortTimeString = null;
- }
- }
- observableCollection.Add(new Tuple<string, string, string>("INÍCIO DO ACESSO", shortTimeString, ""));
- expedicao = this.FimAcesso;
- if (!expedicao.HasValue)
- {
- shortTimeString1 = "";
- }
- else
- {
- expedicao = this.FimAcesso;
- if (expedicao.HasValue)
- {
- shortTimeString1 = expedicao.GetValueOrDefault().ToShortTimeString();
- }
- else
- {
- shortTimeString1 = null;
- }
- }
- observableCollection.Add(new Tuple<string, string, string>("FIM DO ACESSO", shortTimeString1, ""));
- observableCollection.Add(new Tuple<string, string, string>("ADMINISTRADOR CENTRAL SEGURADO", (this.AdministradorCentralSegurado ? "SIM" : "NÃO"), ""));
- tupleList.Tuples = observableCollection;
- tupleLists.Add(tupleList);
- return tupleLists;
- }
-
- public UserSso ToUserSso(string serial, string documentoEmpresa, string ssoId = null)
- {
- return new UserSso()
- {
- Id = ssoId,
- Name = this.Nome,
- Username = this.Login,
- Password = this.Senha,
- Serial = serial,
- CustomerDocument = documentoEmpresa,
- IdEmpresa = this.IdEmpresa,
- Document = this.Documento,
- IsDeleted = false,
- Email = this.Email ?? string.Empty,
- Phone = (string.IsNullOrEmpty(this.Prefixo) || string.IsNullOrEmpty(this.Telefone) ? string.Empty : string.Concat(this.Prefixo.Clear(), this.Telefone.Clear()))
- };
- }
-
- public List<KeyValuePair<string, string>> Validate()
- {
- List<KeyValuePair<string, string>> keyValuePairs = ValidationHelper.AddValue();
- if (this.Expedicao.HasValue && (DateTime.Compare(this.Expedicao.Value, new DateTime(1753, 1, 1)) < 0 || DateTime.Compare(this.Expedicao.Value, new DateTime(9999, 12, 31)) > 0))
- {
- keyValuePairs.AddValue<string, string>("Expedicao", string.Format(Messages.DataInvalida, Array.Empty<object>()), true);
- }
- if (this.Nascimento.HasValue && (DateTime.Compare(this.Nascimento.Value, new DateTime(1753, 1, 1)) < 0 || DateTime.Compare(this.Nascimento.Value, new DateTime(9999, 12, 31)) > 0))
- {
- keyValuePairs.AddValue<string, string>("Nascimento", string.Format(Messages.DataInvalida, Array.Empty<object>()), true);
- }
- if (this.InicioAcesso.HasValue && this.FimAcesso.HasValue && this.InicioAcesso.Value.TimeOfDay > this.FimAcesso.Value.TimeOfDay)
- {
- keyValuePairs.AddValue<string, string>("FimAcesso|FIM DO ACESSO", "O HORÁRIO DO FIM DO ACESSO NÃO PODE SER ANTERIOR AO HORÁRIO DO INICIO DO ACESSO", true);
- }
- if (string.IsNullOrEmpty(this.Nome))
- {
- keyValuePairs.AddValue<string, string>("Nome", Messages.Obrigatorio, true);
- }
- else if (this.Nome.Length > 50)
- {
- keyValuePairs.AddValue<string, string>("Nome", string.Format(Messages.MaiorQueLimite, 50), true);
- }
- if (!string.IsNullOrEmpty(this.Documento) && !this.Documento.ValidacaoDocumento())
- {
- keyValuePairs.AddValue<string, string>("Documento", Messages.Invalido, true);
- }
- if (string.IsNullOrEmpty(this.Login))
- {
- keyValuePairs.AddValue<string, string>("Login", Messages.Obrigatorio, true);
- }
- else if (this.Login.Length > 30)
- {
- keyValuePairs.AddValue<string, string>("Login", string.Format(Messages.MaiorQueLimite, 30), true);
- }
- if (!string.IsNullOrEmpty(this.Login) && !Regex.IsMatch(this.Login, "^(?!.* {2})[a-zA-Z0-9](?:[a-zA-Z0-9 .]{0,49}[a-zA-Z0-9])?$"))
- {
- keyValuePairs.AddValue<string, string>("Login|USUARIO", "USUARIO INVALIDO,\nUSUARIO SOMENTE DEVE CONTER LETRAS E NUMEROS,\nNÃO DEVE CONTER MAIS DE UM ESPAÇO,\nNÃO DEVE TER ESPAÇO NO INICIO E NO FIM.\nEXEMPLO VALIDO:\nUSUARIO01 OU USUARIO 02 OU USUARIO.03", true);
- }
- if (string.IsNullOrEmpty(this.Senha))
- {
- keyValuePairs.AddValue<string, string>("Senha", Messages.Obrigatorio, true);
- }
- if (string.IsNullOrEmpty(this.Email))
- {
- keyValuePairs.AddValue<string, string>("Email", Messages.Obrigatorio, true);
- }
- if (!string.IsNullOrEmpty(this.EstadoEmissor) && !this.EstadoEmissor.ValidacaoEstado())
- {
- keyValuePairs.AddValue<string, string>("EstadoEmissor", Messages.Invalido, true);
- }
- if (this.Expedicao.HasValue && !this.Expedicao.ValidacaoDataPassada())
- {
- keyValuePairs.AddValue<string, string>("Expedicao", Messages.Invalido, true);
- }
- if (this.Nascimento.HasValue && !this.Nascimento.ValidacaoDataPassada())
- {
- keyValuePairs.AddValue<string, string>("Nascimento", Messages.Invalido, true);
- }
- if (!string.IsNullOrEmpty(base.Cep) && !base.Cep.ValidacaoCep())
- {
- keyValuePairs.AddValue<string, string>("Cep", Messages.Invalido, true);
- }
- if (!string.IsNullOrEmpty(base.Endereco) && base.Endereco.Length > 60)
- {
- keyValuePairs.AddValue<string, string>("Endereco", string.Format(Messages.MaiorQueLimite, 60), true);
- }
- if (!string.IsNullOrEmpty(base.Numero) && base.Numero.Length > 5)
- {
- keyValuePairs.AddValue<string, string>("Numero", string.Format(Messages.MaiorQueLimite, 5), true);
- }
- if (!string.IsNullOrEmpty(base.Bairro) && base.Bairro.Length > 60)
- {
- keyValuePairs.AddValue<string, string>("Bairro", string.Format(Messages.MaiorQueLimite, 60), true);
- }
- if (!string.IsNullOrEmpty(base.Cidade) && base.Cidade.Length > 30)
- {
- keyValuePairs.AddValue<string, string>("Cidade", string.Format(Messages.MaiorQueLimite, 30), true);
- }
- if (!string.IsNullOrEmpty(base.Estado) && !base.Estado.ValidacaoEstado())
- {
- keyValuePairs.AddValue<string, string>("Estado", Messages.Invalido, true);
- }
- if (!string.IsNullOrEmpty(base.Cep) || !string.IsNullOrEmpty(base.Numero) || !string.IsNullOrEmpty(base.Complemento) || !string.IsNullOrEmpty(base.Endereco) || !string.IsNullOrEmpty(base.Bairro) || !string.IsNullOrEmpty(base.Cidade) || !string.IsNullOrEmpty(base.Estado))
- {
- if (string.IsNullOrEmpty(base.Cep))
- {
- keyValuePairs.AddValue<string, string>("Cep", Messages.Obrigatorio, true);
- }
- if (string.IsNullOrEmpty(base.Endereco))
- {
- keyValuePairs.AddValue<string, string>("Endereco", Messages.Obrigatorio, true);
- }
- if (string.IsNullOrEmpty(base.Numero))
- {
- keyValuePairs.AddValue<string, string>("Numero", Messages.Obrigatorio, true);
- }
- if (string.IsNullOrEmpty(base.Bairro))
- {
- keyValuePairs.AddValue<string, string>("Bairro", Messages.Obrigatorio, true);
- }
- if (string.IsNullOrEmpty(base.Cidade))
- {
- keyValuePairs.AddValue<string, string>("Cidade", Messages.Obrigatorio, true);
- }
- if (string.IsNullOrEmpty(base.Estado))
- {
- keyValuePairs.AddValue<string, string>("Estado", Messages.Obrigatorio, true);
- }
- }
- if (this.AdministradorCentralSegurado && string.IsNullOrEmpty(this.Documento))
- {
- keyValuePairs.AddValue<string, string>("Documento", Messages.Obrigatorio, true);
- }
- if (this.AdministradorCentralSegurado && string.IsNullOrEmpty(this.Prefixo))
- {
- keyValuePairs.AddValue<string, string>("Prefixo", Messages.Obrigatorio, true);
- }
- if (this.AdministradorCentralSegurado && string.IsNullOrEmpty(this.Telefone))
- {
- keyValuePairs.AddValue<string, string>("Telefone", Messages.Obrigatorio, true);
- }
- if (this.AdministradorCentralSegurado && string.IsNullOrEmpty(this.Email))
- {
- keyValuePairs.AddValue<string, string>("Email", Messages.Obrigatorio, true);
- }
- if (this.InicioAcesso.HasValue && this.FimAcesso.HasValue && this.FimAcesso.Value.TimeOfDay == this.InicioAcesso.Value.TimeOfDay)
- {
- keyValuePairs.AddValue<string, string>("InicioAcesso", Messages.Invalido, true);
- keyValuePairs.AddValue<string, string>("FimAcesso", Messages.Invalido, true);
- }
- if (this.Documento == null || string.IsNullOrEmpty(this.Documento))
- {
- keyValuePairs.AddValue<string, string>("Documento", Messages.Obrigatorio, true);
- }
- return keyValuePairs;
- }
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/Vendedor.cs b/Gestor.Model/Model.Domain.Seguros/Vendedor.cs
deleted file mode 100644
index 200f397..0000000
--- a/Gestor.Model/Model.Domain.Seguros/Vendedor.cs
+++ /dev/null
@@ -1,375 +0,0 @@
-using Gestor.Model.Attributes;
-using Gestor.Model.Common;
-using Gestor.Model.Domain.Common;
-using Gestor.Model.Domain.Generic;
-using Gestor.Model.Helper;
-using Gestor.Model.Resources;
-using Gestor.Model.Validation;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel;
-using System.Globalization;
-using System.Runtime.CompilerServices;
-using System.Threading;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class Vendedor : EnderecoBase, IDomain, INotifyPropertyChanged
- {
- private bool _selecionado;
-
- private string _nome;
-
- private string _documento;
-
- private string _conta;
-
- private string _agencia;
-
- private string _observacao;
-
- private string _titularConta;
-
- private string _documentoTitular;
-
- public string Agencia
- {
- get
- {
- string str = this._agencia;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._agencia = value;
- }
- }
-
- public bool Ativo
- {
- get;
- set;
- }
-
- public Gestor.Model.Domain.Common.Banco Banco
- {
- get;
- set;
- }
-
- public string Conta
- {
- get
- {
- string str = this._conta;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._conta = value;
- }
- }
-
- public Gestor.Model.Domain.Seguros.Controle Controle
- {
- get;
- set;
- }
-
- public bool Corretora
- {
- get;
- set;
- }
-
- public decimal? Desconto
- {
- get;
- set;
- }
-
- public string Documento
- {
- get
- {
- string str = this._documento;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._documento = value;
- }
- }
-
- public long IdEmpresa
- {
- get;
- set;
- }
-
- [Log(true)]
- [Name(true)]
- public string Nome
- {
- get
- {
- string str = this._nome;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._nome = value;
- }
- }
-
- public string Observacao
- {
- get
- {
- string str = this._observacao;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._observacao = value;
- }
- }
-
- public bool Selecionado
- {
- get
- {
- return this._selecionado;
- }
- set
- {
- if (value == this._selecionado)
- {
- return;
- }
- this._selecionado = value;
- this.OnPropertyChanged("Selecionado");
- }
- }
-
- public List<VendedorTelefone> Telefones
- {
- get;
- set;
- }
-
- public Gestor.Model.Common.TipoConta TipoConta
- {
- get;
- set;
- }
-
- public Gestor.Model.Common.TipoIncidenciaDesconto TipoIncidenciaDesconto
- {
- get;
- set;
- }
-
- public string TitularConta
- {
- get
- {
- string str = this._titularConta;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._titularConta = value;
- }
- }
-
- public string TitularDocumento
- {
- get
- {
- string str = this._documentoTitular;
- if (str == null)
- {
- return null;
- }
- return str.ToUpper().Trim();
- }
- set
- {
- this._documentoTitular = value;
- }
- }
-
- [JsonIgnore]
- public Func<List<KeyValuePair<string, string>>> ValidationEvent
- {
- get
- {
- Vendedor vendedor = this;
- return new Func<List<KeyValuePair<string, string>>>(vendedor.Validate);
- }
- }
-
- public Vendedor()
- {
- }
-
- public List<TupleList> Log()
- {
- decimal? nullable;
- string str;
- string description;
- decimal? nullable1;
- List<TupleList> tupleLists = new List<TupleList>();
- TupleList tupleList = new TupleList();
- ObservableCollection<Tuple<string, string, string>> observableCollection = new ObservableCollection<Tuple<string, string, string>>()
- {
- new Tuple<string, string, string>("NOME", (string.IsNullOrWhiteSpace(this.Nome) ? "" : this.Nome), ""),
- new Tuple<string, string, string>("CPF", (string.IsNullOrWhiteSpace(this.Documento) ? "" : this.Documento), ""),
- new Tuple<string, string, string>("ATIVO", (this.Ativo ? "SIM" : "NÃO"), ""),
- new Tuple<string, string, string>("BANCO", (this.Banco == null ? "" : this.Banco.Nome), ""),
- new Tuple<string, string, string>("AGÊNCIA", (string.IsNullOrWhiteSpace(this.Agencia) ? "" : this.Agencia), ""),
- new Tuple<string, string, string>("CONTA CORRENTE/POUPANÇA", (string.IsNullOrWhiteSpace(this.Conta) ? "" : this.Conta), ""),
- new Tuple<string, string, string>("TITULAR DA CONTA", (string.IsNullOrWhiteSpace(this.TitularConta) ? "" : this.TitularConta), ""),
- new Tuple<string, string, string>("DOCUMENTO TITULAR DA CONTA", (string.IsNullOrWhiteSpace(this.TitularDocumento) ? "" : this.TitularDocumento), ""),
- new Tuple<string, string, string>("TIPO CONTA", (string.IsNullOrWhiteSpace(this.TipoConta.GetDescription()) ? "" : this.TipoConta.GetDescription()), "")
- };
- decimal? desconto = this.Desconto;
- if (!desconto.HasValue)
- {
- str = "";
- }
- else
- {
- desconto = this.Desconto;
- decimal num = 100;
- if (desconto.HasValue)
- {
- nullable1 = new decimal?(desconto.GetValueOrDefault() / num);
- }
- else
- {
- nullable = null;
- nullable1 = nullable;
- }
- nullable = nullable1;
- if (nullable.HasValue)
- {
- decimal valueOrDefault = nullable.GetValueOrDefault();
- str = valueOrDefault.ToString("P", new CultureInfo("pt-BR", false));
- }
- else
- {
- str = null;
- }
- }
- observableCollection.Add(new Tuple<string, string, string>("DESCONTO", str, ""));
- tupleList.Tuples = observableCollection;
- tupleLists.Add(tupleList);
- List<TupleList> tupleLists1 = tupleLists;
- ObservableCollection<Tuple<string, string, string>> observableCollection1 = new ObservableCollection<Tuple<string, string, string>>()
- {
- new Tuple<string, string, string>("CONTATOS$", "", "")
- };
- if (this.Telefones != null && this.Telefones.Count != 0)
- {
- foreach (VendedorTelefone telefone in this.Telefones)
- {
- observableCollection1.Add(new Tuple<string, string, string>(string.Format(" CONTATO {0}$", this.Telefones.IndexOf(telefone) + 1), "", ""));
- observableCollection1.Add(new Tuple<string, string, string>(" NOME", (string.IsNullOrWhiteSpace(telefone.Nome) ? "" : telefone.Nome), ""));
- ObservableCollection<Tuple<string, string, string>> observableCollection2 = observableCollection1;
- TipoTelefone? tipo = telefone.Tipo;
- if (!tipo.HasValue)
- {
- description = "";
- }
- else
- {
- tipo = telefone.Tipo;
- if (tipo.HasValue)
- {
- description = tipo.GetValueOrDefault().GetDescription();
- }
- else
- {
- description = null;
- }
- }
- observableCollection2.Add(new Tuple<string, string, string>(" TIPO DE TELEFONE", description, ""));
- observableCollection1.Add(new Tuple<string, string, string>(" PREFIXO", (string.IsNullOrWhiteSpace(telefone.Prefixo) ? "" : telefone.Prefixo), ""));
- observableCollection1.Add(new Tuple<string, string, string>(" NÚMERO DE TELEFONE", (string.IsNullOrWhiteSpace(telefone.Numero) ? "" : telefone.Numero), ""));
- observableCollection1.Add(new Tuple<string, string, string>(" E-MAIL", (string.IsNullOrWhiteSpace(telefone.Email) ? "" : telefone.Email), ""));
- }
- tupleLists1.Add(new TupleList()
- {
- Tuples = observableCollection1
- });
- }
- return tupleLists1;
- }
-
- protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
- {
- PropertyChangedEventHandler propertyChangedEventHandler = this.PropertyChanged;
- if (propertyChangedEventHandler == null)
- {
- return;
- }
- propertyChangedEventHandler(this, new PropertyChangedEventArgs(propertyName));
- }
-
- public List<KeyValuePair<string, string>> Validate()
- {
- List<KeyValuePair<string, string>> keyValuePairs = ValidationHelper.AddValue();
- if (string.IsNullOrEmpty(this.Nome))
- {
- keyValuePairs.AddValue<string, string>("Nome", Messages.Obrigatorio, true);
- }
- if (!string.IsNullOrWhiteSpace(this.Documento) && !this.Documento.ValidacaoDocumento())
- {
- keyValuePairs.AddValue<string, string>("Documento", Messages.Invalido, true);
- }
- if (!string.IsNullOrWhiteSpace(this.TitularDocumento) && !this.TitularDocumento.ValidacaoDocumento())
- {
- keyValuePairs.AddValue<string, string>("TitularDocumento", Messages.Invalido, true);
- }
- if (this.Telefones == null)
- {
- return keyValuePairs;
- }
- foreach (VendedorTelefone telefone in this.Telefones)
- {
- keyValuePairs.AddRange(telefone.Validate());
- }
- return keyValuePairs;
- }
-
- public event PropertyChangedEventHandler PropertyChanged;
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/VendedorParcela.cs b/Gestor.Model/Model.Domain.Seguros/VendedorParcela.cs
deleted file mode 100644
index 8d40450..0000000
--- a/Gestor.Model/Model.Domain.Seguros/VendedorParcela.cs
+++ /dev/null
@@ -1,235 +0,0 @@
-using Gestor.Model.Attributes;
-using Gestor.Model.Common;
-using Gestor.Model.Domain.Generic;
-using Gestor.Model.Helper;
-using Gestor.Model.Resources;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Runtime.CompilerServices;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class VendedorParcela : DomainBase, IDomain
- {
- private string _vCondRep;
-
- public bool CoCorretagem
- {
- get;
- set;
- }
-
- public Gestor.Model.Domain.Seguros.CondicaoRepasse CondicaoRepasse
- {
- get;
- set;
- }
-
- [Description("DATA DO PAGAMENTO")]
- [Log(true)]
- public DateTime? DataPagamento
- {
- get;
- set;
- }
-
- [Description("DATA PREVISÃO DE PAGAMENTO")]
- [Log(true)]
- public DateTime? DataPrePagamento
- {
- get;
- set;
- }
-
- [Log(false)]
- public Gestor.Model.Domain.Seguros.Documento Documento
- {
- get;
- set;
- }
-
- [Log(false)]
- public Gestor.Model.Domain.Seguros.Parcela Parcela
- {
- get;
- set;
- }
-
- [Description("PORCENTAGEM REPASSE")]
- [Log(true)]
- public decimal? PorcentagemRepasse
- {
- get;
- set;
- }
-
- public decimal? PorcentagemRepasseB
- {
- get;
- set;
- }
-
- public string RecebidoPorCompleto
- {
- get;
- set;
- }
-
- public Gestor.Model.Domain.Seguros.Repasse Repasse
- {
- get;
- set;
- }
-
- public bool Selecionado
- {
- get;
- set;
- }
-
- public Gestor.Model.Domain.Seguros.TipoVendedor TipoVendedor
- {
- get;
- set;
- }
-
- [JsonIgnore]
- public Func<List<KeyValuePair<string, string>>> ValidationEvent
- {
- get
- {
- VendedorParcela vendedorParcela = this;
- return new Func<List<KeyValuePair<string, string>>>(vendedorParcela.Validate);
- }
- }
-
- [Description("VALOR REPASSE")]
- [Log(true)]
- public decimal? ValorRepasse
- {
- get;
- set;
- }
-
- public decimal? ValorRepasseB
- {
- get;
- set;
- }
-
- public decimal? ValorTotal
- {
- get;
- set;
- }
-
- public decimal? ValorTotalPago
- {
- get;
- set;
- }
-
- public string VCondRep
- {
- get
- {
- string str = this._vCondRep;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._vCondRep = value;
- }
- }
-
- [Log(true)]
- public Gestor.Model.Domain.Seguros.Vendedor Vendedor
- {
- get;
- set;
- }
-
- public VendedorParcela()
- {
- }
-
- public List<KeyValuePair<string, string>> Validate()
- {
- decimal num;
- List<KeyValuePair<string, string>> keyValuePairs = ValidationHelper.AddValue();
- if (this.DataPagamento.HasValue && (DateTime.Compare(this.DataPagamento.Value, new DateTime(1753, 1, 1)) < 0 || DateTime.Compare(this.DataPagamento.Value, new DateTime(9999, 12, 31)) > 0))
- {
- keyValuePairs.AddValue<string, string>("DataPagamento", string.Format(Messages.DataInvalida, Array.Empty<object>()), true);
- }
- if (this.DataPrePagamento.HasValue && (DateTime.Compare(this.DataPrePagamento.Value, new DateTime(1753, 1, 1)) < 0 || DateTime.Compare(this.DataPrePagamento.Value, new DateTime(9999, 12, 31)) > 0))
- {
- keyValuePairs.AddValue<string, string>("DataPrePagamento", string.Format(Messages.DataInvalida, Array.Empty<object>()), true);
- }
- if (this.Vendedor == null)
- {
- keyValuePairs.AddValue<string, string>("Vendedor", Messages.Obrigatorio, true);
- }
- if (this.Documento == null)
- {
- keyValuePairs.AddValue<string, string>("Documento", Messages.Obrigatorio, true);
- }
- if (this.Documento != null && this.Documento.Id > (long)0 && this.Parcela == null)
- {
- keyValuePairs.AddValue<string, string>("Parcela", Messages.Obrigatorio, true);
- }
- if (this.Repasse == null)
- {
- keyValuePairs.AddValue<string, string>("Repasse", Messages.Obrigatorio, true);
- }
- if (this.TipoVendedor == null && !this.CoCorretagem)
- {
- keyValuePairs.AddValue<string, string>("TipoVendedor", Messages.Obrigatorio, true);
- }
- decimal? porcentagemRepasse = this.PorcentagemRepasse;
- if (!porcentagemRepasse.HasValue && !this.CoCorretagem)
- {
- keyValuePairs.AddValue<string, string>("PorcentagemRepasse", Messages.Obrigatorio, true);
- }
- porcentagemRepasse = this.ValorRepasse;
- if (!porcentagemRepasse.HasValue)
- {
- keyValuePairs.AddValue<string, string>("ValorRepasse", Messages.Obrigatorio, true);
- }
- if (this.Vendedor == null || this.Vendedor.Corretora)
- {
- return keyValuePairs;
- }
- porcentagemRepasse = this.PorcentagemRepasse;
- if (porcentagemRepasse.HasValue)
- {
- porcentagemRepasse = this.PorcentagemRepasse;
- num = new decimal();
- if ((porcentagemRepasse.GetValueOrDefault() <= num) & porcentagemRepasse.HasValue)
- {
- keyValuePairs.AddValue<string, string>("PorcentagemRepasse", Messages.Invalido, true);
- }
- }
- porcentagemRepasse = this.ValorRepasse;
- if (porcentagemRepasse.HasValue)
- {
- porcentagemRepasse = this.ValorRepasse;
- num = new decimal();
- if ((porcentagemRepasse.GetValueOrDefault() == num) & porcentagemRepasse.HasValue && !this.CoCorretagem)
- {
- keyValuePairs.AddValue<string, string>("ValorRepasse", Messages.Invalido, true);
- }
- }
- if (this.Repasse != null && this.Documento != null && this.Documento.TipoRecebimento.GetValueOrDefault() == TipoRecebimento.Parcela && this.Repasse.Base.GetValueOrDefault() == BaseRepasse.Transmissao && (!this.Documento.Remessa.HasValue || DateTime.Compare(this.Documento.Remessa.Value, new DateTime(1753, 1, 1)) < 0 || DateTime.Compare(this.Documento.Remessa.Value, new DateTime(9999, 12, 31)) > 0))
- {
- keyValuePairs.AddValue<string, string>("TRANSMISSÃO DA PROPOSTA", string.Format(Messages.DataInvalida, Array.Empty<object>()), true);
- }
- return keyValuePairs;
- }
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/VendedorParcelas.cs b/Gestor.Model/Model.Domain.Seguros/VendedorParcelas.cs
deleted file mode 100644
index c3a7261..0000000
--- a/Gestor.Model/Model.Domain.Seguros/VendedorParcelas.cs
+++ /dev/null
@@ -1,162 +0,0 @@
-using Gestor.Model.Domain.Generic;
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Globalization;
-using System.Runtime.CompilerServices;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class VendedorParcelas : DomainBase
- {
- public ObservableCollection<VendedorParcela> VendedorParcelasList
- {
- get;
- set;
- }
-
- public VendedorParcelas()
- {
- }
-
- public List<TupleList> Log(bool restricaoComissao, bool restricaoComissaoPorcentagem)
- {
- decimal? porcentagemRepasse;
- decimal valueOrDefault;
- string shortDateString;
- string str;
- string str1;
- string str2;
- string str3;
- ObservableCollection<Tuple<string, string, string>> observableCollection = new ObservableCollection<Tuple<string, string, string>>()
- {
- new Tuple<string, string, string>("VENDEDORES$", "", "")
- };
- if (this.VendedorParcelasList != null)
- {
- foreach (VendedorParcela vendedorParcelasList in this.VendedorParcelasList)
- {
- observableCollection.Add(new Tuple<string, string, string>(" NOME", (vendedorParcelasList.Vendedor == null ? "" : vendedorParcelasList.Vendedor.Nome.ToUpper()), ""));
- observableCollection.Add(new Tuple<string, string, string>(" TIPO VENDEDOR", (vendedorParcelasList.TipoVendedor == null ? "" : vendedorParcelasList.TipoVendedor.Descricao), ""));
- if (!restricaoComissao)
- {
- ObservableCollection<Tuple<string, string, string>> observableCollection1 = observableCollection;
- porcentagemRepasse = vendedorParcelasList.PorcentagemRepasse;
- if (!porcentagemRepasse.HasValue)
- {
- str2 = "";
- }
- else
- {
- porcentagemRepasse = vendedorParcelasList.PorcentagemRepasse;
- if (porcentagemRepasse.HasValue)
- {
- valueOrDefault = porcentagemRepasse.GetValueOrDefault();
- str2 = valueOrDefault.ToString("C", new CultureInfo("pt-BR", false));
- }
- else
- {
- str2 = null;
- }
- }
- observableCollection1.Add(new Tuple<string, string, string>(" COMISSÃO", str2, ""));
- ObservableCollection<Tuple<string, string, string>> observableCollection2 = observableCollection;
- porcentagemRepasse = vendedorParcelasList.ValorRepasse;
- if (!porcentagemRepasse.HasValue)
- {
- str3 = "";
- }
- else
- {
- porcentagemRepasse = vendedorParcelasList.ValorRepasse;
- if (porcentagemRepasse.HasValue)
- {
- valueOrDefault = porcentagemRepasse.GetValueOrDefault();
- str3 = valueOrDefault.ToString("C", new CultureInfo("pt-BR", false));
- }
- else
- {
- str3 = null;
- }
- }
- observableCollection2.Add(new Tuple<string, string, string>(" REPASSE", str3, ""));
- }
- else if (!restricaoComissaoPorcentagem)
- {
- observableCollection.Add(new Tuple<string, string, string>(" COMISSÃO", "", ""));
- observableCollection.Add(new Tuple<string, string, string>(" REPASSE", "", ""));
- }
- else
- {
- ObservableCollection<Tuple<string, string, string>> observableCollection3 = observableCollection;
- porcentagemRepasse = vendedorParcelasList.PorcentagemRepasse;
- if (!porcentagemRepasse.HasValue)
- {
- str1 = "";
- }
- else
- {
- porcentagemRepasse = vendedorParcelasList.PorcentagemRepasse;
- if (porcentagemRepasse.HasValue)
- {
- valueOrDefault = porcentagemRepasse.GetValueOrDefault();
- str1 = valueOrDefault.ToString("C", new CultureInfo("pt-BR", false));
- }
- else
- {
- str1 = null;
- }
- }
- observableCollection3.Add(new Tuple<string, string, string>(" COMISSÃO", str1, ""));
- observableCollection.Add(new Tuple<string, string, string>(" REPASSE", "", ""));
- }
- ObservableCollection<Tuple<string, string, string>> observableCollection4 = observableCollection;
- DateTime? dataPrePagamento = vendedorParcelasList.DataPrePagamento;
- if (!dataPrePagamento.HasValue)
- {
- shortDateString = "";
- }
- else
- {
- dataPrePagamento = vendedorParcelasList.DataPrePagamento;
- if (dataPrePagamento.HasValue)
- {
- shortDateString = dataPrePagamento.GetValueOrDefault().ToShortDateString();
- }
- else
- {
- shortDateString = null;
- }
- }
- observableCollection4.Add(new Tuple<string, string, string>(" DATA PRÉ PAGAMENTO", shortDateString, ""));
- ObservableCollection<Tuple<string, string, string>> observableCollection5 = observableCollection;
- dataPrePagamento = vendedorParcelasList.DataPagamento;
- if (!dataPrePagamento.HasValue)
- {
- str = "";
- }
- else
- {
- dataPrePagamento = vendedorParcelasList.DataPagamento;
- if (dataPrePagamento.HasValue)
- {
- str = dataPrePagamento.GetValueOrDefault().ToShortDateString();
- }
- else
- {
- str = null;
- }
- }
- observableCollection5.Add(new Tuple<string, string, string>(" DATA PAGAMENTO", str, ""));
- }
- }
- return new List<TupleList>()
- {
- new TupleList()
- {
- Tuples = observableCollection
- }
- };
- }
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/VendedorTelefone.cs b/Gestor.Model/Model.Domain.Seguros/VendedorTelefone.cs
deleted file mode 100644
index 7117ff5..0000000
--- a/Gestor.Model/Model.Domain.Seguros/VendedorTelefone.cs
+++ /dev/null
@@ -1,89 +0,0 @@
-using Gestor.Model.Domain.Generic;
-using Gestor.Model.Helper;
-using Gestor.Model.Resources;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.Runtime.CompilerServices;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class VendedorTelefone : TelefoneBase, IDomain
- {
- private string _nome;
-
- private string _email;
-
- public string Email
- {
- get
- {
- string str = this._email;
- if (str == null)
- {
- return null;
- }
- return str.ToLower().Trim();
- }
- set
- {
- this._email = value;
- }
- }
-
- public string Nome
- {
- get
- {
- string str = this._nome;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._nome = value;
- }
- }
-
- [JsonIgnore]
- public Func<List<KeyValuePair<string, string>>> ValidationEvent
- {
- get
- {
- VendedorTelefone vendedorTelefone = this;
- return new Func<List<KeyValuePair<string, string>>>(vendedorTelefone.Validate);
- }
- }
-
- public Gestor.Model.Domain.Seguros.Vendedor Vendedor
- {
- get;
- set;
- }
-
- public VendedorTelefone()
- {
- }
-
- public List<KeyValuePair<string, string>> Validate()
- {
- List<KeyValuePair<string, string>> keyValuePairs = base.ValidateBase(false);
- if (string.IsNullOrWhiteSpace(this.Nome))
- {
- keyValuePairs.AddValue<string, string>("Nome", Messages.Obrigatorio, true);
- }
- if (!string.IsNullOrEmpty(this.Email) && this.Email.Length > 100)
- {
- keyValuePairs.AddValue<string, string>("Email|E-MAIL", string.Format(Messages.MaiorQueLimite, 100), true);
- }
- if (!string.IsNullOrEmpty(this.Email) && !this.Email.ValidacaoEmail())
- {
- keyValuePairs.AddValue<string, string>("Email|E-MAIL", Messages.Invalido, true);
- }
- return keyValuePairs;
- }
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/VendedorUsuario.cs b/Gestor.Model/Model.Domain.Seguros/VendedorUsuario.cs
deleted file mode 100644
index a53782f..0000000
--- a/Gestor.Model/Model.Domain.Seguros/VendedorUsuario.cs
+++ /dev/null
@@ -1,51 +0,0 @@
-using Gestor.Model.Domain.Generic;
-using Gestor.Model.Helper;
-using Gestor.Model.Resources;
-using System;
-using System.Collections.Generic;
-using System.Runtime.CompilerServices;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class VendedorUsuario : DomainBase, IDomain
- {
- public Gestor.Model.Domain.Seguros.Usuario Usuario
- {
- get;
- set;
- }
-
- public Func<List<KeyValuePair<string, string>>> ValidationEvent
- {
- get
- {
- VendedorUsuario vendedorUsuario = this;
- return new Func<List<KeyValuePair<string, string>>>(vendedorUsuario.Validate);
- }
- }
-
- public Gestor.Model.Domain.Seguros.Vendedor Vendedor
- {
- get;
- set;
- }
-
- public VendedorUsuario()
- {
- }
-
- public List<KeyValuePair<string, string>> Validate()
- {
- List<KeyValuePair<string, string>> keyValuePairs = ValidationHelper.AddValue();
- if (this.Usuario == null)
- {
- keyValuePairs.AddValue<string, string>("Usuario", Messages.Obrigatorio, true);
- }
- if (this.Vendedor == null)
- {
- keyValuePairs.AddValue<string, string>("Vendedor", Messages.Obrigatorio, true);
- }
- return keyValuePairs;
- }
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/Vida.cs b/Gestor.Model/Model.Domain.Seguros/Vida.cs
deleted file mode 100644
index 4d945c4..0000000
--- a/Gestor.Model/Model.Domain.Seguros/Vida.cs
+++ /dev/null
@@ -1,306 +0,0 @@
-using Gestor.Model.Domain.Generic;
-using Gestor.Model.Helper;
-using Gestor.Model.Resources;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Globalization;
-using System.Runtime.CompilerServices;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class Vida : DomainBase, IDomain
- {
- private string _plano;
-
- public decimal? CapitalFuncionarios
- {
- get;
- set;
- }
-
- public decimal? CapitalSocios
- {
- get;
- set;
- }
-
- public int? Funcionarios
- {
- get;
- set;
- }
-
- public Gestor.Model.Domain.Seguros.Item Item
- {
- get;
- set;
- }
-
- public string Observacao
- {
- get;
- set;
- }
-
- public string Plano
- {
- get
- {
- string str = this._plano;
- if (str != null)
- {
- return str.ToUpper();
- }
- return null;
- }
- set
- {
- this._plano = value;
- }
- }
-
- public int? Socios
- {
- get;
- set;
- }
-
- [JsonIgnore]
- public Func<List<KeyValuePair<string, string>>> ValidationEvent
- {
- get
- {
- Vida vida = this;
- return new Func<List<KeyValuePair<string, string>>>(vida.Validate);
- }
- }
-
- public Vida()
- {
- }
-
- public static List<TupleList> Log(Gestor.Model.Domain.Seguros.Item item)
- {
- string str;
- string str1;
- string str2;
- string str3;
- string str4;
- string str5;
- List<TupleList> tupleLists = new List<TupleList>();
- TupleList tupleList = new TupleList();
- ObservableCollection<Tuple<string, string, string>> observableCollection = new ObservableCollection<Tuple<string, string, string>>()
- {
- new Tuple<string, string, string>("PLANO", (string.IsNullOrWhiteSpace(item.Vida.Plano) ? "" : item.Vida.Plano), ""),
- new Tuple<string, string, string>("DESCRIÇÃO", (string.IsNullOrWhiteSpace(item.Descricao) ? "" : item.Descricao.ToUpper()), "")
- };
- int? socios = item.Vida.Socios;
- if (!socios.HasValue)
- {
- str = "";
- }
- else
- {
- socios = item.Vida.Socios;
- if (socios.HasValue)
- {
- str = socios.GetValueOrDefault().ToString();
- }
- else
- {
- str = null;
- }
- }
- observableCollection.Add(new Tuple<string, string, string>("SÓCIOS", str, ""));
- decimal? capitalSocios = item.Vida.CapitalSocios;
- if (!capitalSocios.HasValue)
- {
- str1 = "";
- }
- else
- {
- capitalSocios = item.Vida.CapitalSocios;
- if (capitalSocios.HasValue)
- {
- str1 = capitalSocios.GetValueOrDefault().ToString();
- }
- else
- {
- str1 = null;
- }
- }
- observableCollection.Add(new Tuple<string, string, string>("CAPITAL SÓCIO", str1, ""));
- socios = item.Vida.Funcionarios;
- if (!socios.HasValue)
- {
- str2 = "";
- }
- else
- {
- socios = item.Vida.Funcionarios;
- if (socios.HasValue)
- {
- str2 = socios.GetValueOrDefault().ToString();
- }
- else
- {
- str2 = null;
- }
- }
- observableCollection.Add(new Tuple<string, string, string>("FUNCIONÁRIOS", str2, ""));
- capitalSocios = item.Vida.CapitalFuncionarios;
- if (!capitalSocios.HasValue)
- {
- str3 = "";
- }
- else
- {
- capitalSocios = item.Vida.CapitalFuncionarios;
- if (capitalSocios.HasValue)
- {
- str3 = capitalSocios.GetValueOrDefault().ToString();
- }
- else
- {
- str3 = null;
- }
- }
- observableCollection.Add(new Tuple<string, string, string>("CAPITAL FUNCIONÁRIOS", str3, ""));
- socios = item.Vida.Socios;
- if (!socios.HasValue)
- {
- str4 = "";
- }
- else
- {
- socios = item.Vida.Socios;
- if (socios.HasValue)
- {
- str4 = socios.GetValueOrDefault().ToString();
- }
- else
- {
- str4 = null;
- }
- }
- observableCollection.Add(new Tuple<string, string, string>("QUANTIDADE DE TITULARES", str4, ""));
- socios = item.Vida.Funcionarios;
- if (!socios.HasValue)
- {
- str5 = "";
- }
- else
- {
- socios = item.Vida.Funcionarios;
- if (socios.HasValue)
- {
- str5 = socios.GetValueOrDefault().ToString();
- }
- else
- {
- str5 = null;
- }
- }
- observableCollection.Add(new Tuple<string, string, string>("QUANTIDADE DE BENEFICIÁRIOS", str5, ""));
- tupleList.Tuples = observableCollection;
- tupleLists.Add(tupleList);
- List<TupleList> tupleLists1 = tupleLists;
- ObservableCollection<Tuple<string, string, string>> observableCollection1 = new ObservableCollection<Tuple<string, string, string>>()
- {
- new Tuple<string, string, string>("COBERTURAS$", "", "")
- };
- foreach (Cobertura cobertura in item.Coberturas)
- {
- observableCollection1.Add(new Tuple<string, string, string>(string.Format(" COBERTURA {0}$", item.Coberturas.IndexOf(cobertura) + 1), "", ""));
- observableCollection1.Add(new Tuple<string, string, string>(" OBSERVAÇÃO", (string.IsNullOrWhiteSpace(cobertura.Observacao) ? "" : cobertura.Observacao.ToUpper()), ""));
- decimal premio = cobertura.Premio;
- observableCollection1.Add(new Tuple<string, string, string>(" PRÊMIO", premio.ToString("C", new CultureInfo("pt-BR", false)), ""));
- premio = cobertura.Franquia;
- observableCollection1.Add(new Tuple<string, string, string>(" FRANQUIA", premio.ToString("C", new CultureInfo("pt-BR", false)), ""));
- premio = cobertura.Lmi;
- observableCollection1.Add(new Tuple<string, string, string>(" L.M.I.", premio.ToString("C", new CultureInfo("pt-BR", false)), ""));
- }
- tupleLists1.Add(new TupleList()
- {
- Tuples = observableCollection1
- });
- return tupleLists1;
- }
-
- public List<KeyValuePair<string, string>> Validate()
- {
- decimal num;
- bool documento;
- List<KeyValuePair<string, string>> keyValuePairs = ValidationHelper.AddValue();
- if (string.IsNullOrWhiteSpace(this.Plano))
- {
- keyValuePairs.AddValue<string, string>("Plano", Messages.Obrigatorio, true);
- }
- Gestor.Model.Domain.Seguros.Item item = this.Item;
- if (item != null)
- {
- documento = item.Documento;
- }
- else
- {
- documento = false;
- }
- if (!documento)
- {
- return keyValuePairs;
- }
- long id = this.Item.Documento.Controle.Ramo.Id;
- if (id == (long)7 || id == (long)10 || id == (long)53)
- {
- int? socios = this.Socios;
- if (socios.HasValue)
- {
- socios = this.Socios;
- if (!(socios.GetValueOrDefault() < 0 & socios.HasValue))
- {
- goto Label0;
- }
- }
- keyValuePairs.AddValue<string, string>("Socios|SÓCIOS", Messages.Obrigatorio, true);
- Label0:
- socios = this.Funcionarios;
- if (socios.HasValue)
- {
- socios = this.Funcionarios;
- if (!(socios.GetValueOrDefault() < 0 & socios.HasValue))
- {
- goto Label1;
- }
- }
- keyValuePairs.AddValue<string, string>("Funcionarios|FUNCIONÁRIOS", Messages.Obrigatorio, true);
- Label1:
- decimal? capitalSocios = this.CapitalSocios;
- if (capitalSocios.HasValue)
- {
- capitalSocios = this.CapitalSocios;
- num = new decimal();
- if (!((capitalSocios.GetValueOrDefault() < num) & capitalSocios.HasValue))
- {
- goto Label2;
- }
- }
- keyValuePairs.AddValue<string, string>("CapitalSocios|CAPITAL SÓCIO", Messages.Obrigatorio, true);
- Label2:
- capitalSocios = this.CapitalFuncionarios;
- if (capitalSocios.HasValue)
- {
- capitalSocios = this.CapitalFuncionarios;
- num = new decimal();
- if (!((capitalSocios.GetValueOrDefault() < num) & capitalSocios.HasValue))
- {
- return keyValuePairs;
- }
- }
- keyValuePairs.AddValue<string, string>("CapitalFuncionarios|CAPITAL FUNCIONÁRIO", Messages.Obrigatorio, true);
- }
- return keyValuePairs;
- }
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/VinculoRepasse.cs b/Gestor.Model/Model.Domain.Seguros/VinculoRepasse.cs
deleted file mode 100644
index 002f83e..0000000
--- a/Gestor.Model/Model.Domain.Seguros/VinculoRepasse.cs
+++ /dev/null
@@ -1,159 +0,0 @@
-using Gestor.Model.Common;
-using Gestor.Model.Domain.Generic;
-using Gestor.Model.Helper;
-using Gestor.Model.Resources;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Runtime.CompilerServices;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class VinculoRepasse : DomainBase
- {
- public long IdRepasse
- {
- get;
- set;
- }
-
- public Repasse RepasseVinculo
- {
- get;
- set;
- }
-
- public Gestor.Model.Domain.Seguros.TipoVendedor TipoVendedor
- {
- get;
- set;
- }
-
- public Gestor.Model.Domain.Seguros.TipoVendedor TipoVendedorVinculo
- {
- get;
- set;
- }
-
- public VinculoRepasse()
- {
- }
-
- public List<KeyValuePair<string, string>> Validate(List<VinculoRepasse> vinculos, Repasse repasse)
- {
- decimal zero;
- decimal num;
- decimal zero1;
- decimal num1;
- List<KeyValuePair<string, string>> keyValuePairs = ValidationHelper.AddValue();
- if (this.TipoVendedor == null)
- {
- keyValuePairs.AddValue<string, string>("TipoVendedor|TIPO VENDEDOR DO REPASSE", Messages.Obrigatorio, true);
- }
- if (this.IdRepasse == 0)
- {
- keyValuePairs.AddValue<string, string>("IdRepasse|REPASSE", Messages.Obrigatorio, true);
- }
- if (this.TipoVendedorVinculo == null)
- {
- keyValuePairs.AddValue<string, string>("TipoVendedorVinculo|TIPO VENDEDOR DO VÍNCULO", Messages.Obrigatorio, true);
- }
- if (this.RepasseVinculo == null)
- {
- keyValuePairs.AddValue<string, string>("RepasseVinculo|REPASSE DO VÍNCULO", Messages.Obrigatorio, true);
- }
- if (this.TipoVendedor != null && this.TipoVendedorVinculo != null && this.TipoVendedor.Id == this.TipoVendedorVinculo.Id)
- {
- keyValuePairs.AddValue<string, string>("TipoVendedor", "TIPO VENDEDOR SELECIONADO NÃO PODE SER O MESMO TIPO VENDEDOR DO VINCULO", true);
- }
- if (this.IdRepasse > (long)0 && this.RepasseVinculo != null && this.IdRepasse == this.RepasseVinculo.Id)
- {
- keyValuePairs.AddValue<string, string>("RepasseVinculo|REPASSE DO VÍNCULO", "NÃO É POSSÍVEL VINCULAR O MESMO REPASSE", true);
- }
- if (this.RepasseVinculo == null)
- {
- zero = decimal.Zero;
- }
- else
- {
- zero = (this.RepasseVinculo.Tipo.GetValueOrDefault() != TipoRepasse.Percentual || this.RepasseVinculo.Incidencia.GetValueOrDefault() != TipoIncidencia.SobreComissao ? decimal.Zero : this.RepasseVinculo.ValorNovo);
- }
- decimal num2 = zero;
- decimal num3 = (repasse.Tipo.GetValueOrDefault() != TipoRepasse.Percentual || repasse.Incidencia.GetValueOrDefault() != TipoIncidencia.SobreComissao ? decimal.Zero : repasse.ValorNovo) + num2;
- decimal num4 = num3;
- if (this.TipoVendedor == null)
- {
- num = decimal.Zero;
- }
- else
- {
- num = (vinculos != null ? vinculos.Where<VinculoRepasse>((VinculoRepasse x) => {
- if (this.TipoVendedor.Id != x.TipoVendedor.Id || x.RepasseVinculo.Tipo.GetValueOrDefault() != TipoRepasse.Percentual)
- {
- return false;
- }
- return x.RepasseVinculo.Incidencia.GetValueOrDefault() == TipoIncidencia.SobreComissao;
- }).Sum<VinculoRepasse>((VinculoRepasse x) => x.RepasseVinculo.ValorNovo) : decimal.Zero);
- }
- num3 = num4 + num;
- if (this.RepasseVinculo == null)
- {
- zero1 = decimal.Zero;
- }
- else
- {
- zero1 = (this.RepasseVinculo.Tipo.GetValueOrDefault() != TipoRepasse.Percentual || this.RepasseVinculo.Incidencia.GetValueOrDefault() != TipoIncidencia.SobreComissao ? decimal.Zero : this.RepasseVinculo.ValorRenovacao);
- }
- decimal num5 = zero1;
- decimal num6 = (repasse.Tipo.GetValueOrDefault() != TipoRepasse.Percentual || repasse.Incidencia.GetValueOrDefault() != TipoIncidencia.SobreComissao ? decimal.Zero : repasse.ValorRenovacao) + num5;
- if (this.TipoVendedor == null)
- {
- num1 = decimal.Zero;
- }
- else
- {
- num1 = (vinculos != null ? vinculos.Where<VinculoRepasse>((VinculoRepasse x) => {
- if (this.TipoVendedor.Id != x.TipoVendedor.Id || x.RepasseVinculo.Tipo.GetValueOrDefault() != TipoRepasse.Percentual)
- {
- return false;
- }
- return x.RepasseVinculo.Incidencia.GetValueOrDefault() == TipoIncidencia.SobreComissao;
- }).Sum<VinculoRepasse>((VinculoRepasse x) => x.RepasseVinculo.ValorRenovacao) : decimal.Zero);
- }
- decimal num7 = num6 + num1;
- if (num3 > new decimal(100))
- {
- keyValuePairs.AddValue<string, string>("RepasseVinculo|VALOR NOVO", "O VALOR DE REPASSE PARA SEGUROS NOVOS ULTRAPASSARÁ 100% DA COMISSÃO RECEBIDA", true);
- }
- if (num7 > new decimal(100))
- {
- keyValuePairs.AddValue<string, string>("RepasseVinculo|VALOR RENOVAÇÃO", "O VALOR DE REPASSE PARA RENOVAÇÕES ULTRAPASSARÁ 100% DA COMISSÃO RECEBIDA", true);
- }
- if (vinculos == null || vinculos.Count <= 0)
- {
- return keyValuePairs;
- }
- if (this.TipoVendedor != null && this.TipoVendedorVinculo != null && vinculos.Any<VinculoRepasse>((VinculoRepasse x) => {
- if (x.TipoVendedor.Id != this.TipoVendedor.Id)
- {
- return false;
- }
- return x.TipoVendedorVinculo.Id == this.TipoVendedorVinculo.Id;
- }))
- {
- keyValuePairs.AddValue<string, string>("TipoVendedorVinculo|TIPO VENDEDOR DO VÍNCULO", string.Concat("JÁ EXISTE UM VINCULO DE REPASSE PARA ", this.TipoVendedorVinculo.Descricao), true);
- }
- if (this.TipoVendedor != null && this.RepasseVinculo != null && vinculos.Any<VinculoRepasse>((VinculoRepasse x) => {
- if (x.TipoVendedor.Id != this.TipoVendedor.Id)
- {
- return false;
- }
- return x.RepasseVinculo.Vendedor.Id == this.RepasseVinculo.Vendedor.Id;
- }))
- {
- keyValuePairs.AddValue<string, string>("TipoVendedorVinculo|VENDEDOR DO VÍNCULO", string.Concat("JÁ EXISTE UM VINCULO DE REPASSE PARA PARA ", this.RepasseVinculo.Vendedor.Nome), true);
- }
- return keyValuePairs;
- }
- }
-} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Seguros/VinculoVendedor.cs b/Gestor.Model/Model.Domain.Seguros/VinculoVendedor.cs
deleted file mode 100644
index 03ef440..0000000
--- a/Gestor.Model/Model.Domain.Seguros/VinculoVendedor.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-using Gestor.Model.Domain.Generic;
-using System;
-using System.Runtime.CompilerServices;
-
-namespace Gestor.Model.Domain.Seguros
-{
- public class VinculoVendedor : DomainBase
- {
- public Gestor.Model.Domain.Seguros.Vendedor Vendedor
- {
- get;
- set;
- }
-
- public bool Vinculado
- {
- get;
- set;
- }
-
- public VinculoVendedor()
- {
- }
- }
-} \ No newline at end of file