public ClienteBE SelectId(int id) { var obj = new ClienteDao().SelectId <ClienteBE>(new { cli_id = id }); ClienteEnderecoBLL _bll = new ClienteEnderecoBLL(); ClienteContatoBLL _con = new ClienteContatoBLL(); obj.Endereco = _bll.Select(new GlobaisClienteEnderecoBE { cli_id = obj.cli_id }); obj.Contato = _con.Select(new GlobaisClienteContatoBE { cli_id = obj.cli_id }); return(obj); }
List <ClienteNotasContratoBE> CarregaEnderecosCliente(List <ClienteNotasContratoBE> obj) { ClienteEnderecoBLL _bll = new ClienteEnderecoBLL(); ClienteContatoBLL _con = new ClienteContatoBLL(); foreach (var item in obj) { item.Endereco = _bll.Select(new GlobaisClienteEnderecoBE { cli_id = item.cli_id }); item.Contato = _con.Select(new GlobaisClienteContatoBE { cli_id = item.cli_id }); } return(obj); }
public ClienteBE SelectIdComServico(int id) { var obj = new ClienteDao().SelectId <ClienteBE>(new { cli_id = id }); ClienteEnderecoBLL _bll = new ClienteEnderecoBLL(); ClienteContatoBLL _con = new ClienteContatoBLL(); obj.Endereco = _bll.Select(new GlobaisClienteEnderecoBE { cli_id = obj.cli_id }); obj.Contato = _con.Select(new GlobaisClienteContatoBE { cli_id = obj.cli_id }); obj.Servicos = new ClienteServicosBLL().Select(new ClienteServicosBE { cli_id = obj.cli_id, log_ativo = true }); return(obj); }