代码_企业管理_经管营销_专业资料.docx

上传人:asd****56 文档编号:93101504 上传时间:2023-06-28 格式:DOCX 页数:48 大小:38.60KB
返回 下载 相关 举报
代码_企业管理_经管营销_专业资料.docx_第1页
第1页 / 共48页
代码_企业管理_经管营销_专业资料.docx_第2页
第2页 / 共48页
点击查看更多>>
资源描述

《代码_企业管理_经管营销_专业资料.docx》由会员分享,可在线阅读,更多相关《代码_企业管理_经管营销_专业资料.docx(48页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。

1、代码一 主界面代码#includemain.hmouse_msg m;void welcome()PIMAGE img0=newimage(941,525);getimage(img0,image/begin.png,0,0);putimage(0,0,941,525,img0,0,0);delay_ms(1000);int menu()cleardevice();PIMAGE imgmain=newimage(941,525);getimage(imgmain,image/main.png,0,0);putimage(0,0,941,525,imgmain,0,0);int choice=0

2、;PIMAGE img=newimage(941,525);getimage(img,image/denglu.png,0,0);PIMAGE img1=newimage(941,525);getimage(img1,image/denglu1.png,0,0);PIMAGE img2=newimage(941,525);getimage(img2,image/denglu2.png,0,0);putimage(0,0,941,525,img,0,0);m=getmouse();while(true)m=getmouse();if(m.x178&m.x250&m.y522&m.x240&m.y

3、742&m.x427&m.y736&m.x214&m.y735&m.x300&m.y268&m.x213&m.y78&m.x213&m.y459&m.x213&m.y489)putimage(0,0,941,525,img3,0,0);if(m.is_down()quick_search();else putimage(0,0,941,525,img,0,0);void resetpassword()char temp20;admin a;inputbox_getline(修改密码,请输入新密码,a.password,20);inputbox_getline(修改密码,请确认新密码,temp,

4、20);if(strcmp(temp,a.password)!=0)doinputbox_getline(修改密码,错误!请输入新密码,a.password,20);inputbox_getline(修改密码,请确认新密码,temp,20);while(strcmp(temp,a.password)!=0);FILE *f1;f1=fopen(d:/adminpassword.dat,wb);fwrite(&a,sizeof(a),1,f1);fclose(f1);outtextxy(200,200,修改成功!);delay_ms(1000);adminf();void checkbookin

5、g()cleardevice();PIMAGE imgmain=newimage(941,525);getimage(imgmain,image/main.png,0,0);putimage(0,0,941,525,imgmain,0,0);int t;dot=getInteger(查看方式:表单图形化);while(t!=1&t!=2);if(t=1)textcheck();else if(t=2)graphcheck();void graphcheck()int t;dot=getInteger(查看方式:标准间商务间套间);while(t!=1&t!=2&t!=3);if(t=1)cle

6、ardevice();PIMAGE imgmain=newimage(941,525);getimage(imgmain,image/main.png,0,0);putimage(0,0,941,525,imgmain,0,0);FILE *f1,*f2;f1=fopen(d:/roommessage_biao.dat,ab);fclose(f1);f1=fopen(d:/roommessage_biao.dat,rb);fread(biaozhun_room,sizeof(struct Room),100,f1);fclose(f1);f2=fopen(d:/usermessage.dat,

7、ab);fclose(f2);f2=fopen(d:/usermessage.dat,rb);fread(user,sizeof(struct User),1000,f2);fclose(f2);PIMAGE img2=newimage(52,42);PIMAGE img3=newimage(52,42);PIMAGE img9=newimage(173,475);PIMAGE img0=newimage(86,53);getimage(img0,image/2.png,0,0);getimage(img9,image/9.png,0,0);/putimage(788,10,961,485,i

8、mg9,0,0);putimage(797,489,943,527,img0,0,0);getimage(img2,image/temp.png,0,0);getimage(img3,image/temp2.png,0,0);int count=1;for(int i=0;i10;i+)for(int j=0;j10;j+)if(biaozhun_roomcount.isbooked)putimage(10+80*i,10+50*j,62+80*i,52+50*j,img3,0,0);elseputimage(10+80*i,10+50*j,62+80*i,52+50*j,img2,0,0);

9、count+;if(t=2)cleardevice();PIMAGE imgmain=newimage(941,525);getimage(imgmain,image/main.png,0,0);putimage(0,0,941,525,imgmain,0,0);PIMAGE img2=newimage(50,40);PIMAGE img3=newimage(50,40);PIMAGE img0=newimage(86,53);PIMAGE img4=newimage(941,525);getimage(img4,image/10.png,0,0);getimage(img0,image/2.

10、png,0,0);getimage(img2,image/temp.png,0,0);getimage(img3,image/temp2.png,0,0);putimage(0,0,941,525,img4,0,0);putimage(797,489,943,527,img0,0,0);FILE* f1;f1=fopen(d:/usermessage.dat,ab);fclose(f1);f1=fopen(d:/usermessage.dat,rb);fread(user,sizeof(struct User),1000,f1);fclose(f1);f1=fopen(d:/roommessa

11、ge_shang.dat,ab);fclose(f1);f1=fopen(d:/roommessage_shang.dat,rb);fread(shangwu_room,sizeof(struct Room),30,f1);fclose(f1);int count=0;for(int i=0;i10;i+)for(int j=0;j3;j+)if(shangwu_roomcount.isbooked=true)putimage(130+70*i,150+140*j,180+70*i,190+140*j,img3,0,0);elseputimage(130+70*i,150+140*j,180+

12、70*i,190+140*j,img2,0,0);count+;if(t=3)cleardevice();PIMAGE imgmain=newimage(941,525);getimage(imgmain,image/main.png,0,0);putimage(0,0,941,525,imgmain,0,0);PIMAGE img2=newimage(50,40);PIMAGE img3=newimage(50,40);PIMAGE img0=newimage(86,53);PIMAGE img4=newimage(941,525);getimage(img4,image/11.png,0,

13、0);getimage(img0,image/2.png,0,0);getimage(img2,image/temp.png,0,0);getimage(img3,image/temp2.png,0,0);putimage(0,0,941,525,img4,0,0);putimage(797,489,943,527,img0,0,0);FILE* f1;f1=fopen(d:/usermessage.dat,ab);fclose(f1);f1=fopen(d:/usermessage.dat,rb);fread(user,sizeof(struct User),1000,f1);fclose(

14、f1);f1=fopen(d:/roommessage_shang.dat,ab);fclose(f1);f1=fopen(d:/roommessage_shang.dat,rb);fread(shangwu_room,sizeof(struct Room),20,f1);fclose(f1);int count=0;for(int i=0;i5;i+)for(int j=0;j797&m.x489&m.y527)adminf();void textcheck()cleardevice();PIMAGE imgmain=newimage(941,525);getimage(imgmain,im

15、age/main.png,0,0);putimage(0,0,941,525,imgmain,0,0);int t;dot=getInteger(标准间商务间套间);while(t!=1&t!=2&t!=3);PIMAGE img0=newimage(86,53);PIMAGE img1=newimage(941,525);PIMAGE img2=newimage(941,525);PIMAGE img3=newimage(941,525);getimage(img3,image/011.png,0,0);getimage(img2,image/010.png,0,0);getimage(im

16、g1,image/012.png,0,0);getimage(img0,image/2.png,0,0);if(t=1)cleardevice();putimage(0,0,941,525,img1,0,0);putimage(797,489,943,527,img0,0,0);Windowset_oline();outtextxy(10,100,房间号 户主名 入住日期);Windowset_one();FILE *f1;f1=fopen(d:/roommessage_biao.dat,ab);fclose(f1);f1=fopen(d:/roommessage_biao.dat,rb);f

17、read(biaozhun_room,sizeof(struct Room),100,f1);fclose(f1);int count=0;for(int i=0;i=100;i+)if(biaozhun_roomi.isbooked=true)if(count=13)xyprintf(10,130+30*count,%5d%20s%30d年%3d月%3d日,i,biaozhun_roomi.user_name,biaozhun_roomi.booked_date.year,biaozhun_roomi.booked_date.month,biaozhun_roomi.booked_date.

18、day);count+;elseWindowset_oline();outtextxy(500,100,房间号 户主名 入住日期);Windowset_one();xyprintf(510,130+30*(count-14),%5d%20s%30d年%3d月%3d日,i,biaozhun_roomi.user_name,biaozhun_roomi.booked_date.year,biaozhun_roomi.booked_date.month,biaozhun_roomi.booked_date.day);count+;if(t=2)cleardevice();putimage(0,0,9

19、41,525,img2,0,0);putimage(797,489,943,527,img0,0,0);Windowset_oline();outtextxy(10,100,房间号 户主名 入住日期);Windowset_one();FILE *f1;f1=fopen(d:/roommessage_shang.dat,rb);fclose(f1);f1=fopen(d:/roommessage_shang.dat,rb);fread(shangwu_room,sizeof(struct Room),30,f1);fclose(f1);int count=0;for(int i=0;i=30;i

20、+)if(shangwu_roomi.isbooked=true)if(count=13)xyprintf(10,130+30*count,%5d%20s%30d年%3d月%3d日,i,shangwu_roomi.user_name,shangwu_roomi.booked_date.year,shangwu_roomi.booked_date.month,shangwu_roomi.booked_date.day);count+;elseWindowset_oline();outtextxy(500,100,房间号 户主名 入住日期);Windowset_one();xyprintf(510

21、,130+30*(count-14),%5d%20s%30d年%3d月%3d日,i,shangwu_roomi.user_name,shangwu_roomi.booked_date.year,shangwu_roomi.booked_date.month,shangwu_roomi.booked_date.day);count+;if(t=3)cleardevice();putimage(0,0,941,525,img3,0,0);putimage(797,489,943,527,img0,0,0);Windowset_oline();outtextxy(10,100,房间号 户主名 入住日

22、期);Windowset_one();FILE *f1;f1=fopen(d:/roommessage_tao.dat,ab);fclose(f1);f1=fopen(d:/roommessage_tao.dat,rb);fread(taojian_room,sizeof(struct Room),20,f1);fclose(f1);int count=0;for(int i=0;i=20;i+)if(taojian_roomi.isbooked=true)if(count797&m.x489&m.y527)adminf();void totalsituation()FILE* f1;f1=f

23、open(d:/usermessage.dat,ab);fclose(f1);f1=fopen(d:/usermessage.dat,rb);fread(user,sizeof(struct User),1000,f1);fclose(f1);f1=fopen(d:/roommessage_biao.dat,ab);fclose(f1);f1=fopen(d:/roommessage_biao.dat,rb);fread(biaozhun_room,sizeof(struct Room),100,f1);fclose(f1);f1=fopen(d:/roommessage_shang.dat,

24、ab);fclose(f1);f1=fopen(d:/roommessage_shang.dat,rb);fread(shangwu_room,sizeof(struct Room),30,f1);fclose(f1);f1=fopen(d:/roommessage_tao.dat,ab);fclose(f1);f1=fopen(d:/roommessage_tao.dat,rb);fread(taojian_room,sizeof(struct Room),20,f1);fclose(f1);PIMAGE imgmain=newimage(941,525);PIMAGE img0=newim

25、age(86,53);getimage(img0,image/2.png,0,0);getimage(imgmain,image/main.png,0,0);putimage(0,0,941,525,imgmain,0,0);putimage(797,439,943,477,img0,0,0);int count=0,chi_count=0,man_count=0;for(int i=0;i1000;i+)if(strcmp(useri.ID,)!=0)count+;if(useri.age18)chi_count+;if(useri.sex=1)man_count+;setcolor(RED

26、);setfont(40,20,微软雅黑);xyprintf(330,10,总 概);setcolor(BLACK);setfont(28,14,微软雅黑);xyprintf(120,100,该系统拥有的用户数量为:%d,count);xyprintf(120,150,其中 %d 位儿童 %d 位成人 | %d 位男性 %d 位女性,chi_count,count-chi_count,man_count,count-man_count);count=0;for(int i=0;i=100;i+)if(biaozhun_roomi.isbooked=true)count+;xyprintf(12

27、0,230,标准间已经入住 %d 间 还有 %d 间空房尚未入住.,count,100-count);count=0;for(int i=0;i=30;i+)if(shangwu_roomi.isbooked=true)count+;xyprintf(120,280,商务间已经入住 %d 间 还有 %d 间空房尚未入住.,count,30-count);count=0;for(int i=0;i797&m.x439&m.y577)adminf();void quick_search()FILE* f1;f1=fopen(d:/usermessage.dat,ab);fclose(f1);f1=

28、fopen(d:/usermessage.dat,rb);fread(user,sizeof(struct User),1000,f1);fclose(f1);f1=fopen(d:/roommessage_biao.dat,ab);fclose(f1);f1=fopen(d:/roommessage_biao.dat,rb);fread(biaozhun_room,sizeof(struct Room),100,f1);fclose(f1);f1=fopen(d:/roommessage_shang.dat,ab);fclose(f1);f1=fopen(d:/roommessage_sha

29、ng.dat,rb);fread(shangwu_room,sizeof(struct Room),30,f1);fclose(f1);f1=fopen(d:/roommessage_tao.dat,ab);fclose(f1);f1=fopen(d:/roommessage_tao.dat,rb);fread(taojian_room,sizeof(struct Room),20,f1);fclose(f1);PIMAGE imgmain=newimage(941,525);PIMAGE img0=newimage(86,53);getimage(img0,image/2.png,0,0);

30、getimage(imgmain,image/main.png,0,0);putimage(0,0,941,525,imgmain,0,0);putimage(797,439,943,477,img0,0,0);int t;dot=getInteger(按户主姓名查找 按时间段查找 返回);while(t!=1&t!=2&t!=3);if(t=3)adminf();if(t=1)char temp20;loop:inputbox_getline(搜索,请输入户主姓名,temp,20);bool d=false;for(int i=0;i=1000;i+)if(strcmp(temp,useri.name)=0)d=true;break;

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 应用文书 > 项目管理

本站为文档C TO C交易模式,本站只提供存储空间、用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。本站仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知淘文阁网,我们立即给予删除!客服QQ:136780468 微信:18945177775 电话:18904686070

工信部备案号:黑ICP备15003705号© 2020-2023 www.taowenge.com 淘文阁