|
|
|
@ -11,6 +11,7 @@
|
|
|
|
|
|
|
|
|
|
#define MAX_CLIENTS 100
|
|
|
|
|
#define MAX_ARTICLES 100
|
|
|
|
|
#define MENU_QUIT 11
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief Affiche le menu principal de l'interface du responsable.
|
|
|
|
@ -31,7 +32,7 @@ void affiche_resp(void) {
|
|
|
|
|
printf("||\t6 : Supprimer un article\t\t\t\t||\n");
|
|
|
|
|
printf("||\t7 : Modifier un article\t\t\t\t\t||\n");
|
|
|
|
|
printf("||\t8 : Ajouter un client\t\t\t\t\t||\n");
|
|
|
|
|
printf("||\t9 : Modifier le statut du client\t\t\t\t||\n");
|
|
|
|
|
printf("||\t9 : Modifier le statut du client\t\t\t||\n");
|
|
|
|
|
printf("||\t10 : Supprimer un client\t\t\t\t||\n");
|
|
|
|
|
printf("||\t11 : Quittez.\t\t\t\t\t\t||\n");
|
|
|
|
|
printf("+----------------------------------------------------------------+\n");
|
|
|
|
@ -358,7 +359,7 @@ void suppressionClient(int tNumClient[], float tCagnotte[], int tSus[], int *tLo
|
|
|
|
|
void menu_resp(int *choix) {
|
|
|
|
|
affiche_resp();
|
|
|
|
|
printf("Vous choisissez: ");
|
|
|
|
|
while (scanf("%d", choix) != 1 || *choix < 0 || *choix > 11) {
|
|
|
|
|
while (scanf("%d", choix) != 1 || *choix < 0 || *choix > MENU_QUIT) {
|
|
|
|
|
while (getchar() != '\n');
|
|
|
|
|
affiche_resp();
|
|
|
|
|
printf("Veuillez entrer un choix valide : ");
|
|
|
|
@ -419,12 +420,13 @@ void global_resp() {
|
|
|
|
|
sauvegardArticles(tRef, tPoids, tVol, tPrix, tLogArticle);
|
|
|
|
|
sauvegarde_clients(tNumClient, tCagnotte, tSus, tLogClient);
|
|
|
|
|
printf("Sauvegarde des articles effectuée.\n");
|
|
|
|
|
printf("Sauvegarde des clients effectuée.\n");
|
|
|
|
|
printf("Au revoir !\n");
|
|
|
|
|
return;
|
|
|
|
|
default:
|
|
|
|
|
printf("Veuillez entrer un choix valide ! \n");
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
} while (choix != 11);
|
|
|
|
|
} while (choix != MENU_QUIT);
|
|
|
|
|
|
|
|
|
|
}
|