Début P4 et fix P1 et 3

master
Jade VAN BRABANDT 3 years ago
parent 691e0ca8fc
commit 1103956393

@ -59,6 +59,10 @@ void menuUser(VilleIUT* lvIUT[],int tlogi, int CandidOpen, candidat* tcandidat[]
} }
reset(); reset();
break; break;
case 6:
fonctionp4?????????();
reset();
break;
case 9: case 9:
quit=1; quit=1;
@ -188,7 +192,7 @@ void menuAdmin(VilleIUT* tiut[],int *tlogi, int* CandidOpen){
reset(); reset();
break; break;
case 4: case 4:
if(*CandidOpen) if(!*CandidOpen)
{ {
printf("Ouverture de la phase de candidature effectué !"); printf("Ouverture de la phase de candidature effectué !");
CandidOpen=0; CandidOpen=0;

@ -141,6 +141,8 @@ void Admissions(candidat* tcandidat[],int tlogi)
tcandidat[i]->TabVoeu[voeuID]=-1; tcandidat[i]->TabVoeu[voeuID]=-1;
} }
} }
//Tri sur la note
trie_??(tabIDCandidatAttente);
//Save Admis liste //Save Admis liste
FILE *fadmis; FILE *fadmis;
if((fadmis=fopen("src/Database/ListeAdmisInfo.bin","wb"))==NULL) if((fadmis=fopen("src/Database/ListeAdmisInfo.bin","wb"))==NULL)

@ -1 +1,5 @@
void menuResponsable(VilleIUT* tiut[],int *tlogi,candidat *tcandidat[]); #include "../partie1/saeP1.h"
void menuResponsable(VilleIUT* tiut[],int *tlogi,candidat* tcandidat[]);
void RechercheVoeuIDInformatique(candidat candid);
void ShowCandid(candidat* tcandidat[],int tlogi);
void Admissions(candidat* tcandidat[],int tlogi);

@ -1,4 +1,77 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <errno.h> #include <errno.h>
#include "../partie1/saeP1.h"
#include "../annexe/saeAnnexe.h"
#include "../partie3/saeP3.h"
#include "saeP4.h" #include "saeP4.h"
void ListeVoeuValide(candidat candid)
{
for(int i=0;i<candid.nbchoix;++i)
{
if(candid.TabVoeu[i]->ddep==1)
{
printf("Candidature pour %s %s accepté.\n",\
candid.TabVoeu[i]->ville,candid.TabVoeu[i]->dep);
}
else
{
if(candid.TabVoeu[i]->ddep==2)
{
printf("Candidature pour %s %s mise en attente.\n",\
candid.TabVoeu[i]->ville,candid.TabVoeu[i]->dep);
}
else
{
if(candid.TabVoeu[i]->ddep==-1)
{
printf("Candidature pour %s %s refusé.\n",\
candid.TabVoeu[i]->ville,candid.TabVoeu[i]->dep);
}
else printf("Candidature pour %s %s non traité.\n",\
candid.TabVoeu[i]->ville,candid.TabVoeu[i]->dep);
}
}
}
}
void Validation()
{
printf("Merci de rentrez le numéro associé au voeu que vous souhaitez accepté");
for(int i=0;i<candid.nbchoix;++i)
{
if(candid.TabVoeu[i]->ddep==1)
{
printf("%d %s %s\n",\
i+1,candid.TabVoeu[i]->ville,candid.TabVoeu[i]->dep);
}
}
int id_Choix;
scanf("%d",&id_Choix);
id_Choix-=1;
for(int i=0;i<candid.nbchoix;++i)
{
if(i!=id_Choix&&candid.TabVoeu[i]->ddep==1)
{
candid.TabVoeu[i]->vcand=-1;
}
else
{
if (i==id_Choix&&candid.TabVoeu[i]->ddep==1)
{
candid.TabVoeu[i]->vcand=1
}
}
}
}
void Recherche_Dichotomique()
{
}
void AffichageAdmisAlphabetique()
{
}
Loading…
Cancel
Save