最新计算机酒店管理系统VB源代码有图.docx
- 文档编号:8744333
- 上传时间:2023-02-01
- 格式:DOCX
- 页数:18
- 大小:693.57KB
最新计算机酒店管理系统VB源代码有图.docx
《最新计算机酒店管理系统VB源代码有图.docx》由会员分享,可在线阅读,更多相关《最新计算机酒店管理系统VB源代码有图.docx(18页珍藏版)》请在冰豆网上搜索。
最新计算机酒店管理系统VB源代码有图
酒店管理系统
PrivateSubck_Click()
EndSub
PrivateSubb_Click()
kfszShow
UnloadMe
EndSub
PrivateSubc_Click()
kfcx.Show
UnloadMe
EndSub
PrivateSubCommand1_Click()
kfsz.Show
UnloadMe
EndSub
PrivateSubCommand2_Click()
zsdj.Show
UnloadMe
EndSub
PrivateSubsz_Click()
EndSub
PrivateSubCommand3_Click()
kfcx.Show
UnloadMe
EndSub
PrivateSubCommand4_Click()
xgmm.Show
UnloadMe
EndSub
PrivateSubCommand6_Click()
xgmm.Show
uloadMe
EndSub
PrivateSubCommand7_Click()
End
EndSub
PrivateSubd_Click()
kfsz.Show
UnloadMe
EndSub
PrivateSubdd_Click()
xgmm.Show
UnloadMe
EndSub
PrivateSubf_Click()
zsdj.Show
UnloadMe
EndSub
PrivateSubk_Click()
EndSub
PrivateSubForm_Load()
Me.Top=(Screen.Height-Me.Height)/2
Me.Left=(Screen.Width-Me.Width)/2
EndSub
PrivateSubg_Click()
tfdj.Show
UnloadMe
EndSub
PrivateSubh_Click()
kfcx.Show
UnloadMe
EndSub
PrivateSubq_Click()
tfjz.Show
UnloadMe
EndSub
PrivateSubx_Click()
glydl.Show
UnloadMe
EndSub
DimtimAsInteger
DimmyAsString
OptionExplicit
PrivateSubCommand1_Click()'修改管理员及密码
Data1.Recordset.MoveFirst
Data1.Recordset.FindFirst("管理员="&"'"&Text1.Text&"'")
IfData1.Recordset.NoMatchThen
MsgBox("管理员输入错误!
")
Text1.SetFocus
Else
IfText1.Text<>""AndText2.Text<>""AndText2.Text=Data1.Recordset.Fields("密码")Then
daohanglan.Show
UnloadMe
EndIf
Iftim=3Then'密码输错3次,退出系统
my=MsgBox("密码输入错误,请向系统管理员查询!
",0,"")
Ifmy=vbOKThenEnd
EndIf
IfText1.Text=""Then
MsgBox("请输入管理员!
")
Text1.SetFocus
Else
IfText1.Text<>Data1.Recordset.Fields("管理员")Then
MsgBox("查无此管理员,请重新输入管理员!
")
Text1.SetFocus
Else
IfText2.Text=""Then
MsgBox("请输入管理员密码!
")
Text2.SetFocus
Else
IfText2.Text<>Data1.Recordset.Fields("密码")Then
MsgBox("密码错误,请重新输入密码!
")
tim=tim+1
Text2.SetFocus
EndIf
EndIf
EndIf
EndIf
EndIf
EndSub
PrivateSubCommand2_Click()
End
EndSub
PrivateSubForm_Load()
Me.Top=(Screen.Height-Me.Height)/2
Me.Left=(Screen.Width-Me.Width)/2
EndSub
PrivateSubCommand1_Click()
DimfjhAsString
fjh=InputBox("请输入要查找的房间号")
Adodc1.Recordset.MoveFirst
Adodc1.Recordset.Find("房间号="&"'"&fjh&"'")
IfAdodc1.Recordset.EOFThen
MsgBox"房号不存在",vbInformation,"查找记录"
Else
Text1=Adodc1.Recordset("房间号")
Text2=Adodc1.Recordset("房间类型")
Text3=Adodc1.Recordset("房态")
EndIf
EndSub
PrivateSubCommand2_Click()
Text1.Text="":
Text2.Text="":
Text3.Text=""
Text1.SetFocus
EndSub
PrivateSubCommand3_Click()
End
EndSub
PrivateSubForm_Load()
Me.Top=(Screen.Height-Me.Height)/2
Me.Left=(Screen.Width-Me.Width)/2
EndSub
DimaAsString
PrivateSubCommand1_Click()
DimfhAsString
DimaAsString
fh=InputBox("请输入要查找的房间")
Data1.Recordset.MoveFirst
Data1.Recordset.FindFirst("房间号="&"'"&fh&"'")
IfData1.Recordset.NoMatchThen
MsgBox"房号不存在"
Else
a="select*from客房状态表Where房间号=text1.text"
Data1.DatabaseName="C:
\DocumentsandSettings\Administrator\桌面\酒店系统9\新建文件夹\db1.mdb"
Data1.RecordSource=a
'Data1.Recordset.ForeColor=RGB(255,255,0)"
EndIf
EndSub
PrivateSubCommand2_Click()
End
EndSub
PrivateSubDataGrid1_Click()
EndSub
PrivateSubForm_Load()
Me.Top=(Screen.Height-Me.Height)/2
Me.Left=(Screen.Width-Me.Width)/2
EndSub
PrivateSubCommand1_Click()
DimkfAsString
DimaAsString
kf=InputBox("请输入要查找的客户")
Data1.Recordset.MoveFirst
Data1.Recordset.FindFirst("姓名="&"'"&kf&"'")
IfData1.Recordset.NoMatchThen
MsgBox"该客户没有挂账!
"
Else
sql="select*from账单表Where姓名=text1.text"
Data1.DatabaseName="C:
\DocumentsandSettings\Administrator\桌面\酒店系统9\新建文件夹\db1.mdb"
Data1.RecordSource=sql
'Data1.Recordset.ForeColor=RGB(255,255,0)"'Data1.Detail.Color=RGB(255,255,0)
EndIf
EndSub
PrivateSubCommand2_Click()
End
EndSub
PrivateSubForm_Load()
Me.Top=(Screen.Height-Me.Height)/2
Me.Left=(Screen.Width-Me.Width)/2
EndSub
PrivateSubFrame1_DragDrop(SourceAsControl,XAsSingle,YAsSingle)
EndSub
PrivateSubCommand1_Click()'客房设置
Data1.Recordset.AddNew
Text1.SetFocus
EndSub
PrivateSubCommand2_Click()'
Data1.Recordset.Edit
IfText1.Text<>""Then
Data1.Recordset.Fields("房间号")=Text1.Text
Data1.Recordset.Fields("价格")=Text2.Text
Data1.Recordset.Fields("使用设置")=Text3.Text
Data1.Recordset.Fields("配置")=Text4.Text
Data1.Recordset.Update
MsgBox"房间设置成功!
"
Else
MsgBox"房间号不能为空,请重新输入!
"&vbCrLf&"然后单击{登记}按钮",vbExclamation,"更新记录"
Text1.SetFocus
EndIf
EndSub
PrivateSubCommand3_Click()
End
EndSub
PrivateSubCommand4_Click()
Text1.Text="":
Text2.Text="":
Text4.Text="":
Text5.Text=""
Text1.SetFocus
EndSub
PrivateSubForm_Load()
Me.Top=(Screen.Height-Me.Height)/2
Me.Left=(Screen.Width-Me.Width)/2
EndSub
PrivateSubCommand1_Click()
Text5.SetFocus
DimaAsInteger
a=MsgBox("确实要退房吗?
",vbYesNo+vbQuestion,"删除客户信息")
Ifa=vbYesNoThen
Data1.Recordset.Delete
Data1.Recordset.MoveNext
EndIf
Text7.Text="这位客户说,我们的酒店服务很好!
"
EndSub
PrivateSubCommand2_Click()
tfjz.Text="":
Text5.Text="":
Text1.Text="":
Text4.Text=""
Combo1.Text="":
Combo2.Text="":
EndSub
PrivateSubCommand3_Click()
DimhAsString
h=Trim(Text5.Text)
Data1.Recordset.MoveFirst
Data1.Recordset.FindFirst("姓名="&"'"&h&"'")
IfData1.Recordset.NoMatchThen
MsgBox"该客户不存在!
"
Else
Text1.Text=Data1.Recordset.Fields("房间号")
Text4.Text=Data1.Recordset.Fields("住宿天数")
EndIf
EndSub
PrivateSubForm_Load()
Me.Top=(Screen.Height-Me.Height)/2
Me.Left=(Screen.Width-Me.Width)/2
EndSub
PrivateSubTimer1_Timer()'显示当前退房时间
Text3.Text=Time()
EndSub
PrivateSubCommand3_Click()
End
EndSub
PrivateSubCommand4_Click()'删除用户
Data1.Recordset.MoveFirst
Data1.Recordset.FindFirst("编号="&"'"&Text4.Text&"'")
IfData1.Recordset.NoMatchThen
MsgBox"没有找到该用户!
"
Else
Data1.Recordset.Delete
Data1.Recordset.MoveNext
Data1.Refresh
MsgBox"删除成功"
EndIf
EndSub
PrivateSubCommand5_Click()'创建用户
Text1.SetFocus
Text2.Enabled=False
Text2.ForeColor=RGB(255,255,0)
Data1.Recordset.Edit
Data1.Recordset.Fields("管理员")=Text1.Text
Data1.Recordset.Fields("密码")=Text2.Text
Data1.Recordset.Update
IfText3.Text<>""Then
MsgBox"用户创建成功!
"
Else
MsgBox"你输入的有误!
或没有输入,请检查"
EndIf
EndSub
PrivateSubForm_Activate()
Me.Top=(Screen.Height-Me.Height)/2
Me.Left=(Screen.Width-Me.Width)/2
Text1.SetFocus
EndSub
PrivateSubForm_Unload(CancelAsInteger)
glydl.Show
EndSub
PrivateSubCommand1_Click()'修改管理员密码
DimyhAsString
yh=Trim(Text1.Text)
Data1.Recordset.MoveFirst
Data1.Recordset.FindFirst("管理员="&"'"&yh&"'")
IfData1.Recordset.NoMatchThen
Data1.Refresh
Else
IfText1.Text<>""AndText2.Text<>""AndText2.Text=Data1.Recordset.Fields("密码")Then
IfText3.Text<>""Then
Data1.Recordset.Edit
Data1.Recordset.Fields("密码")=Text3.Text
MsgBox("密码修改成功,退出管理员密码修改!
")
Data1.Recordset.Update
glydl.Show
UnloadMe
EndIf
Else
IfText1.Text<>Data1.Recordset.Fields("管理员")Then
Text1.SetFocus
Text1.Text=""
MsgBox("无此管理员,请重新输入!
")
EndIf
EndIf
IfText2.Text=""Then
MsgBox("请输入管理员原密码!
")
Text2.SetFocus
Else
IfText2.Text<>Text3.TextThen
MsgBox("原密码错误,请重新输入原密码!
")
Text2.SetFocus
EndIf
EndIf
EndIf
EndSub
PrivateSubCommand2_Click()
Text1.Text="":
Text2.Text="":
Text3.Text="":
Text4.Text=""
EndSub
PrivateSubFrame1_DragDrop(SourceAsControl,XAsSingle,YAsSingle)
EndSub
PrivateSubText4_Change()
Text4.Text=Data1.Recordset.Fields("编号")+1
EndSub
OptionExplicit
DimsqlAsString
PrivateSubCommand1_Click()
DimxmAsString
DimaAsString
xm=Trim(Text1.Text)
Data1.Recordset.MoveFirst
Data1.Recordset.FindFirst("姓名="&"'"&xm&"'")
IfData1.Recordset.NoMatchThen
MsgBox"用户不存在"
Data1.Refresh
Else
sql="select*from客人信息表Where姓名=text1.text"
Data1.DatabaseName="C:
\DocumentsandSettings\Administrator\桌面\酒店系统9\新建文件夹\db1.mdb"
Data1.RecordSource=sql
EndIf
EndSub
PrivateSubCommand2_Click()
End
EndSub
PrivateSubForm_Load()
Me.Top=(Screen.Height-Me.Height)/2
Me.Left=(Screen.Width-Me.Width)/2
EndSub
PrivateSubText1_Change()
EndSub
PrivateSubCommand1_Click()
Data1.Recordset.AddNew
Text1.SetFocus
MsgBox"请输入用户信息"
EndSub
PrivateSubCommand2_Click()
Data1.Refresh
EndSub
PrivateSubCommand3_Click()
End
EndSub
PrivateSubDataGrid2_Click()
Adodc1.CommandType=adCmdText
Adodc1.RecordSource="select*from客房状态表where房态='空房'"
Adodc1.Refresh
EndSub
PrivateSubForm_Load()
EndSub
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 最新 计算机 酒店 管理 系统 VB 源代码