Public Class FrmInput3 REM INITIALISE Private Sub FrmInput3_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If Boule = False Then Me.Tag = "Assistant création de candidature (4/4)" End If If Boule = True Then Me.Tag = "Assistant édition de candidature (4/4)" Call DetectModif() CmdNext.Text = "&Mettre à jour" CmdDelet.Visible = True LblID.Visible = True LblID.Text = "Id : " & Format(Selectedclef, "00") REM met d'ID en cas d'édition. End If Me.Text = Me.Tag & " | " & Horaire End Sub REM INITIALISE Private Sub FrmInput3_VisibleChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.VisibleChanged REM Reprend et met en forme des informations depuis la feuille input1. LblNP.Text = FrmInput1.TxtNom.Text & " " & FrmInput1.TxtPrenom.Text LblAdrss.Text = FrmInput1.TxtAdrss.Text LblCPV.Text = FrmInput1.TxtCP.Text & ", " & FrmInput1.TxtVille.Text LblAge.Text = FrmInput1.TxtMois.Text & "/" & FrmInput1.TxtAns.Text & " (" & FrmInput1.LblAns.Text & ")" REM Reprend et met en forme tous les choix des épreuves depuis la feuille input2. Dim CB As CheckBox LBexam.Items.Clear() LBexam.Items.Add("Centre :") LBexam.Items.Add(" " & FrmInput2.CboRegion.SelectedItem) LBexam.Items.Add(" ") LBexam.Items.Add("Ecrits :") For Each CB In FrmInput2.GBEcrit.Controls If CB.Checked Then LBexam.Items.Add(" " & CB.Text) End If Next LBexam.Items.Add(" ") LBexam.Items.Add("Oraux :") For Each CB In FrmInput2.GBOral.Controls If CB.Checked Then LBexam.Items.Add(" " & CB.Text) End If Next LBexam.Items.Add(" ") If FrmInput2.RBYes.Checked Then LBexam.Items.Add("Examen facultatif :") LBexam.Items.Add(" " & FrmInput2.CboFac.SelectedItem) LBexam.Items.Add(" ") End If End Sub REM ANNULER Private Sub CmdAnnul_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CmdAnnul.Click FrmEdit.Close() FrmNouv.Close() FrmInput1.Close() FrmInput2.Close() Me.Close() FrmAccueil.Show() End Sub REM SUIVANT : ENREGISTRER / METTRE A JOUR Private Sub CmdNext_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CmdNext.Click If Boule = False Then Call InscBdD() MsgBox("Votre inscription a été effectuée avec succès." & vbCrLf & "Votre numéro de candidature est : " & ClefMAX - 1 & vbCrLf & "Gardez le précieusement.", MsgBoxStyle.Information, "Enregistrement réussi") FrmInput1.Close() FrmInput2.Close() Me.Close() FrmAccueil.Show() REM retour a l'accueil End If If Boule = True Then Call MaJBdD() MsgBox("Votre inscription a été mise à jours avec succès.", MsgBoxStyle.Information, "Mise à jour réussie.") FrmEdit.Close() FrmInput1.Close() FrmInput2.Close() Me.Close() FrmAccueil.Show() REM retour a l'accueil End If End Sub 'REM PRECEDENT 'Private Sub CmdPre_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) ' REM retour au précédant ' Me.Hide() ' FrmInput2.Show() 'End Sub REM SUPPRIMER LE CANDIDAT Private Sub CmdDelet_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CmdDelet.Click Dim state As Integer state = MsgBox("Voulez-vous réelement supprimer le candidat n° " & Format(Selectedclef, "00") & " ?", MsgBoxStyle.Question & MsgBoxStyle.YesNo, "Confirmation de la supression") If state = vbYes Then Call SupprBdD() Call CmdAnnul_Click(sender, e) End If End Sub End Class