public Fornecedor(string id, string nomeFant, string cnpj, Telefone telefone, Endereco endereco) : this(nomeFant, cnpj, telefone, endereco) { if (nomeFant == "") { throw new DomainExceptions("O nome do fornecedor deve ser preenchido!"); } if (cnpj != "" && cnpj.Length < 14) { throw new DomainExceptions("O CNPJ está faltando caracteres!"); } Id = int.Parse(id); }
public Fornecedor(string nomeFant, string cnpj, Telefone telefone, Endereco endereco) { if (nomeFant == "") { throw new DomainExceptions("O nome do fornecedor deve ser preenchido!"); } if (cnpj != "" && cnpj.Length < 14) { throw new DomainExceptions("O CNPJ está faltando caracteres!"); } NomeFant = nomeFant; Cnpj = cnpj; Telefone = telefone; Endereco = endereco; }
public Cliente(string nome, string rg, string cpf, string email, Telefone telefone, Endereco endereco) { if (nome == "") { throw new DomainExceptions("O nome do Cliente deve ser preenchido!"); } if (rg == "") { throw new DomainExceptions("O RG do Cliente deve ser preenchido!"); } Nome = nome; Rg = rg; Cpf = cpf; Email = email; Telefone = telefone; Endereco = endereco; }
public Cliente(string id, string nome, Telefone telefone, Endereco endereco) : this(nome, telefone, endereco) { Id = int.Parse(id); }
public Cliente(string id, string nome, string rg, string cpf, string email, string status, Telefone telefone, Endereco endereco) : this(nome, rg, cpf, email, telefone, endereco) { Id = int.Parse(id); Status = status; }