コード例 #1
0
        protected void gvIndividuos_SelectedIndexChanged(object sender, EventArgs e)
        {
            int idPersona   = Convert.ToInt32(((Label)gvIndividuos.Rows[gvIndividuos.SelectedRow.RowIndex].FindControl("lblID")).Text);
            int tipoPersona = objDPersona.consultaTipoPersona(idPersona);

            switch (tipoPersona)
            {
            case 0:
                MsgBox("Algo ha salido mal!", this.Page, this);
                break;

            case 1:
                Response.Redirect("frmActualizarNinio.aspx?id=" + idPersona);
                break;

            case 2:
                Response.Redirect("frmActualizarJoven.aspx?id=" + idPersona);
                break;

            case 3:
                Response.Redirect("frmActualizarAdulto.aspx?id=" + idPersona);
                break;

            default:
                MsgBox("Algo ha salido mal!", this.Page, this);
                break;
            }
        }