public ArrayList ObtenerDatos()
        {
            this.IniciarConeccion();
            MySqlCommand Comando = new MySqlCommand(this.Query(),this.Conectado);

            MySqlDataReader LeerSQL = Comando.ExecuteReader();

            ArrayList DatosTabla = new ArrayList();

            while (LeerSQL.Read())
            {
                Datos datos = new Datos();
                datos.nombre = LeerSQL["Nombre"].ToString();
                datos.apellido = LeerSQL["Apellido"].ToString();
                datos.domicilio = LeerSQL["Domicilio"].ToString();
                datos.fecha = LeerSQL["Fecha"].ToString();

                DatosTabla.Add(datos);
            }
            Comando.Dispose();
            Comando = null;

            LeerSQL.Close();
            LeerSQL = null;

            this.CerrarConeccion();

            return DatosTabla;
        }
Пример #2
0
 private void CuerpodeConsulta(Datos datos)
 {
     this.CreacionLabel("lblNombre" + datos.id, "<span size=\"12000\" foreground=\"#000000\">" + datos.nombre + "</span>");
     this.x += 200;
     this.CreacionLabel("lblApellido" + datos.id, "<span size=\"12000\" foreground=\"#000000\">" + datos.apellido + "</span>");
     this.x += 200;
     this.CreacionLabel("lblDomicilio" + datos.id, "<span size=\"12000\" foreground=\"#000000\">" + datos.domicilio + "</span>");
     this.x += 200;
     this.CreacionLabel("lblFecha" + datos.id, "<span size=\"12000\" foreground=\"#000000\">" + datos.fecha + "</span>");
     this.x += 200;
 }