afficherDeptIutDonne, modification de choix pour en faire une liste

master
loris OBRY 2 years ago
parent 9daa5b8441
commit 027f6a6479

@ -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[]);

@ -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,10 +506,21 @@ int modifieChefDept(VilleIut *tVilleIut[], int nbVilles, char ville[], char nomD
return 0;
}
void afficherDeptIutDonne(VilelIut **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);
}
/**
@ -873,6 +884,4 @@ ListeCandidats insertionTeteCand( ListeCandidats nvL, ListeCandidats l )
free( l );
return nvL;
}
}
Loading…
Cancel
Save