You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
2.4 KiB

#include "Fonctions.h"
void gestionMenus(void)
{
int tNoCarte[20] = {0}, tage[20] = {0}, tPointsCarte[20] = {0}, tCarteActive[20] = {0};
int tDate[20] = {0}, tNbActivitesJour[20] = {0};
int tmax = 20, nbelem, choix, pasAct;
char choixA;
nbelem = Ouverture(tNoCarte, tage, tPointsCarte, tCarteActive, tNbActivitesJour, tDate, tmax, &pasAct);
if (nbelem < 0)
{
printf("Erreur d'ouverture du fichier ou tableau plein !!!\n");
return;
}
choix = choixMenu();
while (choix != 8)
{
if (choix == 1)
{
choixA = choixMenuAffichage();
while (choixA != 'F' && choixA != 'f')
{
if (choixA == 'A' || choixA == 'a')
{
Affichage1Adherent(tNoCarte, tage, tPointsCarte, tCarteActive, nbelem);
}
if (choixA == 'B' || choixA == 'b')
{
AffichageTousAdherents(tNoCarte, tage, tPointsCarte, tCarteActive, nbelem);
}
if (choixA == 'C' || choixA == 'c')
{
AffichageNbEntreesTousJour(tNbActivitesJour, tDate, nbelem);
}
if (choixA == 'D' || choixA == 'd')
{
AffichageNbEntreesTotal(tNbActivitesJour, nbelem);
}
if (choixA == 'E' || choixA == 'e')
{
AffichageNbAdherents(nbelem);
}
choixA = choixMenuAffichage();
}
}
if (choix == 2)
{
nbelem = AjoutAdherent(tNoCarte, tage, tPointsCarte, tCarteActive, tmax, nbelem);
}
if (choix == 3)
{
ModificationAge(tNoCarte, tage, nbelem);
}
if (choix == 4)
{
nbelem = SupprimmerAdherent(tNoCarte, tage, tPointsCarte, tCarteActive, nbelem);
}
if (choix == 5)
{
AjoutPoints(tNoCarte, tPointsCarte, tCarteActive, nbelem);
}
if (choix == 6)
{
ModificationActivationCarte(tNoCarte, tCarteActive, nbelem);
}
if (choix == 7)
{
DebitActivitee(tNoCarte, tCarteActive, tNbActivitesJour, nbelem);
}
choix = choixMenu();
}
Sauvegarde(tNoCarte, tage, tPointsCarte, tCarteActive, tNbActivitesJour, tDate, nbelem);
exit(1);
}