|
|
@ -709,33 +709,35 @@ void afficherDepartementVille(DepartementVille* departementVille) {
|
|
|
|
void affichagedepresultat(Maillonchoix* carte, int *suite){
|
|
|
|
void affichagedepresultat(Maillonchoix* carte, int *suite){
|
|
|
|
if(carte==NULL){return;}
|
|
|
|
if(carte==NULL){return;}
|
|
|
|
if(carte->decision==1){
|
|
|
|
if(carte->decision==1){
|
|
|
|
printf("%s %s - admis \n", carte.Ville, carte.dep);
|
|
|
|
printf("%s %s - admis \n", carte->Ville, carte->dep);
|
|
|
|
*suite=1;
|
|
|
|
*suite=1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(carte->decision==-1){
|
|
|
|
if(carte->decision==-1){
|
|
|
|
printf("%s %s - refusé \n", carte.Ville, carte.dep);
|
|
|
|
printf("%s %s - refusé \n", carte->Ville, carte->dep);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(carte->decision==2){
|
|
|
|
if(carte->decision==2){
|
|
|
|
printf("%s %s - lsite d'attente \n", carte.Ville, carte.dep);
|
|
|
|
printf("%s %s - lsite d'attente \n", carte->Ville, carte->dep);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
affichagedepresultat(carte.suivant, suite);
|
|
|
|
affichagedepresultat(carte->suivant, suite);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// validation
|
|
|
|
// validation
|
|
|
|
|
|
|
|
|
|
|
|
void validation(char choixville[], char choixdep[], Maillonchoix* carte, int *ok, Maillonatt lplace, int nbplace, listetuinfo etu){
|
|
|
|
void validation(char choixville[], char choixdep[], Maillonchoix* carte, int *ok, Maillonatt lplace, int nbplace, listetuinfo etu){
|
|
|
|
if(carte==NULL){return;}
|
|
|
|
if(carte==NULL){return;}
|
|
|
|
if(strcmp(carte.Ville,choixville)==0){
|
|
|
|
if(strcmp(carte->Ville,choixville)==0){
|
|
|
|
if(strcmp(carte.dep,choixdep)==0){
|
|
|
|
if(strcmp(carte->dep,choixdep)==0){
|
|
|
|
if(carte.decision==1){
|
|
|
|
if(carte->decision==1){
|
|
|
|
carte.validation=1;
|
|
|
|
carte->validation=1;
|
|
|
|
*ok=1;
|
|
|
|
*ok=1;
|
|
|
|
}else{printf("vous netes pas admis dans cette iut\n");*ok=-1;return;}
|
|
|
|
}else{printf("vous netes pas admis dans cette iut\n");*ok=-1;return;}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
validation(choixville, choixdep, carte.suivant, ok);
|
|
|
|
validation(choixville, choixdep, carte->suivant, ok);
|
|
|
|
if(ok==1){
|
|
|
|
if(ok==1){
|
|
|
|
if(carte.decision==1){
|
|
|
|
if(carte->decision==1);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// MENU PARTIE 1
|
|
|
|
// MENU PARTIE 1
|
|
|
@ -744,7 +746,7 @@ void menuValidation(){}
|
|
|
|
|
|
|
|
|
|
|
|
void menuP1Utilisateur(listetuinfo etu, VilleIUT *tabVille[], int nb) {
|
|
|
|
void menuP1Utilisateur(listetuinfo etu, VilleIUT *tabVille[], int nb) {
|
|
|
|
int choixP1U;
|
|
|
|
int choixP1U;
|
|
|
|
|
|
|
|
int suite=0;
|
|
|
|
while (choixP1U >= 1 || choixP1U <= 4) {
|
|
|
|
while (choixP1U >= 1 || choixP1U <= 4) {
|
|
|
|
printf("\n");
|
|
|
|
printf("\n");
|
|
|
|
printf("---------------------- MENU UTILISATEUR -----------------------\n");
|
|
|
|
printf("---------------------- MENU UTILISATEUR -----------------------\n");
|
|
|
@ -781,11 +783,11 @@ void menuP1Utilisateur(listetuinfo etu, VilleIUT *tabVille[], int nb) {
|
|
|
|
afficheIUTdepParticulier(tabVille, nb);
|
|
|
|
afficheIUTdepParticulier(tabVille, nb);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 5:
|
|
|
|
case 5:
|
|
|
|
allajoutprocess(tbVille, etu, nb);
|
|
|
|
allajoutprocess(tabVille, etu, nb);
|
|
|
|
etu->nbchoix = etu->nbchoix+1;
|
|
|
|
etu->nbchoix = etu->nbchoix+1;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 6:
|
|
|
|
case 6:
|
|
|
|
modificationcarte(etu, tabville, nb);
|
|
|
|
modificationcarte(etu, tabVille, nb);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 7:
|
|
|
|
case 7:
|
|
|
|
suppcarte(etu);
|
|
|
|
suppcarte(etu);
|
|
|
@ -795,7 +797,6 @@ void menuP1Utilisateur(listetuinfo etu, VilleIUT *tabVille[], int nb) {
|
|
|
|
affichageetu(etu);
|
|
|
|
affichageetu(etu);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 9:
|
|
|
|
case 9:
|
|
|
|
int suite=0;
|
|
|
|
|
|
|
|
affichagedepresultat(etu->lcarte, &suite);
|
|
|
|
affichagedepresultat(etu->lcarte, &suite);
|
|
|
|
if(suite==1){
|
|
|
|
if(suite==1){
|
|
|
|
int reponse;
|
|
|
|
int reponse;
|
|
|
@ -869,7 +870,8 @@ void menuP1Administrateur(VilleIUT *tabVille[], int nb, listetuinfo *tetu[], int
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void menuPrincipal(VilleIUT *tabVille[], int nb, listetuinfo *tetu[], int nbEtu, DepartementVille* departementVille, char nomFich[]) {
|
|
|
|
void menuPrincipal(VilleIUT *tabVille[], int nb, listetuinfo *tetu[], int nbEtu, DepartementVille* departementVille, char nomFich[]) {
|
|
|
|
int choix = 0, ligneetu;
|
|
|
|
int choix = 0, ligneetu, num;
|
|
|
|
|
|
|
|
listetuinfo etu;
|
|
|
|
while (choix >= 1 || choix <= 4) {
|
|
|
|
while (choix >= 1 || choix <= 4) {
|
|
|
|
printf("\n");
|
|
|
|
printf("\n");
|
|
|
|
printf("---------------------- MENU PRINCIPAL -----------------------\n");
|
|
|
|
printf("---------------------- MENU PRINCIPAL -----------------------\n");
|
|
|
@ -888,7 +890,8 @@ void menuPrincipal(VilleIUT *tabVille[], int nb, listetuinfo *tetu[], int nbEtu,
|
|
|
|
printf("| - quel est votre numéro de candidat ?\n| =>");
|
|
|
|
printf("| - quel est votre numéro de candidat ?\n| =>");
|
|
|
|
scanf("%d", &num);
|
|
|
|
scanf("%d", &num);
|
|
|
|
ligneetu = recherdicoetu(tetu, nbEtu, num);
|
|
|
|
ligneetu = recherdicoetu(tetu, nbEtu, num);
|
|
|
|
menuP1Utilisateur(tetu[ligneetu], tabVille, nb);
|
|
|
|
etu = tetu[ligneetu];
|
|
|
|
|
|
|
|
menuP1Utilisateur(etu, tabVille, nb);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
case 2:
|
|
|
|
menuP1Administrateur(tabVille, nb, tetu, nbEtu, departementVille);
|
|
|
|
menuP1Administrateur(tabVille, nb, tetu, nbEtu, departementVille);
|
|
|
@ -896,7 +899,7 @@ void menuPrincipal(VilleIUT *tabVille[], int nb, listetuinfo *tetu[], int nbEtu,
|
|
|
|
case 9:
|
|
|
|
case 9:
|
|
|
|
sauvegarde(tabVille, nb);
|
|
|
|
sauvegarde(tabVille, nb);
|
|
|
|
//sauvegardeTabRespFichier(tabVille, nb, tabResp);
|
|
|
|
//sauvegardeTabRespFichier(tabVille, nb, tabResp);
|
|
|
|
enregistrementetudiants(nomFich, tetu, nbEtu)
|
|
|
|
enregistrementetudiants(nomFich, tetu, nbEtu);
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|