|
|
@ -105,7 +105,6 @@ void fAffichage1Client(int *tAd, char tnom[][15], char tpnom[][15], int *tage, i
|
|
|
|
{
|
|
|
|
{
|
|
|
|
int i, coderet, rang, trouve, NonTrouve;
|
|
|
|
int i, coderet, rang, trouve, NonTrouve;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fRecherche(tAd, n, noClient, &coderet, &rang);
|
|
|
|
fRecherche(tAd, n, noClient, &coderet, &rang);
|
|
|
|
|
|
|
|
|
|
|
|
trouve = coderet;
|
|
|
|
trouve = coderet;
|
|
|
@ -206,9 +205,81 @@ void affNbParAct(int *tacti, int tlog)
|
|
|
|
printf("Le nombre d'entrée par activité est de\n");
|
|
|
|
printf("Le nombre d'entrée par activité est de\n");
|
|
|
|
printf("Badminton\t Musculation\t Foot\t Squash\t Zumba\n");
|
|
|
|
printf("Badminton\t Musculation\t Foot\t Squash\t Zumba\n");
|
|
|
|
printf("%d\t %d\t %d\t %d\t %d\t", totbad, totmuscu, totfoot, totsqua, totzumba);
|
|
|
|
printf("%d\t %d\t %d\t %d\t %d\t", totbad, totmuscu, totfoot, totsqua, totzumba);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//Fonction suppression d'un client
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void suppr1Client(int *tAd, char tnom[][15], char tpnom[][15], int *tage, int *tstate, int *tacti, int *tpasseoupas, int *tptsbought, int *tptsbonus, char *tcateg, int *n, int tmax)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
int coderet, rang, noClient, i;
|
|
|
|
|
|
|
|
char contsuppr, confsupp;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
printf("Entrez le numero client à supprimer");
|
|
|
|
|
|
|
|
scanf("%d", &noClient);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fRecherche(tAd, n, noClient, &coderet, &rang);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ( coderet == 1 )
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
printf("Confirmation de la suppression? O/N");
|
|
|
|
|
|
|
|
scanf("%*c%c%*c", &confsupp)
|
|
|
|
|
|
|
|
if ( confsupp == 'O')
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
for ( i = rang ; i < n-1 ; i++)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tAd[i] = tAd[i+1];
|
|
|
|
|
|
|
|
tnom[i] = tnom[i+1];
|
|
|
|
|
|
|
|
tpnom[i] = tpnom[i+1];
|
|
|
|
|
|
|
|
tage[i] = tage[i+1];
|
|
|
|
|
|
|
|
tstate[i] = tstate[i+1];
|
|
|
|
|
|
|
|
tacti[i] = tacti[i+1];
|
|
|
|
|
|
|
|
tpasseoupas[i] = tpasseoupas[i+1];
|
|
|
|
|
|
|
|
tptsbought[i] = tptsbought[i+1];
|
|
|
|
|
|
|
|
tptsbonus[i] = tptsbonus[i+1];
|
|
|
|
|
|
|
|
tcateg[i] = tcateg[i+1];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
printf("Le client numéro %d a été supprimé", noClient);
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
while ( coderet == 0 )
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
printf("Le numéro client n'est pas trouvé. Voulez-vous continuez? O/N");
|
|
|
|
|
|
|
|
scanf("%*c%c%*c", &confsuppr);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if( contsuppr == 'O')
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
printf("Veuillez entrer a nouveau le numéro de carte à supprimer");
|
|
|
|
|
|
|
|
scanf("%d", &noClient);
|
|
|
|
|
|
|
|
fRecherche(tAd, n, noClient, &coderet, &rang);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ( coderet == 1 )
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
printf("Confirmation de la suppression? O/N");
|
|
|
|
|
|
|
|
scanf("%*c%c%*c", &confsupp)
|
|
|
|
|
|
|
|
if ( confsupp == 'O')
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
for ( i = rang ; i < n-1 ; i++)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tAd[i] = tAd[i+1];
|
|
|
|
|
|
|
|
tnom[i] = tnom[i+1];
|
|
|
|
|
|
|
|
tpnom[i] = tpnom[i+1];
|
|
|
|
|
|
|
|
tage[i] = tage[i+1];
|
|
|
|
|
|
|
|
tstate[i] = tstate[i+1];
|
|
|
|
|
|
|
|
tacti[i] = tacti[i+1];
|
|
|
|
|
|
|
|
tpasseoupas[i] = tpasseoupas[i+1];
|
|
|
|
|
|
|
|
tptsbought[i] = tptsbought[i+1];
|
|
|
|
|
|
|
|
tptsbonus[i] = tptsbonus[i+1];
|
|
|
|
|
|
|
|
tcateg[i] = tcateg[i+1];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
printf("Le client numéro %d a été supprimé", noClient);
|
|
|
|
|
|
|
|
return;}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//EVANN
|
|
|
|
//EVANN
|