1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
| void update()
{ int i;
int t,call1,call2,r1=0,r2=0;
char choix2;
char n[30],p[30];
gotoxy(30,7);
printf("que voulez vous modifier?\n");
gotoxy(30,8);
printf("1.le nom et le numero\n");
gotoxy(30,9);
printf("2.la date\n");
gotoxy(30,11);
printf(" choix : ");
choix2=getch();
switch (choix2)
{ case '1':
clrscr();
gotoxy(30,5);
printf("veuillez saisir un nom");
fgets (n,30,stdin);
gotoxy(30,6);
printf("veuillez saisir un prenom");
fgets (p,30,stdin);
for(i=0;i<count;i++)
{r1=strcmp(R[i].avec.nom,n);
r2=strcmp(R[i].avec.prenom,p);
if(r1==0 && r2==0)
{
clrscr();
gotoxy(30,5);
printf("nom trouvé saisir le nouveau nom:");
fflush(stdin);
scanf("%s",&R[i].avec.nom);
fflush(stdin);
gotoxy(30,6);
printf("veuillez saisir le prenom:");
fflush(stdin);
scanf("%s",&R[i].avec.prenom);
gotoxy(30,7);
printf("numero");
scanf("%d", &E[i].num);
}
else {printf("error");}
}
break;
case '2':
clrscr();
gotoxy(31,5);
printf("saisir une date:\n");
gotoxy(40,6);
printf("le jour :");
gotoxy(49,6);
scanf("%d",&call1);
gotoxy(40,7);
printf("le mois :");
gotoxy(49,7);
scanf("%d",&call2);
t=search_rdv(call1,call2);
if(t==1)
{ printf("saisir une nouvelle date:\n");
gotoxy(40,6);
printf("le jour :");
gotoxy(49,6);
scanf("%d",&call1);
gotoxy(40,7);
printf("le mois :");
gotoxy(49,7);
scanf("%d",&call2);
for(i=0;i<count2;i++)
{clrscr();
R[trv[i]].date.jour=call1;R[trv[i]].date.mois=call2;
gotoxy(40,12);
system("PAUSE");}
}
break;
}
} |
Partager