Beispiel #1
0
        protected void GDVAula_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            int line = int.Parse(e.CommandArgument.ToString());
            int id   = int.Parse(GDVAula.Rows[line].Cells[0].Text);

            Aula bilheteria = new AulaDB().FindById(id);

            if (e.CommandName == "A")
            {
                Response.Redirect("CadastroAula.aspx?idItem=" + id);
            }
            else if (e.CommandName == "E")
            {
                lblExcluir.Text = id.ToString();
                lblMsg.Text     = "Tem certeza que deseja excluir este registro?";
                DisplayModal(this);
            }
        }
Beispiel #2
0
        private void LoadDataPage()
        {
            string idItem = Request.QueryString["idItem"];

            if (!String.IsNullOrEmpty(idItem))
            {
                Aula aula = new AulaDB().FindById(int.Parse(idItem));

                lblId.Visible = true;
                TxtId.Visible = true;

                TxtQtd_Alunos.Text     = aula.Qtd_Alunos.ToString();
                TxtNomeDisciplina.Text = aula.NomeDisciplina;
                TxtId.Text             = aula.Id.ToString();
                TxtNomeProfessor.Text  = aula.NomeProfessor;
                TxtNomeFaculdade.Text  = aula.NomeFaculdade;
            }
        }