Beispiel #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string email = Convert.ToString(Session.Contents["Email"]);

            Label4.Visible = false;
            Label5.Visible = false;

            if (!Page.IsPostBack)
            {
                //CARGAR EL DROPDOWNLIST
                DataView aDV = Tareas.CargarAsignaturasProfesor(email);

                dropAsignaturas.DataSource     = aDV;
                dropAsignaturas.DataTextField  = "codigoasig";
                dropAsignaturas.DataValueField = "codigoasig";
                dropAsignaturas.DataBind();

                try
                {
                    dropAsignaturas.SelectedValue = dropAsignaturas.Items[0].Value;

                    //CARGAR EL GRINDVIEW SIN FILTROS
                    DataTable dt = Tareas.BuscarTareasGenericasProfesor(Convert.ToString(Session.Contents["Email"]), dropAsignaturas.SelectedValue);
                    gridTareas.DataSource = dt;
                    gridTareas.DataBind();
                    currentTable = dt;
                    Session.Contents.Add("currentTable", currentTable);
                }
                catch (Exception ex)
                {
                }
            }
            else
            {
                currentTable = (DataTable)Session.Contents["currentTable"];
            }
        }