public NetworkVO getDetails(int padre) { FVSL_LINQDataContext dbcon = new FVSL_LINQDataContext(); NetworkVO network = new NetworkVO(); EntityVO enti = new EntityVO(); List<EntityVO> nodos = new List<EntityVO>(); try { enti = EntityExtractor.create(NetworkVO.COOP_EXTRACTOR).getDetails(padre); enti.type = NetworkVO.COOP_EXTRACTOR; network.type = NetworkVO.COOP_EXTRACTOR; network.parent = enti; List<mapa_get_network_nodesResult> resultset = dbcon.mapa_get_network_nodes(3, padre).ToList(); foreach (mapa_get_network_nodesResult res in resultset) { EntityVO nodo = new EntityVO(); nodo.id = res.id_invitada.ToString(); nodo.name = res.nombre; nodo.latitude = res.latitud; nodo.longitude = res.longitud; nodo.type = NetworkVO.COOP_EXTRACTOR; nodos.Add(nodo); } network.nodes = nodos; return network; } catch (Exception e) { Logging.WriteError(e.StackTrace.ToString()); return null; } }