Code Structure
In this function below I try to get the content of the MySql database and passing it to a List<BDependente> lDep
in the line where facade.listDependente(bDep);
Employee 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 record of the bank leaves.