commit
This commit is contained in:
parent
a70b104817
commit
36319a7b7f
8 changed files with 207 additions and 153 deletions
|
@ -105,6 +105,8 @@ void menuConf(ptConf confChain, ptListener listenerChain) {
|
|||
system("cls");
|
||||
drawMenu(options, 5);
|
||||
goToCoords(0, 13);
|
||||
tasse();
|
||||
printf("\n");
|
||||
printf("Que voulez-vous faire ? : ");
|
||||
int choice;
|
||||
scanf("%d", &choice);
|
||||
|
@ -160,6 +162,15 @@ void menuConf(ptConf confChain, ptListener listenerChain) {
|
|||
|
||||
case 3:
|
||||
{
|
||||
ptConf px = confChain -> next;
|
||||
|
||||
printf("\n");
|
||||
while (px -> next != NULL) {
|
||||
printf("%d : %s\n", px -> id, px -> title);
|
||||
px = px -> next;
|
||||
}
|
||||
printf("\n");
|
||||
|
||||
int id;
|
||||
|
||||
printf("Id de la conference a supprimer : ");
|
||||
|
@ -167,6 +178,7 @@ void menuConf(ptConf confChain, ptListener listenerChain) {
|
|||
|
||||
removeConf(confChain, id);
|
||||
saveConf(confChain -> next);
|
||||
saveRelations(confChain -> next);
|
||||
menuConf(confChain, listenerChain);
|
||||
break;
|
||||
}
|
||||
|
@ -216,6 +228,8 @@ void menuAbo(ptConf confChain, ptListener listenerChain) {
|
|||
system("cls");
|
||||
drawMenu(options, 4);
|
||||
goToCoords(0, 12);
|
||||
tasse();
|
||||
printf("\n");
|
||||
printf("Que voulez-vous faire ? : ");
|
||||
int choice;
|
||||
scanf("%d", &choice);
|
||||
|
@ -264,6 +278,15 @@ void menuAbo(ptConf confChain, ptListener listenerChain) {
|
|||
|
||||
case 3:
|
||||
{
|
||||
ptListener px = listenerChain -> next;
|
||||
|
||||
printf("\n");
|
||||
while (px -> next != NULL) {
|
||||
printf("%d : %s\n", px -> id, px -> name);
|
||||
px = px -> next;
|
||||
}
|
||||
printf("\n");
|
||||
|
||||
int id;
|
||||
|
||||
printf("Id de l'abonne a supprimer : ");
|
||||
|
@ -271,6 +294,7 @@ void menuAbo(ptConf confChain, ptListener listenerChain) {
|
|||
|
||||
removeListener(listenerChain, id);
|
||||
saveListeners(listenerChain -> next);
|
||||
saveRelations(confChain -> next);
|
||||
menuAbo(confChain, listenerChain);
|
||||
break;
|
||||
}
|
||||
|
@ -308,6 +332,21 @@ void menu(ptConf confChain, ptListener listenerChain)
|
|||
|
||||
case 3:
|
||||
{
|
||||
ptConf px = confChain -> next;
|
||||
ptListener py = listenerChain -> next;
|
||||
|
||||
printf("\n");
|
||||
while (px -> next != NULL) {
|
||||
printf("%d : %s\n", px -> id, px -> title);
|
||||
px = px -> next;
|
||||
}
|
||||
printf("\n");
|
||||
while (py -> next != NULL) {
|
||||
printf("%d : %s\n", py -> id, py -> name);
|
||||
py = py -> next;
|
||||
}
|
||||
printf("\n");
|
||||
|
||||
int confId, listenerId, grade;
|
||||
printf("Entrez l'ID de la conference : ");
|
||||
scanf("%d", &confId);
|
||||
|
@ -317,7 +356,7 @@ void menu(ptConf confChain, ptListener listenerChain)
|
|||
scanf("%d", &grade);
|
||||
|
||||
if (participateToConf(confChain, listenerChain, confId, listenerId, grade) != -1) {
|
||||
saveRelations(confChain);
|
||||
saveRelations(confChain -> next);
|
||||
} else {
|
||||
printf("La note doit etre comprise entre 0 et 5 et l'abonne ne doit pas avoir deja participe a la conference\n\n");
|
||||
system("pause");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue