|
|
|
@ -51,7 +51,61 @@ void clientMenu(float *weight, float *volume, float *price, int tabItemRef[], fl
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void adminMenu(void)
|
|
|
|
|
void adminMenu(int clientID[], int clientPassword[], float cagnotte[], int suspended[], int isAdmin[], int tabReference[], float tabWeight[], float tabVolume[], float unitPrice[], int *tlogItem, int *tlogClient)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
int choice = 0;
|
|
|
|
|
while (choice != 10)
|
|
|
|
|
{
|
|
|
|
|
printf("\n=================================\n");
|
|
|
|
|
printf(" Menu Client\n");
|
|
|
|
|
printf("=================================\n");
|
|
|
|
|
printf("1\u2022 Ajouter un client\n");
|
|
|
|
|
printf("2\u2022 Modifier les données d'un client\n");
|
|
|
|
|
printf("3\u2022 Supprimer un client\n");
|
|
|
|
|
printf("4\u2022 Ajouter un article\n");
|
|
|
|
|
printf("5\u2022 Supprimer un article\n");
|
|
|
|
|
printf("6\u2022 Afficher les données d'un article\n");
|
|
|
|
|
printf("7\u2022 Afficher la liste des articles\n");
|
|
|
|
|
printf("8\u2022 Afficher les données d'un client\n");
|
|
|
|
|
printf("9\u2022 Afficher la liste des clients\n");
|
|
|
|
|
printf("10\u2022 Quitter\n");
|
|
|
|
|
printf("=================================\n");
|
|
|
|
|
printf("Votre choix: ");
|
|
|
|
|
scanf("%d", &choice);
|
|
|
|
|
switch (choice)
|
|
|
|
|
{
|
|
|
|
|
case 1:
|
|
|
|
|
signup(clientID, clientPassword, cagnotte, suspended, isAdmin, tlogClient);
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
modifyClient(clientID, cagnotte, suspended, isAdmin, *tlogClient);
|
|
|
|
|
break;
|
|
|
|
|
case 3:
|
|
|
|
|
deleteClient(clientID, cagnotte, suspended, isAdmin, tlogClient);
|
|
|
|
|
break;
|
|
|
|
|
case 4:
|
|
|
|
|
inputItem(tabReference, tabWeight, tabVolume, unitPrice, tlogItem);
|
|
|
|
|
break;
|
|
|
|
|
case 5:
|
|
|
|
|
deleteItem(tabReference, tabWeight, tabVolume, unitPrice, tlogItem);
|
|
|
|
|
break;
|
|
|
|
|
case 6:
|
|
|
|
|
displayItem(tabReference, tabWeight, tabVolume, unitPrice, *tlogItem);
|
|
|
|
|
break;
|
|
|
|
|
case 7:
|
|
|
|
|
displayItemList(tabReference, tabWeight, tabVolume, unitPrice, *tlogItem);
|
|
|
|
|
break;
|
|
|
|
|
case 8:
|
|
|
|
|
displayClient(clientID, cagnotte, suspended, isAdmin, *tlogClient);
|
|
|
|
|
break;
|
|
|
|
|
case 9:
|
|
|
|
|
displayClientList(clientID, cagnotte, suspended, isAdmin, *tlogClient);
|
|
|
|
|
break;
|
|
|
|
|
case 10:
|
|
|
|
|
return;
|
|
|
|
|
default:
|
|
|
|
|
printf("Erreur, veuillez entrer un choix valide.\n");
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|