旅游信息管理系统程序代码
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
旅游信息管理程序代码(1)用户信息表:users
(2)旅游线路表:lines
(3)员工信息表:workers
(4)团队信息表:teams
use travels
create table users
(
uno varchar(10) not null,
umi varchar(10) not null
)
create table lines
(
lno varchar(10) not null,
lname varchar(30),
lmode varchar(10),
lprice int
)
create table workers
(
wno varchar(10) not null,
wname varchar(10) not null,
wsex varchar(2),
wmoney int,
wtype varchar(10),
wyears smalldatetime
)
create table Teams
(
tno varchar(10) not null,
tname varchar(10) not null,
tline varchar(10),
tprice int,
tday int
)
insert into users values('09302208','09302208')
insert into users values('09302207','09302208')
insert into users values('09302223','09302223')
insert into users values('09302225','09302225')
insert into lines values('0001','沈阳-海口','火车','316')
insert into lines values('0002','沈阳-北京','火车','220')
insert into lines values('0003','沈阳-哈尔滨','火车','159')
insert into lines values('0004','沈阳-拉萨','火车','560')
insert into lines values('0005','沈阳-杭州','飞机','640')
insert into lines values('0006','沈阳-上海','飞机','299')
insert into workers values('0001','李雷','男','5000','全导','6')
insert into workers values('0002','韩梅梅','女','5500','地导','6')
insert into workers values('0003','林涛','男','4200','地导','5')
insert into workers values('0004','李丽','女','4800','全导','4')
insert into workers values('0005','王博','男','4600','地导','2')
insert into workers values('0006','张明明','男','3800','地导','1')
insert into Teams values('0001','星光旅行社','海南五日游','3500','5')
insert into Teams values('0002','北方旅行社','北京三日游','2200','3')
insert into Teams values('0003','南方旅行社','哈尔滨三日游','1800','3')
insert into Teams values('0004','白鹭旅行社','西藏七日游','7400','7')
insert into Teams values('0005','时光旅行社','杭州七日游','4000','7')
insert into Teams values('0006','北方旅行社','上海五日游','5000','5')
用户登陆界面代码
Private Sub Command1_Click()
Adodc1.RecordSource = "select * from users where uno ='" & Text1.Text & "'" Adodc1.Refresh
If Adodc1.Recordset.EOF Then
MsgBox "没有这个用户,请重新输入正确的用户名", , "错误提示"
Else
If Text2.Text = Adodc1.Recordset.Fields("umi") Then
MsgBox "登录成功!", , "错误提示"
Form1.Hide
Form2.Show
Else
MsgBox "你的密码错误,请输入正确的用户密码!", , "错误提示"
End If
End If
End Sub
(1)公共模块代码(Public recs As Integer '用于保存线路记录个数
Public flag As Integer '用于保存操作方式')
(2)旅游线路管理代码
Private Sub Form_Activate()
DataGrid1.SetFocus '焦点移向DataGrid1控件
Call encomm '调用本窗体自定义的encomm过程
End Sub
Private Sub Command3_Click() '添加教师记录
flag = 1 'flag=1表示添加操作
Form4.Show vbModal '调用edt1窗体
End Sub
Private Sub Command4_Click() '修改教师记录
flag = 2 'flag=2表示修改操作
Form4.Show vbModal '调用edt1窗体修改当前教师记录
End Sub
Private Sub command6_Click()
Form3.Hide
Form2.Show
End Sub
Private Sub Command1_Click()
condstr = "" '条件表达式,以下代码根据设置条件框架建立condstr If Trim(Text1.Text) <> "" Then
If condstr = "" Then
condstr = "lno like '" + Trim(Text1.Text) + "%'"
End If
End If