-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRecap.vb
More file actions
96 lines (89 loc) · 3.33 KB
/
Copy pathRecap.vb
File metadata and controls
96 lines (89 loc) · 3.33 KB
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
''' <summary>
''' Formulaire de récapitulatif d'inscription
''' </summary>
Public Class Recap
''' <summary>
''' Chargement du formulaire
''' </summary>
''' <param name="sender"></param>
''' <param name="e"></param>
Private Sub Recap_Load(sender As Object, e As EventArgs) Handles MyBase.Load
LabelNom.Text = Inscription.NomCandidat.Text
LabelPrenom.Text = Inscription.PrenomCandidat.Text
LabelAdresse.Text = Inscription.AdresseCandidat.Text
LabelCP.Text = Inscription.CPCandidat.Text
LabelVille.Text = Inscription.VilleCandidat.Text
LabelAge.Text = Inscription.HScrollBarAge.Value
LabelFacultative.Text = ChoixRegionMatieres.ComboBoxFacultative.Text
LabelRegion.Text = ChoixRegionMatieres.ComboBoxRegions.SelectedItem
Load_Mat(ChoixRegionMatieres.GroupBoxEcrit.Controls, GroupBoxEcrit)
Load_Mat(ChoixRegionMatieres.GroupBoxOral.Controls, GroupBoxOral)
End Sub
''' <summary>
''' Chargement de la liste des épreuves choisies (écrit ou oral)
''' </summary>
''' <param name="Source"></param>
''' <param name="Dest"></param>
Private Sub Load_Mat(ByRef Source, ByRef Dest)
Dim i As Integer = 0
For Each cb As CheckBox In Source
If cb.Checked Then
Dest.Controls(i).Text = cb.Text
i += 1
End If
Next
End Sub
''' <summary>
''' Retour au choix de la région de pasasge et des épreuves
''' </summary>
''' <param name="sender"></param>
''' <param name="e"></param>
Private Sub Retour_Click(sender As Object, e As EventArgs) _
Handles Retour.Click
ChoixRegionMatieres.Show()
ChoixRegionMatieres.TimerRegionMatiere.Start()
Dim i As Integer = 0
For Each mat In ChoixRegionMatieres.ComboBoxFacultative.Items
If mat = LabelFacultative.Text Then
ChoixRegionMatieres.ComboBoxFacultative.SelectedIndex = i
End If
i += 1
Next
Me.Close()
End Sub
''' <summary>
''' Abandon de l'inscription (rien n'est enregistré)
''' </summary>
''' <param name="sender"></param>
''' <param name="e"></param>
Private Sub Abandonner_Click(sender As Object, e As EventArgs) _
Handles Abandonner.Click
ChoixRegionMatieres.Close()
Inscription.Close()
Me.Close()
End Sub
''' <summary>
''' Enregistrement de l'inscription
''' </summary>
''' <param name="sender"></param>
''' <param name="e"></param>
Private Sub Enregistrer_Click(sender As Object, e As EventArgs) _
Handles Enregistrer.Click
Dim i As Integer = 0
Dim matieres(7) As String
For Each mat As Label In GroupBoxEcrit.Controls
matieres(i) = mat.Text
i += 1
Next
For Each mat As Label In GroupBoxOral.Controls
matieres(i) = mat.Text
i += 1
Next
matieres(i) = LabelFacultative.Text
ajout(LabelNom.Text, LabelPrenom.Text, LabelAdresse.Text, LabelCP.Text, LabelVille.Text, LabelAge.Text, LabelRegion.Text, matieres)
MsgBox("Le candidat numéro " & ListCandidats.Last().NumCandidat & " a bien été enregistré.")
ChoixRegionMatieres.Close()
Inscription.Close()
Me.Close()
End Sub
End Class