📄 frmsrchic1.frm
字号:
VERSION 5.00
Begin VB.Form FrmSrchIC
Caption = "查询发行IC卡情况"
ClientHeight = 5700
ClientLeft = 45
ClientTop = 1140
ClientWidth = 9480
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
LinkTopic = "Form1"
ScaleHeight = 5700
ScaleWidth = 9480
Begin VB.ListBox LstRoomBook
BackColor = &H00E0E0E0&
Height = 1740
ItemData = "FrmSrchIC1.frx":0000
Left = 5280
List = "FrmSrchIC1.frx":0002
TabIndex = 7
Top = 240
Visible = 0 'False
Width = 1575
End
Begin VB.CommandButton CmdAllClient
Caption = "全部"
Height = 375
Left = 7440
TabIndex = 6
Top = 240
Width = 975
End
Begin VB.CommandButton CmdAllIC
Caption = "全部"
Height = 375
Left = 3120
TabIndex = 8
Top = 240
Width = 975
End
Begin VB.Data Data1
Caption = "Data1"
Connect = "Access"
DatabaseName = ""
DefaultCursorType= 0 '缺省游标
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
Height = 345
Left = 120
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = ""
Top = 1320
Visible = 0 'False
Width = 1455
End
Begin VB.CommandButton CmdCancel
Caption = "取消"
Height = 375
Left = 8520
TabIndex = 5
Top = 240
Width = 975
End
Begin VB.CommandButton CmdShortRoomNumber
Caption = ">>"
Height = 375
Left = 6840
TabIndex = 4
Top = 240
Width = 495
End
Begin VB.TextBox TxtShortRoomNumber
Height = 375
Left = 5280
TabIndex = 3
Top = 240
Width = 1575
End
Begin VB.ComboBox CboICType
Height = 330
Left = 1200
TabIndex = 0
Top = 240
Width = 1815
End
Begin VB.Label Label2
Caption = "房间"
Height = 375
Left = 4680
TabIndex = 2
Top = 240
Width = 615
End
Begin VB.Label Label1
Caption = "卡类型"
Height = 375
Left = 240
TabIndex = 1
Top = 240
Width = 855
End
End
Attribute VB_Name = "FrmSrchIC"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub CboICType_Click()
Dim sSQL As String
If CboICType.Text = "客人卡" Then
sSQL = "select shortroomnumber as 房间 ,putoutsdate as 入住时间,operatorout as 入住经办人," & _
" cancelsdate as 退房时间,operatorcancel as 退房经办人," & _
"name as 客人姓名,IDCard as 身份证 from ICCard where ICtype='客人卡'"
Else
sSQL = "select shortroomnumber as 房间 ,putoutsdate as 发行时间,operatorout as 发行人," & _
" cancelsdate as 注销时间,operatorcancel as 注销人,CancelReason as 注销原因," & _
"name as 持卡人,IDCard as 身份证 from ICCard where ICtype='" & _
CboICType.Text & "'"
End If
Data1.RecordSource = sSQL
Data1.Refresh
End Sub
Private Sub CmdAllClient_Click()
Dim sSQL As String
sSQL = "select shortroomnumber as 房间 ,putoutsdate as 发行时间,operatorout as 发行人, " & _
" cancelsdate as 注销时间,operatorcancel as 注销人,CancelReason as 注销原因," & _
"name as 持卡人,IDCard as 身份证 from ICCard where ICtype='客人卡'"
Data1.RecordSource = sSQL
Data1.Refresh
End Sub
Private Sub CmdAllIC_Click()
Dim sSQL As String
sSQL = "select shortroomnumber as 房间 ,putoutsdate as 发行时间,operatorout as 发行人, " & _
" cancelsdate as 注销时间,operatorcancel as 注销人,CancelReason as 注销原因," & _
"name as 持卡人,IDCard as 身份证 from ICCard "
Data1.RecordSource = sSQL
Data1.Refresh
End Sub
Private Sub CmdCancel_Click()
Unload Me
End Sub
Private Sub CmdShortRoomNumber_Click()
LstRoomBook.Clear
With RC_Room
If Not (.BOF And .EOF) Then
.MoveFirst
While Not .EOF
LstRoomBook.AddItem .Fields("ShortroomNumber")
.MoveNext
Wend
End If
End With
LstRoomBook.Visible = True
LstRoomBook.SetFocus
End Sub
Private Sub Form_Load()
Data1.DatabaseName = SystemDir & "icdata.mdb"
For i = 1 To UBound(gICType_Array)
CboICType.AddItem gICType_Array(i).ICTypeName
Next
CboICType.ListIndex = 0
End Sub
Private Sub LstRoomBook_Click()
If LstRoomBook.Text <> "" Then
TxtShortRoomNumber.Text = LstRoomBook.Text
LstRoomBook.Visible = False
End If
End Sub
Private Sub LstRoomBook_LostFocus()
LstRoomBook.Visible = False
End Sub
Private Sub TxtShortRoomNumber_KeyPress(KeyAscii As Integer)
Dim sSQL As String
If (TxtShortRoomNumber.Text <> "") And (KeyAscii = 13) Then
sSQL = "select shortroomnumber as 房间 ,putoutsdate as 入住时间,operatorout as 入住经办人," & _
" cancelsdate as 退房时间,operatorcancel as 退房经办人," & _
"name as 客人姓名,IDCard as 身份证 from ICCard where ICType='客人卡' and ShortRoomNumber='" & _
TxtShortRoomNumber.Text & "'"
Data1.RecordSource = sSQL
Data1.Refresh
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -