Ejemplo n.º 1
0
        private void listb_bd_SelectedIndexChanged(object sender, EventArgs e)
        {
            string        nombreDB = listb_bd.SelectedItem.ToString();
            OperacionesDB Opdb     = new OperacionesDB(conexion);//crea una conexion

            //---------------------carga info a Tablas-------------------------
            listanew = Opdb.DatosBDTablas(nombreDB); //pide las tablas de la BD
            listb_tablas.Items.Clear();              //limpia
            foreach (string s in listanew)           //carga a la lista los datos TABLAS
            {
                listb_tablas.Items.Add(s);
            }
            //------------------Carga info a Views------------------------------------------
            listanew = Opdb.DatosBDViews(nombreDB); //pide las tablas de la BD
            listb_vistas.Items.Clear();             //limpia
            foreach (string s in listanew)          //carga a la lista los datos TABLAS
            {
                listb_vistas.Items.Add(s);
            }
            //------------------Carga info a Stored procedures----------------------------
            listanew = Opdb.DatosBDSP(nombreDB); //pide las tablas de la BD
            listb_storeprocedure.Items.Clear();  //limpia
            foreach (string s in listanew)       //carga a la lista los datos TABLAS
            {
                listb_storeprocedure.Items.Add(s);
            }
        }
Ejemplo n.º 2
0
        private void btn_datosClick(object sender, EventArgs e)
        {
            string        conexion = "server=HGDLAPCALDERONA\\SQLEXPRESS ;" + " database=AdventureWorks2014 ; integrated security = true";
            OperacionesDB OPDB     = new OperacionesDB(conexion);

            dgv_resul.AutoGenerateColumns = true;
            dgv_resul.DataSource          = OPDB.Getinfo();
        }
Ejemplo n.º 3
0
        private void Busqueda_Load(object sender, EventArgs e)
        {
            OperacionesDB Opdb = new OperacionesDB(conexion);

            listanew = Opdb.BasesD();
            foreach (string s in listanew)
            {
                listb_bd.Items.Add(s);
            }
        }