summaryrefslogtreecommitdiff
path: root/Codemerx/Gestor.Model/Model.CalculoWeb/Auto/Veiculo.cs
diff options
context:
space:
mode:
authorLucas Faria Mendes <lucas.fariamo08@gmail.com>2026-03-30 13:38:18 +0000
committerLucas Faria Mendes <lucas.fariamo08@gmail.com>2026-03-30 13:38:18 +0000
commit1f4e14b2e973ee7de337fd4866d9a5ceff5cb6d1 (patch)
treee1c3b20ea08f0cf71122a1e73f0d395f8fd83874 /Codemerx/Gestor.Model/Model.CalculoWeb/Auto/Veiculo.cs
parent674ca83ba9243a9e95a7568c797668dab6aee26a (diff)
downloadgestor-1f4e14b2e973ee7de337fd4866d9a5ceff5cb6d1.tar.gz
gestor-1f4e14b2e973ee7de337fd4866d9a5ceff5cb6d1.zip
chore: location
Diffstat (limited to 'Codemerx/Gestor.Model/Model.CalculoWeb/Auto/Veiculo.cs')
-rw-r--r--Codemerx/Gestor.Model/Model.CalculoWeb/Auto/Veiculo.cs217
1 files changed, 217 insertions, 0 deletions
diff --git a/Codemerx/Gestor.Model/Model.CalculoWeb/Auto/Veiculo.cs b/Codemerx/Gestor.Model/Model.CalculoWeb/Auto/Veiculo.cs
new file mode 100644
index 0000000..a616133
--- /dev/null
+++ b/Codemerx/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