基于c窗体航空订票管理系统设计与实现.docx

上传人:聆听****声音 文档编号:567721 上传时间:2023-04-29 格式:DOCX 页数:48 大小:769.88KB
下载 相关 举报
基于c窗体航空订票管理系统设计与实现.docx_第1页
第1页 / 共48页
基于c窗体航空订票管理系统设计与实现.docx_第2页
第2页 / 共48页
基于c窗体航空订票管理系统设计与实现.docx_第3页
第3页 / 共48页
基于c窗体航空订票管理系统设计与实现.docx_第4页
第4页 / 共48页
基于c窗体航空订票管理系统设计与实现.docx_第5页
第5页 / 共48页
基于c窗体航空订票管理系统设计与实现.docx_第6页
第6页 / 共48页
基于c窗体航空订票管理系统设计与实现.docx_第7页
第7页 / 共48页
基于c窗体航空订票管理系统设计与实现.docx_第8页
第8页 / 共48页
基于c窗体航空订票管理系统设计与实现.docx_第9页
第9页 / 共48页
基于c窗体航空订票管理系统设计与实现.docx_第10页
第10页 / 共48页
基于c窗体航空订票管理系统设计与实现.docx_第11页
第11页 / 共48页
基于c窗体航空订票管理系统设计与实现.docx_第12页
第12页 / 共48页
基于c窗体航空订票管理系统设计与实现.docx_第13页
第13页 / 共48页
基于c窗体航空订票管理系统设计与实现.docx_第14页
第14页 / 共48页
基于c窗体航空订票管理系统设计与实现.docx_第15页
第15页 / 共48页
基于c窗体航空订票管理系统设计与实现.docx_第16页
第16页 / 共48页
基于c窗体航空订票管理系统设计与实现.docx_第17页
第17页 / 共48页
基于c窗体航空订票管理系统设计与实现.docx_第18页
第18页 / 共48页
基于c窗体航空订票管理系统设计与实现.docx_第19页
第19页 / 共48页
基于c窗体航空订票管理系统设计与实现.docx_第20页
第20页 / 共48页
亲,该文档总共48页,到这儿已超出免费预览范围,如果喜欢就下载吧!
下载资源
资源描述

基于c窗体航空订票管理系统设计与实现.docx

《基于c窗体航空订票管理系统设计与实现.docx》由会员分享,可在线阅读,更多相关《基于c窗体航空订票管理系统设计与实现.docx(48页珍藏版)》请在冰点文库上搜索。

基于c窗体航空订票管理系统设计与实现.docx

制作人:

王曼董明欣张杰网络设计与开发二班c#大作业指导老师:

李海平

基于c#窗体的航空订票管理系统的设计与实现

一.系统分工

管理资料

查询航线

航空订票管理系统

管理员

用户

修改公告

修改航班

管理用户

查看信息

订票管理

退票管理

二.需求分析

进入21世纪,人们计算机处理事情的需求有了进一步的要求。

小到商店缴费管理系统的快速运行,大到国家航空航天计算机的管理系统的进一步提升。

我们每时每刻都在追求着计算机处理事情的快速,稳定,运算量大等一系列优点。

由于人们为了方便快捷的生活方式,上网已经成为潮流,这样快速稳定的航空订票系统应运而生。

航空订票系统需要满足一般的查询航线,订票,退票等一系列基本操作,当然我们也可以设置黑名单,以屏蔽违规用户。

当然人人都追求美感,那么系统界面的设计也要符合大众的审美要求。

资料的安全与隐私性也是至关重要的,我们每个人,都不想别人知道自己的一些隐私,对自己资金的安全也格外重视。

所以订票系统对不同的角色赋予不同的权限从而保证用户资料的安全性与隐私性。

三.系统功能

(1)游客功能

对游客我们系统只为其提供查询航班信息的功能,不可进行订票操作。

当游客点击购票按钮时,将提醒其注册或登录。

(2)用户注册

用户只有注册成为我们的会员,才可以进行订票操作。

一旦注册,用户名将不可修改。

注册时不可与数据库中存在的用户名相同,即系统中只能存在唯一一个用户名。

(3)用户中心

提供用户对自己的资料的查看与修改的功能。

还可以对自己的密码进行修改,在修改密码时需要输入原始密码进而进行验证。

由于时间问题,对个人钱包功能先暂停使用,默认钱够买票了。

(4)订票功能

用户可根据航班时间,和航班号或航班价格进行订票。

订票时系统会提醒确认,订票成功后系统会将用户的信息加入订票信息表。

并改变航班的余票额。

(5)退票功能

用户在不需要票的情况下进行退票操作。

退票时必须输入订票时随机生成的订单号,与航班号。

退票成功后,航班自动将余票量加一操作。

(6)本系统还添加了管理员界面。

当管理员进入后,可对用户的信息进行查看,但不能修改,也可将用户加入黑名单,如果用户有订单,则不允许管理员做加入黑名单操作。

当然加入黑名单时,管理员需要说明理由,作为存档。

管理员,也可根据实际情况对航班进行管理操作。

增删改查。

他也可以对公告进行修改操作。

(7)系统也实现了,对于不同的角色进入,会产生不同的界面效果。

保证了数据的安全性,和保密性。

数据库设计

(1)管理员表

(2)航班表

(3)黑名单表

(4)订单信息表

(5)用户信息表

四.运行截图

五.源代码

usingSystem;

usingSystem.Collections.Generic;

usingSystem.Linq;

usingSystem.Windows.Forms;

namespace航空订票管理系统

{

staticclassProgram

{

///

///应用程序的主入口点。

///

[STAThread]

staticvoidMain()

{

stringdataDir=AppDomain.CurrentDomain.BaseDirectory;

if(dataDir.EndsWith(@"\bin\Debug\")

||dataDir.EndsWith(@"\bin\Release\"))

{

dataDir=System.IO.Directory.GetParent(dataDir).Parent.Parent.FullName;

AppDomain.CurrentDomain.SetData("DataDirectory",dataDir);

}

Application.EnableVisualStyles();

Application.SetCompatibleTextRenderingDefault(false);

Application.Run(newForm1());

}

}

}

usingSystem;

usingSystem.Collections.Generic;

usingSystem.ComponentModel;

usingSystem.Data;

usingSystem.Drawing;

usingSystem.Linq;

usingSystem.Text;

usingSystem.Windows.Forms;

usingSystem.Data.SqlClient;

namespace航空订票管理系统

{

publicpartialclassForm1:

Form

{

zhucezc=newzhuce();

Userlaunchlch=newUserlaunch();

publicstringstatus1{get;set;}

intlabel1x;

publicForm1()

{

InitializeComponent();

}

privatevoidForm1_Load(objectsender,EventArgse)

{

label1x=label1.Right;

timer1.Enabled=true;

timer2.Enabled=true;

timer3.Enabled=true;

timer2.Start();

novisible2();

novisible1();

textBox1.Focus();

timer1.Start();

}

//隐藏管理员可做的操作

publicvoidnovisible1()

{

客户信息ToolStripMenuItem.Visible=false;

航班信息ToolStripMenuItem.Visible=false;

修改公告ToolStripMenuItem.Visible=false;

}

//隐藏用户可做的操作

publicvoidnovisible2()

{

用户补全资料ToolStripMenuItem.Visible=false;//个人中心

用户充值ToolStripMenuItem.Visible=false;//办理业务

}

//隐藏登陆前界面

publicvoidnovisible3()

{

用户登录ToolStripMenuItem.Visible=false;

浏览信息ToolStripMenuItem.Visible=false;

管理员登陆ToolStripMenuItem.Visible=false;

}

//控制公告字段

privatevoidtimer1_Tick(objectsender,EventArgse)

{

label1.Location=newPoint(label1.Location.X-1,label1.Location.Y);

if(label1.Right==0)

{

label1.Left=label1x;

}

}

//当点到按钮时,进行图片变换

privatevoidbutton1_MouseEnter(objectsender,EventArgse)

{

Buttonbttn;

timer2.Enabled=false;

bttn=(Button)sender;

if(bttn==button1)picture1();

elseif(bttn==button2)picture2();

elseif(bttn==button3)picture3();

elseif(bttn==button4)picture4();

elseif(bttn==button5)picture5();

}

privatevoidradioButton1_CheckedChanged(objectsender,EventArgse)

{

textBox5.Enabled=false;

textBox1.Enabled=true;

textBox2.Enabled=true;

textBox5.Text="";

textBox1.Focus();

}

privatevoidradioButton2_CheckedChanged(objectsender,EventArgse)

{

textBox5.Enabled=true;

textBox1.Text="";

textBox2.Text="";

textBox1.Enabled=false;

textBox2.Enabled=false;

}

privatevoidradioButton4_CheckedChanged(objectsender,EventArgse)

{

textBox6.Enabled=false;

textBox3.Enabled=true;

textBox4.Enabled=true;

textBox6.Text="";

textBox4.Focus();

}

privatevoidradioButton3_CheckedChanged(objectsender,EventArgse)

{

textBox6.Enabled=true;

textBox4.Text="";

textBox3.Text="";

textBox3.Enabled=false;

textBox4.Enabled=false;

textBox6.Focus();

}

//安全退出

privatevoid用户退出ToolStripMenuItem_Click(objectsender,EventArgse)

{

if(toolStripStatusLabel4.Text=="未登录")

{

MessageBox.Show("当前你未登录,请登录或注册");

}

else

{

MessageBox.Show(toolStripStatusLabel4.Text+"您已下线,谢谢使用!

");

toolStripStatusLabel4.Text="未登录";

status1="";

novisible2();

novisible1();

用户登录ToolStripMenuItem.Visible=true;

浏览信息ToolStripMenuItem.Visible=true;

管理员登陆ToolStripMenuItem.Visible=true;

}

}

//注册界面

privatevoid浏览信息ToolStripMenuItem_Click(objectsender,EventArgse)

{

zhucezc=newzhuce();

zc.ShowDialog();

}

//图片变换

privatevoidtimer2_Tick(objectsender,EventArgse)

{

Randomrd=newRandom();

intr=rd.Next(1,6);

switch(r)

{

case1:

picture1();break;

case2:

picture2();break;

case3:

picture3();break;

case4:

picture4();break;

case5:

picture5();break;

}

}

//图片显示方法

privatevoidpicture1()

{

pictureBox1.Show();

pictureBox2.Hide();

pictureBox3.Hide();

pictureBox4.Hide();

pictureBox5.Hide();

}

privatevoidpicture2()

{

pictureBox2.Show();

pictureBox1.Hide();

pictureBox3.Hide();

pictureBox4.Hide();

pictureBox5.Hide();

}

privatevoidpicture3()

{

pictureBox3.Show();

pictureBox2.Hide();

pictureBox1.Hide();

pictureBox4.Hide();

pictureBox5.Hide();

}

privatevoidpicture4()

{

pictureBox4.Show();

pictureBox2.Hide();

pictureBox3.Hide();

pictureBox1.Hide();

}

privatevoidpicture5()

{

pictureBox5.Show();

pictureBox2.Hide();

pictureBox3.Hide();

pictureBox4.Hide();

pictureBox1.Hide();

}

//当不用手动控制图片时,执行

privatevoidbutton1_MouseLeave(objectsender,EventArgse)

{

timer2.Enabled=true;

}

//用户登陆

privatevoid用户登录ToolStripMenuItem_Click(objectsender,EventArgse)

{

Userlaunchuch=newUserlaunch();

if(uch.ShowDialog()==DialogResult.OK)

{

status1=uch.UserName;

toolStripStatusLabel4.Text="尊敬的用户"+status1+"你好!

";

用户补全资料ToolStripMenuItem.Visible=true;

用户充值ToolStripMenuItem.Visible=true;

novisible1();

novisible3();

}

uch.Dispose();

}

//管理员登陆

privatevoid管理员登陆ToolStripMenuItem_Click(objectsender,EventArgse)

{

Admainadn=newAdmain();

if(adn.ShowDialog()==DialogResult.OK)

{

toolStripStatusLabel4.Text=adn.AdmainName;

novisible2();

novisible3();

客户信息ToolStripMenuItem.Visible=true;

航班信息ToolStripMenuItem.Visible=true;

修改公告ToolStripMenuItem.Visible=true;

}

}

//机票预订

privatevoidbutton6_Click(objectsender,EventArgse)

{

if(toolStripStatusLabel4.Text=="未登录")

{

MessageBox.Show("请先登录");

textBox1.Text=textBox2.Text=textBox5.Text="";

}

elseif(toolStripStatusLabel4.Text.Substring(0,3)=="亲爱的")

{

MessageBox.Show("对不起,管理员,您不能订票的!

");

textBox1.Text=textBox2.Text=textBox5.Text="";

}

else

{

if(textBox1.Text!

=""&&textBox2.Text!

=""||textBox5.Text!

="")

{

intn=1;

jipiaoyudingjyd=newjipiaoyuding(textBox1.Text,textBox2.Text

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > IT计算机 > 电脑基础知识

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2