public CliFor(string nomeCliFor, string rg, string cpfCnpj, DateTime?dtDataNasc, TypeCliente tipoCliente, string telefone, string celular, string telComercial, List <EnderecoCliFor> enderecos, TypeClassificaoCliente classificacao) : this(nomeCliFor, rg, cpfCnpj, dtDataNasc, tipoCliente, telefone, celular, telComercial, classificacao) { foreach (var a in enderecos) { this.Enderecos.Add(a); if (a.TipoEndereco == "Comercial") { this.NumeroEndereco = a.NumeroEndereco; this.NomeEndereco = a.NomeEndereco; this.Cep = a.Cep.Replace(".", ""); this.Cidade = a.Cidade; this.Uf = a.Uf; this.Complemento = a.Complemento; this.TipoEndereco = a.TipoEndereco; this.Bairro = a.Bairro; } } }
protected AbstractClient(string nome, string rg, string cpfCnpj, DateTime?dtDataNasc, TypeCliente tipoCliente, string telefone, string celular, string telComercial) : this() { this.RazaoSocial = nome; this.RG = rg; this.CpfCnpj = cpfCnpj; this.DataNascimento = dtDataNasc; this.TipoCliente = tipoCliente; this.Telefone = telefone; this.Celular = celular; this.TelefoneComercial = telComercial; }
public CliFor(string nomeCliFor, string rg, string cpfCnpj, DateTime?dtDataNasc, TypeCliente tipoCliente, string telefone, string celular, string telComercial, TypeClassificaoCliente classificacao) : base(nomeCliFor, rg, cpfCnpj, dtDataNasc, tipoCliente, telefone, celular, telComercial) { this.Vendas = new HashSet <Venda>(); this.Enderecos = new HashSet <EnderecoCliFor>(); this.CreditosCliente = new HashSet <CreditoCliente>(); this.Atendimentos = new HashSet <Atendimento>(); this.Manutencoes = new HashSet <Manutencao>(); this.AtividadesPrincipais = new HashSet <AtividadePrincipalCliFor>(); this.AtividadesSecundarias = new HashSet <AtividadeSecundariaCliFor>(); this.Classificacao = classificacao; }