summaryrefslogtreecommitdiff
path: root/Codemerx/Gestor.Model/Model.Domain.Generic/EnderecoBase.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Codemerx/Gestor.Model/Model.Domain.Generic/EnderecoBase.cs')
-rw-r--r--Codemerx/Gestor.Model/Model.Domain.Generic/EnderecoBase.cs128
1 files changed, 128 insertions, 0 deletions
diff --git a/Codemerx/Gestor.Model/Model.Domain.Generic/EnderecoBase.cs b/Codemerx/Gestor.Model/Model.Domain.Generic/EnderecoBase.cs
new file mode 100644
index 0000000..964fb70
--- /dev/null
+++ b/Codemerx/Gestor.Model/Model.Domain.Generic/EnderecoBase.cs
@@ -0,0 +1,128 @@
+using Gestor.Model.Attributes;
+using System;
+using System.ComponentModel;
+using System.Runtime.CompilerServices;
+using System.Text.RegularExpressions;
+
+namespace Gestor.Model.Domain.Generic
+{
+ public class EnderecoBase : DomainBase
+ {
+ private string _cep;
+
+ private string _endereco;
+
+ private string _numero;
+
+ private string _bairro;
+
+ private string _cidade;
+
+ private string _estado;
+
+ [Log(true)]
+ public string Bairro
+ {
+ get
+ {
+ return this._bairro;
+ }
+ 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;
+ }
+ }
+
+ [Log(true)]
+ public string Cidade
+ {
+ get
+ {
+ return this._cidade;
+ }
+ set
+ {
+ this._cidade = value;
+ }
+ }
+
+ [Log(true)]
+ public string Complemento
+ {
+ get;
+ set;
+ }
+
+ [Description("ENDEREÇO")]
+ [Log(true)]
+ public string Endereco
+ {
+ get
+ {
+ return this._endereco;
+ }
+ set
+ {
+ this._endereco = value;
+ }
+ }
+
+ [Log(true)]
+ public string Estado
+ {
+ get
+ {
+ string str = this._estado;
+ if (str == null)
+ {
+ return null;
+ }
+ return str.ToUpper().Trim();
+ }
+ set
+ {
+ this._estado = 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;
+ }
+ }
+
+ public EnderecoBase()
+ {
+ }
+ }
+} \ No newline at end of file