java酒店管理毕业设计源代码(4)

2019-04-08 19:17

悠悠同学网www.uuclass.com nosound(); gotoxy(41,14); clreol(); } }while(!valid); }while(ch == 'Y'); } //***************************************************************** // CLASS NAME : HKEEP // FUNCTION NAME : DELETE_RECORD // DETAILS : IT DELETES THE RECORD IN THE HKEEP'S FILE // FOR THE GIVEN CODE //***************************************************************** void hkeep :: delete_record(int t_code) { fstream file; file.open(\:: binary | ios :: in); fstream temp; temp.open(\:: binary | ios: file.seekg(0,ios::beg); while(file.read((char *) this, sizeof(hkeep))) { if(code != t_code) temp.write((char *) this, sizeof(hkeep)); } file.close(); temp.close(); file.open(\:: binary | ios: t_code = 1; while(temp.read((char *)this,sizeof(hkeep))) { code = t_code; file.write((char *)this, sizeof(hkeep)); t_code++; } file.close(); temp.close(); } ut); ut); temp.open(\:: binary | ios::in); 悠悠同学网www.uuclass.com

//***************************************************************** // CLASS NAME : HKEEP // FUNCTION NAME : DELETION // DETAILS : IT GIVES THE CODE NO. TO DELETE THE // RECORD IN HKEEP'S FILE //***************************************************************** void hkeep :: deletion(void) { menu m; clrscr(); int valid; int t_code = 0, t; char t1_code[5], t2_code[5]; char ch; gotoxy(3,3); cout<<\Enter Order Serial No. of the record to be deleted \ gotoxy(3,4); cout<<\or Press to see from the list or '0' to exit : \ gets(t1_code); t = atoi(t1_code); t_code = t; if(t1_code[0] == '0') return; if(t1_code[0] != '\\0') { clrscr(); if(!found_record(t_code)) { sound(500); delay(100); nosound(); gotoxy(3,15); cout<<\not found\ m.line_hor(1,79,24,196); gotoxy(1,25); cout<<\any key to continue... \ getch(); return; } display_record(t_code); gotoxy(3,12); cout<<\you want to delete this record (y/n) : \悠悠同学网www.uuclass.com

do { valid = 1; gotoxy(45,12); ch = getch(); ch = toupper(ch); if (ch != 'Y' && ch != 'N') { valid = 0; sound(500); delay(100); nosound(); gotoxy(45,12); clreol(); } }while(! valid); if (ch == 'N') return; gotoxy(1,25); cout<<\ delete_record(t_code); clrscr(); gotoxy(1,14); cout<<\Deleted\\n\ m.line_hor(1,79,24,196); gotoxy(1,25); cout<<\any key to continue...\ getch(); return; } display_list(); gotoxy(1,25); clreol(); gotoxy(3,25); cout<<\Order Serial No. of the record or to exit \;gets(t2_code); t = atoi(t2_code); t_code = t; if(t2_code[0] == '\\0') return; clrscr(); if(! found_record(t_code)) { sound(500); delay(100); nosound(); gotoxy(3,15); 悠悠同学网www.uuclass.com cout<<\not found\ m.line_hor(1,79,24,196); gotoxy(1,25); cout<<\any key to continue...\ getch(); return; } display_record(t_code); gotoxy(3,12); cout<<\you want to delete this Record (y/n) : \ do { valid = 1; gotoxy(45,12); ch = getche(); ch = toupper(ch); if(ch != 'Y' && ch != 'N') { valid = 0; sound(500); delay(100); nosound(); gotoxy(45,12); clreol(); } }while(!valid); if(ch == 'N') return; gotoxy(1,25); cout<<\ delete_record(t_code); clrscr(); gotoxy(1,14); cout<<\Deleted\\n\ m.line_hor(1,79,24,196); gotoxy(1,25); cout<<\any key to continue...\ getch(); } //***************************************************************** // CLASS NAME : HKEEP // FUNCTION NAME : MODIFY_RECORD // DETAILS : IT MODIFIES THE RECORD IN THE HKEEP'S // FILE FOR THE GIVEN CODE 悠悠同学网www.uuclass.com

//***************************************************************** void hkeep :: modify_record(int t_code) { menu m; int valid,modified = 0; char ch; m.line_hor(1,79,12,196); gotoxy(3,14); cout<<\Serial No.\ gotoxy(3,16); cout<<\ : \ gotoxy(3,17); cout<<\No. : \ gotoxy(3,18); cout<<\ : \ m.line_hor(1,79,23,196); gotoxy(13,16); cout<<\(y/n) : \ do { valid =1; gotoxy(28,16); ch = getche(); ch = toupper(ch); if (ch != 'Y' && ch != 'N') { valid = 0; sound(500); delay(100); nosound(); gotoxy(45,12); clreol(); } } while(!valid); valid = 0; while(!valid && ch == 'Y') { modified = 1; valid = 1; gotoxy(13,16);clreol(); gotoxy(3,25); cout<<\THE NAME OF THE PERSON\ gotoxy(13,16);


java酒店管理毕业设计源代码(4).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:厦大新闻传播学院考研8本书的复习策略

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: