protected void btnModificar_Click(object sender, EventArgs e)
        {
            Inscripcion insc = new Inscripcion();
            
            insc.IdInscripcion = Convert.ToInt32(txtIdInscripcion.Text);
            insc.CodigoCursoGestion = Convert.ToInt32(txtcocGestion.Text);
            insc.Fecha = Convert.ToDateTime(txtFec.Text);
            insc.CodigoEstudiante = Convert.ToInt32(txtcodEst.Text);

            if (insc.modificar()) { lblResp.Text = "Inscripcion modificada..!"; } else { lblResp.Text = "Error al modificar"; }
            //this.mostrar();

            detalleInscripcion detInsc = new detalleInscripcion();
            detInsc.IdcodInscripcion = Convert.ToInt32(txtIdInscripcion.Text);
            detInsc.eliminar();

            detalleInscripcion dv;
            
            foreach (GridViewRow row in gvApoderado.Rows)
            {
                dv = new detalleInscripcion();
                dv.IdcodApoderado = Convert.ToInt32(row.Cells[0].Text);
                dv.Relacion = ((TextBox)row.Cells[6].FindControl("txtQty")).Text;
                dv.guardar();
            }
        }
        protected void btnEliminar_Click(object sender, EventArgs e)
        {
            detalleInscripcion detIns = new detalleInscripcion();
            detIns.IdcodInscripcion = Convert.ToInt32(txtIdInscripcion.Text);
            detIns.eliminar();

            Inscripcion insc = new Inscripcion();
            insc.IdInscripcion = Convert.ToInt32(txtIdInscripcion.Text);
            if (insc.eliminar()) { lblResp.Text = "Registro Eliminado..!"; } else { lblResp.Text = "Error al Eliminar"; }
            this.mostrar();
        }
        protected void gvInscripcion_SelectedIndexChanged(object sender, EventArgs e)
        {
            txtIdInscripcion.Text = gvInscripcion.SelectedRow.Cells[0].Text;
            txtcocGestion.Text = gvInscripcion.SelectedRow.Cells[5].Text;
            txtFec.Text = gvInscripcion.SelectedRow.Cells[1].Text;
            txtcodEst.Text = gvInscripcion.SelectedRow.Cells[2].Text;

            detalleInscripcion detInsc = new detalleInscripcion();
            DataTable detalle = new DataTable();
            detInsc.IdcodInscripcion = Convert.ToInt32(txtIdInscripcion.Text);
            detalle = detInsc.buscar();
            gvApoderado.DataSource = detalle;
            gvApoderado.DataBind();
            Session["prueba"] = detalle;

        }