2
Structure of the Code
In this function below I try to grab the contents of the Mysql database and passing to a List<BDependente> lDep
on the line where this facade.listDependente(bDep);
Official Method
lvDependente.Columns.Add("Nome", 150, HorizontalAlignment.Left);
lvDependente.Columns.Add("Parentesco", 70, HorizontalAlignment.Left);
lvDependente.Columns.Add("Nascimento", 130, HorizontalAlignment.Left);
lDep = facade.listDependente(bDep);
foreach (BDependente bDepe in lDep) {
string[] row = {bDepe.Nome, bDepe.Grau_parentesco, bDepe.Data_nascimento };
lvDependente.Items.Add(row);
}
lvDependente.View = View.Details;
The result of this is that only the last bank record comes out.
I implemented your tip but the result goes out in the unexpected way ! It is only bringing the last result.
– Ikaro Sales
The problem could be here:
lDep = facade.listDependente(bDep);
– Tiago S
this listDepending method is a query method in the Database, the problem should be there ? or is in the List<>
– Ikaro Sales
I implemented your tip but the result goes out in the unexpected way ! It is only bringing the last result, the result should be:
Ikaro | Sobrinho(a) | 2016-04-13
 Ikaro Sales | Neto(a) | 2016-04-05
How is it coming: [! [insert image description here][1]][1] [! [insert image description here][2][2] [1]: http://i.stack.Imgur.com/F1dyp.png [2]: http://i.stack.stackImgur.com/7pVWb.png– Ikaro Sales
Checks whether the contents of the variable
lDep
is correct and if you do not have repeated data– Tiago S
I’m thinking the problem is in the bank’s consul
– Tiago S
OK ! Thank you very much Tiago
– Ikaro Sales