private void CarregarTelaCliente() { IQueryable<Cliente> queryCliente = new ClienteBLL().ObterTodos(); IQueryable<Tipo_Cliente> queryTipoCliente = new TipoClienteBLL().ObterTodos(); grvCliente.DataSource = (from c in queryCliente join t in queryTipoCliente on c.cd_tipo equals t.id_tipo select new { ID = c.id_cliente, cpf_cnpj = c.nm_cpf_cnpj, tipo = t.nm_descricao_tipo, nome = c.nm_nome, bairro = c.nm_bairro, cep = c.nm_cep }); grvCliente.DataBind(); this.upCadastroCliente.Update(); }
private void CarregarTelaCliente() { IQueryable <Cliente> queryCliente = new ClienteBLL().ObterTodos(); IQueryable <Tipo_Cliente> queryTipoCliente = new TipoClienteBLL().ObterTodos(); grvCliente.DataSource = (from c in queryCliente join t in queryTipoCliente on c.cd_tipo equals t.id_tipo select new { ID = c.id_cliente, cpf_cnpj = c.nm_cpf_cnpj, tipo = t.nm_descricao_tipo, nome = c.nm_nome, bairro = c.nm_bairro, cep = c.nm_cep }); grvCliente.DataBind(); this.upCadastroCliente.Update(); }
public static List <Tipo_Cliente> CarregarComboTipoPessoa() { IQueryable <Tipo_Cliente> query = new TipoClienteBLL().ObterTodos(); List <Tipo_Cliente> lstTipoClienteAux = query.ToList <Tipo_Cliente>(); List <Tipo_Cliente> lstTipoCliente = new List <Tipo_Cliente>(); Tipo_Cliente tipoCliente = new Tipo_Cliente(); tipoCliente.id_tipo = 0; tipoCliente.nm_descricao_tipo = String.Empty; lstTipoCliente.Add(tipoCliente); foreach (Tipo_Cliente objTipoCliente in lstTipoClienteAux) { lstTipoCliente.Add(objTipoCliente); } return(lstTipoCliente); }