From 705f823e65798ecf57474f07e1a81bc9221b0cdc Mon Sep 17 00:00:00 2001 From: "antoine.perederii" Date: Thu, 12 Jan 2023 23:56:45 +0100 Subject: [PATCH] ajout des menu affichages --- SAE.h | 3 +- dptInfos.txt | 23 ++++++++++++ menus.c | 104 ++++++++++++++++++++++++++++++++++++++++++--------- partie_3.c | 1 - partie_4.c | 2 + structures.h | 1 - 6 files changed, 114 insertions(+), 20 deletions(-) diff --git a/SAE.h b/SAE.h index f8f7737..a24fe48 100755 --- a/SAE.h +++ b/SAE.h @@ -11,7 +11,8 @@ void menu(VilleIUT *tiut[], int *nbIUT, Etudiant *tetud[], int *nbCandidats, boo void menuAdministrateur(VilleIUT *tiut[], int *nbIUT, Etudiant *tetud[], int *nbCandidats, bool *phaseCandidatures, bool *phaseTraitement); void menuUtilisateur(VilleIUT *tiut[], int *nbIUT, Etudiant *tetud[], int *nbCandidats); void menuCandidat(VilleIUT *tiut[], int *nbIUT, Etudiant *tetud[], int *nbCandidats); -void menuResponsable(Etudiant *tetud[], int *nbCandidats, VilleIUT *tiut[], int *nbIUT); +void menuResponsable(Etudiant *tetud[], int nbCandidats, VilleIUT *tiut[], int *nbIUT); +void menuAffichage(Etudiant *tetud[], int nbCandidats, VilleIUT *tiut[], int *nbIUT); /* Partie 1 */ /* Fichier */ diff --git a/dptInfos.txt b/dptInfos.txt index e69de29..71c5532 100644 --- a/dptInfos.txt +++ b/dptInfos.txt @@ -0,0 +1,23 @@ +2 +1 +Dufour +Albert +19.00 4.00 16.00 3.00 +1 +Clermont-Ferrand +Informatique +2 +0 +2 +Michel +Jacques +7.00 6.00 15.00 20.00 +2 +Clermont-Ferrand +Informatique +0 +0 +Grenoble +Informatique +0 +0 diff --git a/menus.c b/menus.c index 798f2d3..086005e 100755 --- a/menus.c +++ b/menus.c @@ -41,7 +41,7 @@ void menu(VilleIUT *tiut[], int *nbIUT, Etudiant *tetud[], int *nbCandidats, boo menuCandidat(tiut, nbIUT, tetud, nbCandidats); break; case 4: - menuResponsable(tetud, nbCandidats, tiut, nbIUT); + menuResponsable(tetud, *nbCandidats, tiut, nbIUT); break; case 9: c = true; @@ -190,11 +190,12 @@ void menuCandidat(VilleIUT *tiut[], int *nbIUT, Etudiant *tetud[], int *nbCandid } } -void menuResponsable(Etudiant *tetud[], int *nbCandidats, VilleIUT *tiut[], int *nbIUT) +void menuResponsable(Etudiant *tetud[], int nbCandidats, VilleIUT *tiut[], int *nbIUT) { int choix; bool c = false; //! Ajouter la moyenne et nommer deux liste pour admis et en attente + while (c == false) { // system("clear"); @@ -202,22 +203,23 @@ void menuResponsable(Etudiant *tetud[], int *nbCandidats, VilleIUT *tiut[], int int nbCandidatsDept; char respVille[30], respDept[30]; deptResp(tiut, *nbIUT, respVille, respDept); - nbCandidatsDept = chargementRespDept(tetud, *nbCandidats, respVille, respDept, tetudResp); + nbCandidatsDept = chargementRespDept(tetud, nbCandidats, respVille, respDept, tetudResp); printf("\n\nMenu des Responsable de Departement : Que voulez-vous faire ?\n"); printf("\t1 - Lancer les admissions\n"); - printf("\t2 - Afficher les candidats dans mon département\n"); - /*printf("\t1 - Modifier le nombre de places dans un département\n"); - printf("\t2 - Afficher les candidats admis du departement\n"); - printf("\t3 - Afficher les candidats refusés du departement\n"); - printf("\t4 - Afficher les candidats en attente du departement\n"); - printf("\t5 - Afficher les informations de tous les candidats du departement\n"); - printf("\t6 - Afficher les informations d'un seul candidat du departement\n"); - printf("\t7 - Afficher le statue d'un candidats du departement\n"); - printf("\t8 - Afficher le nombre de candidats admis du departement\n"); - printf("\t9 - Afficher le nombre de candidats refusés du departement\n"); - printf("\t10- Afficher le nombre de candidats en attente du departement\n"); - printf("\t11- Modifier la note minimal d'admission du departement\n"); - printf("\t12- Modifier la note exellente d'admission du departement\n");*/ + printf("\t2 - Affichages\n"); + printf("\t3 - Modifier le nombre de places dans un département\n"); + printf("\t4 - Modifier la note minimal d'admission du departement"); + printf("\t5 - Modifier la note exellente d'admission du departement"); + // printf("\t2 - Afficher les candidats dans mon département\n"); + // printf("\t3 - Afficher les candidats admis du departement\n"); + // printf("\t4 - Afficher les candidats refusés du departement\n"); + // printf("\t5 - Afficher les candidats en attente du departement\n"); + // printf("\t6 - Afficher les informations de tous les candidats du departement\n"); + // printf("\t7 - Afficher les informations d'un seul candidat du departement\n"); + // printf("\t8 - Afficher le statue d'un candidats du departement\n"); + // printf("\t9 - Afficher le nombre de candidats admis du departement\n"); + // printf("\t10- Afficher le nombre de candidats refusés du departement\n"); + // printf("\t11- Afficher le nombre de candidats en attente du departement\n"); printf("\t9 - Quitter\n"); printf("\nEntrez votre choix :\n> "); scanf("%d%*c", &choix); @@ -227,7 +229,7 @@ void menuResponsable(Etudiant *tetud[], int *nbCandidats, VilleIUT *tiut[], int // lancerAdmission(tetudResp, *nbCandidats); break; case 2: - afficherCandidats(tetudResp, nbCandidatsDept); + menuAffichage(tetud, nbCandidats, tiut, nbIUT); break; /*case 1: // modifNbPlaces(nbPlaces) @@ -273,4 +275,72 @@ void menuResponsable(Etudiant *tetud[], int *nbCandidats, VilleIUT *tiut[], int break; } } +} + +void menuAffichage(Etudiant *tetud[], int nbCandidats, VilleIUT *tiut[], int *nbIUT) +{ + int choix; + bool c = false; + while (c == false) + { + // system("clear"); + Etudiant *tetudResp[100]; + int nbCandidatsDept; + char respVille[30], respDept[30]; + deptResp(tiut, *nbIUT, respVille, respDept); + nbCandidatsDept = chargementRespDept(tetud, nbCandidats, respVille, respDept, tetudResp); + printf("\n\nMenu des Affichages Responsable de Departement : Que voulez-vous faire ?\n"); + printf("\t1 - Afficher les candidats dans mon département\n"); + printf("\t2 - Afficher les candidats admis du departement\n"); + printf("\t3 - Afficher les candidats refusés du departement\n"); + printf("\t4 - Afficher les candidats en attente du departement\n"); + printf("\t5 - Afficher les informations de tous les candidats du departement\n"); + printf("\t6 - Afficher les informations d'un seul candidat du departement\n"); + printf("\t7 - Afficher le statue d'un candidats du departement\n"); + // ! printf("\t8 - Afficher le nombre de candidats admis du departement\n"); + // ! printf("\t9 - Afficher le nombre de candidats refusés du departement\n"); Les mettres a la fin de chaque affichage des autres + // ! printf("\t10- Afficher le nombre de candidats en attente du departement\n"); + printf("\t9 - Quitter\n"); + printf("\nEntrez votre choix :\n> "); + scanf("%d%*c", &choix); + switch (choix) + { + case 1: + // lancerAdmission(tetudResp, *nbCandidats); + break; + case 2: + afficherCandidatsAdmis(tetud, nbCandidats); + break; + case 3: + afficherCandidatsRefuses(tetud, nbCandidats); + break; + case 4: + afficherCandidatsAttente(tetud, nbCandidats); + break; + case 5: + afficherCandidats(tetud, nbCandidats); + break; + case 6: + afficherCandidat(tetud, nbCandidats); + break; + case 7: + statueCandidat(tetud, nbCandidats); + break; + case 8: + nbCandidatsAdmis(tetud, nbCandidats); + break; + case 10: + nbCandidatsRefuses(tetud, nbCandidats); + break; + case 11: + nbCandidatsAttente(tetud, nbCandidats); + break; + case 9: + c = true; + return; + default: + printf("Option non reconnue. Veuillez recommencer.\n"); + break; + } + } } \ No newline at end of file diff --git a/partie_3.c b/partie_3.c index dfe0360..cbdccb8 100644 --- a/partie_3.c +++ b/partie_3.c @@ -19,7 +19,6 @@ void deptResp(VilleIUT *tiut[], int nbVilles, char respVille[], char respIUT[]) } //! Rechercher si existe } - } int chargementRespDept(Etudiant *tetud[], int nbCand, char respVille[], char respIUT[], Etudiant *tetudResp[]) diff --git a/partie_4.c b/partie_4.c index 575d753..44d974b 100644 --- a/partie_4.c +++ b/partie_4.c @@ -1 +1,3 @@ #include "SAE.h" + +void validationAdmission() \ No newline at end of file diff --git a/structures.h b/structures.h index 68a37a3..6ea62c3 100644 --- a/structures.h +++ b/structures.h @@ -51,7 +51,6 @@ enum moy }; -// ? Comment on fait les enums en C ? /* ListeDept */ ListeDept listenouv(void);