Example #1
0
        private List<Socket> CargarTag()
        {
            Conexion conexion = new Conexion();
            List<Socket> tags = new List<Socket>();
            int numCampos = 5;
            List<String> resultados = conexion.Consulta("select idregistro,tag,tipor,acceso,clasificacion from registro inner join tiporeg on idregistro=Registro_idregistro where Estacion_idEstacion=" + est.idEstacion + " and r_estatus=1 order by clasificacion,idRegistro", numCampos);
            for (int i = 0; i < resultados.Count; i += numCampos)
            {
                Socket tag = new Socket(est.URL);
                tag.IdRegistro = Convert.ToInt32(resultados[i]);
                tag.Tag = resultados[i + 1];
                tag.Url += tag.Tag;
                tag.TipoR = resultados[i + 2];
                tag.Acceso = resultados[i + 3];
                tag.Clasificacion = resultados[i + 4];

                tags.Add(tag);
            }
            return tags;
        }