summaryrefslogtreecommitdiff
path: root/Gestor.Model/Model.Domain.Seguros/MaisContato.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Gestor.Model/Model.Domain.Seguros/MaisContato.cs')
-rw-r--r--Gestor.Model/Model.Domain.Seguros/MaisContato.cs340
1 files changed, 0 insertions, 340 deletions
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