?? httz.frm
字號:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form HTTZ
Caption = "房態(tài)調(diào)整"
ClientHeight = 5625
ClientLeft = 60
ClientTop = 345
ClientWidth = 9900
DrawStyle = 5 'Transparent
Icon = "HTTZ.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 5625
ScaleWidth = 9900
ShowInTaskbar = 0 'False
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command1
Caption = "(&O)確認(rèn)"
Height = 375
Left = 120
TabIndex = 2
Top = 5040
Width = 1815
End
Begin VB.Frame Frame1
Height = 5340
Left = 2040
TabIndex = 0
Top = 120
Width = 7720
Begin VB.CommandButton Command0
Caption = "Command0"
Height = 975
Index = 0
Left = 120
Style = 1 'Graphical
TabIndex = 1
Top = 240
Width = 1215
End
End
Begin MSComctlLib.TreeView TreeView1
Height = 4665
Left = 120
TabIndex = 3
Top = 220
Width = 1815
_ExtentX = 3201
_ExtentY = 8229
_Version = 393217
LabelEdit = 1
LineStyle = 1
Style = 7
FullRowSelect = -1 'True
SingleSel = -1 'True
ImageList = "ImageList1"
Appearance = 1
End
Begin MSComctlLib.ImageList ImageList1
Left = 0
Top = 0
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 17
ImageHeight = 15
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 4
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "HTTZ.frx":0442
Key = ""
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "HTTZ.frx":07A2
Key = ""
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "HTTZ.frx":0B3E
Key = ""
EndProperty
BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "HTTZ.frx":0EF2
Key = ""
EndProperty
EndProperty
End
End
Attribute VB_Name = "HTTZ"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim DATJDGL As Database
Dim RECLC As Recordset
Dim RECHT As Recordset
Dim RECSK As Recordset, RECHJAP As Recordset
Private Sub Combo1_Click()
' LOADFJ
End Sub
Private Sub Command0_Click(Index As Integer)
strhh = left(Command0(Index).Caption, 3)
'檢查當(dāng)前房間是否住客
RECSK.FindFirst ("房號=" & strhh)
If Not RECSK.NoMatch Then
MsgBox "當(dāng)前房間已住客,不能調(diào)整!", vbCritical, "提示信息"
Exit Sub
Else
RECHJAP.FindFirst ("房號=" & strhh)
If Not RECHJAP.NoMatch Then
MsgBox "當(dāng)前房間已住客,不能調(diào)整!", vbCritical, "提示信息"
Exit Sub
End If
End If
'調(diào)整房態(tài)
RECHT.FindFirst ("房號=" & strhh)
If Not RECHT.NoMatch Then
RECHT.Edit
If RECHT("房態(tài)") = "空房" Then
RECHT("房態(tài)") = "在住"
Else
If RECHT("房態(tài)") = "在住" Then
RECHT("房態(tài)") = "走房"
Else
If RECHT("房態(tài)") = "走房" Then
RECHT("房態(tài)") = "維修"
Else
RECHT("房態(tài)") = "空房"
End If
End If
End If
Else
MsgBox "查無此房!", vbCritical, "系統(tǒng)錯誤"
End If
RECHT.Update
If RECHT("房態(tài)") = "空房" Then Command0(Index).Picture = LoadPicture(App.Path & "\空房.ICO")
If RECHT("房態(tài)") = "走房" Then Command0(Index).Picture = LoadPicture(App.Path & "\走房.ICO")
If RECHT("房態(tài)") = "在住" Then Command0(Index).Picture = LoadPicture(App.Path & "\在住.ICO")
If RECHT("房態(tài)") = "維修" Then Command0(Index).Picture = LoadPicture(App.Path & "\維修.ICO")
' Command0(Index).Caption = RECHT("房號") & " " & RECHT("房態(tài)")
Command0(Index).Caption = RECHT("房號") & " " & RECHT("類型") & " " & RECHT("房態(tài)")
End Sub
Private Sub Command1_Click()
Unload Me
End Sub
Private Sub Form_Activate()
TreeView1.Nodes(1).Selected = True
LOADFJ
TreeView1.SetFocus
End Sub
Private Sub Form_Load()
Dim RECHT_1 As Recordset
Dim TEMPNODE As Node
Set DATJDGL = OpenDatabase(App.Path & "\DATA\JDGL.MDB")
Set RECLC = DATJDGL.OpenRecordset("樓層", dbOpenDynaset)
Set RECHT = DATJDGL.OpenRecordset("房間狀態(tài)", dbOpenDynaset)
Set RECSK = DATJDGL.OpenRecordset("散客登記表", dbOpenDynaset)
Set RECHJAP = DATJDGL.OpenRecordset("團(tuán)會房間安排", dbOpenDynaset)
RECLC.MoveLast
If RECLC.RecordCount <= 0 Then
MsgBox "您還沒有在本系統(tǒng)中設(shè)置有效的房間!", vbCritical, "提示信息"
Unload Me
End If
RECLC.MoveFirst
TreeView1.Nodes.Clear
Set TEMPNODE = TreeView1.Nodes.Add(, , "A一樓", "一樓", 1, 2)
Set TEMPNODE = TreeView1.Nodes.Add(, , "A二樓", "二樓", 1, 2)
Set TEMPNODE = TreeView1.Nodes.Add(, , "A三樓", "三樓", 1, 2)
Set TEMPNODE = TreeView1.Nodes.Add(, , "A四樓", "四樓", 1, 2)
Set TEMPNODE = TreeView1.Nodes.Add(, , "A五樓", "五樓", 1, 2)
Set TEMPNODE = TreeView1.Nodes.Add(, , "A六樓", "六樓", 1, 2)
Set TEMPNODE = TreeView1.Nodes.Add(, , "A七樓", "七樓", 1, 2)
Set TEMPNODE = TreeView1.Nodes.Add(, , "A八樓", "八樓", 1, 2)
End Sub
Private Sub Form_Unload(Cancel As Integer)
DATJDGL.Close
End Sub
Private Sub LOADFJ()
For l = Command0.Count - 1 To 1 Step -1
Unload Command0(l)
Next l
RECHT.Filter = "TRIM(樓層)='" & TreeView1.SelectedItem.Text & "'"
Set RECHT_1 = RECHT.OpenRecordset(, dbOpenDynaset)
W = 0
H = 0
If RECHT_1.RecordCount > 0 Then
RECHT_1.MoveFirst
Else
Command0(0).Visible = False
End If
Do While Not RECHT_1.EOF
If S <> 0 Then
Load Command0(S)
End If
Command0(S).Visible = True
Command0(S).left = Command0(0).left + 1250 * W
Command0(S).top = Command0(0).top + 1000 * H
If RECHT_1("房態(tài)") = "空房" Then Command0(S).Picture = LoadPicture(App.Path & "\空房.ICO")
If RECHT_1("房態(tài)") = "走房" Then Command0(S).Picture = LoadPicture(App.Path & "\走房.ICO")
If RECHT_1("房態(tài)") = "在住" Then Command0(S).Picture = LoadPicture(App.Path & "\在住.ICO")
If RECHT_1("房態(tài)") = "維修" Then Command0(S).Picture = LoadPicture(App.Path & "\維修.ICO")
Command0(S).Caption = RECHT_1("房號") & " " & RECHT_1("類型") & " " & RECHT_1("房態(tài)")
S = S + 1
W = W + 1
If W = 6 Then
H = H + 1
W = 0
End If
RECHT_1.MoveNext
Loop
End Sub
Private Sub TreeView1_NodeClick(ByVal Node As MSComctlLib.Node)
LOADFJ
End Sub
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -