|
|
@ -3,6 +3,34 @@
|
|
|
|
#include <errno.h>
|
|
|
|
#include <errno.h>
|
|
|
|
#include "saeP1.h"
|
|
|
|
#include "saeP1.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void MenuUser(VilleIUT* lvIUT[],int tlogi)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
int intUserEntry=0;
|
|
|
|
|
|
|
|
printf("#--------------------------------------------------------------------#\n");
|
|
|
|
|
|
|
|
printf("| |\n");
|
|
|
|
|
|
|
|
printf("| SAE S1.02 |\n");
|
|
|
|
|
|
|
|
printf("| |\n");
|
|
|
|
|
|
|
|
printf("#--------------------------------------------------------------------#\n\n");
|
|
|
|
|
|
|
|
printf("Codes correspondant aux différentes actions :\n\n");
|
|
|
|
|
|
|
|
printf("1 : Rechercher les villes possèdant un IUT.\n");
|
|
|
|
|
|
|
|
printf("2 : Afficher tout les départements de chaques IUT\n");
|
|
|
|
|
|
|
|
printf("3 : Afficher le nombre de place en première année d'un IUT précis avec un département précis\n");
|
|
|
|
|
|
|
|
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(VilleIUT* lvIUT[], int tlogi);
|
|
|
|
|
|
|
|
if (intUserEntry==2) DepEachIUT(VilleIUT* lvIUT[], int tlogi);
|
|
|
|
|
|
|
|
if (intUserEntry==3) SearchPlaceFromDepInIUT(VilleIUT* lvIUT[],int tlogi);
|
|
|
|
|
|
|
|
if (intUserEntry==4) SearchIUTFromDep(VilleIUT* lvIUT[],int tlogi);
|
|
|
|
|
|
|
|
if (intUserEntry==9) printf("Sortie en cours.\n");
|
|
|
|
|
|
|
|
else printf("Entrée innexacte. Veuillez réessayer");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void SearchCityWithIUT(VilleIUT* lvIUT[], int tlogi)
|
|
|
|
void SearchCityWithIUT(VilleIUT* lvIUT[], int tlogi)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
for (int i=0;i<tlogi;++i) printf("%s",lvIUT[i]->Ville);
|
|
|
|
for (int i=0;i<tlogi;++i) printf("%s",lvIUT[i]->Ville);
|
|
|
@ -12,8 +40,9 @@ void DepEachIUT(VilleIUT* lvIUT[], int tlogi)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
for (int i=0;i<tlogi;++i)
|
|
|
|
for (int i=0;i<tlogi;++i)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
printf("%s :",lvIUT[i]->Ville);
|
|
|
|
MaillonDep* MaillonAct=lvIUT[i]->ldept;
|
|
|
|
MaillonDep* MaillonAct=lvIUT[i]->ldept;
|
|
|
|
while (MaillonAct!=NULL) printf("%s",MaillonAct->departement);
|
|
|
|
while (MaillonAct!=NULL) printf("\t-%s\n",MaillonAct->departement);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -69,6 +98,7 @@ void SearchIUTFromDep(VilleIUT* lvIUT[],int tlogi)
|
|
|
|
if(MaillonAct->departement==sDep) printf("%s",lvIUT[i]->Ville);
|
|
|
|
if(MaillonAct->departement==sDep) printf("%s",lvIUT[i]->Ville);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void menuAdmin(void){
|
|
|
|
void menuAdmin(void){
|
|
|
|
printf("#--------------------------------------------------------------------#\n");
|
|
|
|
printf("#--------------------------------------------------------------------#\n");
|
|
|
|
printf("| |\n");
|
|
|
|
printf("| |\n");
|
|
|
|