public void CargaRegion(ref DropDownList oddlRegion) { DLRegion DataLayerRegion = new DLRegion(); oddlRegion.DataSource = DataLayerRegion.getRegionAll(); oddlRegion.DataValueField = "idRegion"; oddlRegion.DataTextField = "Nombre"; }
public List <Region> ObtieneRegionAll() { DLRegion odlRegion = new DLRegion(); List <Region> lstReg = new List <Region>(); try { lstReg = odlRegion.getRegionAll(); lstReg.RemoveAll(x => x.idRegion == 0); } catch (Exception ex) { throw ex; } return(lstReg); }