Private Sub zscx_Click() '调入住宿查询
Load main_zscx
main_zscx.Show
main.Enabled = False
End Sub
Private Sub tfcx_Click() '调入退宿查询
Load main_tfcx
main_tfcx.Show
main.Enabled = False
End Sub
Private Sub sftx_Click() '调入宿费提醒
Load main_xftx
main_xftx.Show
main.Enabled = False
End Sub
Private Sub xsbb_Click() '调入客房销售报表
main_xsbb.Show
main.Enabled = False
End Sub
Private Sub xstj_Click() '调入客房销售统计
main_xstj.Show
main.Enabled = False
End Sub
Private Sub czysz_Click() '调入操作员设置
Load main_czysz
main_czysz.Show
main.Enabled = False
End Sub
Private Sub ma_Click() '调入密码设置
main_mmsz.Show
main.Enabled = False
End Sub
Private Sub csh_Click() '调入初始化
main_csh.Show
main.Enabled = False
End Sub
Private Sub qxsz_Click() '调入权限设置
main_qxsz.Show
main.Enabled = False
End Sub
Private Sub tc_Click()
End
End Sub
6.3住宿管理设计
6.3.1住宿登记
`
Private Sub ZSDJ_Change(Index As Integer)
Select Case Index
Case 6
ZSDJ(7).Text = Format(Val(ZSDJ(6).Text) * Val(ZSDJ(5).Text), "0.00") '计算折前宿费
ZSDJ(9).Text = ZSDJ(7).Text '赋值给ZSDJ(9)
ZSDJ(8).Text = 100
DTP3.Value = DTP1.Value + Val(ZSDJ(6).Text) '计算退宿日期
Case 8
ZSDJ(9).Text = Format(Val(ZSDJ(7).Text) * Val(ZSDJ(8).Text) / 100, "0.00") '计算实际宿费
Case 10
If ZSDJ(10).Text <> "" Then
ZSDJ(10).Text = Val(ZSDJ(10).Text) '用val函数将字符串转换为数字
DTP2.Value = DTP1.Value + Int(Val(ZSDJ(10).Text) / Val(ZSDJ(5).Text)) '计算提醒日期
If (Val(ZSDJ(10).Text) - Int(Val(ZSDJ(10).Text) / Val(ZSDJ(5).Text))) > 0.5 * Val(ZSDJ(5).Text) Then
tim2.Value = #6:00:00 PM#
Else
tim2.Value = #12:00:00 AM#
End If
End If
End Select
End Sub
Private Sub ZSDJ_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer)
Select Case Index
Case 0
If KeyCode = vbKeyReturn Then Combo1.SetFocus '按回车键Combo1获得焦点
Case 1
If KeyCode = vbKeyReturn Then ZSDJ(2).SetFocus '按回车键ZSDJ(2)获得焦点
Case 2
If KeyCode = vbKeyReturn Then ZSDJ(3).SetFocus '按回车键ZSDJ(3)获得焦点
Case 3
If KeyCode = vbKeyReturn Then DBCombo1.SetFocus '按回车键ZSDJ(2)获得焦点
Case 4
If KeyCode = vbKeyReturn Then ZSDJ(5).SetFocus '按回车键ZSDJ(5)获得焦点
Case 5
751com.cn
SetFocus '按回车键ZSDJ(10)获得焦点
Case 10
If KeyCode = vbKeyReturn Then ZSDJ(11).SetFocus 'ZSDJ(11)获得焦点
Case 11
If KeyCode = vbKeyReturn Then Comok.SetFocus '按回车键Comok获得焦点
End Select
End Sub
Private Sub Combo1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then ZSDJ(1).SetFocus '按回车键ZSDJ(1)获得焦点
End Sub
Private Sub DTP2_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then tim3.SetFocus '按回车键tim3获得焦点
End Sub
Private Sub DTP3_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then tim4.SetFocus '按回车键tim4获得焦点
End Sub
Private Sub tim3_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then DTP3.SetFocus '按回车键DTP3获得焦点
End Sub
Private Sub tim4_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then Text10.SetFocus '按回车键Text10获得焦点
End Sub
Private Sub DBCombo1_Change()
'查询空闲房间信息
Data2.RecordSource = "select * from kf where 房间号='" & DBCombo1.Text & "'and 房态='空房'"
Data2.Refresh
'查询住宿登记信息
Data1.RecordSource = "select * from djb where 房间号='" & DBCombo1.Text & "'and 标志='1'"
Data1.Refresh
If Data2.Recordset.RecordCount > 0 Then
If Data1.Recordset.RecordCount = 0 Then
ZSDJ(4).Text = Data2.Recordset.Fields("房间类型") '赋值给ZSDJ(4)
ZSDJ(5).Text = Data2.Recordset.Fields("价格") '赋值给ZSDJ(5)
Else
MsgBox ("此房间已占用或停止使用!!")
End If
End If
End Sub
Private Sub DBCombo1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then ZSDJ(5).SetFocus 'ZSDJ(5)获得焦点
End Sub
Private Sub comdj_Click()
'查询空闲房间信息
Data2.RecordSource = "select * from kf where 房态='空房'"
Data2.Refresh
Data3.RecordSource = "select * from kf where 房态='空房'"
Data3.Refresh
'生成凭证号码
Data1.RecordSource = "select * from djb order by 凭证号码"
Data1.Refresh
If Not Data1.Recordset.EOF Then Data1.Recordset.MoveLast
If lsph.Text = "" Then bh.Text = Date & "d" & Format(1, "###000")
If lsph.Text <> "" Then
y1.Text = Month(Date)
y2.Text = Month(Left(lsph.Text, 10))
If y1.Text = y2.Text Then
bh.Text = Date & "d" & Format(Val(Right(lsph.Text, 3)) + 1, "###000")
End If
上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] ... 下一页 >>