yimian
string1995 5 years ago
parent 4cbd31374e
commit 8835fdc7d4
  1. 13
      data.h
  2. 2
      data/Room.txt
  3. 2
      data/Signature.txt
  4. 2
      data/roomIndex.txt
  5. 1
      data/staffPasswd.txt
  6. 2
      main.c
  7. BIN
      main.exe
  8. 735
      menu.h

@ -1630,3 +1630,16 @@ void data__room_setup()
}
int data__change_room_type(int roomNo,int Type)
{
room *pts=NULL;
int currentdate=data__get_current_date(0);
pts=data__get_room_info(0,roomNo,currentdate,NULL,0,0,0,0,pts);
pts->type=Type;
data__insert_room_info(pts);
return 0;
}

File diff suppressed because one or more lines are too long

@ -1 +1 @@
d7C7dFd7C0C7
d7C7dBd7C8C7

@ -1 +1 @@
X\_>H$2401$^\]T]^^\(H$44$^\]T]^^\(H$118$^\]T]^^\(H$192$^\]T]^^\(H$266$^\]T]^^\(H$340$^\]T]^^\(H$414$^\]T]^^\(H$488$^\]T]^^\(H$562$^\]T]^^\(H$636$^\]T]^^\(H$710$^\]T]^^\(H$784$^\]T]^^\(H$858$^\]T]^^\(H$932$^\]T]^^\(H$1006$^\]T]^^\(H$1080$^\]T]^^\(H$1154$^\]T]^^\(H$1228$^\]T]^^\(H$1302$^\]T]^^\(H$1376$^\]T]^^\(H$1450$^\]T]^^\(H$1524$^\]T]^^\(H$1598$^\]T]^^\(H$1672$^\]T]^^\(H$1746$^\]T]^^\(H$1820$^\]T]^^\(H$1894$^\]T]^^\(H$1968$^\]T]^^\(H$2042$^\]T]^^\(H$2116$^\]T]^^\(H$2190$^\]T]^^\(H$2264$^\]T]^^\(H$2338$^\]T]^^\(H$2412$^\]T]^^\(H$2486$^\]T]^^\(H$2560$^\]T]^^\(H$2634$^\]T]^^\(H$2708$^\]T]^^\(H$2782$^\]T]^^\(H$2856$^\]T]^^\(H$2930$^\]T]^^\(H$3004$^\]T]^^\(H$3078$^\]T]^^\(H$3152$^\]T]^^\(H$3226$^\]T]^^\(H$3300$^\]T]^^\(H$3374$^\]T]^^\(H$3448$^\]T]^^\(H$3522$^\]T]^^\(H$3596$^\]T]^^\(H$3670$^\]T]^^\(H$3744$^\]T]^^\(H$3818$^\]T]^^\(H$3892$^\]T]^^\(H$3966$^\]T]^^\(H$4040$^\]T]^^\(H$4114$^\]T]^^\(H$4188$^\]T]^^\(H$4262$^\]T]^^\(H$4336$^\]T]^^\(H$4410$^\]T]^^\(H$4484$^\]T]^^\(H$4558$^\]T]^^\(H$4632$^\]T]^^\(H$4706$^\]T]^^\(H$4780$^\]T]^^\(H$4854$^\]T]^^\(H$4928$^\]T]^^\(H$5002$^\]T]^^\(H$5076$^\]T]^^\(H$5150$^\]T]^^\(H$5224$^\]T]^^\(H$5298$^\]T]^^\(H$5372$^\]T]^^\(H$5446$^\]T]^^\(H$5520$^\]T]^^\(H$5594$^\]T]^^\(H$5668$^\]T]^^\(H$5742$^\]T]^^\(H$5816$^\]T]^^\(H$5890$X\_>H$8321$X\_>H$14241$X\_>H$20161$X\_>H$26081$X\_>H$32001$X\_>H$37921$X\_>H$43841$^\]T]^^\(H$47404$^\]T]^^\(H$47478$^\]T]^^\(H$47552$^\]T]^^\(H$47626$^\]T]^^\(H$47700$^\]T]^^\(H$47774$^\]T]^^\(H$47848$^\]T]^^\(H$47922$^\]T]^^\(H$47996$^\]T]^^\(H$48070$^\]T]^^\(H$48144$^\]T]^^\(H$48218$^\]T]^^\(H$48292$^\]T]^^\(H$48366$^\]T]^^\(H$48440$^\]T]^^\(H$48514$^\]T]^^\(H$48588$^\]T]^^\(H$48662$^\]T]^^\(H$48736$^\]T]^^\(H$48810$^\]T]^^\(H$48884$^\]T]^^\(H$48958$^\]T]^^\(H$49032$^\]T]^^\(H$49106$^\]T]^^\(H$49180$^\]T]^^\(H$49254$^\]T]^^\(H$49328$^\]T]^^\(H$49402$^\]T]^^\(H$49476$^\]T]^^\(H$49550$^\]T]^^\(H$49624$^\]T]^^\(H$49698$^\]T]^^\(H$49772$^\]T]^^\(H$49846$^\]T]^^\(H$49920$^\]T]^^\(H$49994$^\]T]^^\(H$50068$^\]T]^^\(H$50142$^\]T]^^\(H$50216$^\]T]^^\(H$50290$
X\_>H$2401$^\]T]^^\(H$44$^\]T]^^\(H$118$^\]T]^^\(H$192$^\]T]^^\(H$266$^\]T]^^\(H$340$^\]T]^^\(H$414$^\]T]^^\(H$488$^\]T]^^\(H$562$^\]T]^^\(H$636$^\]T]^^\(H$710$^\]T]^^\(H$784$^\]T]^^\(H$858$^\]T]^^\(H$932$^\]T]^^\(H$1006$^\]T]^^\(H$1080$^\]T]^^\(H$1154$^\]T]^^\(H$1228$^\]T]^^\(H$1302$^\]T]^^\(H$1376$^\]T]^^\(H$1450$^\]T]^^\(H$1524$^\]T]^^\(H$1598$^\]T]^^\(H$1672$^\]T]^^\(H$1746$^\]T]^^\(H$1820$^\]T]^^\(H$1894$^\]T]^^\(H$1968$^\]T]^^\(H$2042$^\]T]^^\(H$2116$^\]T]^^\(H$2190$^\]T]^^\(H$2264$^\]T]^^\(H$2338$^\]T]^^\(H$2412$^\]T]^^\(H$2486$^\]T]^^\(H$2560$^\]T]^^\(H$2634$^\]T]^^\(H$2708$^\]T]^^\(H$2782$^\]T]^^\(H$2856$^\]T]^^\(H$2930$^\]T]^^\(H$3004$^\]T]^^\(H$3078$^\]T]^^\(H$3152$^\]T]^^\(H$3226$^\]T]^^\(H$3300$^\]T]^^\(H$3374$^\]T]^^\(H$3448$^\]T]^^\(H$3522$^\]T]^^\(H$3596$^\]T]^^\(H$3670$^\]T]^^\(H$3744$^\]T]^^\(H$3818$^\]T]^^\(H$3892$^\]T]^^\(H$3966$^\]T]^^\(H$4040$^\]T]^^\(H$4114$^\]T]^^\(H$4188$^\]T]^^\(H$4262$^\]T]^^\(H$4336$^\]T]^^\(H$4410$^\]T]^^\(H$4484$^\]T]^^\(H$4558$^\]T]^^\(H$4632$^\]T]^^\(H$4706$^\]T]^^\(H$4780$^\]T]^^\(H$4854$^\]T]^^\(H$4928$^\]T]^^\(H$5002$^\]T]^^\(H$5076$^\]T]^^\(H$5150$^\]T]^^\(H$5224$^\]T]^^\(H$5298$^\]T]^^\(H$5372$^\]T]^^\(H$5446$^\]T]^^\(H$5520$^\]T]^^\(H$5594$^\]T]^^\(H$5668$^\]T]^^\(H$5742$^\]T]^^\(H$5816$^\]T]^^\(H$5890$X\_>H$8321$X\_>H$14241$X\_>H$20161$X\_>H$26081$X\_>H$32001$X\_>H$37921$X\_>H$43841$^\]T]^^\(H$47404$^\]T]^^\(H$47478$^\]T]^^\(H$47552$^\]T]^^\(H$47626$^\]T]^^\(H$47700$^\]T]^^\(H$47774$^\]T]^^\(H$47848$^\]T]^^\(H$47922$^\]T]^^\(H$47996$^\]T]^^\(H$48070$^\]T]^^\(H$48144$^\]T]^^\(H$48218$^\]T]^^\(H$48292$^\]T]^^\(H$48366$^\]T]^^\(H$48440$^\]T]^^\(H$48514$^\]T]^^\(H$48588$^\]T]^^\(H$48662$^\]T]^^\(H$48736$^\]T]^^\(H$48810$^\]T]^^\(H$48884$^\]T]^^\(H$48958$^\]T]^^\(H$49032$^\]T]^^\(H$49106$^\]T]^^\(H$49180$^\]T]^^\(H$49254$^\]T]^^\(H$49328$^\]T]^^\(H$49402$^\]T]^^\(H$49476$^\]T]^^\(H$49550$^\]T]^^\(H$49624$^\]T]^^\(H$49698$^\]T]^^\(H$49772$^\]T]^^\(H$49846$^\]T]^^\(H$49920$^\]T]^^\(H$49994$^\]T]^^\(H$50068$^\]T]^^\(H$50142$^\]T]^^\(H$50216$^\]T]^^\(H$50290$_\_>H$1661$_\_>H$7581$_\_>H$13501$_\_>H$19421$_\_>H$25341$_\_>H$31261$_\_>H$37181$_\_>H$43101$^\]T]^^\(H$50364$

@ -0,0 +1 @@
E0YWFgt2aFlelsjJN5251dS2E0YWFgt2aF

@ -341,7 +341,7 @@ int final_main()
int nPnt=menu__data_setting();
if(nPnt==1) {while(1){print__room_type(); printf("\n\n\n\n"); system("echo Please Press Any Key to Continue...&&pause>nul");if(data__change_price_by_type_final()==0) break;}}
//if(nPnt==2)
if(nPnt==2) {while(1){print__room_type(); printf("\n\n\n\n"); system("echo Please Press Any Key to Continue...&&pause>nul");if(data__change_room_type_final()==0) break;}}
//if(nPnt==3)
if(nPnt==0) step=1;
}

Binary file not shown.

735
menu.h

@ -1,3 +1,624 @@
void menu__print_select_floor(int nPnt)
{
/* clear screen */
system("cls");
/* print the screen header */
print__header();
printf("\n\nPlease use Arrows on Keyboard to Select a floor:");
char chItem1[]="First Floor";
/* function pringt__item has three parameters: display string, if it is choosed,extra space on its left*/
print__item(chItem1,(nPnt==1)?1:0,0);
char chItem2[]="Second Floor";
print__item(chItem2,(nPnt==2)?1:0,0);
char chItem3[]="Third Floor";
print__item(chItem3,(nPnt==3)?1:0,0);
char chItem4[]="Fourth Floor";
print__item(chItem4,(nPnt==4)?1:0,0);
char chItem5[]="Fifth Floor";
print__item(chItem5,(nPnt==5)?1:0,0);
char chItem6[]="Sixth Floor";
print__item(chItem6,(nPnt==6)?1:0,0);
char chItem7[]="Seven Floor";
print__item(chItem7,(nPnt==7)?1:0,0);
char chItem8[]="Eighth Floor";
print__item(chItem8,(nPnt==8)?1:0,0);
printf("\n\n\n\n\n");
printf("Press ESC to Exit!");
}
int menu__select_floor()/*data statistics interface*/
{
int nVal=5600;
int nArrw=0;
do
{
/* print out the menu */
menu__print_select_floor(nVal%8+1);
/* detect user keyboard press*/
nArrw= input__get_arrow();
/* when input a arrow */
if(nArrw==1||nArrw==-1)
nVal+=nArrw;
/* when press enter */
if(nArrw==6)
break;
/* when press esc */
if(nArrw==9)
return 0;
}while(1);
/* return user choice by number*/
return nVal%8+1;
}
void menu__print_select_number(int nPnt,int floor)
{
/* clear screen */
system("cls");
/* print the screen header */
print__header();
printf("\n\nPlease use Arrows on Keyboard to Select a room:");/* function pringt__item has three parameters: display string, if it is choosed,extra space on its left*/
int floor1=100*floor+1;
char chItem1[5];
itoa(floor1,chItem1,10);
print__item(chItem1,(nPnt==1)?1:0,0);
int floor2=100*floor+2;
char chItem2[5];
itoa(floor2,chItem2,10);
print__item(chItem2,(nPnt==2)?1:0,0);
int floor3=100*floor+3;
char chItem3[5];
itoa(floor3,chItem3,10);
print__item(chItem3,(nPnt==3)?1:0,0);
int floor4=100*floor+4;
char chItem4[5];
itoa(floor4,chItem4,10);
print__item(chItem4,(nPnt==4)?1:0,0);
int floor5=100*floor+5;
char chItem5[5];
itoa(floor5,chItem5,10);
print__item(chItem5,(nPnt==5)?1:0,0);
int floor6=100*floor+6;
char chItem6[5];
itoa(floor6,chItem6,10);
print__item(chItem6,(nPnt==6)?1:0,0);
int floor7=100*floor+7;
char chItem7[5];
itoa(floor7,chItem7,10);
print__item(chItem7,(nPnt==7)?1:0,0);
int floor8=100*floor+8;
char chItem8[5];
itoa(floor8,chItem8,10);
print__item(chItem8,(nPnt==8)?1:0,0);
int floor9=100*floor+9;
char chItem9[5];
itoa(floor9,chItem9,10);
print__item(chItem9,(nPnt==9)?1:0,0);
int floor10=100*floor+10;
char chItem10[5];
itoa(floor10,chItem10,10);
print__item(chItem10,(nPnt==10)?1:0,0);
printf("\n\n\n");
printf("Press ESC to Exit!");
}
int menu__select_number(int floor1)/*data statistics interface*/
{
int nVal=5600;
int nArrw=0;
do
{
/* print out the menu */
menu__print_select_number(nVal%10+1,floor1);
/* detect user keyboard press*/
nArrw= input__get_arrow();
/* when input a arrow */
if(nArrw==1||nArrw==-1)
nVal+=nArrw;
/* when press enter */
if(nArrw==6)
break;
/* when press esc */
if(nArrw==9)
return 0;
}while(1);
/* return user choice by number*/
return nVal%10+1;
}
void menu__print_select_room_type(int nPnt)
{
/* clear screen */
system("cls");
/* print the screen header */
print__header();
printf("\n\nPlease use Arrows on Keyboard to Select:");
char chItem1[]=" Type ** ";
/* function pringt__item has three parameters: display string, if it is choosed,extra space on its left*/
print__item(chItem1,(nPnt==1)?1:0,0);
char chItem2[]=" Type *** ";
print__item(chItem2,(nPnt==2)?1:0,0);
char chItem3[]=" Type **** ";
print__item(chItem3,(nPnt==3)?1:0,0);
char chItem4[]=" VIP ";
print__item(chItem4,(nPnt==4)?1:0,0);
printf("\n\n\n\n\n");
printf("Press ESC to Exit!");
}
int menu__select_room_type()/*data statistics interface*/
{
int nVal=5600;
int nArrw=0;
do
{
/* print out the menu */
menu__print_select_room_type(nVal%4+1);
/* detect user keyboard press*/
nArrw= input__get_arrow();
/* when input a arrow */
if(nArrw==1||nArrw==-1)
nVal+=nArrw;
/* when press enter */
if(nArrw==6)
break;
/* when press esc */
if(nArrw==9)
return 0;
}while(1);
/* return user choice by number*/
return nVal%4+1;
}
void menu__print_update_visitor_info(int nPnt)
{
/* clear screen */
system("cls");
/* print the screen header */
print__header();
printf("\n\nPlease use Arrows on Keyboard to Select an option:");
char chItem1[]=" Name";
/* function pringt__item has three parameters: display string, if it is choosed,extra space on its left*/
print__item(chItem1,(nPnt==1)?1:0,0);
char chItem2[]=" Tel No.";
print__item(chItem2,(nPnt==2)?1:0,0);
char chItem3[]="VIP";
print__item(chItem3,(nPnt==3)?1:0,0);
char chItem4[]=" Nation ID ";
print__item(chItem4,(nPnt==4)?1:0,0);
char chItem5[]=" Nation";
print__item(chItem5,(nPnt==5)?1:0,0);
char chItem6[]=" Province ";
print__item(chItem6,(nPnt==6)?1:0,0);
char chItem7[]=" City";
print__item(chItem7,(nPnt==7)?1:0,0);
printf("\n\n\n\n\n");
printf("Press ESC to Exit!");
}
int menu__update_visitor_info()/*data statistics interface*/
{
int nVal=5600;
int nArrw=0;
do
{
/* print out the menu */
menu__print_update_visitor_info(nVal%7+1);
/* detect user keyboard press*/
nArrw= input__get_arrow();
/* when input a arrow */
if(nArrw==1||nArrw==-1)
nVal+=nArrw;
/* when press enter */
if(nArrw==6)
break;
/* when press esc */
if(nArrw==9)
return 0;
}while(1);
/* return user choice by number*/
return nVal%7+1;
}
void menu__print_search_visitor_three_type_selection(int nPnt)
{
/* clear screen */
system("cls");
/* print the screen header */
print__header();
printf("\n\nPlease use Arrows on Keyboard to Select an option:");
char chItem1[]=" Name";
/* function pringt__item has three parameters: display string, if it is choosed,extra space on its left*/
print__item(chItem1,(nPnt==1)?1:0,0);
char chItem2[]=" Tel No.";
print__item(chItem2,(nPnt==2)?1:0,0);
char chItem3[]=" Nation ID ";
print__item(chItem3,(nPnt==3)?1:0,0);
printf("\n\n\n\n\n");
printf("Press ESC to Exit!");
}
int menu__search_visitor_three_type_selection()/*data statistics interface*/
{
int nVal=5700;
int nArrw=0;
do
{
/* print out the menu */
menu__print_search_visitor_three_type_selection(nVal%3+1);
/* detect user keyboard press*/
nArrw= input__get_arrow();
/* when input a arrow */
if(nArrw==1||nArrw==-1)
nVal+=nArrw;
/* when press enter */
if(nArrw==6)
break;
/* when press esc */
if(nArrw==9)
return 0;
}while(1);
/* return user choice by number*/
return nVal%3+1;
}
struct visitor* data__search_visitor_from_three_types(void)
{
char *p=NULL;
visitor *container0=NULL;
visitor *container1=NULL;
visitor *container2=NULL;
while(1)
{
int selection=menu__search_visitor_three_type_selection();
if(selection==0)
return container0;
if(selection==1)
{
system("cls");
while(1)
{
printf("The visitor you want to find(Enter \"q\" to return): ");
p[0]='\0';
p=input__getchar_plus(p);
while(1)
{
if(strlen(p)>25 || p[0]=='\0')
{
printf("Please make sure the length is within 25 letters.\n");
printf("Enter \"q\" to return\n\n");
system("pause");
system("cls");
printf("The visitor you want to find(Enter \"q\" to return): ");
p=input__getchar_plus(p);
if(strlen(p)==1 && p[0]=='q')
break;
}
else if(strlen(p)<=25 && p[0]=='\0')
break;
}
if(strlen(p)==1 && p[0]=='q')
break;
system("cls");
printf("Loading...");
container1=data__get_visitor_info(p,container1);
if(container1==NULL)
{
system("cls");
printf("Sorry, the visitor you search is not in the database.\n");
system("pause");
system("cls");
}
else if(g_nRtrnRows!=1)
{
printf("There are more than two users with the same name\n");
printf("Please user other keywords to find visitor");
system("pause");
break;
}
else if(g_nRtrnRows==1)
{
system("cls");
printf("The visitor is found");
system("pause");
return container1;
}
}
}
if(selection==2)
{
system("cls");
while(1)
{
printf("Please input the visitor's Tel No.(Enter \"q\" to return): ");
p=input__getchar_plus(p);
while(1)
{
if(strlen(p)>25 || p[0]=='\0')
{
printf("Please make sure the length is within 25 numbers.\n");
printf("Enter \"q\" to return\n\n");
system("pause");
system("cls");
printf("Please input the visitor's Tel No.(Enter \"q\" to return): ");
p=input__getchar_plus(p);
if(strlen(p)==1 && p[0]=='q')
break;
}
else if(strlen(p)==1 && p[0]=='q')
break;
else if(strlen(p)<=25 && p[0]=='\0')
{
int i=-100;
for(i=0;i<strlen(p);i++)
{
if(isdigit(p[i]) || p[i]==35 || p[i]==42 || p[i]==43) continue;
else break;
}
if(i==strlen(p))
break;
else
{
printf("Please make sure the length is within 25 numbers.\n");
printf("Enter \"q\" to return\n\n");
system("pause");
system("cls");
printf("Please input the visitor's Tel No.(Enter \"q\" to return): ");
p=input__getchar_plus(p);
if(strlen(p)==1 && p[0]=='q')
break;
}
}
}
if(strlen(p)==1 && p[0]=='q')
break;
system("cls");
printf("Loading...");
container2=data__get_visitor_info(p,container2);
if(container2==NULL)
{
printf("Sorry, the visitor you search is not in the database.\n");
system("pause");
system("cls");
}
else if(g_nRtrnRows==1)
{
int original=atoi(container2->tel);
int input=atoi(p);
if(original==input)
{
system("cls");
printf("The visitor is found");
system("pause");
return container2;
}
else
{
printf("Do not find the visitor");
system("pause");
system("cls");
continue;
}
}
else if(g_nRtrnRows>1)
{
printf("Something wrong occurs");
system("pause");
break;
}
}
}
if(selection==3)
{
system("cls");
while(1)
{
printf("Please input the visitor's ID(Enter \"q\" to return): ");
p=input__getchar_plus(p);
while(1)
{
if(strlen(p)>25 || p[0]=='\0')
{
printf("Please make sure the length is within 25 numbers.\n");
printf("Enter \"q\" to return\n\n");
system("pause");
system("cls");
printf("The visitor you want to find(Enter \"q\" to return): ");
p=input__getchar_plus(p);
if(strlen(p)==1 && p[0]=='q')
break;
}
else if(strlen(p)==1 && p[0]=='q')
break;
else if(strlen(p)<=25 && p[0]=='\0')
{
int i=-100;
for(i=0;i<strlen(p);i++)
{
if(isdigit(p[i])) continue;
else break;
}
if(i==strlen(p))
break;
else
{
printf("Please make sure the length is within 25 numbers.\n");
printf("Enter \"q\" to return\n\n");
system("pause");
system("cls");
printf("Please input the visitor's ID(Enter \"q\" to return): ");
p=input__getchar_plus(p);
if(strlen(p)==1 && p[0]=='q')
break;
}
}
}
if(strlen(p)==1 && p[0]=='q')
break;
system("cls");
printf("Loading...");
container2=data__get_visitor_info(p,container2);
if(container2==NULL)
{
printf("Sorry, the visitor you search is not in the database.\n");
system("pause");
system("cls");
}
else if(g_nRtrnRows==1)
{
int original1=atoi(container2->nationalId);
int input1=atoi(p);
if(original1==input1)
{
printf("The visitor is found");
system("pause");
system("cls");
return container2;
}
else
{
system("cls");
printf("Do not find the visitor");
system("pause");
continue;
}
}
else if(g_nRtrnRows>1)
{
printf("Something wrong occurs");
system("pause");
break;
}
}
}
}
}
void menu__print_main(int nPnt)
{
@ -293,68 +914,6 @@ int menu__receptionist()
}
void menu__print_select_room_type(int nPnt)
{
/* clear screen */
system("cls");
/* print the screen header */
print__header();
printf("\n\nPlease use Arrows on Keyboard to Select:");
char chItem1[]=" Type ** ";
/* function pringt__item has three parameters: display string, if it is choosed,extra space on its left*/
print__item(chItem1,(nPnt==1)?1:0,0);
char chItem2[]=" Type *** ";
print__item(chItem2,(nPnt==2)?1:0,0);
char chItem3[]=" Type **** ";
print__item(chItem3,(nPnt==3)?1:0,0);
char chItem4[]=" VIP ";
print__item(chItem4,(nPnt==4)?1:0,0);
printf("\n\n\n\n\n");
printf("Press ESC to Exit!");
}
int menu__select_room_type()/*data statistics interface*/
{
int nVal=5600;
int nArrw=0;
do
{
/* print out the menu */
menu__print_select_room_type(nVal%4+1);
/* detect user keyboard press*/
nArrw= input__get_arrow();
/* when input a arrow */
if(nArrw==1||nArrw==-1)
nVal+=nArrw;
/* when press enter */
if(nArrw==6)
break;
/* when press esc */
if(nArrw==9)
return 0;
}while(1);
/* return user choice by number*/
return nVal%4+1;
}
int data__change_price_by_type_final(void)
@ -407,4 +966,56 @@ int data__change_price_by_type_final(void)
return 0;
}
int data__change_room_type_final(void)
{
int m=-100,n=0,x=0,brnum=0;
while(1)
{
do
{
while(1)
{
m=menu__select_floor();
if(m==0) break;
while(1)
{
n=0;
x=0;
n=menu__select_number(m);
if(n==0) break;
x=menu__select_room_type();
if(x==0) continue;
else break;
}
if(x!=0) break;
}
if(m==0) break;
if(x!=0)
{
int roomNo=100*m+n;
system("cls");
printf("Loading...");
data__change_room_type(roomNo,x+1);
printf("\n\nThe room has been successfully updated!\n\n");
brnum=-10;
Sleep(2000);
break;
}
}while(1);
if(!m) return 0;
if(m==0 || brnum==-10) return 1;
}
return -1;
}
Loading…
Cancel
Save