1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
| Protected Sub btnValider_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnValider.Click
Dim rb1, rb2, rb3, rb4, rb5, rb6, rb7, rb8, rb9, rb10, rb11, rb12, rb13, rb14, rb15, rb16 As RadioButton
Dim lblIdRisque As Label
Dim nbFrequence As Integer
For Each item As RepeaterItem In rpDetailsRisques.Items
rb1 = item.FindControl("rb1")
rb2 = item.FindControl("rb2")
rb3 = item.FindControl("rb3")
rb4 = item.FindControl("rb4")
rb5 = item.FindControl("rb5")
rb6 = item.FindControl("rb6")
rb7 = item.FindControl("rb7")
rb8 = item.FindControl("rb8")
rb9 = item.FindControl("rb9")
rb10 = item.FindControl("rb10")
rb11 = item.FindControl("rb11")
rb12 = item.FindControl("rb12")
rb13 = item.FindControl("rb13")
rb14 = item.FindControl("rb14")
rb15 = item.FindControl("rb15")
rb16 = item.FindControl("rb16")
lblIdRisque = item.FindControl("lblIdRisque")
If rb1.Checked Then
nbFrequence = rb1.ID.Substring(2)
ElseIf rb2.Checked Then
nbFrequence = rb2.ID.Substring(2)
ElseIf rb3.Checked Then
nbFrequence = rb3.ID.Substring(2)
ElseIf rb4.Checked Then
nbFrequence = rb4.ID.Substring(2)
ElseIf rb5.Checked Then
nbFrequence = rb5.ID.Substring(2)
ElseIf rb6.Checked Then
nbFrequence = rb6.ID.Substring(2)
ElseIf rb7.Checked Then
nbFrequence = rb7.ID.Substring(2)
ElseIf rb8.Checked Then
nbFrequence = rb8.ID.Substring(2)
ElseIf rb9.Checked Then
nbFrequence = rb9.ID.Substring(2)
ElseIf rb10.Checked Then
nbFrequence = rb10.ID.Substring(2)
ElseIf rb11.Checked Then
nbFrequence = rb11.ID.Substring(2)
ElseIf rb12.Checked Then
nbFrequence = rb12.ID.Substring(2)
ElseIf rb13.Checked Then
nbFrequence = rb13.ID.Substring(2)
ElseIf rb14.Checked Then
nbFrequence = rb14.ID.Substring(2)
ElseIf rb15.Checked Then
nbFrequence = rb15.ID.Substring(2)
ElseIf rb16.Checked Then
nbFrequence = rb16.ID.Substring(2)
End If
If mesMethodesEvaluations.ajouterFrequenceRisqueEvaluation(Session("idEvaluation").ToString, lblIdRisque.Text, nbFrequence) = True Then
'On passe à la suite
Else
System.Diagnostics.Debug.Print("Erreur lors de l'ajout d'une fréquence de risque pour l'évaluation")
End If
Next
Server.Transfer("EvaluationCible.aspx")
End Sub |
Partager