Advertisement
Guest User

Untitled

a guest
Mar 21st, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 5.11 KB | None | 0 0
  1. using MTSys.WebApp.Dominio.Interfaces;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.ComponentModel.DataAnnotations;
  5. using System.ComponentModel.DataAnnotations.Schema;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9.  
  10. namespace MTSys.WebApp.Dominio.Entidades
  11. {
  12.     public class Pessoa : IEntidadeBase, IFixo
  13.     {
  14.         [Key]
  15.         public int PessoaID { get; set; }
  16.  
  17.         [Obrigatorio]
  18.         [Display(Name = "Tipo de Pessoa")]
  19.         public int TipoPessoaID { get; set; }
  20.  
  21.         [Obrigatorio]
  22.         [Display(Name = "Sexo")]
  23.         public int SexoID { get; set; }
  24.  
  25.         [Display(Name = "CPF/CNPJ")]
  26.         public string CNPJCPF { get; set; }
  27.  
  28.         [Display(Name = "Identificação Interna / Matrícula")]
  29.         public string IdentificacaoInterna { get; set; }
  30.  
  31.         [Obrigatorio]
  32.         [Display(Name = "Nome/Nome Fantasia")]
  33.         public string Nome { get; set; }
  34.  
  35.         #region Dados Pessoa Física
  36.         [Display(Name = "Dt. de Nascimento")]
  37.         public DateTime? DtNascto { get; set; }
  38.  
  39.         [Display(Name = "Estado Civil")]
  40.         public int? EstadoCivilID { get; set; }
  41.  
  42.         [Display(Name = "Raça / Cor")]
  43.         public int? RacaCorID { get; set; }
  44.  
  45.         [Display(Name = "RG")]
  46.         public string RG { get; set; }
  47.  
  48.         [Display(Name = "RG - Orgão Emissor")]
  49.         public string RGOrgaoEmissor { get; set; }
  50.  
  51.         [Display(Name = "RG - Dt. Emissão")]
  52.         public DateTime? RGDtEmissao { get; set; }
  53.  
  54.         [Display(Name = "Pai")]
  55.         public string Pai { get; set; }
  56.  
  57.         [Display(Name = "Mãe")]
  58.         public string Mae { get; set; }
  59.         #endregion
  60.  
  61.         #region Dados Pessoa Juridica
  62.         [Display(Name = "Razão Social")]
  63.         public string RazaoSocial { get; set; }
  64.  
  65.         [Display(Name = "IE (Inscrição Estadual)")]
  66.         public string InscricaoEstadual { get; set; }
  67.  
  68.         [Display(Name = "IM (Inscrição Municipal)")]
  69.         public string InscricaoMunicipal { get; set; }
  70.  
  71.         [Display(Name = "CNAE Principal")]
  72.         public int? CNAESubClasseID { get; set; }
  73.  
  74.         [Display(Name = "Dt. Fundação")]
  75.         public DateTime? DtFundacao { get; set; }
  76.         #endregion
  77.  
  78.         [Display(Name = "Foto / Logo")]
  79.         public string FotoLogo { get; set; }
  80.  
  81.         [Display(Name = "E-mail")]
  82.         [Email]
  83.         public string Email { get; set; }
  84.  
  85.         [Display(Name = "Telefone")]
  86.         public string Telefone { get; set; }
  87.  
  88.         public string Filial { get; set; }
  89.         public string Profissional { get; set; }
  90.         public string Paciente { get; set; }
  91.         public string Cliente { get; set; }
  92.         public string Funcionario { get; set; }
  93.         public string Fornecedor { get; set; }
  94.         public string Transportadora { get; set; }
  95.         public string AcessoAoSistema { get; set; }
  96.  
  97.         #region Campos não mapeados
  98.         [NotMapped]
  99.         [Display(Name = "Filial")]
  100.         public bool EFilial { get { return Filial == "S" ? true : false; } set { Filial = value ? "S" : "N"; } }
  101.        
  102.         [NotMapped]
  103.         [Display(Name = "Profissional")]
  104.         public bool EProfissional { get { return Profissional == "S" ? true : false; } set { Profissional = value ? "S" : "N"; } }
  105.                
  106.         [NotMapped]
  107.         [Display(Name = "Cliente")]
  108.         public bool EPaciente { get { return Paciente == "S" ? true : false; } set { Paciente = value ? "S" : "N"; } }
  109.                
  110.         [NotMapped]
  111.         [Display(Name = "Cliente")]
  112.         public bool ECliente { get { return Cliente == "S" ? true : false; } set { Cliente = value ? "S" : "N"; } }
  113.                
  114.         [NotMapped]
  115.         [Display(Name = "Funcionário")]
  116.         public bool EFuncionario { get { return Funcionario == "S" ? true : false; } set { Funcionario = value ? "S" : "N"; } }
  117.                
  118.         [NotMapped]
  119.         [Display(Name = "Fornecedor")]
  120.         public bool EFornecedor { get { return Fornecedor == "S" ? true : false; } set { Fornecedor = value ? "S" : "N"; } }
  121.                
  122.         [NotMapped]
  123.         [Display(Name = "Transportadora")]
  124.         public bool ETransportadora { get { return Transportadora == "S" ? true : false; } set { Transportadora = value ? "S" : "N"; } }
  125.        
  126.         [NotMapped]
  127.         [Display(Name = "Acessa o Sistema")]
  128.         public bool TemAcessoAoSistema { get { return AcessoAoSistema == "S" ? true : false; } set { AcessoAoSistema = value ? "S" : "N"; } }
  129.         #endregion
  130.  
  131.         public virtual ICollection<Endereco> Enderecos { get; set; }
  132.  
  133.         #region DadosInterface
  134.         public string Fixo { get; set; }
  135.         public string Status { get; set; }
  136.         public string Apagado { get; set; }
  137.  
  138.         public int VisaoID { get; set; }
  139.  
  140.         public int UsuCad { get; set; }
  141.         public DateTime DtCad { get; set; }
  142.         public int UsuAlt { get; set; }
  143.         public DateTime DtAlt { get; set; }
  144.         public int? UsuApagado { get; set; }
  145.         public DateTime? DtApagado { get; set; }
  146.         #endregion        
  147.     }
  148. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement