protected void Page_Load(object sender, EventArgs e)
        {
            DAL.DALDisciplina daldis = new DAL.DALDisciplina();
            Modelo.Disciplina dis    = new Modelo.Disciplina();
            int aux1 = Convert.ToInt32(Session["idDisciplina"]);

            dis         = daldis.Select(aux1)[0];
            Label5.Text = dis.nome;
            DAL.DALRespostaDoAlunoExercicio dalresp = new DAL.DALRespostaDoAlunoExercicio();
            int[] aux = dalresp.SelectAllCertaIdDisciplina(Convert.ToInt32(Session["idDisciplina"]), Session["Nome"].ToString());
            Label3.Text = aux[0].ToString();
            Label4.Text = aux[1].ToString();
        }
예제 #2
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     DAL.DALModulo     dalmodulo = new DAL.DALModulo();
     Modelo.Disciplina dis       = new Modelo.Disciplina();
     DAL.DALDisciplina daldis    = new DAL.DALDisciplina();
     dis = (daldis.Select(Convert.ToInt32(DisciplinaId.Text)))[0];
     Modelo.Modulo mod = new Modelo.Modulo();
     mod.titulo     = TituloId.Text;
     mod.descricao  = DescricaoId.Text;
     mod.disciplina = dis;
     dalmodulo.Insert(mod);
     Response.Redirect("~/WebFormModulo.aspx");
 }
예제 #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!((Session["Nome"] != null) && (Session["Senha"] != null)))
            {
                Response.Redirect("~/WebFormAutenticar.aspx");
            }
            TableRow  tr1;
            TableCell tc0, tc1;
            string    idDisciplina = Request.QueryString["idDisciplina"];

            DAL.DALModulo        dalmodulo  = new DAL.DALModulo();
            List <Modelo.Modulo> ListModulo = new List <Modelo.Modulo>();

            ListModulo = dalmodulo.SelectAllIdDisciplina(Convert.ToInt32(idDisciplina));
            for (int i = 0; i < ListModulo.Count; i++)
            {
                HyperLink link = new HyperLink();
                link.NavigateUrl = "~/WebFormMateria.aspx?idModulo=" + ListModulo[i].idModulo;
                link.Text        = ListModulo[i].titulo;
                link.Font.Name   = "Segoe UI Light";
                link.Font.Size   = 16;
                link.Font.Bold   = true;
                Label descricao = new Label();
                descricao.Text      = ListModulo[i].descricao;
                descricao.Font.Name = "Segoe UI Light";
                descricao.Font.Size = 12;
                tc0 = new TableCell();
                tc1 = new TableCell();
                tc0.Controls.Add(link);
                tc1.Controls.Add(descricao);
                tr1 = new TableRow();
                tr1.Cells.Add(tc0);
                tr1.Cells.Add(tc1);
                Table1.Rows.Add(tr1);
            }
            DAL.DALDisciplina disc       = new DAL.DALDisciplina();
            Modelo.Disciplina disciplina = new Modelo.Disciplina();
            disciplina  = disc.Select(Convert.ToInt32(idDisciplina))[0];
            Label1.Text = disciplina.nome;
        }
예제 #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!((Session["Nome"] != null) && (Session["Senha"] != null)))
            {
                Response.Redirect("~/WebFormAutenticar.aspx");
            }
            TableRow  tr1;
            TableCell tc0;
            string    idModulo = Request.QueryString["idModulo"];

            DAL.DALMateria        dalmateria  = new DAL.DALMateria();
            List <Modelo.Materia> ListMateria = new List <Modelo.Materia>();

            ListMateria = dalmateria.SelectAllIdModulo(Convert.ToInt32(idModulo));
            for (int i = 0; i < ListMateria.Count; i++)
            {
                HyperLink link = new HyperLink();
                link.NavigateUrl = "~/WebFormMateriaUsuario.aspx?idMateria=" + ListMateria[i].idMateria;
                link.Text        = ListMateria[i].titulo;
                link.Font.Name   = "Segoe UI Light";
                link.Font.Size   = 16;
                link.Font.Bold   = true;
                tc0 = new TableCell();
                tc0.Controls.Add(link);
                tr1 = new TableRow();
                tr1.Cells.Add(tc0);
                Table1.Rows.Add(tr1);
            }
            DAL.DALModulo mod    = new DAL.DALModulo();
            Modelo.Modulo modulo = new Modelo.Modulo();
            modulo      = mod.Select(Convert.ToInt32(idModulo))[0];
            Label1.Text = modulo.titulo;
            DAL.DALDisciplina disc       = new DAL.DALDisciplina();
            Modelo.Disciplina disciplina = new Modelo.Disciplina();
            disciplina             = disc.Select(modulo.idDisciplina)[0];
            HyperLink1.Text        = disciplina.nome;
            HyperLink1.NavigateUrl = "~/WebFormDisciplina.aspx?idDisciplina=" + disciplina.idDisciplina;
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!((Session["Nome"] != null) && (Session["Senha"] != null)))
            {
                Response.Redirect("~/WebFormAutenticar.aspx");
            }
            TableRow  tr1, tr2, tr3, tr4;
            TableCell tc0, tc1, tc2, tc3;
            string    idMateria = Request.QueryString["idMateria"];

            Session["idMateria"] = idMateria;
            int aux = Convert.ToInt32(idMateria);

            DAL.DALMateria dalmateria = new DAL.DALMateria();
            Modelo.Materia materia    = dalmateria.SelectTeste(aux);

            //Adicionando componentes da Label
            Label label = new Label();

            label.Text      = materia.titulo;
            label.Font.Name = "Segoe UI Light";
            label.Font.Size = 20;
            label.Font.Bold = true;
            Label descricao = new Label();

            descricao.Text      = materia.descricao;
            descricao.Font.Name = "Segoe UI Light";
            descricao.Font.Size = 12;

            //Add Imagem
            Image imagem = new Image();

            imagem.ImageUrl = "~/HandlerMateria2.ashx";
            tc0             = new TableCell();
            tc1             = new TableCell();
            tc2             = new TableCell();
            tc0.Controls.Add(label);
            tc1.Controls.Add(descricao);
            tc2.Controls.Add(imagem);

            //Add Link Fazer exercício
            HyperLink link = new HyperLink();

            link.NavigateUrl = "~/WebFormExercicioUsuario.aspx?idMateria=" + idMateria;
            link.Text        = "Fazer o exercício";
            link.Font.Name   = "Segoe UI Light";
            link.Font.Size   = 18;
            link.ID          = "asd";
            tc3 = new TableCell();
            tc3.Controls.Add(link);

            tr1 = new TableRow();
            tr2 = new TableRow();
            tr3 = new TableRow();
            tr3 = new TableRow();
            tr4 = new TableRow();

            tr1.Cells.Add(tc0);
            tr2.Cells.Add(tc1);
            tr3.Cells.Add(tc2);
            tr4.Cells.Add(tc3);
            Table1.Rows.Add(tr1);
            Table1.Rows.Add(tr2);
            Table1.Rows.Add(tr3);
            Table1.Rows.Add(tr4);

            DAL.DALMateria mat  = new DAL.DALMateria();
            Modelo.Materia mate = new Modelo.Materia();
            mate        = mat.Select(Convert.ToInt32(idMateria))[0];
            Label1.Text = mate.titulo;

            DAL.DALModulo mod    = new DAL.DALModulo();
            Modelo.Modulo modulo = new Modelo.Modulo();
            modulo                 = mod.Select(Convert.ToInt32(mate.idModulo))[0];
            HyperLink2.Text        = modulo.titulo;
            HyperLink2.NavigateUrl = "~/WebFormMateria.aspx?idModulo=" + mate.idModulo;

            DAL.DALDisciplina disc       = new DAL.DALDisciplina();
            Modelo.Disciplina disciplina = new Modelo.Disciplina();
            disciplina             = disc.Select(modulo.idDisciplina)[0];
            HyperLink1.Text        = disciplina.nome;
            HyperLink1.NavigateUrl = "~/WebFormDisciplina.aspx?idDisciplina=" + disciplina.idDisciplina;
        }