summaryrefslogtreecommitdiff
path: root/Gestor.Model/Model.CalculoWeb/Auto/Veiculo.cs
diff options
context:
space:
mode:
authorLucas Faria Mendes <lucas.fariamo08@gmail.com>2026-03-30 13:35:25 +0000
committerLucas Faria Mendes <lucas.fariamo08@gmail.com>2026-03-30 13:35:25 +0000
commit674ca83ba9243a9e95a7568c797668dab6aee26a (patch)
tree4a905b3fb1d827665a34d63f67bc5559f8e7235b /Gestor.Model/Model.CalculoWeb/Auto/Veiculo.cs
downloadgestor-674ca83ba9243a9e95a7568c797668dab6aee26a.tar.gz
gestor-674ca83ba9243a9e95a7568c797668dab6aee26a.zip
feat: upload files
Diffstat (limited to 'Gestor.Model/Model.CalculoWeb/Auto/Veiculo.cs')
-rw-r--r--Gestor.Model/Model.CalculoWeb/Auto/Veiculo.cs217
1 files changed, 217 insertions, 0 deletions
diff --git a/Gestor.Model/Model.CalculoWeb/Auto/Veiculo.cs b/Gestor.Model/Model.CalculoWeb/Auto/Veiculo.cs
new file mode 100644
index 0000000..a616133
--- /dev/null
+++ b/Gestor.Model/Model.CalculoWeb/Auto/Veiculo.cs
@@ -0,0 +1,217 @@
+using System;
+using System.Runtime.CompilerServices;
+
+namespace Gestor.Model.CalculoWeb.Auto
+{
+ public class Veiculo
+ {
+ private string _combustivel;
+
+ public string Alienado
+ {
+ get;
+ set;
+ }
+
+ public string AnoFabricacao
+ {
+ get;
+ set;
+ }
+
+ public string AnoModelo
+ {
+ get;
+ set;
+ }
+
+ public string Antifurto
+ {
+ get;
+ set;
+ }
+
+ public string Blindado
+ {
+ get;
+ set;
+ }
+
+ public string CepPernoite
+ {
+ get;
+ set;
+ }
+
+ public string CodigoFipe
+ {
+ get;
+ set;
+ }
+
+ public string Combustivel
+ {
+ get
+ {
+ return this._combustivel;
+ }
+ set
+ {
+ this._combustivel = value;
+ Veiculo.ConvertCombustivelCalculo(this._combustivel);
+ }
+ }
+
+ public string Fabricante
+ {
+ get;
+ set;
+ }
+
+ public Gestor.Model.CalculoWeb.Auto.Fipe Fipe
+ {
+ get;
+ set;
+ }
+
+ public long Id
+ {
+ get;
+ set;
+ }
+
+ public string KitGas
+ {
+ get;
+ set;
+ }
+
+ public string Modelo
+ {
+ get;
+ set;
+ }
+
+ public string NumeroChassi
+ {
+ get;
+ set;
+ }
+
+ public string Placa
+ {
+ get;
+ set;
+ }
+
+ public string Rastreador
+ {
+ get;
+ set;
+ }
+
+ public string Uf
+ {
+ get;
+ set;
+ }
+
+ public string ZeroKm
+ {
+ get;
+ set;
+ }
+
+ public Veiculo()
+ {
+ }
+
+ private static string ConvertCombustivelCalculo(string combustivel)
+ {
+ if (combustivel != null)
+ {
+ int length = combustivel.Length;
+ if (length == 1)
+ {
+ switch (combustivel[0])
+ {
+ case '1':
+ {
+ return "3";
+ }
+ case '2':
+ {
+ return "2";
+ }
+ case '3':
+ {
+ return "4";
+ }
+ case '4':
+ {
+ return "1";
+ }
+ case '5':
+ case '7':
+ case '8':
+ {
+ return "6";
+ }
+ case '6':
+ {
+ return string.Empty;
+ }
+ case '9':
+ {
+ break;
+ }
+ default:
+ {
+ return string.Empty;
+ }
+ }
+ }
+ else if (length == 2)
+ {
+ switch (combustivel[1])
+ {
+ case '0':
+ {
+ if (combustivel == "10")
+ {
+ break;
+ }
+ return string.Empty;
+ }
+ case '1':
+ {
+ if (combustivel == "11")
+ {
+ return "7";
+ }
+ return string.Empty;
+ }
+ case '2':
+ {
+ if (combustivel == "12")
+ {
+ break;
+ }
+ return string.Empty;
+ }
+ default:
+ {
+ return string.Empty;
+ }
+ }
+ }
+ else
+ {
+ return string.Empty;
+ }
+ return "5";
+ }
+ return string.Empty;
+ }
+ }
+} \ No newline at end of file