You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123 lines
3.6 KiB

#include "SAE.h"
void menu(VilleIUT *tiut[], int *nbIUT, Etudiant *tetud[], int *nbCandidats)
{
int choix;
bool c = false;
while (c == false)
{
// system("clear");
printf("\n\nVeuillez choisir votre menu :\n");
printf("\t1 - Menu utilisateur\n");
printf("\t2 - Menu administrateur\n");
printf("\t9 - Quitter\n");
printf("\nEntrez votre choix :\n> ");
scanf("%d", &choix);
switch (choix)
{
case 1:
menuUtilisateur(tiut, nbIUT, tetud, nbCandidats);
break;
case 2:
menuAdministrateur(tiut, nbIUT, tetud, nbCandidats);
break;
case 9:
c = true;
return;
default:
printf("Option non reconnue. Veuillez recommencer.\n");
break;
}
}
}
void menuUtilisateur(VilleIUT *tiut[], int *nbIUT, Etudiant *tetud[], int *nbCandidats)
{
int choix;
bool c = false;
while (c == false)
{
// system("clear");
printf("\n\nMenu d'utilisateur : Que voulez-vous faire ?\n");
printf("\t1 - Voir les villes possédant un IUT\n");
printf("\t2 - Voir les départements dans chaque IUT\n");
printf("\t3 - Voir le nombre de places en première année\n");
printf("\t4 - Voir les IUT possédant un département particulier\n");
printf("\t9 - Quitter\n");
printf("\nEntrez votre choix :\n> ");
scanf("%d", &choix);
switch (choix)
{
case 1:
affichageVillesIUT(tiut, *nbIUT);
break;
case 2:
affichageDeptIUT(tiut, *nbIUT);
break;
case 3:
affichageNbP(tiut, *nbIUT);
break;
case 4:
affichageDeptParticulier(tiut, *nbIUT);
break;
case 9:
c = true;
return;
default:
printf("Option non reconnue. Veuillez recommencer.\n");
break;
}
}
}
void menuAdministrateur(VilleIUT *tiut[], int *nbIUT, Etudiant *tetud[], int *nbCandidats)
{
int choix;
bool c = false;
while (c == false)
{
// system("clear");
printf("\n\nMenu d'administrateur : Que voulez-vous faire ?\n");
printf("\t1 - Modifier le nombre de places dans un département\n");
printf("\t2 - Créer un département dans un IUT\n");
printf("\t3 - Supprimer un département d'un IUT\n");
printf("\t4 - Modifier le responsable d'un département\n");
printf("\t5 - Afficher les informations de tous les candidats\n");
printf("\t6 - Afficher les informations d'un seul candidat\n");
printf("\t7 - Lancer la phase de candidature\n");
printf("\t8 - Stopper la phase de candidature\n");
printf("\t9 - Quitter\n");
printf("\nEntrez votre choix :\n> ");
scanf("%d", &choix);
switch (choix)
{
case 1:
modificationNbPDept(tiut, *nbIUT);
break;
case 2:
creationDept(tiut, *nbIUT);
break;
case 3:
*nbIUT = suppressionDept(tiut, *nbIUT);
break;
case 4:
modificationRespDept(tiut, *nbIUT);
break;
case 5:
afficherCandidats(tetud, *nbCandidats);
break;
case 6:
afficherCandidat(tetud, *nbCandidats);
break;
case 7:
//
break;
case 9:
c = true;
return;
default:
printf("Option non reconnue. Veuillez recommencer.\n");
break;
}
}
}