@ -81,6 +81,7 @@ int menuUtilisateurAffiche(void)
printf ( " 4 - Consultation du nombre de places pour un Département dans un IUT \n " ) ;
printf ( " 4 - Consultation du nombre de places pour un Département dans un IUT \n " ) ;
printf ( " 5 - Consultation des départements dans un IUT \n " ) ;
printf ( " 5 - Consultation des départements dans un IUT \n " ) ;
printf ( " 6 - Consultation de tout les IUT ayant un département choisi \n " ) ;
printf ( " 6 - Consultation de tout les IUT ayant un département choisi \n " ) ;
printf ( " 7 - Consultation de toute les informations des Département par IUT " ) ;
printf ( " \n \n 9 - Connexion mode Administrateur \n " ) ;
printf ( " \n \n 9 - Connexion mode Administrateur \n " ) ;
printf ( " \n \n 10 - Quitter \n " ) ;
printf ( " \n \n 10 - Quitter \n " ) ;
printf ( " #################################################### \n " ) ;
printf ( " #################################################### \n " ) ;
@ -159,11 +160,11 @@ int gestionMenuAdmin(void)
system ( " clear " ) ;
system ( " clear " ) ;
switch ( choix ) {
switch ( choix ) {
case 1 :
case 1 :
//fonction recherche et affichage iut dans une ville donnée
AffichageVille ( tiut , nbEle ) ;
clearpage ( ) ;
clearpage ( ) ;
break ;
break ;
case 2 :
case 2 :
//affichage de tout les département par iut
AffichageGlobalDepVille ( tiut , nbEle ) ;
clearpage ( ) ;
clearpage ( ) ;
break ;
break ;
case 3 :
case 3 :
@ -182,6 +183,10 @@ int gestionMenuAdmin(void)
//affichage de tout les iut ayant un département choisi
//affichage de tout les iut ayant un département choisi
clearpage ( ) ;
clearpage ( ) ;
break ;
break ;
case 7 :
//affichage de tout les iut ayant un département choisi
clearpage ( ) ;
break ;
case 9 :
case 9 :
return 0 ;
return 0 ;
case 10 :
case 10 :
@ -343,6 +348,18 @@ void AffichageDeptVille(VilleIUT **tiut, int nbEle)
}
}
}
}
void AffichageGlobalIUT ( VilleIUT * * tiut , int nbEle )
{
int pos = 0 ;
while ( pos < nbEle )
{
printf ( " Ville : %s \n " , tiut [ pos ] - > Ville ) ;
affichageListeDept ( tiut [ pos ] - > idDept ) ;
pos = pos + 1 ;
printf ( " \n " ) ;
}
}
void MiseAJourNbPlace ( VilleIUT * * tiut , int nbEle )
void MiseAJourNbPlace ( VilleIUT * * tiut , int nbEle )
{
{
ListeDept * aux ;
ListeDept * aux ;
@ -450,6 +467,45 @@ void suppressionDept(VilleIUT **tiut, int nbEle)
}
}
}
}
void modifChefDept ( VilleIUT * * tiut , int nbEle )
{
char code [ 30 ] ;
int trouve , pos , nbP ;
while ( 1 )
{
printf ( " Dans quel IUT voulez-vous modifier le chef de département : " ) ;
scanf ( " %s " , code ) ;
pos = rechVille ( tiut , nbEle , code , & trouve ) ;
if ( trouve = = 1 )
{
printf ( " Nom du Département : " ) ;
scanf ( " %s " , code ) ;
if ( recherche ( tiut [ pos ] - > idDept , code ) )
{
while ( tiut [ pos ] - > idDept - > suiv ! = NULL )
{
if ( strcmp ( tiut [ pos ] - > idDept - > departement , code ) = = 1 )
{
printf ( " Nom de l'ancien chef de département %s de %s : %s \n " , tiut [ pos ] - > idDept - > departement , tiut [ pos ] - > ville , tiut [ pos ] - > idDept - > resp ) ;
printf ( " nom du nouveau chef de département %s de %s : " , tiut [ pos ] - > idDept - > departement , tiut [ pos ] - > ville ) ;
fgets ( code , 30 , stdin ) ;
code [ strlen ( code ) - 1 ] = " \0 " ;
tiut [ pos ] - > idDept - > resp = code ;
printf ( " Chef de département : %s \n " , tiut [ pos ] - > idDept - > resp ) ;
}
}
}
if ( ! recherche ( tiut [ pos ] - > idDept , code ) )
printf ( " Ce Département n'existe pas dans l'IUT de %s \n " , tiut [ pos ] - > ville ) ;
if ( ! verifSelection ( ) )
break ;
}
}
}
void clearpage ( void )
void clearpage ( void )
{
{
char entre ;
char entre ;