Candidate-7-Pro/FrmInput3.vb
2021-09-10 01:15:10 +02:00

93 lines
3.7 KiB
VB.net

Public Class FrmInput3
Private Sub CmdAnnul_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CmdAnnul.Click
Me.Close()
FrmNouv.Close()
FrmEdit.Close()
FrmInput1.Close()
FrmInput2.Close()
FrmAccueil.Show()
End Sub
Private Sub CmdNext_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CmdNext.Click
If FrmAccueil.Boule = False Then
Call FrmAccueil.InscBdD()
MsgBox("Votre inscription a été effectuée avec succès." & vbCrLf & "Votre numéro de candidature est : " & FrmAccueil.NbID - 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 FrmAccueil.Boule = True Then
Call FrmAccueil.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
Private Sub CmdPre_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CmdPre.Click
REM retour au précédant
Me.Hide()
FrmInput2.Show()
End Sub
Private Sub FrmInput3_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If FrmAccueil.Boule = False Then
Me.Tag = "Assistant création de candidature (4/4)"
End If
If FrmAccueil.Boule = True Then
Me.Tag = Me.Text = "Assistant édition de candidature (4/4)"
CmdNext.Text = "&Mettre à jour"
CmdDelet.Visible = True
CmdPre.Visible = True
LblID.Visible = False
LblID.Text = "Id : " & FrmEdit.SelectedID REM met d'ID en cas d'édition.
End If
End Sub
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.SBHAge.Value & " ans"
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("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
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° " & FrmEdit.SelectedID & " ?", MsgBoxStyle.Question & MsgBoxStyle.YesNo, "Confirmation de la supression")
If state = vbYes Then
Call FrmAccueil.SupprBdD()
Call CmdAnnul_Click(sender, e)
End If
End Sub
End Class