|
|
|
@ -9,6 +9,9 @@
|
|
|
|
|
//Partie Consultant.
|
|
|
|
|
|
|
|
|
|
void MenuUser(VilleIUT* lvIUT[],int tlogi)
|
|
|
|
|
{
|
|
|
|
|
int quit=0;
|
|
|
|
|
while(!quit)
|
|
|
|
|
{
|
|
|
|
|
int intUserEntry=0;
|
|
|
|
|
printf("#--------------------------------------------------------------------#\n");
|
|
|
|
@ -23,16 +26,30 @@ void MenuUser(VilleIUT* lvIUT[],int tlogi)
|
|
|
|
|
printf("4 : Rechercher les IUTs possèdant un département précis.\n");
|
|
|
|
|
printf("9 : Revenir à l'écran de sélection du profil.\n\n");
|
|
|
|
|
printf("#--------------------------------------------------------------------#\n\n");
|
|
|
|
|
while(intUserEntry!=9)
|
|
|
|
|
{
|
|
|
|
|
printf("Choisissez l'action que vous voulez exécuter : ");
|
|
|
|
|
if (!(scanf("%d",intUserEntry)))printf("Entrée innexacte. Veuillez réessayer");
|
|
|
|
|
if (intUserEntry==1) SearchCityWithIUT(lvIUT,tlogi);
|
|
|
|
|
if (intUserEntry==2) DepEachIUT(lvIUT,tlogi);
|
|
|
|
|
if (intUserEntry==3) SearchPlaceFromDepInIUT(lvIUT,tlogi);
|
|
|
|
|
if (intUserEntry==4) SearchIUTFromDep(lvIUT,tlogi);
|
|
|
|
|
if (intUserEntry==9) printf("Sortie en cours.\n");
|
|
|
|
|
else printf("Entrée innexacte. Veuillez réessayer");
|
|
|
|
|
int act;
|
|
|
|
|
scanf("%d",&act);
|
|
|
|
|
switch(act){
|
|
|
|
|
case 1:
|
|
|
|
|
SearchCityWithIUT(lvIUT,tlogi);
|
|
|
|
|
reset();
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
DepEachIUT(lvIUT,tlogi);
|
|
|
|
|
reset();
|
|
|
|
|
break;
|
|
|
|
|
case 3:
|
|
|
|
|
SearchPlaceFromDepInIUT(lvIUT,tlogi);
|
|
|
|
|
reset();
|
|
|
|
|
break;
|
|
|
|
|
case 4:
|
|
|
|
|
SearchIUTFromDep(lvIUT,tlogi);
|
|
|
|
|
reset();
|
|
|
|
|
break;
|
|
|
|
|
case 9:
|
|
|
|
|
quit=1;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -167,7 +184,7 @@ void modifPlaces(VilleIUT* tiut[],int tlogi){
|
|
|
|
|
printf("\n\nEntrez le département à modifier:");
|
|
|
|
|
char dep[31];
|
|
|
|
|
scanf("%*c%s",&dep);
|
|
|
|
|
if(!existeDep(tiut->ldept,dep)){
|
|
|
|
|
if(!existeDep(v->ldept,dep)){
|
|
|
|
|
fprintf(stderr,"\nDépartement non existant !\n");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
@ -228,7 +245,7 @@ void supprimerDep(VilleIUT* tiut[],int tlogi){
|
|
|
|
|
printf("\n\nEntrez le département à supprimer:");
|
|
|
|
|
char dep[31];
|
|
|
|
|
scanf("%*c%s",&dep);
|
|
|
|
|
if(!existeDep(tiut->ldept,dep)){
|
|
|
|
|
if(!existeDep(v->ldept,dep)){
|
|
|
|
|
fprintf(stderr,"\nDépartement non existant !\n");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
@ -268,7 +285,7 @@ void modifNomResponsable(VilleIUT* tiut[],int tlogi){
|
|
|
|
|
printf("\n\nEntrez le département à modifier:");
|
|
|
|
|
char dep[31];
|
|
|
|
|
scanf("%*c%s",&dep);
|
|
|
|
|
if(!existeDep(tiut->ldept,dep)){
|
|
|
|
|
if(!existeDep(v->ldept,dep)){
|
|
|
|
|
fprintf(stderr,"\nDépartement non existant !\n");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|