2022年长途汽车管理系统方案数据库课程方案报告

上传人:新** 文档编号:567318098 上传时间:2024-07-19 格式:PDF 页数:22 大小:1.20MB
返回 下载 相关 举报
2022年长途汽车管理系统方案数据库课程方案报告_第1页
第1页 / 共22页
2022年长途汽车管理系统方案数据库课程方案报告_第2页
第2页 / 共22页
2022年长途汽车管理系统方案数据库课程方案报告_第3页
第3页 / 共22页
2022年长途汽车管理系统方案数据库课程方案报告_第4页
第4页 / 共22页
2022年长途汽车管理系统方案数据库课程方案报告_第5页
第5页 / 共22页
点击查看更多>>
资源描述

《2022年长途汽车管理系统方案数据库课程方案报告》由会员分享,可在线阅读,更多相关《2022年长途汽车管理系统方案数据库课程方案报告(22页珍藏版)》请在金锄头文库上搜索。

1、个人资料整理仅限学习使用课程设计报告专业信息管理与信息系统课程名称数据库原理与应用设计题目长途汽车管理系统设计设计题目: 长途汽车管理系统设计设计主要内容 : 一、开发平台: VB+ SQL SERVER 2000 二、功能要求:1、设计内容设计一个长途汽车管理系统,该系统的用户由一般用户和管理员和司机组成,然后不同的用户拥有不同的权限,各自完成各自的管理功能,首先是欢迎界面,然后选择登录,登录的时候首先要判断用户的身份,合法的用户然后进入到系统主界面中,不同的用户看到不同的系统功能。用sql server2000创建后台数据库,然后利用程序设计语言VB )编写程序实现对数据库的操作,按照要求

2、完成所有的功能和模块。2、长途汽车管理信息系统主要功能1)登录界面、本用户密码的修改界面。2)普通用户管理:长途汽车路线查询界面按照起点或者终点查询)2)汽车管理 司机):长途汽车查询界面按照车牌号或者司机名查询)。3)管理员管理:管理员登录界面、长途汽车登记界面包括查询,添加、修改、删除等操作)、精选学习资料 - - - - - - - - - 名师归纳总结 - - - - - - -第 1 页,共 22 页个人资料整理仅限学习使用司机信息管理界面包括查询、删除、修改)、长途路线界面包括查询、添加、修改、删除等操作)。3、长途汽车管理信息系统数据库表单可以按照需求增加) 1)用户信息表单,主

3、要字段有:用户名、密码、用户身份管理员和普通用户、司机)2)司机信息表单,主要字段有:车牌号外码)、司机名、驾驶证号、性别、宅电、手机、出生日期、邮编、地址、备注、3)长途汽车管理表单,主要字段有:车牌号、路线编号外码)、司机名 4)长途路线详细表单,主要字段有:路线编号、发车时间、沿途停靠点、到达时间、票价、起点、终点三、课程设计报告主要内容:1 长途汽车管理系统需求分析给出系统的功能模块图,对各个功能作出详细介绍)2 长途汽车管理系统界面设计给出界面截图及其主要控件的属性设置表格)3 长途汽车管理系统数据库设计给出数据库各个表单中数据的字段名,数据类型及其相应的说明)4 长途汽车管理系统程

4、序设计按照功能模块给出详细的程序代码,并给出重点语句的注释)1 长途汽车信息管理系统需求分析图 1.1 长途汽车信息管理系统长途汽车信息管理系一般用户管理员司机长途汽车信息管理司机信息管理长途路线管理长途汽车查询长途汽车路线查询用户信息管理精选学习资料 - - - - - - - - - 名师归纳总结 - - - - - - -第 2 页,共 22 页个人资料整理仅限学习使用1.1 系统登录在登陆界面中选择登陆用户身份。按照用户权限相应的拥有进入相应界面的权利:长途汽车路线查询,长途汽车查询,长途汽车路线信息管理,司机信息管理,长途汽车管理、用户信息管理。1.2 用户管理1.2.1 新用户注册

5、通过新用户注册界面,注册一个新的用户。权限为普通用户。1.2.2 用户信息管理利用VB 界面可以将你要查询的用户信息内容从数据库的表单中用户信息查找出来。而只有管理员才可以进入的用户信息更新界面可以通过VB 界面来修改和删除你存储在数据库中的用户信息。1.3.1用户信息添加利用 VB界面输入一部分信息来可以将你用户信息添加到数据库中1.3.2用户信息删除通过 VB界面来添加或修改你所存储在数据库中的用户信息。1.4 长途汽车路线查询利用 VB界面输入路线号来可以把有关该路线号的所有信息都显示出来1.5 长途汽车路线管理管理员可以通过这个界面对长途汽车各路线的发车时间、沿途停靠点、到达时间、票价

6、及起点和终点进行增、删、改、查。精选学习资料 - - - - - - - - - 名师归纳总结 - - - - - - -第 3 页,共 22 页个人资料整理仅限学习使用1.6 长途汽车管理管理员可以通过这部分界面对长途汽车的车牌号、路线编号、司机名进行增、删、改、查。1.7 司机信息管理管理员可以通过这部分界面对司机的司机名、车牌号、驾驶证号、性别、宅电、手机号、出生年月、邮编、地址等进行增、删、改、查。1.8 退出退出系统2 长途汽车管理系统界面设计图 2.1 欢迎界面表 2.1 欢迎界面属性表对象属性属性值Form1 caption 长途汽车管理系统精选学习资料 - - - - - -

7、- - - 名师归纳总结 - - - - - - -第 4 页,共 22 页个人资料整理仅限学习使用Label1 caption 欢迎进入长途汽车管理系统backstyle 0 Combo1list 管理员司机用户Image1 caption 确定Image2 caption 注册图 2.2 登录界面表 2.2 司机、管理员、用户登陆属性表对象属性属性值Label1 caption 帐号Label2 caption 密码Text1 textNULL Text2 textNULL Image1 Picture 确定Image2 Picture 取消精选学习资料 - - - - - - - - -

8、 名师归纳总结 - - - - - - -第 5 页,共 22 页个人资料整理仅限学习使用图 2.3 长途汽车路线查询界面表 2.3 长途汽车路线查询属性表对象属性属性值Label1 caption 长途汽车路线信息Label2 caption 路线基本信息Label3 caption 路线编号Label4 caption发车时间Label5caption沿途停靠点Label6caption到达时间Label7caption票价Label8caption起点Label9caption终点line borderwidth 1 frame captionNULL Command1 caption

9、查询Text1 textNULL Text2 textNULL Text3 textNULL Text4 textNULL Text5 textNULL Text6 textNULL Combo1list x01、x02、x03、 x04 Adodclline CaptionAdodclline recordsource longline CommandType2-adCmdTableVisibleFalse精选学习资料 - - - - - - - - - 名师归纳总结 - - - - - - -第 6 页,共 22 页个人资料整理仅限学习使用图 2.4 管理员造作界面图 2.5 用户信息管理

10、界面表 2.5 用户信息管理界面属性表对象属性属性值SSTab1 caption 添加、删除、查询精选学习资料 - - - - - - - - - 名师归纳总结 - - - - - - -第 7 页,共 22 页个人资料整理仅限学习使用Label1 caption 用户名Label2 caption 密码Label3 caption 身份Image1 Picture 确定Image2 Picture 取消图 2.6 用户信息管理界面表 2.6 用户信息管理界面属性表:对象属性属性值datagrid datasource Adodc1 Adodc1 recordsource longline C

11、ommandType2-adCmdTableVisibleFalseFrame1 Image1 Picture 添加Image2 Picture 更新Image3 Picture 退出精选学习资料 - - - - - - - - - 名师归纳总结 - - - - - - -第 8 页,共 22 页个人资料整理仅限学习使用图 2.7 用户注册界面表 2.7 用户注册界面属性表:对象属性属性值datagrid datasource Adodc1 Adodc1 recordsource User_table CommandType2-adCmdTableVisibleFalseText1 textN

12、ULL Text2 textNULL Text2 textNULL Image1 Picture 确定Image2 Picture 退出Timer1 Interval 300 Label1 Caption 精选学习资料 - - - - - - - - - 名师归纳总结 - - - - - - -第 9 页,共 22 页个人资料整理仅限学习使用图 2.8 司机信息管理界面表 2.8 司机信息管理界面属性表:对象属性属性值SSTab1 caption 添加、删除、查询Label1 caption 车牌号Label2 caption 司机名Label3 caption 驾驶证号Image1 Pict

13、ure 添加Image2 Picture 退出Image3 Picture 更新datagrid datasource Adodc1 Adodc1datasource driver CommandType2-adCmdTableVisibleFalse精选学习资料 - - - - - - - - - 名师归纳总结 - - - - - - -第 10 页,共 22 页个人资料整理仅限学习使用图 2.8 用户密码修改界面表 2.8 用户密码修改界面属性表:对象属性属性值Label1 caption 用户名Label2 caption 旧密码Label3 caption 新密码Label3 capt

14、ion 确认密码Image1 Picture 确定Image2 Picture 退出datagrid datasource Adodc1 Adodc1datasource User_table CommandType2-adCmdTableVisibleFalse图 2.9 司机查询界面表 2.9 司机查询界面属性表:精选学习资料 - - - - - - - - - 名师归纳总结 - - - - - - -第 11 页,共 22 页个人资料整理仅限学习使用对象属性属性值Image1 Picture 退出datagrid datasource Adodc1 Adodc1datasource Ca

15、r CommandType2-adCmdTableVisibleFalse3 长途汽车信息管理数据库设计3.1 用户信息表单此表单包含用户的基本登录信息,如表3.1 所示: 表 3.1 用户信息表单列名含义数据类型约束username 用户Char Not NULL identities 身份Char (8 管 理 员 、 司 机 、 用户3.2 司机信息表单此表单包司机的基本信息,如表3.2 所示: 表 3.2 司机信息表单列名含义数据类型约束cnum 车牌号Char(10 外码dname 司机名Char(10 外码jnum 驾驶证号Char(18 主码sex 性别Char(2 Not NU

16、LL hnum 宅电Char(8 Not NULL mbnum 手机Char(11 Not NULL bdate 出生日期datetime pnum 邮编Char(6 Not NULL adress 地址Char(50 remark 备注Char(80 精选学习资料 - - - - - - - - - 名师归纳总结 - - - - - - -第 12 页,共 22 页个人资料整理仅限学习使用3.3 长途汽车路线信息表单此表单包含长途路线的信息,如表3.3 所示: 表 3.3 长途汽车路线信息表单列名含义数据类型约束lnum 路线编号Char(10 主码fctime 发车时间datetime N

17、ot NULL stoppoint 沿途停靠点Chat(80 arime 到达时间datetime Not NULL tprice 票价money Not NULL start 起点Char(10 Not NULL ends 终点Char(10 Not NULL 3.4 长途汽车管理表单此表单包含长途汽车的信息,如表3.4 所示: 表 3.4 长途汽车管理表单列名含义数据类型约束cnum 车牌号Char(10 主码lnum 路线编号Char(10 外码dname 司机名Char(10 Not NULL 4 长途汽车信息管理程序设计4.1 欢迎界面使用单选按钮选择用户身份,然后单击“确定”按钮,

18、触发Comman1_Click事件分别启动相应的登录界面。单击“退出”按钮,将触发Command2_Click 事件,直接退出系统。4.2 新用户注册界面输入注册信息后,就可以注册一个新的用户。精选学习资料 - - - - - - - - - 名师归纳总结 - - - - - - -第 13 页,共 22 页个人资料整理仅限学习使用4.3 普通用户登录界面单击“登录“按钮,将触发 Command1_Click事件,进入用户登陆界面单击“退出“按钮,将触发 Command2_Click事件,进入欢迎界面具体代码如下:精选学习资料 - - - - - - - - - 名师归纳总结 - - - -

19、- - -第 14 页,共 22 页个人资料整理仅限学习使用If Text1.Text = Then MsgBox 请输入用户名! Text1.SetFocus Exit Sub End If If Text2.Text = Then MsgBox 请输入密码! Text2.SetFocus Exit Sub End If 将用户名和密码赋给全局变量 zname = Text1.Text zkey = Text2.Text Adodc1.CommandType = adCmdText Adodc1.RecordSource = select * from user_table where us

20、ername= & Trim(Text1.Text & and code= & Trim(Text2.Text & Adodc1.Refresh 判断管理员所填信息是否正确If Adodc1.Recordset.EOF = True Then MsgBox 用户名与密码不相符,请重新输入! Text1.Text = Text2.Text = Text1.SetFocus Else MsgBox 登陆成功! userup.Hide selectline.Show Text1.Text = Text2.Text = End If End Sub Private Sub Image2_Click(

21、userup.Hide End Sub Private Sub Image3_Click( modify.Show End Sub4.4 司机登录界面Private Sub Image1_Click( If Text1.Text = Then MsgBox 请输入用户名! Text1.SetFocus Exit Sub End If If Text2.Text = Then MsgBox 请输入密码! Text2.SetFocus Exit Sub End If 将用户名和密码赋给全局变量 zname = Text1.Text zkey = Text2.Text Adodc1.CommandT

22、ype = adCmdText Adodc1.RecordSource = select * from user_table where username= & Trim(Text1.Text & and code= & Trim(Text2.Text & Adodc1.Refresh 判断管理员所填信息是否正确If Adodc1.Recordset.EOF = True Then MsgBox 帐号与密码不相符,请重新输精选学习资料 - - - - - - - - - 名师归纳总结 - - - - - - -第 15 页,共 22 页个人资料整理仅限学习使用入! Text1.Text = T

23、ext2.Text = Text1.SetFocus Else MsgBox 登陆成功! driverup.Hide sijicx.Show Text1.Text = Text2.Text = End If End Sub Private Sub Image2_Click( driverup.Hide End Sub 4.6 管理员登录界面与普通用户登录界面基本相似。4.7 管理员管理界面点击主界面上的菜单编辑器上的“用户信息管理”,将触发usergl_Click(_事件可以通过连接到用户信息管理界面。点击主界面上的菜单编辑器上“长途路线管理”,将触发linegl_Click(事件可以通过连接

24、到长途路线管理界面。点击主界面上的菜单编辑器上“司机信息管理”,将触发drivergl_Click(事件可以通过连接到司机信息管理界面。点击主界面上的菜单编辑器上“退出”,将触发end_Click( 事件可以退出该界面界面。4.8 用户信息查询界面确定了用户的用户名密码正确后,就可以显示出该用户的信息内容。并且可以通过按钮“密码修改”修改该用户的密码信息。部分代码如下:Private Sub Command2_Click( Text4.Locked = False Adodc1.Recordset.Update Adodc1.Refresh 精选学习资料 - - - - - - - - - 名

25、师归纳总结 - - - - - - -第 16 页,共 22 页个人资料整理仅限学习使用End Sub Private Sub Command3_Click( MsgBox 修改成功! End Sub Private Sub Form_Load( Text3.Text = Text4.Text = Text5.Text = EndSub 4.9 长途汽车路线查询界面普通用户在成功登陆后,将进入长途汽车路线查询界面,永固可以通过combo选择路线进行查询。部分代码如下:Private Sub Command1_Click( If Combo1.Text Then Adodclline.Comma

26、ndType = adCmdText Adodclline.RecordSource = select * from longline where lnum= & Trim(Combo1.Text & Adodclline.Refresh End If End Sub Private Sub Command2_Click( Unload Me End Sub Private Sub Form_Load( Text1.Text = Text2.Text = Text3.Text = Text4.Text = Text5.Text = Text6.Text = End Sub Private Su

27、b Image1_Click( If Combo1.Text Then Adodclline.CommandType = adCmdText Adodclline.RecordSource = select * from longline where lnum= & Trim(Combo1.Text & Adodclline.Refresh End If End Sub Private Sub Image2_Click( Unload Me End Sub4.10 司机信息查询界面司机在成功登陆后可以直接进入司机查询界面,通过datagrad 中的图表直接对司机信息进行查询。精选学习资料 -

28、- - - - - - - - 名师归纳总结 - - - - - - -第 17 页,共 22 页个人资料整理仅限学习使用4.11 用户信息管理界面管理员进入管理界面后,点击菜单编辑器上的“用户信息管理”,进入用户信息 管 理 界 面 , 在 这 里 , 管理 员 可 以 对 用 户 信 息 进 行 管 理 。部 分 代 码 如 下:Private Sub Image1_Click( If Text1.Text = Then MsgBox 请输入用户名 Text1.SetFocus Exit Sub End If Adodc1.CommandType = adCmdText Adodc1.Re

29、cordSource = select * from user_table where username = & Trim(Text1.Text & Adodc1.Refresh If Adodc1.Recordset.EOF = False Then MsgBox 已经存在此用户名,请重新输入! Text1.SetFocus Text1.Text = Exit Sub End If If Text2.Text = Then MsgBox 请输入密码 Text2.SetFocus Exit Sub End If If Text3.Text = Then MsgBox 请输入身份 Text3.S

30、etFocus Exit Sub End If Dim res As Integer res = MsgBox(确 实 添 加 此 记 录 !, vbExclamation + vbYesNo + vbDefaultButton2 提示用户If res = vbYes Then 如果确实要添加Adodc1.Recordset.AddNew Adodc1.Recordset.Fields(username.Value = Trim(Text1.TextAdodc1.Recordset.Fields(code.Value = Trim(Text2.TextAdodc1.Recordset.Fiel

31、ds(identities.Value = Trim(Text3.TextAdodc1.Recordset.Update Adodc1.Refresh MsgBox 添加成功 Text1.SetFocus Text2.SetFocus Text3.SetFocus Exit Sub End If End Sub Private Sub Image2_Click( Unload Me End Sub Private Sub Image3_Click( If Text4.Text = Then MsgBox 请输入用户名 精选学习资料 - - - - - - - - - 名师归纳总结 - - -

32、- - - -第 18 页,共 22 页个人资料整理仅限学习使用Text4.Text = Text4.SetFocus Exit Sub End If Adodc1.CommandType = adCmdText Adodc1.RecordSource = select * from user_table where username = & Trim(Text4.Text & Adodc1.Refresh Dim res As Integer res = MsgBox( 确认要删除此记录吗?, vbExclamation + vbYesNo + vbDefaultButton2If res

33、= vbYes Then Adodc1.Recordset.Delete MsgBox ( 删除成功 Adodc1.Recordset.MoveNext End If Text4.Text = Text5.Text = Text6.Text = End Sub Private Sub Image4_Click( Unload Me End Sub Private Sub Image5_Click( Adodc1.CommandType = adCmdText Adodc1.RecordSource = select * from user_table Adodc1.Refresh End Su

34、b 4.12长途路线管理界面管理员进入管理界面后,点击菜单编辑器上的“长途路线管理”,进入用户信息管理界面,在这里,管理员可以对长途汽车路线进行管理。点击添加按钮,弹出添加路线信息界面。部分代码如下:Private Sub Command1_Click( If Text1.Text = Then MsgBox 请输入路线编号 Text1.SetFocus Exit Sub End If Adodc1.CommandType = adCmdText Adodc1.RecordSource = select * from longline where lnum = & Trim(Text1.Tex

35、t & Adodc1.Refresh If Adodc1.Recordset.EOF = False Then MsgBox 路线编号已存在,请重新输入! Text1.SetFocus Text1.Text = Exit Sub End If If Text2.Text = Then MsgBox 请输入发出时间 Text2.SetFocus Exit Sub 精选学习资料 - - - - - - - - - 名师归纳总结 - - - - - - -第 19 页,共 22 页个人资料整理仅限学习使用End If If Text3.Text = Then MsgBox 请输入沿途停靠点 Text

36、3.SetFocus Exit Sub End If If Text4.Text = Then MsgBox 请输入到达时间 Text4.SetFocus Exit Sub End If If Text5.Text = Then MsgBox 请输入票价 Text5.SetFocus Exit Sub End If If Text6.Text = Then MsgBox 请输入起点 Text6.SetFocus Exit Sub End If If Text7.Text = Then MsgBox 请输入终点 Text7.SetFocus Exit Sub End If Dim res As

37、Integer res = MsgBox(确实添加此记录!, vbExclamation + vbYesNo + vbDefaultButton2 提示用户If res = vbYes Then 如果确实要添加Adodc1.Recordset.AddNew Adodc1.Recordset.Fields(lnum.Value = Trim(Text1.TextAdodc1.Recordset.Fields(fctime.Value = Trim(Text2.TextAdodc1.Recordset.Fields(stoppoint.Value = Trim(Text3.TextAdodc1.R

38、ecordset.Fields(arime.Value = Trim(Text4.TextAdodc1.Recordset.Fields(tprice.Value = Trim(Text5.TextAdodc1.Recordset.Fields(start.Value = Trim(Text6.TextAdodc1.Recordset.Fields(ends.Value = Trim(Text7.TextAdodc1.Recordset.Update Adodc1.Refresh MsgBox 添加成功 Text1.SetFocus Text2.SetFocus Text3.SetFocus

39、Text4.SetFocus Text5.SetFocus Text6.SetFocus Text7.SetFocus Exit Sub End If Unload Me End Sub 4.13 用户密码修改界面用户进入登陆界面后,可以选择修改密码。部分代码如下:精选学习资料 - - - - - - - - - 名师归纳总结 - - - - - - -第 20 页,共 22 页个人资料整理仅限学习使用Private Sub Image1_Click( If Trim(Text2.Text = Then MsgBox 请填旧密码! Text2.Text = Text2.SetFocus Exi

40、t Sub End If 判断新密码是否为空If Trim(Text3.Text = Then MsgBox 请填写新密码! Text3.SetFocus Exit Sub End If 判断确认密码是否为空If Trim(Text4.Text = Then MsgBox 请再次确认密码! Text4.Text = Text4.SetFocus Exit Sub End If 判断密码长度是否符合要求If Len(Text3.Text 10 ThenMsgBox 新密码不符合要求,为2-10 个字符! Text3.Text = Text3.SetFocus Exit Sub End If 判断

41、两次输入是否相同! If Text3.Text Text4.Text Then MsgBox 两次密码输入不一致,请重新输入! Text3.SetFocus Text4.SetFocus Exit Sub End If 判断原密码是否正确Adodc1.CommandType = adCmdText Adodc1.RecordSource = select * from user_table where username = & Trim(Text1.Text & Adodc1.Refresh If Trim(Text2.Text Trim(Adodc1.Recordset.Fields(cod

42、e.Value ThenMsgBox 旧密码错误,请重新输入! Text2.Text = Text2.SetFocus Exit Sub End If 修改密码Adodc1.Recordset.Update Adodc1.Recordset.Fields(username = Trim(Text1.TextAdodc1.Recordset.Fields(code = Trim(Text4.Text Adodc1.Recordset.Update Adodc1.Refresh MsgBox 密码修改成功! 文本框清空Text4.Text = Text2.Text = Text3.Text = U

43、nload Me End Sub 精选学习资料 - - - - - - - - - 名师归纳总结 - - - - - - -第 21 页,共 22 页个人资料整理仅限学习使用5 小结通过这两周的课程设计,在老师的精心指导下已经完成了该系统的基本功能,虽然界面设计和代码设计还有缺陷,但是这是第一次通过自己的劳动获得的,以后随着知识的积累和经验的增长我相信我能设计出更好更符合用户的系统。在课程设计过程中 , 我们用到VB ,SQL2000设计的软件等。这些软件只是课堂上听老师介绍过,而并没有自己真正地接触过。曾经只是认为它们是多么的复杂。经过这次课程设计后,发现它们并不是那么难,而且还很简单。至少

44、,我们的基础有了。我们对它们十分感兴趣。希望还有更多的这样课程设计来提高我们的学习。在学习过程中我也遇到了许多困难,如一些数据控件的使用,我不是太懂,通过问指导老师和同学们基本了解了数据控件的基本知识,利用数据控件实现了前台VB 界面和后台数据库的连接,实现了数据库的操作。经过这次数据库的课程设计,我学到了好多东西,还加强我的实际动手能力。感谢老师能给我们这次学习VB ,数据库知识的机会。6 参考文献1 王宏主编 . SQL Sever 2000数据库管理 . 北京:人民邮电出版社2 何玉洁著 . 数据库基础及应用技术 . 北京:清华大学出版社3 王福成著 . Visual Basic 6数据库开发指南北京:清华大学出版社4 杨莉著 . Visual Basic程序设计教程 . 北京:中国水利水电出版社精选学习资料 - - - - - - - - - 名师归纳总结 - - - - - - -第 22 页,共 22 页

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 建筑/环境 > 施工组织

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号