diff options
Diffstat (limited to 'Gestor.Model/Gestor.Model.CalculoWeb.Auto')
8 files changed, 360 insertions, 0 deletions
diff --git a/Gestor.Model/Gestor.Model.CalculoWeb.Auto/CalculoAuto.cs b/Gestor.Model/Gestor.Model.CalculoWeb.Auto/CalculoAuto.cs new file mode 100644 index 0000000..e5b426a --- /dev/null +++ b/Gestor.Model/Gestor.Model.CalculoWeb.Auto/CalculoAuto.cs @@ -0,0 +1,20 @@ +namespace Gestor.Model.CalculoWeb.Auto; + +public class CalculoAuto +{ + public Segurado Segurado { get; set; } + + public CondutorPrincipal CondutorPrincipal { get; set; } + + public Veiculo Veiculo { get; set; } + + public QuestionarioAuto Questionario { get; set; } + + public Caminhao Caminhao { get; set; } + + public CoberturaAuto Cobertura { get; set; } + + public Seguro Seguro { get; set; } + + public int TipoVeiculo { get; set; } +} diff --git a/Gestor.Model/Gestor.Model.CalculoWeb.Auto/Caminhao.cs b/Gestor.Model/Gestor.Model.CalculoWeb.Auto/Caminhao.cs new file mode 100644 index 0000000..ade84e5 --- /dev/null +++ b/Gestor.Model/Gestor.Model.CalculoWeb.Auto/Caminhao.cs @@ -0,0 +1,26 @@ +namespace Gestor.Model.CalculoWeb.Auto; + +public class Caminhao +{ + public string Carga { get; set; } + + public string Carroceria { get; set; } + + public string Equipamento { get; set; } + + public string GerenciamentoRisco { get; set; } + + public string Uso { get; set; } + + public string RegiaoCirculacao { get; set; } + + public string SeguroCarga { get; set; } + + public string Garagem { get; set; } + + public string ProprioEstado { get; set; } + + public string Periodo { get; set; } + + public int Id { get; set; } +} diff --git a/Gestor.Model/Gestor.Model.CalculoWeb.Auto/CoberturaAuto.cs b/Gestor.Model/Gestor.Model.CalculoWeb.Auto/CoberturaAuto.cs new file mode 100644 index 0000000..660b1a8 --- /dev/null +++ b/Gestor.Model/Gestor.Model.CalculoWeb.Auto/CoberturaAuto.cs @@ -0,0 +1,44 @@ +namespace Gestor.Model.CalculoWeb.Auto; + +public class CoberturaAuto +{ + public string DanosMorais { get; set; } + + public string DanosMateriais { get; set; } + + public string DanosCorporais { get; set; } + + public string MorteInvalidez { get; set; } + + public decimal FatorAjuste { get; set; } + + public string TipoCobertura { get; set; } + + public string TipoFranquia { get; set; } + + public string Assistencia { get; set; } + + public string CarroReserva { get; set; } + + public string Vidros { get; set; } + + public string DespesasExtras { get; set; } + + public decimal KitGas { get; set; } + + public decimal Carroceria { get; set; } + + public decimal Equipamento { get; set; } + + public decimal Blindagem { get; set; } + + public string ArCondicionado { get; set; } + + public string GarantiaZero { get; set; } + + public string ReparoRapido { get; set; } + + public string ProtecaoBuracos { get; set; } + + public int Id { get; set; } +} diff --git a/Gestor.Model/Gestor.Model.CalculoWeb.Auto/ComissaoSeguradora.cs b/Gestor.Model/Gestor.Model.CalculoWeb.Auto/ComissaoSeguradora.cs new file mode 100644 index 0000000..addf23e --- /dev/null +++ b/Gestor.Model/Gestor.Model.CalculoWeb.Auto/ComissaoSeguradora.cs @@ -0,0 +1,8 @@ +namespace Gestor.Model.CalculoWeb.Auto; + +public class ComissaoSeguradora +{ + public long Seguradora { get; set; } + + public decimal Valor { get; set; } +} diff --git a/Gestor.Model/Gestor.Model.CalculoWeb.Auto/CondutorPrincipal.cs b/Gestor.Model/Gestor.Model.CalculoWeb.Auto/CondutorPrincipal.cs new file mode 100644 index 0000000..eb31353 --- /dev/null +++ b/Gestor.Model/Gestor.Model.CalculoWeb.Auto/CondutorPrincipal.cs @@ -0,0 +1,87 @@ +using System; + +namespace Gestor.Model.CalculoWeb.Auto; + +public class CondutorPrincipal +{ + private string _sexo; + + private string _estadoCivil; + + public string NomeCompleto { get; set; } + + public string CpfCnpj { get; set; } + + public DateTime? DataNascimento { get; set; } + + public string Sexo + { + get + { + return _sexo; + } + set + { + _sexo = value; + ConvertSexoCalculo(_sexo); + } + } + + public DateTime? DataHabilitacao { get; set; } + + public string TempoHabilitacao { get; set; } + + public string EstadoCivil + { + get + { + return _estadoCivil; + } + set + { + _estadoCivil = value; + value = ConvertEstCivCalculo(_estadoCivil); + } + } + + public string NumeroHabilitacao { get; set; } + + public long Id { get; set; } + + private string ConvertSexoCalculo(string sexo) + { + if (!(sexo == "0")) + { + return "2"; + } + return "1"; + } + + private string ConvertEstCivCalculo(string estadoCivil) + { + if (estadoCivil != null) + { + int length = estadoCivil.Length; + if (length == 1) + { + switch (estadoCivil[0]) + { + case '0': + return "1"; + case '1': + return "2"; + case '2': + return "3"; + case '3': + case '5': + case '6': + case '7': + return "4"; + case '4': + return "5"; + } + } + } + return string.Empty; + } +} diff --git a/Gestor.Model/Gestor.Model.CalculoWeb.Auto/Fipe.cs b/Gestor.Model/Gestor.Model.CalculoWeb.Auto/Fipe.cs new file mode 100644 index 0000000..3fbd849 --- /dev/null +++ b/Gestor.Model/Gestor.Model.CalculoWeb.Auto/Fipe.cs @@ -0,0 +1,28 @@ +namespace Gestor.Model.CalculoWeb.Auto; + +public class Fipe +{ + public string Codigo { get; set; } + + public string Modelo { get; set; } + + public string Marca { get; set; } + + public string AnoMaximo { get; set; } + + public string AnoMinimo { get; set; } + + public string Combustivel { get; set; } + + public decimal Valor { get; set; } + + public decimal ValorAntigo { get; set; } + + public string AnoModelo { get; set; } + + public int TipoVeiculo { get; set; } + + public bool ZeroKm { get; set; } + + public int Id { get; set; } +} diff --git a/Gestor.Model/Gestor.Model.CalculoWeb.Auto/QuestionarioAuto.cs b/Gestor.Model/Gestor.Model.CalculoWeb.Auto/QuestionarioAuto.cs new file mode 100644 index 0000000..4469fe4 --- /dev/null +++ b/Gestor.Model/Gestor.Model.CalculoWeb.Auto/QuestionarioAuto.cs @@ -0,0 +1,30 @@ +namespace Gestor.Model.CalculoWeb.Auto; + +public class QuestionarioAuto +{ + public string QuilometragemMensal { get; set; } + + public string UsoVeiculo { get; set; } + + public string GaragemTrabalho { get; set; } + + public string GaragemEstudo { get; set; } + + public string GaragemResidencia { get; set; } + + public string TipoResidencia { get; set; } + + public string UsoDependentes { get; set; } + + public string FaixaEtariaDependentes { get; set; } + + public string IsencaoFiscal { get; set; } + + public string Pcd { get; set; } + + public string PeriodoUso { get; set; } + + public string Associado { get; set; } + + public long Id { get; set; } +} diff --git a/Gestor.Model/Gestor.Model.CalculoWeb.Auto/Veiculo.cs b/Gestor.Model/Gestor.Model.CalculoWeb.Auto/Veiculo.cs new file mode 100644 index 0000000..780cf09 --- /dev/null +++ b/Gestor.Model/Gestor.Model.CalculoWeb.Auto/Veiculo.cs @@ -0,0 +1,117 @@ +namespace Gestor.Model.CalculoWeb.Auto; + +public class Veiculo +{ + private string _combustivel; + + public string NumeroChassi { get; set; } + + public string Placa { get; set; } + + public string Uf { get; set; } + + public string Modelo { get; set; } + + public string Fabricante { get; set; } + + public string AnoFabricacao { get; set; } + + public string AnoModelo { get; set; } + + public string CodigoFipe { get; set; } + + public string Rastreador { get; set; } + + public string Antifurto { get; set; } + + public string KitGas { get; set; } + + public string ZeroKm { get; set; } + + public string Alienado { get; set; } + + public string Combustivel + { + get + { + return _combustivel; + } + set + { + _combustivel = value; + ConvertCombustivelCalculo(_combustivel); + } + } + + public string CepPernoite { get; set; } + + public Fipe Fipe { get; set; } + + public string Blindado { get; set; } + + public long Id { get; set; } + + private static string ConvertCombustivelCalculo(string combustivel) + { + if (combustivel != null) + { + int length = combustivel.Length; + if (length == 1) + { + switch (combustivel[0]) + { + case '4': + return "1"; + case '2': + return "2"; + case '1': + return "3"; + case '3': + return "4"; + case '9': + break; + case '5': + case '7': + case '8': + return "6"; + default: + goto IL_00c7; + } + goto IL_00b5; + } + if (length == 2) + { + switch (combustivel[1]) + { + case '0': + break; + case '2': + goto IL_007f; + case '1': + if (!(combustivel == "11")) + { + goto IL_00c7; + } + return "7"; + default: + goto IL_00c7; + } + if (combustivel == "10") + { + goto IL_00b5; + } + } + } + goto IL_00c7; + IL_00c7: + return string.Empty; + IL_00b5: + return "5"; + IL_007f: + if (combustivel == "12") + { + goto IL_00b5; + } + goto IL_00c7; + } +} |