导航:首页 > 源码编译 > 航空信息管理系统源码免费

航空信息管理系统源码免费

发布时间:2022-07-12 13:09:07

⑴ 求一个信息管理系统的源代码 希望是可以运行成功地哦~~~~~ 大侠来帮忙吧。。。

就是windows风格的界面,跨平台编程,不同平台都有自己的style

⑵ 求一个员工信息管理系统的asp免费源代码

伙计这个东西不好弄的,这相当于是订做一套软件了,你连网络的分都不出肯定没有人回答你了,加点分了再看看有没有来帮你弄吧

⑶ 机票订购信息管理系统的C语言源代码,急急急!!!特别注意有排序功能!!!

以发,请查收

⑷ 飞机订票系统的源代码

机票预定系统概要设计说明书1.引言
1.1 编写目的
在本机票预定系统项目的前一阶段,也就是需求分析阶段中,已经将系统用户对本系统的需求做了详细的阐述,这些用户需求已经在上一阶段中对航空公司、各旅行社及机场的实地调研中获得,并在需求规格说明书中得到详尽得叙述及阐明。
本阶段已在系统的需求分析的基础上,对机票预定系统做概要设计。主要解决了实现该系统需求的程序模块设计问题。包括如何把该系统划分成若干个模块、决定各个模块之间的接口、模块之间传递的信息,以及数据结构、模块结构的设计等。在以下的概要设计报告中将对在本阶段中对系统所做的所有概要设计进行详细的说明。
在下一阶段的详细设计中,程序设计员可参考此概要设计报告,在概要设计对机票预定系统所做的模块结构设计的基础上,对系统进行详细设计。在以后的软件测试以及软件维护阶段也可参考此说明书,以便于了解在概要设计过程中所完成的各模块设计结构,或在修改时找出在本阶段设计的不足或错误。 1.2 项目背景 本项目(机票预定系统)时由浙江航空公司委托,由<>负责开发。
机票预定系统将由两部分组成:置于个旅行社定票点的前台客户程序,以及置于航空公司的数据库服务器。本系统与其他系统的关系如下: 1.3 定义 1.3.1 专门术语
SQL SERVER: 系统服务器所使用的数据库管理系统(DBMS)。
SQL: 一种用于访问查询数据库的语言
事务流:数据进入模块后可能有多种路径进行处理。
主键:数据库表中的关键域。值互不相同。
外部主键:数据库表中与其他表主键关联的域。
ROLLBACK: 数据库的错误恢复机制。
1
1.3.2 缩写
系统:若未特别指出,统指本机票预定系统。
SQL: Structured Query Language(结构化查询语言)。
ATM: Asynchronous Transfer Mode (异步传输模式)。
1.4 参考资料 以下列出在概要设计过程中所使用到的有关资料:
1. 机票预定系统项目计划任务书 浙江航空公司 1999/3 2.机票预定系统项目开发计划 《》软件开发小组 1999/3
3.需求规格说明书 《》软件开发小组 1999/3
4.用户操作手册(初稿) 《》软件开发小组 1999/4
5.软件工程及其应用 周苏、王文等 天津科学技术出版社 1992/1
6.软件工程 张海藩 清华大学出版社 1990/11
7.Computer Network A.S.Tanenbaun Prentice Hall 1996/01
文档所采用的标准是参照《软件工程导论》沈美明着 的“计算机软件开发文档编写指南”。
2.任务概述

⑸ 航空公司订票系统源代码 要求要 c++ 来写

#include <iostream.h>
#include <stdio.h>
#include <string.h>
#include <conio.h>
#define m 4 //3架飞机
#define n 5 //每架飞机5张票

struct node
{
char name[21];
char id[21];
int seat,plane,date;
node *next,*pre;
};
struct wait
{
char name[21];
char id[21];
char phone[8];
int seat,plane,date,count;
wait *next,*pre;
};
struct piao
{
int seat[n+1];
};

void makenull();
void makenull_piao();
void makenull_information();
void list_menu();
void list_piao();
void makenull_wait();
void list_information();
void plane_information(node *head);
void book();
void add_information(node *head,int x,int y);
void add_wait(int x,int y);
void search_delete(int x);
void write_to_file();
void show_wait();
bool comp(node *x,node*y);

node *head1,*head2,*head3,*q;
wait *wait_head,*wait_end;
char c;
piao a[m];

void main()
{

makenull();
do
{ list_menu();
cout<<endl<<"choose an operation: ";
cin>>c;
if (c!='6')
switch(c)
{
case '0' : show_wait();break;
case '1' : {list_piao();book();}break;
case '2' : search_delete(1);break;
case '3' : list_piao();break;
case '4' : list_information();break;
case '5' : search_delete(0);break;
default : break;
}
}while(c!='6');
cout<<"Exit System ";
}
void makenull()
{
makenull_piao();
makenull_information();
makenull_wait();
}
void list_menu()
{ cout<<endl<<"";
cout<<endl<<" 菜单";
cout<<endl<<" ************************";
cout<<endl<<" * 0 . 查看排队情况 *";
cout<<endl<<" * 1 . 订票 *";
cout<<endl<<" * 2 . 退票 *";
cout<<endl<<" * 3 . 查看剩余票 *";
cout<<endl<<" * 4 . 查看飞机信息 *";
cout<<endl<<" * 5 . 查看乘客信息 *";
cout<<endl<<" * 6 . 退出 *";
cout<<endl<<" ************************";
cout<<endl<<"";
}
void makenull_piao()
{
FILE *fp;
int i;
if((fp=fopen("piao.dat","r")) == NULL )
{
fp=fopen("piao.dat","w");
for (i=1;i<=m-1;i++)
fwrite(&a[i],sizeof(piao),1,fp);
fclose(fp);
fp=fopen("piao.dat","r");
}
for(i=1;i<=m-1;i++)
fread(&a[i],sizeof(piao),1,fp);
fclose(fp);
}
void makenull_information()
{
node *r;
FILE *fp;
int i,j,sum;

sum=a[1].seat[0]+a[2].seat[0]+a[3].seat[0];
fp=fopen("information.dat","r");
head1=new node;
head2=new node;
head3=new node;
head1->pre=NULL;
head1->next=NULL;
head2->pre=NULL;
head2->next=NULL;
head3->pre=NULL;
head3->next=NULL;
q=head1;
for(i=1;i<=sum;i++)
{
j=0;
r=new node;
fread(r,sizeof(node),1,fp);
q->next=r;
r->pre=q;
r->next=NULL;
q=q->next;
fclose(fp);
if(i==a[1].seat[0]+1) {
head2->next=q;
q->pre->next=NULL;
q->pre=head2;
}
if(i==a[1].seat[0]+a[2].seat[0]+1) {
head3->next=q;
q->pre->next=NULL;
q->pre=head3;
}
}
}

void makenull_wait()
{
wait *tempw;
FILE *fp;
tempw=new wait;
int i;
if((fp=fopen("wait.txt","r")) ==NULL )
{
fp=fopen("wait.txt","w");
fclose(fp);
}
wait_end=new wait;
wait_head=new wait;
wait_end->next=NULL;
wait_end->pre=NULL;
wait_head=wait_end;
wait_head->count=0;
fp=fopen("wait.txt","r");
fread(wait_head,sizeof(wait),1,fp);
for(i=1;i<=wait_head->count;i++)
{
fread(tempw,sizeof(wait),1,fp);
wait_end->next=tempw;
tempw->pre=wait_end;
tempw->next=NULL;
wait_end=tempw;
}
}

void list_piao()
{
int i,j;
for(i=1;i<=m-1;i++)
{
if(a[i].seat[0]!=n)
{
cout<<endl<<"第 "<<i<<" 架飞机剩余的票 :"<<endl;
for(j=1;j<=n;j++)
if (a[i].seat[j]==0) cout<<" "<<j;
cout<<endl;
}
else cout<<endl<<"The "<<i<<" plane is full !"<<endl<<endl;
}
}
void list_information()
{
int x;
do {cout<<endl<<"显示哪架飞机的信息 ? "; cin>>x;cout<<endl;}while(x<1 || x>=m);
cout<<endl<<"第 "<<x<<" 架飞机的信息如下 "<<endl;
if(x==1) plane_information(head1);
if(x==2) plane_information(head2);
if(x==3) plane_information(head3);
}

void plane_information(node *head)
{
node *q;
char ch;
int x=0;
if(head!=NULL && head->next!=NULL)
q=head->next;
else {
q=NULL;
cout<<"飞机空,无预订票 !"<<endl;
}
while(q!=NULL)
{
cout<<endl<<"*******************"<<endl;
q->date=q->plane;
cout<<"日期 :"<<q->date<<endl;
cout<<"座位号 : "<<q->seat<<endl;
cout<<"姓名 : "<<q->name;
cout<<endl<<"ID 号 : "<<q->id;
q=q->next;x++;
if (x % 3 ==0) ch=getch();
}
cout<<endl;
}
void book()
{
int i,j,p;
cout<<endl<<"请选择地点:(1、2、3) ";
do {
cin>>i;
if (i<1 || i>=m) {
cout<<endl<<"**** 超出范围!****"<<endl<<"请重新输入:";
}
else
{cout<<endl<<"你要订的是到"<<i<<"地的飞机"<<endl;
cout<<endl<<"第 "<<i<<" 架飞机剩余的票 :"<<endl;
for(p=1;p<=n;p++)
if (a[i].seat[p]==0) cout<<" "<<p;
cout<<endl;
break;}
}while(1);
cout<<endl<<"请选择座位号 : ";
do {
cin>>j;
if (j<1 || j>n) {
cout<<endl<<"**** 超出范围!****"<<endl<<"请重新输入:";
}
else
{
q->date=i;
cout<<endl<<"您的订票日期 : "<<q->date<<endl;
break;
}
}while(1);

if (a[i].seat[j]==0) {
a[i].seat[j]=1;
cout<<endl;
a[i].seat[0]++;
if(i==1) add_information(head1,1,j);
if(i==2) add_information(head2,2,j);
if(i==3) add_information(head3,3,j);
}
else
{
cout<<endl<<"**** 对不起,该座位已被预订,您被安排到订票等候队列 ****"<<endl;
add_wait(i,j);
}

}
void add_wait(int x,int y)
{
wait *tempw;
tempw=new wait;
tempw->next=NULL;
cout<<"请输入个人信息"<<endl;
cout<<endl<<"*************"<<endl;
cout<<"姓名 : ";cin>>tempw->name;
cout<<"ID号 : ";cin>>tempw->id;
cout<<"电话 :";cin>>tempw->phone;
tempw->seat=y;
tempw->plane=x;
wait_end->next=tempw;
tempw->pre=wait_end;
wait_end=wait_end->next;
cout<<endl<<"**** 正在排队等候 ****"<<endl;
wait_head->count++;
write_to_file();
}
void show_wait()
{
wait *tempw;
tempw=wait_head->next;
if (tempw==NULL) cout<<endl<<"排队中没有人!"<<endl;
while(tempw!=NULL)
{
cout<<tempw->name<<" - ";
tempw=tempw->next;
}
}
void add_information(node *head,int x,int y)
{
node *temp;
temp=new node;
temp->pre=NULL;
temp->next=NULL;
cout<<"请输入个人信息"<<endl;
cout<<endl<<"*************"<<endl;
cout<<"姓名 : ";cin>>temp->name;
cout<<"ID号 : ";cin>>temp->id;
temp->seat=y;
temp->plane=x;
temp->next=head->next;
temp->pre=head;
if (head->next!=NULL) head->next->pre=temp;
head->next=temp;
write_to_file();
cout<<endl<<"**** 订票成功 ****"<<endl;
}
void search_delete(int x)
{
node *p,*q,*r;
wait *tempw,*tempw2,*tempw3;
int step=1,t1,t2,i;
char ch;
p=new node;
tempw=new wait;
tempw2=new wait;
tempw3=new wait;
q=head1;
cout<<endl<<"请输入个人信息"<<endl;
cout<<"*************"<<endl;
cout<<endl<<"姓名 : ";cin>>p->name;
do{
q=q->next;
if ( (q!=NULL) &&
(comp(q,p)) )
{
cout<<endl;
q->date=q->plane;
cout<<"Located!"<<endl;
cout<<"****************";
cout<<endl<<"姓名 : "<<q->name;
cout<<endl<<"ID号 : "<<q->id;
cout<<endl<<"座位号 : "<<q->seat;
cout<<endl<<"班机号 : "<<q->plane;
cout<<endl<<"日期 : "<<q->date<<endl;
if (x==1) {
cout<<"删除该纪录 ? [Y/N] ";
cin>>ch;
if (ch=='Y' || ch=='y') {
t1=q->plane;
t2=q->seat;
a[t1].seat[t2]=0;
a[t1].seat[0]--;
r=q;q=q->pre;
r->pre->next=r->next;
if(r->next!=NULL) r->next->pre=r->pre;
delete(r);
cout<<"**** 记录删除成功 ! ****";
write_to_file();
tempw=wait_head;
for(i=0;i<wait_head->count;i++)
{
tempw=tempw->next;
if(tempw==NULL) break;
if((tempw->plane==t1) && (tempw->seat==t2))
{
strcpy(tempw3->name,tempw->name);
strcpy(tempw3->phone,tempw->phone);
cout<<endl<<"等候的人中有可以订票的了:"<<endl;
cout<<endl<<"姓名 : "<<tempw->name;
cout<<endl<<"ID号 : "<<tempw->id<<endl;
a[t1].seat[0]++;
a[t1].seat[t2]=1;
if(tempw->plane==1) add_information(head1,1,tempw->seat);
if(tempw->plane==2) add_information(head2,2,tempw->seat);
if(tempw->plane==3) add_information(head3,3,tempw->seat);
tempw2=tempw->pre;
tempw2->next=tempw->next;
if(tempw->next==NULL) wait_end=tempw2;
else tempw->next->pre=tempw2;
delete(tempw);
wait_head->count--;
write_to_file();
cout<<endl<<"等候的"<<tempw3->name<<"已经成功订票,已经由电话"<<tempw3->phone<<"通知了"<<endl;
break;
}
}

}
}continue;
}
else
{
if (q==NULL)
{
step++;
if(step==2) q=head2;
if(step==3) q=head3;
if(step==4) {cout<<endl<<"**** 信息检索完毕 ****";break;}
}
}
}while(1);
}
bool comp(node *x,node *y)
{
node *p,*q;
int i,j,k;
p=x;
q=y;
i=j=0;
do
{
while ( (p->name[i] != q->name[j]) && (p->name[i] != '\0') ) i++;

if (p->name[i] == '\0') {return(false);break;}
else
{
k=i;
while ( (p->name[k] == q->name[j]) && (q->name[j]!='\0') ) {k++;j++;}
if (q->name[j]=='\0') return(true);
else
{
j=0;
i++;
}
}
}while( (q->name[j]!='\0') && (p->name[i] != '\0') );
return(false);
}

void write_to_file()
{
FILE *fp;
int i,j;
int x[m];
node *p;
wait *tempw;
tempw=new wait;
tempw=wait_head;
fp=fopen("piao.dat","w");
for (i=1;i<=m-1;i++)
{
fwrite(&a[i],sizeof(piao),1,fp);
}
fclose(fp);

fp=fopen("information.dat","w");
x[0]=0;x[1]=a[1].seat[0];
for(i=0,j=1;j<=m-1;j++) {i=i+a[j].seat[0];x[j]=a[j].seat[0]+x[j-1];}
j=1;p=head1->next;
for(j=1;j<=i;j++)
{
if(j==x[1]+1) p=head2->next;
if(j==x[2]+1) p=head3->next;
if(p==NULL)break;
fwrite(p,sizeof(node),1,fp);
p=p->next;
}
fclose(fp);

fp=fopen("wait.txt","w");
for(j=0;j<=wait_head->count;j++)
{
if(tempw==NULL)break;
fwrite(tempw,sizeof(wait),1,fp);
tempw=tempw->next;
}
fclose(fp);
}

javaee信息管理系统源代码下载

信息管理系统是将经常变动的信息,类似新闻、新产品发布和部门动态等更新信息集中管理,并通过信息的某些共性进行分类,最后系统化、标准化发布到网络中上的一种网络资源共享的应用程序。信息通过一个操作简单的界面加入数据库,然后通过已有的网页模板格式与审核流程发布到网络服务器上。

本系统提供一个通用接口,可以把其他OA集成起来,形成一个完整的OA办公对外环境。
该产品大大减轻了信息更新维护的工作量,通过网络数据库的引用,将信息的更新维护工作简化到只需录入文字和上传图片,从而使系统内容的更新速度大大缩短,在某些专门的网上新闻站点,如新浪的新闻中心等,新闻的更新速度已经缩短到五分钟一更新,从而大大加快了信息的传播速度,也吸引了更多的长期用户群,时时保持系统的活动力和影响力。本系统可以简化为网站信息管理系统,可将动态等更新信息集中管理,并通过信息的某些共性进行分类,最后系统化、标准化发布到网络上(内部网或广域网)的一种应用程序。信息的采编通过一个操作简单的界面加入数据库,然后通过已有的网页模板格式与审核流程发布到网络上。

主功能模块:

栏目(即类别)管理:类别管理为整个系统的灵活高效提供了可能性,它使系统管理员可随时调整各类别(可无限级添加),都可以根据需要增加、修改、删除、栏目定向、栏目用户的管理以及次序的调整。这对于系统内信息的分类调整以及系统发展规划中第二步的实现具有很大的作用,可以极大地减少二次开发的工作量

信息管理:信息管理实现系统内容的更新与维护,提供在后台输入、查询、修改、删除各信息类别和专题中的具体信息的功能等一系列完善的信息管理功能。

页面编辑(界面方案)功能:页面编辑功能可以通过WEB编辑方式轻松实现系统首页面的定制功能,在保证页面风格不变的情况下,尽可能多的展现出信息的内容,活动模块的引入就显得更加方便,除此之外还可将页面上的一些固定内容如首页栏目,友情链接等,引入WEB编辑功能来处理,将这些日常维护工作量转为系统化、标准化的维护格式,从而保证网站设计风格的统一,同时也可以大大减轻工作量。

皮燮昝麓常隗署迅只聋縻策谨保叹焜织献弓弢阒

⑺ C语言编写一个简单的航空管理系统

需要分析:
A.车寻航线:
1.根据旅客提出的起点站,终点站名输出下列信息:航班号,票价,折扣,最多载客量,是否满载,起飞时间,降落时间和飞行时间;
2.根据订票乘客的姓名可以查询所订航班的航班号,座位号,飞行日期等信息;
3.根据航班号查询航班的起点站,中转站,终点站名,票价,折扣,最多载客量,是否满载,起飞时间,降落时间和飞行时间;
B.承办客户提出的要求(航班号、订票数额)查询该航班票额情况,若有余票,则为客户办理订票手续,输出座位号,需付款项信息;若已满员或余票额少于盯票额,则需重新询问客户要求。若需要,可登记排队候补;
C.根据客户提供的情况(日期、航班),为客户办理退票手续。(然后查询该航班是否有人排队候补,首先询问排第一的客户,若所退票额所能满足他的要求,则为他办理订票手续,否则依次询问其他排队候补客户);
E.内部人员对航班情况的控制:
可以录入航班信息,删除航班信息,修改航班信息,查看基本航班信息。

概要设计:
因为每个客户名单或查询名单都包括多个数据域,这样就需要有一个能存储多个数据域的数据类型来存储,因此采用单链表类型。由于航线的信息是固定的,可选用结构体数组,又因为订票与预约人数无法预计,可选用链表存储信息。
线性表的单链表存储结构:typedef struct LNode{
ElemType;
Struct Lnode*next;}LNode,*LinkList;
a.抽象数据类型顺序表的定义如下:
ADT SqList{
数据对象:D={ai|ai∈数据类型,i=1,2,3...,n}
数据关系:R1={<ai-1,ai>|ai-1,ai∈D,i=1,2,3...,n}
基本操作:
InitList_Sq(&L)
操作结果:创建空的顺序表。
CreatList_Sq(&L)
操作结果:建立顺序表。
}ADT SqList

b.抽象数据类型单链表的定义如下:
ADT LinkList{
数据对象:D={ai|ai∈结构类型,i=1,2,3...,n,n>0}
数据关系:R1={<ai-1,ai>|ai-1,ai∈D,i=1,2,3...,n}
基本操作:
InitList_L(&L)
操作结果:创建空的顺序表。
}ADT LinkList
在main()里调用各个函数
2.主程序
void main(){
初始化;
do{
接受命令
处理命令;
}while(“命令”!=“退出”);
}
3.程序的模块调用:

三.详细设计:
1.所有数据类型:
struct plan /*航班数据*/
{
char num[5];/*航班号码*/
char city[10];/*到达城市*/
char up[8];/*航班起飞时间*/
char down[8];/*航班到达时间*/
int pric ;/*航班价格*/
int rshu ;/*人数*/
int zheg[4];/*价格折扣*/
}
;
struct man/*定票人数据*/
{
char num[10];/*身份证号码*/
char nam[10];/*姓名*/
int demand ;/*定票数量*/
}
;
typedef struct node/*航班数据结点*/
{
struct plan data ;
struct node*next ;
}
Node,*Link ;
typedef struct people/*乘客数据结点*/
{
struct man data ;
struct people*next ;
}
peo,*LIN ;

2.程序所用函数:
void print()/*界面输出*/
{
printf("============================System of book ticket===============================\n");
printf("\n");
printf("\t***********************************************************\n");
printf("\t*\t1---Bookticket \t2---Dishonorbill *\n");
printf("\t*\t3---Adding flight\t4---Adding flight *\n");
printf("\t*\t5---Modify \t6---Advice *\n");
printf("\t*\t7---Save \t8---exit *\n");
printf("\t##########################################################\n");
}
添加航班模块
void add(Link l)/*添加航班数据*/
{
Node*p,*r,*s ;
char num[10];
r=l ;
s=l->next ;
while(r->next!=NULL)
r=r->next ;
while(1)
{
printf("please input the number of the plan(0-return)");/*输入0就返回*/
scanf("%s",num);
if(strcmp(num,"0")==0)
break ;
while(s)
{
if(strcmp(s->data.num,num)==0)
{
printf("=====tip:the number'%s'has been born!\n",num);

return ;
}
s=s->next ;
}
p=(Node*)malloc(sizeof(Node));/*航班数据输入*/
strcpy(p->data.num,num);
printf("Input the city where the plan will reach:");/*飞机到达地城市*/
scanf("%s",p->data.city);
getchar();
printf("Input the time which the plan take off:");/*起飞时间*/
scanf("%s",p->data.up);
getchar();
printf("Input the time which the plan reach:");/*降落时间*/
scanf("%s",&p->data.down);
getchar();
printf("Input the price of ticket:$");/*机票价格*/
scanf("%d",&p->data.pric);
getchar();
printf("Input the number of people who have booked ticket:");/*定票数量*/
scanf("%d",&p->data.rshu);
getchar();
printf("Input the agio of the ticket:");
scanf("%s",&p->data.zheg);
getchar();
p->next=NULL ;
r->next=p ;
r=p ;
shoudsave=1 ;
}
}
输出模块
void pri(Node*p)/*输出函数*/
{
printf("\n\t\t\tThe following is the record you want:\n");
printf("\nnumber of plan: %s",p->data.num);
printf("\ncity the plan will reach: %s",p->data.city);
printf("\nthe time the plan take off: %s\nthe time the plan reach: %s",p->data.up,p->data.down);
printf("\nthe price of the ticket: %d",p->data.pric);
printf("\nthe number of people who have booked ticket: %d",p->data.rshu);
printf("\nthe agio of the ticket:%s",p->data.zheg);

}
退出函数模块
Node*Locate1(Link l,char findmess[],char numorcity[])
{
Node*r ;
if(strcmp(numorcity,"num")==0)
{
r=l->next ;
while(r)
{
if(strcmp(r->data.num,findmess)==0)
return r ;
r=r->next ;
}
}
else if(strcmp(numorcity,"city")==0)
{
r=l->next ;
while(r)
{
if(strcmp(r->data.city,findmess)==0)
return r ;
r=r->next ;
}
}
return 0 ;
}

航班信息模块
void qur(Link l)/*航班信息查询*/

{
Node*p ;
int sel ;
char str1[5],str2[10];

if(!l->next)
{
printf("TIP:there are not any record to be inquired for you!");
return ;
}
printf("Choose the way:(1->according to the number of plan;2->according to the city):");/*选择航班号查询和终点城市查询*/
scanf("%d",&sel);
if(sel==1)
{
printf("Input the the number of plan:");
scanf("%s",str1);
p=Locate1(l,str1,"num");
if(p)
{
printf("the following is what you want:\n");
pri(p);
}
else
{
mark1=1 ;
printf("\nthe file can't be found!");
}
}
else if(sel==2)
{
printf("Input the city:");
scanf("%s",str2);
p=Locate1(l,str2,"city");
if(p)
{
printf("the following is what you want:\n");
pri(p);
}
else
{
mark1=1 ;
printf("\nthe file can't be found!");
}
}
}

定票模块
void buy(Link l,LIN k)/*定票函数*/
{
Node*r[10],*p ;
int ch,dem ;
peo*v,*h ;
int i=0,t=0 ;
char str[10],str1[10],str2[10];
v=k ;
while(v->next!=NULL)
v=v->next ;
printf("Input the city you want to go: ");/*航班终点站城市*/
scanf("%s",&str);
p=l->next ;
while(p!=NULL)
{
if(strcmp(p->data.city,str)==0)
{
r[i]=p ;
i++;
}
p=p->next ;
}
printf("\n\nthe number of record have %d\n",i);
for(t=0;t<i;t++)
pri(r[t]);
if(i==0)
printf("\n\tSorry!Can't find the plan for you!\n");
else
{
printf("\ndo you want to book it?<1/0>\n");
printf("please choose: ");
scanf("%d",&ch);
if(ch==1)
{
h=(peo*)malloc(sizeof(peo));/*重新分配空间*/
printf("Input your name: ");
scanf("%s",&str1);
strcpy(h->data.nam,str1);
printf("Input your id: ");
scanf("%s",&str2);
strcpy(h->data.num,str2);
printf("Input your demand: ");
scanf("%d",&dem);
h->data.demand=dem ;
h->next=NULL ;
v->next=h ;
v=h ;
printf("\n\tLucky!Success in booking ticket!");
getch();
shoudsave=1 ;
}
}
}
peo*Locate2(LIN k,char findmess[])
{
peo*r ;
r=k->next ;
while(r)
{
if(strcmp(r->data.num,findmess)==0)
{
mark=1 ;
return r ;
}
r=r->next ;
}
return 0 ;
}
退票模块
void tui(LIN k)/*退票函数*/
{
char str[10];
peo*p,*r ;
int ch2=0 ;
printf("Input your id: ");/*输入身份证号*/
scanf("%s",&str);
p=Locate2(k,str);
if(mark!=1)
printf("can't find the people!");
else if(mark==1)
{
mark=0 ;
printf("\t\t\tthe following is the record you want:\n");
printf("your id:%s\n",p->data.num);
printf("name:%s\n",p->data.nam);
printf("your denmand:%d",p->data.demand);
printf("\ndo you want to refund the ticket?<1/0>");
scanf("%d",&ch2);
if(ch2==1)
{
if(p)
{
r=k ;
while(r->next!=p)
r=r->next ;
r->next=p->next ;
free(p);
}
count2--;
printf("\nyou have sucessed in refunding ticket!");
shoudsave=1 ;
}
}
}

void Modify(Link l)/*修改航班信息*/
{
Node*p ;
char findmess[20],ch ;
if(!l->next)
{
printf("\n=====tip:there isn't record for you to modify!\n");
return ;
}
else
{
qur(l);
if(mark1==0)
{
printf("\nDo you want to modify it?\n");
getchar();
scanf("%c",&ch);
if(ch=='y');
{
printf("\nInput the number of the plan:");
scanf("%s",findmess);
p=Locate1(l,findmess,"num");
if(p)
{
printf("Input another number of plan:");
scanf("%s",&p->data.num);
getchar();
printf("Input another city the plan will reach:");
scanf("%s",&p->data.city);
getchar();
printf("Input another time the plan take off");
scanf("%s",&p->data.up);
printf("Input another time the plan reach:");
scanf("%s",&p->data.down);
printf("Input another price of the ticket::");
scanf("%d",&p->data.pric);
printf("Input another number of people who have booked ticket:");
scanf("%d",&p->data.rshu);
printf("Input another agio of the ticket:");
scanf("%s",&p->data.zheg);
printf("\n=====>tip:modifying record is sucessful!\n");
shoudsave=1 ;
}
else
printf("\tcan't find the flight!");
}
}
else
mark1=0 ;
}
}

void advice(Link l)/*终点站航班查询*/
{
Node*r ;
char str[10];
int mar=0 ;
r=l->next ;
printf("Iuput the city you want to go: ");/*输入终点站城市*/
scanf("%s",str);
while(r)
{
if(strcmp(r->data.city,str)==0&&r->data.rshu<200)
{
mar=1 ;
printf("\nyou can select the following plan!\n");
printf("\n\nplease select the fourth operation to book the ticket!\n");
pri(r);
}
r=r->next ;
}
if(mar==0)
printf("\n\t\t\tyou can't book any ticket now!\n");

}

void save1(Link l)/*保存数据*/
{
FILE*fp ;
Node*p ;
int count=0,flag=1 ;
fp=fopen("g:\\data1","wb");
if(fp==NULL)
{
printf("the file can't be opened!");
return ;
}
p=l->next ;
while(p)
{
if(fwrite(p,sizeof(Node),1,fp)==1)
{
p=p->next ;
count++;
}
else
{
flag=0 ;
break ;
}
}
if(flag)
{
printf("the number of the record which have been saved is %d\n",count);
shoudsave=0 ;
}
fclose(fp);
}

void save2(LIN k) /*保存数据*/
{
FILE*fp ;
peo*p ;
int count=0,flag=1 ;
fp=fopen("g:\\data2","wb");/*文件连接*/
if(fp==NULL)
{
printf("the file can't be opened!");
return ;
}
p=k->next ;
while(p)
{
if(fwrite(p,sizeof(peo),1,fp)==1)
{
p=p->next ;
count++;
}
else
{
flag=0 ;
break ;
}
}
if(flag)
{
printf("the number of the record which have been saved is %d\n",count);
shoudsave=0 ;
}
fclose(fp);
}

四.主函数模块:

main()
{
FILE*fp1,*fp2 ;
Node*p,*r ;
char ch1,ch2 ;
Link l ;
LIN k ;
peo*t,*h ;
int sel ;
l=(Node*)malloc(sizeof(Node));
l->next=NULL ;
r=l ;
k=(peo*)malloc(sizeof(peo));
k->next=NULL ;
h=k ;
fp1=fopen("g:\\data1","ab+");
if((fp1==NULL))
{
printf("can't open the file!");
return 0 ;
}

while(!feof(fp1))
{
p=(Node*)malloc(sizeof(Node));

if(fread(p,sizeof(Node),1,fp1)==1)
{
p->next=NULL ;
r->next=p ;
r=p ;

count1++;
}
}
fclose(fp1);
fp2=fopen("g:\\data2","ab+");
if((fp2==NULL))
{
printf("can't open the file!");
return 0 ;
}

while(!feof(fp2))
{
t=(peo*)malloc(sizeof(peo));

if(fread(t,sizeof(peo),1,fp2)==1)
{
t->next=NULL ;
h->next=t ;
h=t ;

count2++;
}
}
fclose(fp2);
while(1)
{

getch();
clrscr();

print();
printf("please choose the operation(1-8): ");
scanf("%d",&sel);
if(sel==8)
{
if(shoudsave==1)
{
getchar();
printf("\n=====tip:the file have been changed!do you want to save it(y/n)?\n");
scanf("%c",&ch1);
if(ch1=='y'||ch1=='Y')
{
save2(k);
save1(l);
}
}
printf("\n\tyou have exited! Happy serve for you");
break ;

}
switch(sel)
{
case 1 :
buy(l,k);
break ;

case 2 :
tui(k);
break ;

case 3 :
qur(l);
break ;

case 4 :
add(l);
break ;

case 5 :
Modify(l);
break ;

case 6 :
advice(l);
break ;

case 7 :
{
save1(l);
save2(k);
break ;
}

case 8 :
exit(0);
}

}
getch();
}

⑻ 机票订购信息管理系统的C#源代码,急急急!!!有界面最好了!!!

铁道部的订票系统也是C#写的,机票和那个差不多,让它拷一份就是了

阅读全文

与航空信息管理系统源码免费相关的资料

热点内容
喷油螺杆制冷压缩机 浏览:578
python员工信息登记表 浏览:376
高中美术pdf 浏览:160
java实现排列 浏览:512
javavector的用法 浏览:981
osi实现加密的三层 浏览:231
大众宝来原厂中控如何安装app 浏览:913
linux内核根文件系统 浏览:242
3d的命令面板不见了 浏览:525
武汉理工大学服务器ip地址 浏览:148
亚马逊云服务器登录 浏览:524
安卓手机如何进行文件处理 浏览:70
mysql执行系统命令 浏览:929
php支持curlhttps 浏览:142
新预算法责任 浏览:443
服务器如何处理5万人同时在线 浏览:250
哈夫曼编码数据压缩 浏览:425
锁定服务器是什么意思 浏览:383
场景检测算法 浏览:616
解压手机软件触屏 浏览:348