宾馆客房管理系统ER图.数据流图.功能模块图.流程图 第10页
If KeyCode = vbKeyReturn Then Texbz.SetFocus
End Sub
Private Sub texpcf_Change()
Call ssje '调用函数
End Sub
Private Sub texhyf_Change()
Call ssje '调用函数
End Sub
Private Sub texfjf_Change()
Texfjf.Text = Val(Texfjf.Text)
If Combo3.Text = "电话费" Then Texdhf.Text = Val(Texfjf.Text)
If Combo3.Text = "杂费" Then Texzf.Text = Val(Texfjf.Text)
If Combo3.Text = "会议费" Then Texhyf.Text = Val(Texfjf.Text)
If Combo3.Text = "停车费" Then Textcf.Text = Val(Texfjf.Text)
If Combo3.Text = "赔偿费" Then Texpcf.Text = Val(Texfjf.Text)
End Sub
Private Sub texfjf_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then Texssje.SetFocus
End Sub
Private Sub textcf_Change()
Call ssje '调用函数
End Sub
Private Sub texts_Change()
Texxf.Text = Val(Texts.Text) * Val(DBCombo2.Text) '计算宿费
Texzhje.Text = Val(Texxf.Text) * Val(Texzk.Text) / 100 '计算折后金额
'计算退还金额
Texthje.Text = Val(Texyj.Text) - Val(Texzhje.Text) - Val(Texzf.Text) - Val(Texdhf.Text)
End Sub
Private Sub texts_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then Texzk.SetFocus '回车Texzk获得焦点
End Sub
Private Sub texts_LostFocus()
Texts.Text = Format(Val(Texts.Text), "0.0") '格式化天数
End Sub
Private Sub texzk_Change()
Texzk.Text = Val(Texzk.Text)
Texzhje.Text = Val(Texxf.Text) * Val(Texzk.Text) / 100 '计算折后金额
'计算退还金额
Texthje.Text = Val(Texyj.Text) - Val(Texzhje.Text) - Val(Texzf.Text) - Val(Texdhf.Text)
End Sub
Private Sub texbz_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then Comok.SetFocus
End Sub
Private Sub zj_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then Texts.SetFocus
End Sub
Private Sub texsfz_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then Texdz.SetFocus
End Sub
Private Sub texzk_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then Texfjf.SetFocus
End Sub
Private Sub comdj_Click() '登记
Texxm.Text = "": Texsfz.Text = "": Texfjf.Text = "": Texdz.Text = "": Texts.Text = ""
Texzk.Text = "": Texyj.Text = "": DBCombo4.Text = "": Texzhje.Text = "": Texthje.Text = ""
Texxf.Text = "": DBCombo1.Text = "": DBCombo2.Text = "": DBCombo3.Text = "": Texbz.Text = ""
Textcf.Text = "0": Texzf.Text = "0": Texdhf.Text = "0": Texssje.Text = "0": Texpcf.Text = "0"
Texhyf.Text = "0"
Comok.Enabled = True: Comcancel.Enabled = True: Comdj.Enabled = False
Comprint.Enabled = False: DBCombo4.Enabled = True: Texzk.Enabled = True
DBCombo4.SetFocus
End Sub
6.4客房管理
6.4.1客房设置
main.Enabled = True
End Sub
Private Sub Combo1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then Combo2.SetFocus
'查询客房信息
Data1.RecordSource = "select * from kf where 房间类型='" & Combo1.Text & "'"
Data1.Refresh
'赋值给texjg.text
If Data1.Recordset.RecordCount > 0 Then Texjg.Text = Data1.Recordset.Fields("价格")
End Sub
Private Sub texfjh_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then Combo1.SetFocus '按回车键Combo1获得焦点
End Sub
Private Sub Combo2_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then Texjg.SetFocus
End Sub
Private Sub texjg_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then DTP1.SetFocus
End Sub
Private Sub DTP1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then Texsz.SetFocus '按回车键Texsz获得焦点
End Sub
Private Sub texsz_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then Texpz.SetFocus
End Sub
Private Sub texpz_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then Texbz.SetFocus
End Sub
Private Sub texbz_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then Comsave.SetFocus
End Sub
Private Sub comdj_Click() '登记
Texfjh.Text = "": Texjg.Text = "": Texsz.Text = ""
Texpz.Text = "": Texbz.Text = ""
Comsave.Enabled = True: Comcancel.Enabled = True: Comdj.Enabled = False
Texfjh.SetFocus
End Sub
Private Sub comsave_Click()
'查找客房信息
Data1.Recordset.FindFirst "房间号 like" + Chr(34) + Texfjh.Text + Chr(34) + ""
If Data1.Recordset.NoMatch Then
'添加客房
Data1.Recordset.AddNew
If Texfjh.Text <> "" Then Data1.Recordset.Fields("房间号") = Texfjh.Text
If Combo1.Text <> "" Then Data1.Recordset.Fields("房间类型") = Combo1.Text
If Combo2.Text <> "" Then Data1.Recordset.Fields("房态") = Combo2.Text
751com.cn("标志") = "0"
Data1.Recordset.Update '更新记录
Data1.Refresh
Else
'编辑客房信息
Data1.Recordset.Edit
If Texfjh.Text <> "" Then Data1.Recordset.Fields("房间号") = Texfjh.Text
If Combo2.Text <> "" Then Data1.Recordset.Fields("房态") = Combo2.Text
If Combo1.Text <> "" Then Data1.Recordset.Fields("房间类型") = Combo1.Text
If Texjg.Text <> "" Then Data1.Recordset.Fields("价格") = Texjg.Text
If DTP1.Value <> "" Then Data1.Recordset.Fields("营业日期") = DTP1.Value
If Texsz.Text <> "" Then Data1.Recordset.Fields("使用设置") = Texsz.Text
If Texpz.Text <> "" Then Data1.Recordset.Fields("配置") = Texpz.Text
If Texbz.Text <> "" Then Data1.Recordset.Fields("备注") = Texbz.Text
If Texfjh.Text <> "" Then Data1.Recordset.Fields("标志") = "0"
Data1.Recordset.Update '更新记录
Data1.Refresh
End If
'设置控件有效或无效
Comsave.Enabled = False: Comcancel.Enabled = False
Comend.Enabled = True: Comdj.Enabled = True
End Sub
Private Sub comcancel_Click() '取消操作
Texfjh.Text = "": Texjg.Text = "": Texsz.Text = ""
Texpz.Text = "": Texbz.Text = ""
Comsave.Enabled = False: Comcancel.Enabled = False: Comdj.Enabled = True
End Sub
Private Sub comend_Click()
main.Enabled = True
Unload Me
End Sub
6.4.2客房查询
上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] ... 下一页 >>
宾馆客房管理系统ER图.数据流图.功能模块图.流程图 第10页下载如图片无法显示或论文不完整,请联系qq752018766