?? 退房.frm
字號:
VERSION 5.00
Begin VB.Form frmLeave
Caption = "退房"
ClientHeight = 1845
ClientLeft = 4290
ClientTop = 3810
ClientWidth = 3900
LinkTopic = "Form5"
ScaleHeight = 1845
ScaleWidth = 3900
Begin VB.ComboBox cboName
Height = 300
Left = 1560
Style = 2 'Dropdown List
TabIndex = 2
Top = 720
Width = 1935
End
Begin VB.CommandButton cmdLeave
Caption = "退房"
Height = 375
Left = 360
TabIndex = 1
Top = 1320
Width = 1095
End
Begin VB.CommandButton cmdReturn
Caption = "返回主窗口"
Height = 375
Left = 1920
TabIndex = 0
Top = 1320
Width = 1575
End
Begin VB.Line Line2
X1 = 0
X2 = 3720
Y1 = 1200
Y2 = 1200
End
Begin VB.Line Line1
X1 = 0
X2 = 3720
Y1 = 600
Y2 = 600
End
Begin VB.Label Label2
Caption = "退房"
BeginProperty Font
Name = "楷體_GB2312"
Size = 26.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 615
Left = 0
TabIndex = 4
Top = 0
Width = 2535
End
Begin VB.Label lblName
Caption = "選擇住客姓名:"
Height = 255
Left = 120
TabIndex = 3
Top = 840
Width = 1335
End
End
Attribute VB_Name = "frmLeave"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Form_Load()
Dim guest1 As guest
Dim int1 As Integer, int2 As Integer
If Dir(strGuestNum) <> "" And Dir(strGuestData) <> "" Then
Open strGuestNum For Input As 1
Input #1, int1
Close 1
Open strGuestData For Random As 1 Len = Len(guest1)
For int2 = 1 To int1
Get #1, int2, guest1
If guest1.blnIsIn = True Then
cboName.AddItem guest1.strName
cboName.ItemData(cboName.NewIndex) = int2
End If
Next
Close 1
End If
End Sub
Private Sub cmdLeave_Click()
Dim str1 As String * 8
Dim str2 As String * 8
Dim guest1 As guest
Dim int1 As Integer
Dim int2 As Integer
If cboName.ListIndex = -1 Then MsgBox ("請選擇住客姓名。"): Exit Sub
Open strGuestData For Random As 1 Len = Len(guest1)
int1 = cboName.ItemData(cboName.ListIndex) '得到用戶所選姓名是
Get #1, int1, guest1
guest1.blnIsIn = False
guest1.dtmOut = Now
Put #1, int1, guest1
cboName.RemoveItem cboName.ListIndex
Close 1
End Sub
Private Sub cmdReturn_Click()
Unload Me
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -