TreeView em WPF
26/03/2015
0
[img:descricao=erro]http://arquivo.devmedia.com.br/forum/imagem/396788-20150326-093456.png[/img]
Chayene Carmo
Posts
26/03/2015
Randrade
Se possível, poste o código junto com a imagem, para que possamos analisar melhor.
26/03/2015
Thiago Santana
26/03/2015
Chayene Carmo
26/03/2015
Chayene Carmo
{
List<Unidade_Custo_BO> lista_unidade_custo = new List<Unidade_Custo_BO>();
Centro_Custo_DAO ccDAO = new Centro_Custo_DAO();
using (_minhaConexao = new Conexao_DAO())
{
string select = "select id_unidade_custo, id_centro_custo, descricao, unidade_producao, id_sub_unidade, tipo_custo from tbl_unidade_custo where id_sub_unidade = " + id_sub_unidade.ToString();
OdbcDataReader reader = _minhaConexao.ExecutaLeitura_PostGres(select);
while (reader.Read())
{
Unidade_Custo_BO ucBO = new Unidade_Custo_BO();
ucBO.Id_Unidade_Custo = Convert.ToInt32(reader[0]);
ucBO.Centro_Custo = ccDAO.PegaIdCentroCusto(Convert.ToInt32(reader[1]));
ucBO.Descricao = reader[2].ToString();
ucBO.Unidade_Producao = reader[3].ToString();
ucBO.Id_Sub_Unidade = Convert.ToInt32(reader[4]);
ucBO.Tipo_Custo = (Tipo_Centro_Custo)Convert.ToInt32(reader[5]);
lista_unidade_custo.Add(ucBO);
}
reader.Dispose();
return lista_unidade_custo;
}
}
Clique aqui para fazer login e interagir na Comunidade :)