public void preencheGrid() { objmateria.idusuario = int.Parse(Session["idusuario"].ToString()); MateriasGridView.DataSource = objmateria.BuscarMateria(); MateriasGridView.DataBind(); }
private void CarregaDropDownList() { ddMaterias.DataSource = objmateria.BuscarMateria(); ddMaterias.DataValueField = "idmateria"; ddMaterias.DataTextField = "Nome"; ddMaterias.DataBind(); ddMaterias.Items.Add(new ListItem("Selecione:", "0")); ddMaterias.SelectedValue = "0"; }