Пример #1
0
        private void CarregarTabela()
        {
            MarcaDB marcaDB = new MarcaDB();

            GridView1.DataSource = marcaDB.ConsultarTudo();
            GridView1.DataBind();
        }
Пример #2
0
        private void CarregarMarca()
        {
            MarcaDB marcaDB = new MarcaDB();

            MarcaDropDownList2.DataSource     = marcaDB.ConsultarTudo();
            MarcaDropDownList2.DataValueField = "Id";
            MarcaDropDownList2.DataTextField  = "Descricao";
            MarcaDropDownList2.DataBind();
        }