📄 zdfdj.frm
字号:
End
Begin VB.Label Label6
AutoSize = -1 'True
Caption = "客人姓名:"
Height = 180
Left = 120
TabIndex = 25
Top = 1680
Width = 810
End
Begin VB.Label Label7
AutoSize = -1 'True
Caption = "证件名称:"
Height = 180
Left = 2400
TabIndex = 24
Top = 1680
Width = 810
End
Begin VB.Label Label8
AutoSize = -1 'True
Caption = "证件号码:"
Height = 180
Left = 120
TabIndex = 23
Top = 2160
Width = 810
End
Begin VB.Label Label9
AutoSize = -1 'True
Caption = "证件地址:"
Height = 180
Left = 120
TabIndex = 22
Top = 2640
Width = 810
End
Begin VB.Label Label10
AutoSize = -1 'True
Caption = "从何处来:"
Height = 180
Left = 120
TabIndex = 21
Top = 3120
Width = 810
End
Begin VB.Label Label11
AutoSize = -1 'True
Caption = "到何处去:"
Height = 180
Left = 2400
TabIndex = 20
Top = 3120
Width = 810
End
Begin VB.Label Label12
AutoSize = -1 'True
Caption = "住宿原因:"
Height = 180
Left = 120
TabIndex = 19
Top = 3600
Width = 810
End
Begin VB.Label Label13
AutoSize = -1 'True
Caption = "操作员:"
Height = 180
Left = 120
TabIndex = 18
Top = 4680
Width = 630
End
Begin VB.Label Label14
AutoSize = -1 'True
Caption = "入住日期:"
Height = 180
Left = 120
TabIndex = 17
Top = 4200
Width = 810
End
Begin VB.Label Label15
AutoSize = -1 'True
Caption = "入住时间:"
Height = 180
Left = 2400
TabIndex = 16
Top = 4200
Width = 810
End
Begin VB.Label Label16
Caption = "Label16"
Height = 375
Left = 960
TabIndex = 15
Top = 4680
Width = 1335
End
End
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = 2760
Top = 6000
Visible = 0 'False
Width = 1335
_ExtentX = 2355
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 1
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=KFGL.MDB;Persist Security Info=False"
OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=KFGL.MDB;Persist Security Info=False"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from kf where 状态=""空房"""
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
End
Attribute VB_Name = "zdfdjj"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim rs_bookstyle As New ADODB.Recordset
Dim rs_bookstyle1 As New ADODB.Recordset
Dim conn As String
conn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=kfgl.mdb;Persist Security Info=False"
Dim sql As String
Dim sql1 As String
If Text6.Text = "" Then
MsgBox "客人姓名不能为空!", vbOKOnly + vbExclamation, "错误"
Exit Sub
End If
If Combo1.Text = "" Then
MsgBox "证件名称不能为空!", vbOKOnly + vbExclamation, "错误"
Exit Sub
End If
If Text7.Text = "" Then
MsgBox "证件号码不能为空!", vbOKOnly + vbExclamation, "错误"
Exit Sub
End If
If Text8.Text = "" Then
MsgBox "证件地址不能为空!", vbOKOnly + vbExclamation, "错误"
Exit Sub
End If
If Text9.Text = "" Then
MsgBox "从何处来不能为空!", vbOKOnly + vbExclamation, "错误"
Exit Sub
End If
If Text11.Text = "" Then
MsgBox "住宿原因不能为空!", vbOKOnly + vbExclamation, "错误"
Exit Sub
End If
sql = "select * from djb where 房号='" & Text1.Text & "'"
sql1 = "select * from kf where 房号='" & Text1.Text & "'"
rs_bookstyle.Open sql, conn, adOpenKeyset, adLockPessimistic
rs_bookstyle1.Open sql1, conn, adOpenKeyset, adLockPessimistic
If rs_bookstyle1.Fields(3) = "空房" Then
rs_bookstyle.AddNew
rs_bookstyle.Fields(0) = Trim(Text1.Text)
rs_bookstyle.Fields(5) = Trim(Text2.Text)
rs_bookstyle.Fields(2) = Trim(Text3.Text)
rs_bookstyle.Fields(3) = Trim(Text4.Text)
rs_bookstyle.Fields(4) = Trim(Text5.Text)
rs_bookstyle.Fields(1) = Trim(Text6.Text)
rs_bookstyle.Fields(6) = Trim(Combo1.Text)
rs_bookstyle.Fields(7) = Trim(Text7.Text)
rs_bookstyle.Fields(8) = Trim(Text8.Text)
rs_bookstyle.Fields(9) = Trim(Text9.Text)
rs_bookstyle.Fields(10) = Trim(Text10.Text)
rs_bookstyle.Fields(11) = Trim(Text11.Text)
rs_bookstyle.Fields(12) = Trim(Label16.Caption)
rs_bookstyle.Fields(13) = Trim(DTP1.Value)
rs_bookstyle.Fields(14) = Trim(tim1.Value)
rs_bookstyle.Fields(15) = "0"
rs_bookstyle.Fields(16) = "0"
rs_bookstyle.Fields(17) = "0"
rs_bookstyle.Update
MsgBox "订房成功!", vbOKOnly, ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
Text10.Text = ""
Text11.Text = ""
Combo1.Text = ""
rs_bookstyle.Close
Else
MsgBox "房间已满!", vbOKOnly + vbExclamation, ""
rs_bookstyle.Close
Exit Sub
End If
rs_bookstyle1.Fields(3) = "入住"
rs_bookstyle1.Update
Adodc1.Refresh
End Sub
Private Sub Command3_Click()
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
Text10.Text = ""
Text11.Text = ""
Combo1.Text = ""
DTP1.Value = Date
tim1.Value = Time
Label16.Caption = MDIForm1.StatusBar1.Panels(1).Text
Adodc1.Refresh
End Sub
Private Sub Command4_Click()
Unload Me
End Sub
Private Sub Form_Activate()
Adodc1.Refresh
End Sub
Private Sub Form_Load()
Combo1.AddItem "身份证"
Combo1.AddItem "工作证"
Combo1.AddItem "户口薄"
Combo1.AddItem "军官证"
Combo1.AddItem "警官证"
Combo1.AddItem "士兵证"
Combo1.AddItem "护照"
Combo1.AddItem "其它证件证"
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
Text10.Text = ""
Text11.Text = ""
Combo1.Text = ""
DTP1.Value = Date
tim1.Value = Time
Label16.Caption = MDIForm1.StatusBar1.Panels(1).Text
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -