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.
130 lines
3.3 KiB
130 lines
3.3 KiB
#include "SAE.h"
|
|
|
|
void choixMenu(void)
|
|
{
|
|
int choix;
|
|
bool c = false;
|
|
while (c == false)
|
|
{
|
|
system("clear");
|
|
printf("Veuillez 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:
|
|
c = true;
|
|
menuUtilisateur();
|
|
break;
|
|
case 2:
|
|
c = true;
|
|
menuAdministrateur();
|
|
break;
|
|
case 9:
|
|
c = true;
|
|
break;
|
|
default:
|
|
printf("Option non reconnue. Veuillez recommencer.\n");
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
void menuUtilisateur(void)
|
|
{
|
|
int choix;
|
|
bool c = false;
|
|
while (c == false)
|
|
{
|
|
system("clear");
|
|
printf("Menu 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:
|
|
c = true;
|
|
// affichageVillesIUT(VilleIUT *tiut[], int nb);
|
|
break;
|
|
case 2:
|
|
c = true;
|
|
// affichageDeptIUT(VilleIUT *tiut[], int nb);
|
|
break;
|
|
case 3:
|
|
c = true;
|
|
//
|
|
break;
|
|
case 4:
|
|
c = true;
|
|
//
|
|
break;
|
|
case 9:
|
|
c = true;
|
|
return choixMenu();
|
|
default:
|
|
printf("Option non reconnue. Veuillez recommencer.\n");
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
void menuAdministrateur(void)
|
|
{
|
|
int choix;
|
|
bool c = false;
|
|
while (c == false)
|
|
{
|
|
system("clear");
|
|
printf("Menu 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 - Lancer la phase de candidature\n");
|
|
printf("\t6 - Stopper la phase de candidature\n");
|
|
printf("\t9 - Quitter\n");
|
|
printf("\nEntrez votre choix :\n> ");
|
|
scanf("%d", &choix);
|
|
switch (choix)
|
|
{
|
|
case 1:
|
|
c = true;
|
|
// modificationNbPDept(tiut, nb);
|
|
break;
|
|
case 2:
|
|
c = true;
|
|
// creationDept(tiut[], nb);
|
|
break;
|
|
case 3:
|
|
c = true;
|
|
// suppressionDept(tiut[], nb);
|
|
break;
|
|
case 4:
|
|
c = true;
|
|
// modificationRespDept(tiut, nb);
|
|
break;
|
|
case 5:
|
|
c = true;
|
|
//
|
|
break;
|
|
case 6:
|
|
c = true;
|
|
//
|
|
break;
|
|
case 9:
|
|
return choixMenu();
|
|
break;
|
|
default:
|
|
printf("Option non reconnue. Veuillez recommencer.\n");
|
|
break;
|
|
}
|
|
}
|
|
} |