129 lines
4.2 KiB
VB.net
129 lines
4.2 KiB
VB.net
Public Class FrmBilanMat
|
|
|
|
Private Sub CmdAnnul_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CmdAnnul.Click
|
|
TmrLst.Stop()
|
|
If Boule Then
|
|
End
|
|
Else
|
|
Me.Close()
|
|
FrmAccueil.Show()
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub CmdBI_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CmdBI.Click
|
|
Me.Close()
|
|
FrmBilanID.Show()
|
|
End Sub
|
|
Private Sub CmdBS_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CmdBS.Click
|
|
Me.Close()
|
|
FrmBilanSupp.Show()
|
|
End Sub
|
|
|
|
Private Sub FrmBilanMat_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
|
|
Dim i As Integer
|
|
Me.Tag = "Bilan des matières"
|
|
Me.Text = Me.Tag & " |" & TimeOfDay
|
|
For i = 0 To UBound(tme)
|
|
CboMat.Items.Add(tme(i))
|
|
Next
|
|
TmrLst.Start()
|
|
End Sub
|
|
|
|
Private Sub CboMat_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CboMat.SelectedIndexChanged
|
|
|
|
Dim NoMat, NbE, NbO, NbF As Integer
|
|
Dim i, j As Integer
|
|
Dim ok As Boolean = False
|
|
LstEtat.Items.Clear()
|
|
LstRegion.Items.Clear()
|
|
LstNP.Items.Clear()
|
|
NoMat = CboMat.SelectedIndex
|
|
NbE = 0
|
|
NbO = 0
|
|
NbF = 0
|
|
For i = 2 To ClefMAX - 1
|
|
|
|
ok = False
|
|
FileGet(nf, cddts, i)
|
|
If Tindex(i - 2).Suppr = False Then
|
|
|
|
For j = 0 To UbdE
|
|
If cddts.Ecrit(j) = NoMat Then
|
|
LstEtat.Items.Add("Ecrit")
|
|
NbE += 1
|
|
'ok = True
|
|
'STTMat = 1
|
|
GoTo trouve
|
|
End If
|
|
Next
|
|
For j = 0 To UbdO
|
|
If cddts.Oral(j) = NoMat Then
|
|
LstEtat.Items.Add("Oral")
|
|
NbO += 1
|
|
'ok = True
|
|
'STTMat = 2
|
|
GoTo trouve
|
|
End If
|
|
Next
|
|
If cddts.Fac = NoMat Then
|
|
LstEtat.Items.Add("Facultatif")
|
|
NbF += 1
|
|
'STTMat = 3
|
|
ok = True
|
|
End If
|
|
|
|
|
|
If ok Then
|
|
trouve:
|
|
LstRegion.Items.Add(treg(cddts.Region))
|
|
LstNP.Items.Add(cddts.Nom & ", " & cddts.Prenom)
|
|
|
|
'k = LstRNP.Items.Add(cddts.Region & " " & cddts.Nom & " " & cddts.Prenom)
|
|
'LstRegion.Items.Insert(k, treg(cddts.Region))
|
|
'LstNP.Items.Insert(k, cddts.Nom & ", " & cddts.Prenom)
|
|
|
|
'If STTMat = 1 Then LstEtat.Items.Insert(k, "Ecrit")
|
|
'If STTMat = 2 Then LstEtat.Items.Insert(k, "Oral")
|
|
'If STTMat = 3 Then LstEtat.Items.Insert(k, "Facultatif")
|
|
End If
|
|
End If
|
|
|
|
REM Affiche les nombre de candidats :
|
|
LblCE.Text = NbE & " candidats à l'écrit."
|
|
LbLCO.Text = NbO & " candidats à l'oral."
|
|
LblCF.Text = NbF & " candidats au facultatif."
|
|
|
|
Next
|
|
End Sub
|
|
|
|
|
|
Dim L1, L2 As ListBox
|
|
Dim k As Integer
|
|
|
|
Private Sub TmrLst_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TmrLst.Tick
|
|
|
|
For Each L1 In PNL.Controls
|
|
If L1.TopIndex = L1.Tag Then Continue For
|
|
k = L1.TopIndex
|
|
L1.Tag = k
|
|
If L1.Name = "LstNom" Then Call tiret(k)
|
|
For Each L2 In PNL.Controls
|
|
If L1 Is L2 Then Continue For
|
|
L2.TopIndex = k
|
|
L2.Tag = k
|
|
If L2.Name = "Lstnom" Then Call tiret(k)
|
|
Next
|
|
Exit For
|
|
Next
|
|
End Sub
|
|
|
|
Sub tiret(ByVal k As Integer)
|
|
If LstRegion.Items(k) = " -" Then
|
|
LstRegion.Items(k) = LstRegion.Items(k - 1)
|
|
LstRegion.TopIndex = k
|
|
ElseIf LstRegion.Items(k) = LstRegion.Items(k + 1) Then
|
|
LstRegion.Items(k + 1) = " -"
|
|
LstRegion.TopIndex = k
|
|
End If
|
|
End Sub
|
|
End Class |