public void loadItems() { object element = this._dataMapper.getElements(); FixupCollection <DeleteArticulo> ic = new FixupCollection <DeleteArticulo>(); if (element != null) { if (((List <ARTICULO>)element).Count > 0) { foreach (ARTICULO item in (List <ARTICULO>)element) { DeleteArticulo aux = new DeleteArticulo(item); //item.IsChecked = false; ic.Add(aux); } } } this.Articulos = ic; //FixupCollection<DeleteArticulo> ic = new FixupCollection<DeleteArticulo>(); //foreach (ARTICULO elemento in (List<ARTICULO>)element) //{ // ic.Add((ARTICULO)elemento); //} //if (ic != null) //{ // this.Articulos = ic; //} }
public void loadItems(CATEGORIA cc) { ArticuloDataMapper aa = new ArticuloDataMapper(); object element = aa.getElementsByCategoria(cc); FixupCollection <DeleteArticulo> ic = new FixupCollection <DeleteArticulo>(); if (element != null) { if (((List <ARTICULO>)element).Count > 0) { foreach (ARTICULO item in (List <ARTICULO>)element) { DeleteArticulo aux = new DeleteArticulo(item); //item.IsChecked = false; ic.Add(aux); } } } this.Articulos = ic; }