yimian
string1995 5 years ago
parent c8405c8424
commit 427f3558c7
  1. 8
      data.h
  2. 13
      input.h
  3. BIN
      main.exe
  4. 12
      maincode.h

@ -1170,6 +1170,12 @@ struct room *data__get_room_info(int index, int roomId, int date, int *visitorId
/* inform return rows of the pVstr*/
g_nRtrnRows=ii;
if(date!=0)
{
for(int i=0;i<ii;i++)
if((pRm+i)->date!=date) g_nRtrnRows--;
}
//printf("%d\n",g_nRtrnRows );
if(errno==22) errno=0;
return pRm;
@ -1511,7 +1517,7 @@ int data__insert_userinfo_to_structure(int Date,int RoomNo,int* Visitordetail)
containerwow.type=pts->type;
for(int i=0;i<4;i++)
{
containerwow.visitorId[i]=Visitordetail[i];printf("%d\n",containerwow.visitorId[i] );
containerwow.visitorId[i]=Visitordetail[i];//printf("%d\n",containerwow.visitorId[i] );
}
data__insert_room_info(&containerwow);

@ -12,6 +12,17 @@ int input__detect_input_ASCII()
return nKey;
}
char *input__process_space(char *chTmp)
{
for(int i=0;i<strlen(chTmp);i++)
{
if(chTmp[i]==32) chTmp[i]='_';
}
return chTmp;
}
/* function to get a char type string as needed */
char *input__getchar_plus(char *p)
{
@ -41,6 +52,8 @@ char *input__getchar_plus(char *p)
/* free the Tmp memory */
free(pTmp);
p=input__process_space(p);
return p;
}

Binary file not shown.

@ -172,7 +172,7 @@ for(int i=0;i<atoi(chVnum);i++)
/* print all these visitors info on screen */
for(int i=0;i<g_nRtrnRows;i++)
printf("\n\n Name:%s Tel:%s VIP:%d NationalID:%s Nation:%s province:%s City:%s\n", (pVstr+i)->name, (pVstr+i)->tel,(pVstr+i)->vip, (pVstr+i)->nationalId,(pVstr+i)->nation, (pVstr+i)->province, (pVstr+i)->city);
printf("\n\n Name:%s Tel:%s VIP:%d Nation:%s province:%s City:%s\n", (pVstr+i)->name, (pVstr+i)->tel,(pVstr+i)->vip, (pVstr+i)->nation, (pVstr+i)->province, (pVstr+i)->city);
if(g_nRtrnRows==1)
@ -227,7 +227,7 @@ for(int i=0;i<atoi(chVnum);i++)
/* print all these visitors info on screen */
for(int i=0;i<g_nRtrnRows;i++)
printf(" \n\nName:%s Tel:%s VIP:%d NationalID:%s Nation:%s province:%s City:%s\n", (pVstr+i)->name, (pVstr+i)->tel,(pVstr+i)->vip, (pVstr+i)->nationalId,(pVstr+i)->nation, (pVstr+i)->province, (pVstr+i)->city);
printf(" \n\nName:%s Tel:%s VIP:%d Nation:%s province:%s City:%s\n", (pVstr+i)->name, (pVstr+i)->tel,(pVstr+i)->vip, (pVstr+i)->nation, (pVstr+i)->province, (pVstr+i)->city);
Sleep(1500);
@ -283,7 +283,7 @@ int main__checkIn_re()
/* print all these visitors info on screen */
for(int i=0;i<g_nRtrnRows;i++)
printf("\n\nName:%s Tel:%s VIP:%d NationalID:%s Nation:%s province:%s City:%s\n", (pVstr+i)->name, (pVstr+i)->tel,(pVstr+i)->vip, (pVstr+i)->nationalId,(pVstr+i)->nation, (pVstr+i)->province, (pVstr+i)->city);
printf("\n\nName:%s Tel:%s VIP:%d Nation:%s province:%s City:%s\n", (pVstr+i)->name, (pVstr+i)->tel,(pVstr+i)->vip, (pVstr+i)->nation, (pVstr+i)->province, (pVstr+i)->city);
if(g_nRtrnRows==1)
@ -310,9 +310,9 @@ int main__checkIn_re()
/* show error hint if the function not runing successfully */
if(!pRm) printf("Error in Function data__get_room_info: %s\n",strerror(errno));
data__mark_check_in(data__get_current_date(0),pRm->roomId);
if(g_nRtrnRows==1)
{printf("\n\nCheck in Successfully!!\n");}
{data__mark_check_in(data__get_current_date(0),pRm->roomId);printf("\n\nCheck in Successfully!!\n");}
else
printf("\n\nThis Visitor has not Book the Room.\n");
@ -349,7 +349,7 @@ int main__change_visitor_info()
/* print all these visitors info on screen */
for(int i=0;i<g_nRtrnRows;i++)
printf("\n\nName:%s Tel:%s VIP:%d NationalID:%s Nation:%s province:%s City:%s\n", (pVstr+i)->name, (pVstr+i)->tel,(pVstr+i)->vip, (pVstr+i)->nationalId,(pVstr+i)->nation, (pVstr+i)->province, (pVstr+i)->city);
printf("\n\nName:%s Tel:%s VIP:%d Nation:%s province:%s City:%s\n", (pVstr+i)->name, (pVstr+i)->tel,(pVstr+i)->vip,(pVstr+i)->nation, (pVstr+i)->province, (pVstr+i)->city);
if(g_nRtrnRows==1)

Loading…
Cancel
Save