影院订票管理系统实验报告
精选 管理方案
文件编号:0 2020 年 年 6 6月
影院订票管理系统实验报告
版本号:
A A
修改号:
1 1
页
次:
1.0
编
制:
会
签:
审
核:
批
准 :
发布日期:
实施日期:
方案大全
方案整理
软件工程 实验报告
一.系统概述;
1.项目需求 ;
2.需求分析; 二.项目开发计划书;
三.设计说明书;
1.分析与创建数据库
2.创建登陆窗体模块;
3.创建售票窗体模块 4.创建检票界面 5.创建维护界面
1.创建影库界面
2.创建职工界面
3.创建票务界面 四.用户操作手册;
五.改进意见;
六.自我评价;
七.参考资料、书籍;
一.系统概述;
1.项目需求;
现在中国大部分的家庭都喜欢在家里置办属于自己风格的家庭影院。但是,仍然有很多人喜欢到电影院去看电影。因为家里的气氛毕竟不如影院好。所以,现代家庭影院的出现并不会让电影院没有生路。
每个社会服务系统都有自己的一套管理机制。当然,电影院也不除外。其实电影院的管理系统应该来说比其他的社会服务系统的管理要简单一点。电影院不外乎是引进电影,制定播放影片的时间表,买票,检票进场观看,还有就是一些数据管理方面的事。如工作人员管理,票务管理等等。为了工作机制简单有序,必然要引进一套管理系统。
2.需求分析; 具体而言,影院售票系统需要实现以下的需求:
(1)
能够对播放电影,工作人员,售票事宜,检票事宜,无用数据进行处理。
(2)
售票管理自然有专人负责,要处理各电影的电影票销售问题。当然包括退票问题,还有就是预订电影票其实也就相当于买票。两者可以当一回事处理。
(3)
检票管理事宜要完成观众进场时检票的事宜。其中包括了电影票的真假检测问题。
(4)
数据管理要处理电影的播放的次序,工作人员的管理,以及过期电影票的处理问题。
二.项目开发计划书;
根据需求分析的结果,本小组成员讨论协商,决定本系统主要划分为以下三个子模块:售票管理模块、检票管理模块、数据管理模块。
影院售票管理系统是一个基于电影院工作人员的系统,不同类型的用户在系统中有不同的权限。主要有三种用户:
1.
售票管理人员:
主要负责卖票,订票及退票事宜; 2.
检票管理人员:
主要负责观众进场时检票工作,以及辨认电影票的真假(此工作自然可以由服务系统来完成); 3.
数据处理人员:
主要负责播放电影导入数据库,工作人员的应聘以及开除的数据管理,还有过期电影票的数据处理; 以下分别介绍此系统中各个系统(3 个子模块。):
(1)售票系统模块
给观众提供售票服务。不同的位置有不同的价格。要选购哪个位置由观众决定。工作人员根据观众的需要进行操作。系统在购票成功后会产生一个验证码,此验证码连工作人员都不知道。是随机生成的。用于对电影票真假的辩识。
(2)检票系统模块
在观众进场时所使用的系统。由扫描仪扫描,取的验证码,然后进行辩识,看是不是和数据库中数据一样,如果一样,则电影票为真,否则电影票为假。由此来决定让不让观众入场。
(3)维护系统模块
此模块是由电影院的数据库管理员来管理的。他根据电影院事情的需要对有关数据进行处理。如电影票的管理,工作人员的管理,和电影库的管理等。
整个系统的结构如下图 1 所示:
以下分别介绍系统中数据系统 3 个子模块。
(1)影片播放管理模块
影片播放管理是对电影院播放的电影的充实,设定电影的播放,以及电影时间的设定。当所设定的电影已经播放完成后,要对其进行删除。还要对数据库进行清理,把一些没用的数据全部清除。
(2)工作人员管理:
电影院里当然有工作人员的增加与开除,以及他们的管理权限的变化。这一部分事件的发生都需要数据库管理人员将有关数据进行处理。保证数据库里数据的统一与完整。
其中有他们的共号,登陆电影院管理系统的密码,以及所拥有的权限。
(3)过期票务管理:
电影院里的电影在放过以后,在数据库的电影票数据就会变成没有用的数据。通过此管理可以把那些没用的过期的数据清除。这里指的是与放过的电影同名的电影票清除,而其他的电影票保存不变。
小组人员分工情况:
王圣武
登陆界面和售票界面、系统转换界面的程序编写,整个系统框架的设计,整个系统界面及美化设计,整个系统流程的管理,创建数据库 张润驰
检票系统和整个维护系统的程序编写,局部框架辅助设计,创建数据库 本系统后台数据库采用目前比较流行的 Microsoft SQL Sever ,该数据库系统在安全性、准确性、运行速度方面有绝对的优势,并且处理数据量大、效率高;前台采用 Microsoft公司的
2003 作为主要的开发工具,其可与 SQL Sever 2000 数据库无缝衔接。
三.设计说明书;
1.分析与创建数据库;
根据系统的功能分析结果,影院售票管理系统将会使用 Microsoft SQL Sever 2000 作为后台的数据库管理系统。本管理系统是应用于电影院中,而且需要和数据库之影院售票管理系统工作人员登录 维护系统 检票系统 售票系统 影 片 播放管理 工作人员管理 过期票务管理
间进行频繁数据交换,所以采用 Microsoft SQL Sever 2000 作为后台的数据库管理系统。
在本管理系统中,需要掌握影库充实信息,职工管理信息,票务管理信息,此外,由于要进行职工管理,还需要掌握使用本系统的职工。表 1 存储硬库信息列表,表2 存储了电影院座位的相关数据连接关系,表 3 存储了电影票销售情况管理,表 4存储了系统使用者职工的相关情况的管理列表。
表 表 1
影库管理表 --- MOVIES
字段名称 数据类型 字段属性 字段大小 作用 必填字段 索引 是否主键 Movie_id smallint 2 电影号 是 有(无重复)
是 Movie_name Nvarchar 50 电影名称 是 无
actor Nvarchar 50 导演 否 无
actress Nvarchar 50 主演 否 无
producer Nvarchar 25 制片厂 否 无
palydate datetime 8 上映时间 是 无
表 表 2
电影院座位管理表 --- SEATS
字段名称 数据类型 字段属性 字段大小 作用 必填字段 索引 是否主键 seatid smallint 2 座位号 是 有(无重复)
是 price float 8 票价 是 无
soldornot smallint 2 是否售出 是 无
表 表 3
电影票信息表 --- TICKETS
字段名称 数据类型 字段属性 字段大小 作用 必填字段 索引 是否主键 ticketsid smallint 2 电影票号 是 有(无重复)
是 seatid smallint 2 座位号 是 有
Movie_id smallint 2 电影号 是 有
Movie_name Nvarchar 50 电影名 否 无
palydate datetime 8 上映时间 是 无
price float 8 价格 是 无
yanzhengma smallint 2 验证码 是 无 是 表 表 4
职工信息表 --- WORKERS
字段名称 数据类型 字段属性 字段大小 作用 必填字段 索引 是否主键 workerid smallint 2 职工号 是 无 是 password smallint 2 职工密码 是 无
leibie smallint 2 职工类型 是 无
根据规范化的设计理念,本管理系统的数据分成上面 4 个表,减少了数据的冗余,同时在这些表之间又存在着一些关联关系。这四个表之间的这两种关系表现在下图所示的关系:
2.创建登陆窗体模块;
(1)窗体模块的功能
登陆窗体
(2)窗体界面的设计
在工程中添加一个窗体,命名为“登陆系统”,用来作为系统登陆窗体。界面
的设计如图 3 所示。
(3)窗体代码
Imports Public Class Form1
Inherits
Dim navigator As BindingManagerBase
"用来对记录导航
Dim mycon As New SqlConnection
"连接对象
Dim mycom As New SqlCommand
"命令对象
Dim mycom1 As New SqlCommand
Dim frm2 As New Form2
Dim frm3 As New Form3 Dim frm8 As New Form8 Private Sub Timer1_Tick(ByVal sender As , ByVal e As
Handles
(0).Text =
End Sub
Private Sub GroupBox1_Enter(ByVal sender As , ByVal e As
Handles
If
= True Then
= False
= False
ElseIf
= True Then
= False
= False
ElseIf
= True Then
= False
= False
End If
End Sub
Private Sub Button1_Click(ByVal sender As , ByVal e As
Handles
= "E:\实验运行场\程序设计\电影院票务系统\image\登陆界面"
= False
()
Dim tox1 As Int32
Dim tox2 As Int32
Dim mydataadapter As New SqlDataAdapter
Dim myds As New DataSet
Dim i As Integer
Dim j As Integer
tox1 = Val
tox2 = Val
= "initial catalog=ticketbooking;user id=sa;password=;"
= mycon
"通过 MYCON 连接对象操作数据库
=
"设置命令类型
= "select * from workers"
"设置要执行的命令
Try
()
= mycom
Catch ex As Exception
("连接失败")
Finally
()
End Try
(myds, "workers")
For i = 0 To ("workers"). - 1
If tox1 = Val("workers").Rows(i).ItemArray(0)) Then
j = 0
Exit For
Else
j = 1
End If
Next
For i = 0 To ("workers"). - 1
If tox2 = Val("workers").Rows(i).ItemArray(1)) Then
j = 0
Exit For
Else
j = 1
End If
Next
If j = 1 Then
("您的工号或者密码错误", "错误提示", ,
Else
Try
= mycon
"通过 MYCON 连接对象操作数据库
=
"设置命令类型
= "select leibie from workers where workerid=" + CStr(tox1) + "and password=" + CStr(tox2) + "" "设置要执行的命令
Dim mydataadapter1 As New SqlDataAdapter
= mycom1
Dim myds1 As New DataSet
(myds1, "workers")
If
= True And Val("workers").Rows(0)("leibie")) = 1 Then
()
()
ElseIf
= True And Val("workers").Rows(0)("leibie")) = 2 Then
()
()
ElseIf
= True And Val("workers").Rows(0)("leibie")) = 3 Then
()
()
Else
("您超出职责范围 或未选择服务系统,请重新输入!", "错误提示", , ,
End If
Catch ex As Exception
End Try
End If
End Sub
Private Sub Form1_Load(ByVal sender As , ByVal e As
Handles
= "E:\实验运行场\程序设计\电影院票务系统\image\登陆界面"
()
End Sub
Private Sub Button2_Click(ByVal sender As , ByVal e As
Handles
Dim exitform As New Form7
If
=
Then
()
()
()
End If
End Sub End Class 3. 创建售票窗体模块 (1)
窗体模块的功能
为观众提供买票服务。在界面上观众可以看见座位的情况,根据此来选择自己喜欢的座位。不同的座位有不同的价格。此窗体还有退票功能。
(2)
窗体界面的设计
在工程中添加一个窗体,命名为“售票系统”,用来作为仓管人员窗体。界面
的设计如下图所示。
(3)
代码编写
Imports Public Class Form2
Inherits
Dim navigator As BindingManagerBase
"用来对记录导航
Dim mycon As New SqlConnection
"连接对象
Dim mycom As New SqlCommand
"命令对象
Private Sub Form2_Load(ByVal sender As , ByVal e As
Handles
"()
= "E:\实验运行场\程序设计\电影院票务系统\image\销售界面.swf"
()
= "E:\实验运行场\程序设计\电影院票务系统\image\检票界面下.swf"
()
Dim mydataadapter As New SqlDataAdapter
Dim myds As New DataSet
Dim i As Integer
Dim j As Integer
Dim strrow As String
Dim dt As New DataTable
= "initial catalog=ticketbooking;user id=sa;password=;"
= mycon
"通过 MYCON 连接对象操作数据库
=
"设置命令类型
= "select * from Movies"
"设置要执行的命令"
Try
()
= mycom
(myds, "Movies")
Catch ex As Exception
("连接失败")
Finally
()
End Try
Try
For i = 0 To ("Movies"). - 1
strrow = ("Movies").Rows(i)("movie_name")
ComboBo
Next
Catch ex As Exception
End Try
End Sub
Private Sub Button1_Click_1(ByVal sender As , ByVal e As
Handles
Dim i As Integer
Dim tickethao As Integer
Dim moviehao As Integer
Dim suiji As Integer
Dim mydataadapter3 As New SqlDataAdapter
Dim myds3 As New DataSet
Dim dt3 As New DataTable
Dim mycom3 As New SqlCommand
Dim mycon3 As New SqlConnection
Randomize()
suiji = Int(9000 * Rnd() + 1000)
Try
tickethao = tickets_id()
moviehao = movieid()
= "initial catalog=ticketbooking;user id=sa;password=;"
= mycon3
"通过 MYCON 连接对象操作数据库
=
"设置命令类型
Catch ex As Exception
End Try
If tickethao = 0 Then
Try
("此座位已售出,请重新选择!", "错误")
= ""
= ""
= ""
= ""
= ""
= ""
Catch ex As Exception
End Try
Else
Try
()
= "insert into tickets (ticketsid,seatid,movie_id,movie_name,palydate,price,yanzhengma) values (" + CStr(tickethao) + "," +
+ "," + CStr(moviehao) + ","" +
+ "","" +
+ ""," +
+ "," + CStr(suiji) + ")"
Dim sql As String
sql = "insert into tickets (ticketsid,seatid,movie_id,movie_name,palydate,price,yanzhengma) values (" + CStr(tickethao) + "," +
+ "," + CStr(moviehao) + ","" +
+ "","" +
+ ""," +
+ "," + CStr(suiji) + ")"
= mycom3
Try
()
("售票成功!", "谢谢观看")
Catch ex As Exception
MsgBox
End Try
Catch ex As Exception
End Try
()
= ""
= ""
= ""
= ""
= ""
= ""
End If
revoke_seat()
End Sub
Private Sub ComboBox1_SelectedIndexChanged_1(ByVal sender As , ByVal e As
Handles
revoke_seat()
Dim mydataadapter1 As New SqlDataAdapter
Dim mydataadapter11 As New SqlDataAdapter
Dim myds1 As New DataSet
Dim myds11 As New DataSet
Dim dt1 As New DataTable
Dim dt11 As New DataTable
Dim mycom1 As New SqlCommand
Dim mycom11 As New SqlCommand
= "initial catalog=ticketbooking;user id=sa;password=;"
= mycon
"通过 MYCON 连接对象操作数据库
=
"设置命令类型
= mycon
=
Try
()
= "select palydate from Movies where
movie_name= "" +
+ """
= "select * from tickets where movie_name= "" +
+ """
= mycom1
= mycom11
(myds1, "tickets")
(myds11, "Movies")
dt1 = ("tickets")
dt11 = ("Movies")
Catch ex As Exception
End Try
Try
IfThen
("还未出售!")
= (0)("palydate")
revoke_seat()
Else
ShowSellInfo(dt1)
= (0)("palydate")
End If
Catch ex As Exception
End Try
()
End Sub
Private Sub Button2_Click_1(ByVal sender As , ByVal e As
Handles
Dim tickethao As Integer
Dim mydataadapter4 As New SqlDataAdapter
Dim myds4 As New DataSet
Dim dt4 As New DataTable
Dim mycom4 As New SqlCommand
Dim mycon4 As New SqlConnection
Try
= "initial catalog=ticketbooking;user id=sa;password=;"
= mycon4
"通过 MYCON 连接对象操作数据库
=
"设置命令类型
tickethao = tuipiao()
Catch ex As Exception
End Try
If tickethao = 0 Then
("座位号输入错误,请重新输入!", "错误")
Else
Try
()
= "delete from tickets where ticketsid=" + CStr(tickethao) + ""
Try
()
("退票成功!", "谢谢观看")
Catch ex As Exception
MsgBox
End Try
Catch ex As Exception
MsgBox
End Try
End If
()
= ""
= ""
= ""
= ""
= ""
= ""
revoke_seat()
End Sub
Private Sub Button3_Click_1(ByVal sender As , ByVal e As
Handles
=
=
If
= "" Then
("请输入座位号!", "提示")
End I
Dim mydataadapter2 As New SqlDataAdapter
Dim myds2 As New DataSet
Dim dt2 As New DataTable
Dim mycom2 As New SqlCommand
= "initial catalog=ticketbooking;user id=sa;password=;"
= mycon
"通过 MYCON 连接对象操作数据库
=
"设置命令类型
Try
()
= "select * from seats where seatid=" +
+ ""
= mycom2
(myds2, "seats")
dt2 = ("seats")
Catch ex As Exception
End Try
= (0)("price")
()
End Sub
Private Sub Button4_Click(ByVal sender As , ByVal e As
Handles
Dim exitform As New Form7
If
=
Then
()
()
()
End If
End Sub
End Class 4. 创建检票界面 (1)创建模块的功能 对进场观众检票,如果发现有假票或无票观众不允许入内。
(2)创建模块的窗体
在工程中添加一个窗体,命名为“检票系统”,用来作为检票系统窗体。界面
的设计如下图所示。
(3)代码编写
Imports Public Class Form3 Inherits
Dim ds1 As New DataSet
Dim sqlda1 As New SqlDataAdapter
Dim RecordCount As Integer
Private Sub Form3_Load(ByVal sender As , ByVal e As
Handles
= "E:\实验运行场\程序设计\电影院票务系统\image\检票界面.swf"
()
= "E:\实验运行场\程序设计\电影院票务系统\image\检票界面下.swf"
()
Dim sqlcmd1 As New SqlCommand
Dim str1 As String = "select * from tickets"
= sqlcn1
= str1
= sqlcmd1
Try
()
()
Catch ex As SqlException
MsgBox
Finally
()
End Try
Try
(ds1)
Catch ex As SqlException
MsgBox
End Try
RecordCount = (0).
= RecordCount
End Sub
Private Sub Button1_Click_1(ByVal sender As , ByVal e As
Handles
Dim i As Integer
Dim flag As Boolean = False
If
= "" Then
= "请认真填写票号!"
()
Exit Sub
End If
If
= "" Then
= "请填写验证码!"
()
Exit Sub
End If
For i = 0 To RecordCount - 1
If
= CStr(0).Rows(i)("ticketsid")) And
= CStr(0).Rows(i)("yanzhengma")) Then
flag = True
Exit For
End If
Next
If flag = True Then
Try
= (0).Rows(i)("seatid")
= (0).Rows(i)("movie_name")
= (0).Rows(i)("price")
Catch ex As Exception
MsgBox
End Try
= "此票为真!"
Else
= "此票为假!"
End If
= RecordCount
End Sub
Private Sub Button2_Click_1(ByVal sender As , ByVal e As
Handles
= ""
= ""
= ""
= ""
= ""
= ""
= ""
()
End Sub
Private Sub Button3_Click_1(ByVal sender As , ByVal e As
Handles
Dim exitform As New Form7
If
=
Then
()
()
()
End If
End Sub End Class 5. 创建维护界面 (1)创建模块的功能
给数据库维护工作人员选择维护的系统数据库
(2)创建模块的设计
在工程中添加一个窗体,命名为“维护系统”,用来作为维护系统窗体。界面
的设计如下图所示。
(3)代码编写 Public Class Form8 Inherits Private Sub Form8_Load(ByVal sender As , ByVal e As
Handles
= "E:\实验运行场\程序设计\电影院票务系统\image\登陆界面.swf"
()
End Sub
Private Sub Button1_Click(ByVal sender As , ByVal e As
Handles
Dim frm4 As New Form4
()
()
End Sub
Private Sub Button2_Click(ByVal sender As , ByVal e As
Handles
Dim frm6 As New Form6
()
()
End Sub
Private Sub Button3_Click(ByVal sender As , ByVal e As
Handles
Dim frm9 As New Form9
()
()
End Sub
Private Sub Button4_Click(ByVal sender As , ByVal e As
Handles
Dim exitform As New Form7
If
=
Then
()
()
()
End If
End Sub End Class
1.创建影库界面 (1)创建模块的功能
对电影库播放列表的管理 (2)创建模块的设计
在工程中添加一个窗体,命名为“影库系统”,用来作为影库系统窗体。界面
的设计如下图所示。
(3)代码编写
Dim sqlAdapter As New SqlDataAdapter
Dim movieRow As DataRow
Dim RecordCount As Integer
Dim i As Integer = 0
Dim idnum(2000) As Integer
Dim CurrentPosition As Integer
Sub ShowPosition()
If RecordCount = 0 Then
= "无记录"
Else
CurrentPosition = (DataSet11, "Movies").Position
= ("movie_id")
idnum(i) =
i += 1
= ("movie_name")
= ("actor")
= ("actress")
= ("producer")
= ("palydate")
= CurrentPosition + 1 & "/" & RecordCount
End If
End Sub
Private Sub Form4_Load(ByVal sender As , ByVal e As
Handles
()
ShowPosition()
End Sub
Private Sub Button1_Click(ByVal sender As , ByVal e As
Handles
If (DataSet11, "Movies").Position > 0 Then
(DataSet11, "Movies").Position -= 1
ShowPosition()
Else
("已到达首记录!", "提示信息")
End If
End Sub
Private Sub Button2_Click(ByVal sender As , ByVal e As
Handles
If (DataSet11, "Movies").Position < RecordCount - 1 Then
(DataSet11, "Movies").Position += 1
ShowPosition()
Else
("已到达尾记录!", "提示信息")
End If
End Sub
Private Sub Button4_Click(ByVal sender As , ByVal e As
Handles
(DataSet11, "Movies").Position = RecordCount - 1
ShowPosition()
End Sub
Private Sub Button5_Click(ByVal sender As , ByVal e As
Handles
"添加数据
Dim j As Integer
Dim flag As Boolean = True
For j = 0 To i
If
= CStr(idnum(j)) Then
flag = False
("ID地址有冲突!", "提示")
End If
Next
If flag = True Then
Dim MyNewData As DataRow
Try
With MyNewData
.BeginEdit()
If
<> "" Then
.Item("movie_id") =
Else
("编号不能为空")
Return
End If
.Item("movie_name") =
.Item("actor") =
.Item("actress") =
.Item("producer") =
.Item("palydate") =
.EndEdit()
End With
Catch ex As Exception
Return
End Try
Try
Dim i As Integer = (DataSet11, "Movies")
()
(i & "条记录添加成功!")
Catch ex As Exception
End Try
idnum(i) =
i = i + 1
End If
End Sub
Private Sub Button6_Click(ByVal sender As , ByVal e As
Handles
"修改数据
Dim j As Integer
For j = 0 To i
If
= CStr(idnum(j)) Then
("ID地址有冲突!", "提示")
End If
Next
CurrentPosition = (DataSet11, "Movies").Position
Try
With movieRow
.BeginEdit()
.Item("movie_id") =
.Item("movie_name") =
.Item("actor") =
.Item("actress") =
.Item("producer") =
.Item("palydate") =
.EndEdit()
End With
Catch ex As Exception
Return
End Try
Try
Dim i As Integer = (DataSet11, "Movies")
()
(i & "条记录修改成功!")
Catch ex As Exception
End Try
End Sub
Private Sub Button3_Click(ByVal sender As , ByVal e As
Handles
(DataSet11, "Movies").Position = 0
ShowPosition()
End Sub
Private Sub Button7_Click(ByVal sender As , ByVal e As
Handles
"删除数据
CurrentPosition = (DataSet11, "Movies").Position
Dim n As Integer = ("movie_id")
Dim j As Integer = 0
For j = 0 To i
If n = idnum(j) Then
idnum(j) = -1
End If
Next
()
Try
Dim i As Integer = (DataSet11, "Movies")
()
(i & "条记录删除成功!")
Catch ex As Exception
End Try
End Sub
Private Sub Button8_Click(ByVal sender As , ByVal e As
Handles
Dim exitform As New Form7
If
=
Then
()
()
()
End If
End Sub
Private Sub Button9_Click(ByVal sender As , ByVal e As
Handles
Dim frm8 As New Form8
()
()
End Sub End Class 2.创建职工界面 (1)创建模块的功能
对职工数据的处理。如增加、删除和更改 (2)创建模块的设计 在工程中添加一个窗体,命名为“影库系统”,用来作为影库系统窗体。界面
的设计如下图所示。
(3)代码编写
Inherits Dim frm8 As New Form8 Dim sqlAdapter As New SqlDataAdapter
Dim movieRow As DataRow
Dim RecordCount As Integer
Dim i As Integer = 0
Dim idnum(2000) As Integer
Dim CurrentPosition As Integer
Sub ShowPosition()
If RecordCount = 0 Then
= "无记录"
Else
CurrentPosition = (DataSet11, "Workers").Position
= ("workerid")
idnum(i) =
i += 1
= ("password")
= ("leibie")
= CurrentPosition + 1 & "/" & RecordCount
End If
End Sub Private Sub Form6_Load(ByVal sender As , ByVal e As
Handles
()
ShowPosition()
End Sub
Private Sub Button1_Click(ByVal sender As , ByVal e As
Handles
If (DataSet11, "Workers").Position > 0 Then
(DataSet11, "Workers").Position -= 1
ShowPosition()
Else
("已到达首记录!", "提示信息")
End If
End Sub
Private Sub Button2_Click(ByVal sender As , ByVal e As
Handles
If (DataSet11, "Workers").Position < RecordCount - 1 Then
(DataSet11, "Workers").Position += 1
ShowPosition()
Else
("已到达尾记录!", "提示信息")
End If
End Sub
Private Sub Button3_Click(ByVal sender As , ByVal e As
Handles
(DataSet11, "Workers").Position = 0
ShowPosition()
End Sub
Private Sub Button4_Click(ByVal sender As , ByVal e As
Handles
(DataSet11, "Workers").Position = RecordCount - 1
ShowPosition()
End Sub
Private Sub Button5_Click(ByVal sender As , ByVal e As
Handles
Dim j As Integer
Dim flag As Boolean = True
For j = 0 To i
If
= CStr(idnum(j)) Then
flag = False
("ID地址有冲突!", "提示")
End If
Next
If
<> 1 And
<> 2 And
<> 3 Then
flag = False
("服务系统号只能为1,2,3!", "提示")
End If
If flag = True Then
Dim MyNewData As DataRow
Try
With MyNewData
.BeginEdit()
If
<> "" Then
.Item("workerid") =
Else
("编号不能为空")
Return
End If
.Item("password") =
.Item("leibie") =
.EndEdit()
End With
Catch ex As Exception
Return
End Try
Try
Dim k As Integer = (DataSet11, "Workers")
()
(k & "条记录添加成功!")
Catch ex As Exception
End Try
idnum(i) =
i = i + 1
End If
End Sub
Private Sub Button6_Click(ByVal sender As , ByVal e As
Handles
Dim j As Integer
For j = 0 To i
If
= CStr(idnum(j)) Then
("ID地址有冲突!", "提示")
End If
Next
If
<> 1 And
<> 2 And
<> 3 Then
("服务系统号只能为1,2,3!", "提示")
End If
CurrentPosition = (DataSet11, "Workers").Position
Try
With movieRow
.BeginEdit()
.Item("workerid") =
.Item("password") =
.Item("leibie") =
.EndEdit()
End With
Catch ex As Exception
Return
End Try
Try
Dim k As Integer = (DataSet11, "Workers")
()
(k & "条记录修改成功!")
Catch ex As Exception
End Try
End Sub
Private Sub Button7_Click(ByVal sender As , ByVal e As
Handles
CurrentPosition = (DataSet11, "Workers").Position
Dim n As Integer = ("workerid")
Dim j As Integer = 0
For j = 0 To i
If n = idnum(j) Then
idnum(j) = -1
End If
Next
()
Try
Dim k As Integer = (DataSet11, "Workers")
()
(k & "条记录删除成功!")
Catch ex As Exception
End Try
End Sub
Private Sub Button8_Click(ByVal sender As , ByVal e As
Handles
Dim exitform As New Form7
If
=
Then
()
()
()
End If
()
End Sub
Private Sub Button9_Click(ByVal sender As , ByVal e As
Handles
()
()
End Sub End Class 3.创建票务界面 (1)创建模块的功能
对所售出的电影票进行管理,把没用的数据进行清除 (2)创建模块的设计
在工程中添加一个窗体,命名为“影库系统”,用来作为影库系统窗体。界面
的设计如下图所示。
(3)代码编写
Imports Public Class Form9
Inherits
Dim ds1 As New DataSet
Dim sqlda1 As New SqlDataAdapter
Dim RecordCount As Integer
Private Sub Form9_Load(ByVal sender As , ByVal e As
Handles
Dim sqlcmd1 As New SqlCommand
Dim str1 As String = "SELECT , , , , ,
FROM Movies INNER JOIN Tickets ON
= "
= sqlcn1
= str1
= sqlcmd1
Try
()
()
Catch ex As SqlException
MsgBox
Finally
()
End Try
Try
(ds1)
Catch ex As SqlException
MsgBox
End Try
RecordCount = (0).
End Sub
Private Sub Button1_Click(ByVal sender As , ByVal e As
Handles
Dim i As Integer
Dim flag As Boolean = False
If
= "" Then
("请认真填写电影名!", "提示信息")
()
Else
For i = 0 To RecordCount - 1
If CStr(0).Rows(i).Item("movie_name")).Trim = CStr Then
Try
= CStr(0).Rows(i).Item("movie_id"))
= CStr(0).Rows(i).Item("movie_name"))
= CStr(0).Rows(i).Item("actor"))
= CStr(0).Rows(i).Item("actress"))
= CStr(0).Rows(i).Item("producer"))
= CStr(0).Rows(i).Item("palydate"))
Catch ex As Exception
MsgBox
End Try
flag = True
Exit Sub
End If
Next
End If
If flag = False Then
("输入电影名有误!", "提示")
End If
End Sub
Private Sub Button2_Click(ByVal sender As , ByVal e As
Handles
()
Dim i As Integer
Dim k As Integer
Dim flag As Boolean = False
If
= "" Then
("请认真填写电影名!", "提示信息")
()
Exit Sub
Else
For i = 0 To k - 1
If CStrCStr Then
flag = True
End If
Next
Try
Dim j As Integer = (DataSet11, "Tickets")
()
(j & "条记录删除成功!")
Catch ex As Exception
End Try
End If
If flag = False Then
("输入电影名有误!", "提示")
End If
End Sub
Private Sub Button3_Click(ByVal sender As , ByVal e As
Handles
Dim frm8 As New Form8
()
()
End Sub
Private Sub Button4_Click(ByVal sender As , ByVal e As
Handles
Dim exitform As New Form7
If
=
Then
()
()
()
End If
End Sub End Class
四.用户操作手册;
系统概述
(1)
能够对播放电影,工作人员,售票事宜,检票事宜,无用数据进行处理。
(2)
售票管理自然有专人负责,要处理各电影的电影票销售问题。当然包括退票问题,还有就是预订电影票其实也就相当于买票。两者可以当一回事处理。
(3)
检票管理事宜要完成观众进场时检票的事宜。其中包括了电影票的真假检测问题。
(4)
数据管理要处理电影的播放的次序,工作人员的管理,以及过期电影票的处理问题。
使用方法
(1)
首先打开本系统,可以进入登陆界面
使用本系统的共有三种人员:售票人员、检票人员、维护人员。系统要求输入职工号、职工密码和所...
上一篇:人力资源规划
下一篇:《城市规划原理》49题