예제 #1
0
    public List<EntityVO> getAll()
    {
        FVSL_LINQDataContext dbcon = new FVSL_LINQDataContext();

        List<EntityVO> lista = new List<EntityVO>();

        try
        {

            List<MAPA_EMP_ALLResult> resultset = dbcon.MAPA_EMP_ALL().ToList();

            foreach (MAPA_EMP_ALLResult emp in resultset)
            {
                EntityVO EVO = new EntityVO();

                EVO.id = emp.Id.ToString();
                EVO.name = emp.Nombre;
                EVO.latitude = emp.Latitud.ToString();
                EVO.longitude = emp.Longitud.ToString();

                lista.Add(EVO);
            }

            return lista;
        }
        catch (Exception e)
        {
            Logging.WriteError(e.StackTrace.ToString());
            return null;
        }
    }
예제 #2
0
    public System.Collections.Generic.List<NetworkVO> getN()
    {
        FVSL_LINQDataContext dbcon = new FVSL_LINQDataContext();

        List<NetworkVO> lista = new List<NetworkVO>();

        try
        {

            List<mapa_get_network_compResult> resultset = dbcon.mapa_get_network_comp().ToList();

            foreach (mapa_get_network_compResult net in resultset)
            {
                NetworkVO netw = new NetworkVO();
                EntityVO ent = new EntityVO();

                ent.id = net.Id.ToString();
                ent.name = net.Nombre;
                ent.latitude = net.Latitud.ToString();
                ent.longitude = net.Longitud.ToString();
                netw.parent = ent;
                netw.type = NetworkVO.EMP_EXTRACTOR;

                lista.Add(netw);
            }

            return lista;

        }
        catch (Exception e)
        {
            Logging.WriteError(e.StackTrace.ToString());
            return null;
        }
    }
예제 #3
0
    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;
        }
    }
예제 #4
0
    public List<EntityVO> getSearch(List<String> arr)
    {
        FVSL_LINQDataContext dbcon = new FVSL_LINQDataContext();

        List<EntityVO> lista = new List<EntityVO>();

        try
        {

            ISingleResult<dynamicLINQE> resultset = dbcon.mapa_search_empresas_by(int.Parse(arr[0]), int.Parse(arr[1]), arr[2], int.Parse(arr[3]), int.Parse(arr[4]));

            foreach (dynamicLINQE dyn in resultset)
            {
                EntityVO EVO = new EntityVO();

                EVO.id = dyn.id.ToString();
                EVO.name = dyn.nombre;
                EVO.longitude = dyn.Longitud.ToString();
                EVO.latitude = dyn.Latitud.ToString();

                lista.Add(EVO);
            }

            return lista;
        }
        catch (Exception e)
        {
            Logging.WriteError(e.StackTrace.ToString());
            return null;
        }
    }
예제 #5
0
    public List<EntityVO> getSearch(List<String> datos)
    {
        FVSL_LINQDataContext dbcon = new FVSL_LINQDataContext();

            List<EntityVO> lista = new List<EntityVO>();
            //0int idpais, 1int idestado, 2string nombre, 3string area, 4string premios, 5int tiporg, 6int fat, 7Int enfoq

            //@idPais int, @idEstado int, @nombre varchar(8000), @tipoOrg int, @fat int, @area_intervencion varchar(8000), @enfoque_geografico int, @premios varchar(8000)
            try
            {

                ISingleResult<dynamicLINQC> resultset = dbcon.MAPA_SEARCH_COOP_BY(int.Parse(datos[0]), int.Parse(datos[1]), datos[2], int.Parse(datos[5]), int.Parse(datos[6]), datos[3], int.Parse(datos[7]), datos[4]);

                foreach (dynamicLINQC dyn in resultset)
                {
                    EntityVO EVO = new EntityVO();

                    EVO.id = dyn.id_coperante.ToString();
                    EVO.name = dyn.nombre;
                    EVO.latitude = dyn.Latitud;
                    EVO.longitude = dyn.Longitud;

                    lista.Add(EVO);
                }

                return lista;
            }
            catch (Exception e)
            {
                Logging.WriteError(e.StackTrace.ToString());
                return null;
            }
    }
예제 #6
0
    //getSearch in:List<String> (int idpais, int idestado, string nombre, string area, string premios)
    public List<EntityVO> getSearch(List<String> datos)
    {
        FVSL_LINQDataContext dbcon = new FVSL_LINQDataContext();

        List<EntityVO> lista = new List<EntityVO>();

        try
        {

            ISingleResult<dynamicLINQ> resultset = dbcon.MAPA_SEARCH_ODS_BY(int.Parse(datos[0]), int.Parse(datos[1]), datos[2], datos[3], datos[4]);

            foreach (dynamicLINQ dyn in resultset)
            {
                EntityVO EVO = new EntityVO();

                EVO.id = dyn.id_ods.ToString();
                EVO.name = dyn.nombre;
                EVO.latitude = dyn.Latitud;
                EVO.longitude = dyn.Longitud;

                lista.Add(EVO);
            }

            return lista;
        }
        catch (Exception e)
        {
            Logging.WriteError(e.StackTrace.ToString());
            return null;
        }
    }
예제 #7
0
    public List<NetworkVO> getSearch(List<String> lista)
    {
        FVSL_LINQDataContext dbcon = new FVSL_LINQDataContext();

        List<NetworkVO> listain = new List<NetworkVO>();

        try
        {

            List<mapa_search_network_cooperantes_byResult> resultset = dbcon.mapa_search_network_cooperantes_by(int.Parse(lista[0]), int.Parse(lista[1]), lista[2]).ToList();

            foreach (mapa_search_network_cooperantes_byResult snet in resultset)
            {
                NetworkVO netw = new NetworkVO();
                EntityVO ent = new EntityVO();

                ent.id = snet.id_anfitriona.ToString();
                ent.name = snet.nombre;
                ent.latitude = snet.latitud.ToString();
                ent.longitude = snet.longitud.ToString();
                ent.type = NetworkVO.COOP_EXTRACTOR;
                netw.parent = ent;
                netw.type = NetworkVO.ODS_EXTRACTOR;

                listain.Add(netw);
            }

            return listain;
        }
        catch (Exception e)
        {
            Logging.WriteError(e.StackTrace.ToString());
            return null;
        }
    }
예제 #8
0
    public List<NetworkVO> getSearch(List<String> listain)
    {
        FVSL_LINQDataContext dbcon = new FVSL_LINQDataContext();

        List<NetworkVO> lista = new List<NetworkVO>();

        try
        {

            //EMPRESAS//
            List<mapa_search_network_ods_byResult> resultset = dbcon.mapa_search_network_ods_by(int.Parse(listain[0]), int.Parse(listain[1]), listain[2]).ToList();

            foreach (mapa_search_network_ods_byResult net in resultset)
            {
                NetworkVO netw = new NetworkVO();
                EntityVO ent = new EntityVO();

                ent.id = net.id_anfitriona.ToString();
                ent.name = net.nombre;
                ent.latitude = net.latitud.ToString();
                ent.longitude = net.longitud.ToString();
                netw.parent = ent;
                netw.type = NetworkVO.ODS_EXTRACTOR;

                lista.Add(netw);
            }
            //ODS//
            List<mapa_search_network_emp_byResult> resultset1 = dbcon.mapa_search_network_emp_by(int.Parse(listain[0]), int.Parse(listain[1]), listain[2]).ToList();

            foreach (mapa_search_network_emp_byResult net1 in resultset1)
            {
                NetworkVO netw1 = new NetworkVO();
                EntityVO ent1 = new EntityVO();

                ent1.id = net1.id_anfitriona.ToString();
                ent1.name = net1.nombre;
                ent1.latitude = net1.latitud.ToString();
                ent1.longitude = net1.longitud.ToString();
                netw1.parent = ent1;
                netw1.type = NetworkVO.EMP_EXTRACTOR;

                lista.Add(netw1);
            }
            //COOPERANTES//
            List<mapa_search_network_cooperantes_byResult> resultset2 = dbcon.mapa_search_network_cooperantes_by(int.Parse(listain[0]),int.Parse(listain[1]), listain[2]).ToList();/*int.Parse(listain[1]),*/

            foreach (mapa_search_network_cooperantes_byResult net2 in resultset2)
            {
                NetworkVO netw2 = new NetworkVO();
                EntityVO ent2 = new EntityVO();

                ent2.id = net2.id_anfitriona.ToString();
                ent2.name = net2.nombre;
                ent2.latitude = net2.latitud.ToString();
                ent2.longitude = net2.longitud.ToString();
                netw2.parent = ent2;
                netw2.type = NetworkVO.COOP_EXTRACTOR;

                lista.Add(netw2);
            }

            return lista;

        }
        catch (Exception e)
        {
            Logging.WriteError(e.StackTrace.ToString());
            return null;
        }
    }
예제 #9
0
    public List<NetworkVO> getN()
    {
        FVSL_LINQDataContext dbcon = new FVSL_LINQDataContext();

        List<NetworkVO> lista = new List<NetworkVO>();

        try
        {
            //EMPRESAS//
            List<mapa_get_network_compResult> resultset = dbcon.mapa_get_network_comp().ToList();

            foreach (mapa_get_network_compResult net in resultset)
            {
                NetworkVO netw = new NetworkVO();
                EntityVO ent = new EntityVO();

                ent.id = net.Id.ToString();
                ent.name = net.Nombre;
                ent.latitude = net.Latitud.ToString();
                ent.longitude = net.Longitud.ToString();
                netw.parent = ent;
                netw.type = NetworkVO.EMP_EXTRACTOR;

                lista.Add(netw);
            }
            //ODS//
            List<mapa_get_network_odsResult> resultset1 = dbcon.mapa_get_network_ods().ToList();

            foreach (mapa_get_network_odsResult net1 in resultset1)
            {
                NetworkVO netw1 = new NetworkVO();
                EntityVO ent1 = new EntityVO();

                ent1.id = net1.id_ods.ToString();
                ent1.name = net1.nombre;
                ent1.latitude = net1.Latitud.ToString();
                ent1.longitude = net1.Longitud.ToString();
                netw1.parent = ent1;
                netw1.type = NetworkVO.ODS_EXTRACTOR;

                lista.Add(netw1);
            }
            //COOPERANTES//
            List<mapa_get_network_coopResult> resultset2 = dbcon.mapa_get_network_coop().ToList();

            foreach (mapa_get_network_coopResult net2 in resultset2)
            {
                NetworkVO netw2 = new NetworkVO();
                EntityVO ent2 = new EntityVO();

                ent2.id = net2.id_coperante.ToString();
                ent2.name = net2.nombre;
                ent2.latitude = net2.Latitud.ToString();
                ent2.longitude = net2.Longitud.ToString();
                netw2.parent = ent2;
                netw2.type = NetworkVO.COOP_EXTRACTOR;

                lista.Add(netw2);
            }

            return lista;

        }
        catch (Exception e)
        {
            Logging.WriteError(e.StackTrace.ToString());
            return null;
        }
    }