diff --git a/header/sae.h b/header/sae.h index 945b049..a11c0c7 100644 --- a/header/sae.h +++ b/header/sae.h @@ -26,13 +26,15 @@ void testColor(void); */ //Proposition structure de candidat & choix pour la partie 2 ( jean ) : -typedef struct +typedef struct choix { char ville[50]; char departement[50]; int decisionDepartement; int validationCandidat; -}Choix; + struct choix *suiv; + +}Choix, *lChoix; typedef struct { @@ -122,6 +124,7 @@ void seConnecterTest(void); int modifiePlacesDept(VilleIut **villeIut, int nbVilles, char *ville, char *nomDept, int nbP); int modifieRespDept(VilleIut *tVilleIut[], int nbVilles, char ville[], char nomDept[], char nvNomResp[]); +void afficherDeptIutDonne(VilleIut **villeIut, int nbVille); void afficheIUTDept(VilleIut* *villeIut, int nbVilles, char *nomDept); void afficheVillesIUT(VilleIut **villeIut, int nbVilles); void afficheNbPlacesDep(VilleIut *tVilleIut[], int nbVilles, char nomDept[]); diff --git a/source/sae.c b/source/sae.c index 3e284cd..6839fd2 100644 --- a/source/sae.c +++ b/source/sae.c @@ -158,7 +158,7 @@ void menuCandidat(Log * tLog, int nbLog, VilleIut *tIut[], int nbVilles) switch(choix) { case 1: - //afficher une candidature + //affiche les candidatures break; case 2: //Creer une candidature @@ -473,7 +473,7 @@ int modifiePlacesDept(VilleIut **villeIut, int nbVilles, char *ville, char *nomD * * @return 1 si le nom du responsable a été trouvé et modifié, 0 sinon */ -int modifieChefDept(VilleIut *tVilleIut[], int nbVilles, char ville[], char nomDept[], char nvNomResp[]) +int modifieRespDept(VilleIut *tVilleIut[], int nbVilles, char ville[], char nomDept[], char nvNomResp[]) { // Recherche de la ville et du département int i; @@ -506,11 +506,22 @@ int modifieChefDept(VilleIut *tVilleIut[], int nbVilles, char ville[], char nomD return 0; } -/*void afficherDeptIutDonne(VilleIut **villeIut, int nbVille) +void afficherDeptIutDonne(VilleIut **villeIut, int nbVille) { - afficheVillesIUT(); - printf() -}*/ + int res; + char *nom; + + afficheVillesIUT(villeIut, nbVille); + printf("Veuillez saisir le nom de l'iut que vous voulez afficher.\n"); + scanf("%s", nom); + res = existeIut(villeiut, nbVille, nom); + if (res == -1) + { + printf("Cet IUT n'existe pas\n"); + return ; + } + afficherListe(villeiut[res]->lDept); +} /** * @brief Affiche les IUT possédant un département spécifique.