Пример #1
0
        public void Cargar()
        {
            Be_BaseDeDatos _BD = new Be_BaseDeDatos();
            string         sql = "SELECT * FROM " + Pp_Tabla;

            this.DisplayMember = Pp_Display;
            this.ValueMember   = Pp_Value;
            this.DataSource    = _BD.Consulta(sql);
        }
Пример #2
0
        public void Cargar2()
        {
            Be_BaseDeDatos _BD   = new Be_BaseDeDatos();
            DataTable      tabla = new DataTable();

            tabla = _BD.Consulta("SELECT * FROM " + Pp_Tabla);
            int filas = tabla.Rows.Count;

            for (int i = 0; i < filas; i++)
            {
                string Plantas = tabla.Rows[i]["Nombre"].ToString();
                this.Items.Add(Plantas);
            }
        }