private void CarregarTabela() { MarcaDB marcaDB = new MarcaDB(); GridView1.DataSource = marcaDB.ConsultarTudo(); GridView1.DataBind(); }
private void CarregarMarca() { MarcaDB marcaDB = new MarcaDB(); MarcaDropDownList2.DataSource = marcaDB.ConsultarTudo(); MarcaDropDownList2.DataValueField = "Id"; MarcaDropDownList2.DataTextField = "Descricao"; MarcaDropDownList2.DataBind(); }