示例#1
0
        public void preencheGrid()
        {
            objmateria.idusuario = int.Parse(Session["idusuario"].ToString());

            MateriasGridView.DataSource = objmateria.BuscarMateria();
            MateriasGridView.DataBind();
        }
示例#2
0
        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";
        }