Пример #1
0
 public void Cargar_Datos()
 {
     conexion.conectar();
     tabla = conexion.consulta(string.Format("SELECT * FROM makeuppruebas.instagram"));
     foreach (DataRow f in tabla.Rows)
     {
         claseInstagram i = new claseInstagram();
         i.IdCliente = f.Field <string>(1);
         i.Usuario   = f.Field <string>(2);
         i.Url       = f.Field <string>(3);
         usuarios.Add(i);
     }
 }
Пример #2
0
        public claseInstagram BuscarURL(string user)
        {
            claseInstagram instagram = new claseInstagram();

            DataTable Tabla = conexion.consulta(string.Format("SELECT URL FROM instagram WHERE Usuario='{0}';", user));

            if (Tabla.Rows.Count > 0)
            {
                instagram.url = Tabla.Rows[0][0].ToString();
                //MessageBox.Show("Si hay");
            }
            return(instagram);
        }