📄 tfdj.frm
字号:
Height = 180
Left = 2160
TabIndex = 7
Top = 1200
Width = 900
End
Begin VB.Label Label9
AutoSize = -1 'True
Caption = "押金剩余:"
Height = 180
Left = 4560
TabIndex = 6
Top = 1200
Width = 900
End
Begin VB.Label Label10
AutoSize = -1 'True
Caption = "应收金额:"
Height = 180
Left = 120
TabIndex = 5
Top = 1680
Width = 900
End
Begin VB.Label Label11
Caption = "实收金额:"
Height = 255
Left = 2160
TabIndex = 4
Top = 1680
Width = 1095
End
Begin VB.Label Label22
AutoSize = -1 'True
Caption = "入住天数:"
Height = 180
Left = 4560
TabIndex = 3
Top = 1680
Width = 810
End
End
Begin MSAdodcLib.Adodc Adodc1
Height = 375
Left = 7440
Top = 3840
Width = 1335
_ExtentX = 2355
_ExtentY = 661
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 2
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 = "djb"
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
Begin VB.Frame Frame1
Caption = "房客信息"
Height = 2415
Left = 120
TabIndex = 0
Top = 120
Width = 6855
Begin MSDataGridLib.DataGrid DataGrid1
Bindings = "tfdj.frx":0000
Height = 2055
Left = 120
TabIndex = 1
Top = 240
Width = 6615
_ExtentX = 11668
_ExtentY = 3625
_Version = 393216
AllowUpdate = 0 'False
HeadLines = 1
RowHeight = 15
BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ColumnCount = 2
BeginProperty Column00
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column01
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
BeginProperty Column00
EndProperty
BeginProperty Column01
EndProperty
EndProperty
End
End
Begin MSComCtl2.DTPicker DTP2
DataField = "入住日期"
DataSource = "Adodc1"
Height = 375
Left = 7440
TabIndex = 27
Top = 1440
Width = 1215
_ExtentX = 2143
_ExtentY = 661
_Version = 393216
Format = 66060289
CurrentDate = 38486
End
Begin MSComCtl2.DTPicker DTP1
Height = 300
Left = 7440
TabIndex = 28
Top = 2160
Width = 1320
_ExtentX = 2328
_ExtentY = 529
_Version = 393216
Format = 66060289
CurrentDate = 37203
End
Begin VB.Label Label24
Caption = "Label24"
DataField = "标准价"
DataSource = "Adodc1"
Height = 255
Left = 7440
TabIndex = 30
Top = 2760
Width = 1215
End
Begin VB.Label Label25
Caption = "Label25"
Height = 375
Left = 7440
TabIndex = 29
Top = 3240
Width = 855
End
End
Attribute VB_Name = "tfdjj"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
If Text1.Text = "" Then
MsgBox "没有输入金额!", vbOKOnly + vbExclamation, "错误"
Exit Sub
End If
If Text1.Text <> Label21.Caption Then
MsgBox "请重新确定实收金额!", vbOKOnly + vbExclamation, "错误"
Exit Sub
End If
If Label12.Caption = "" Then
MsgBox "没有入住信息!", vbOKOnly + vbExclamation, "错误"
Exit Sub
End If
Dim answer As String
On Error GoTo delerror
Dim a As String
a = Adodc1.Recordset("房号")
answer = MsgBox("确定要退房吗?", vbYesNo, "")
If answer = vbYes Then
Dim rs_chang As New ADODB.Recordset
Dim sql As String
Dim conn As String
conn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=kfgl.mdb;Persist Security Info=False"
sql = "select * from kf where 房号='" & Label12.Caption & "'"
rs_chang.Open sql, conn, adOpenKeyset, adLockPessimistic
rs_chang.Fields(3) = "空房"
rs_chang.Update
rs_chang.Close
Adodc1.Recordset.Delete
Adodc1.Refresh
MsgBox "退房成功!", vbOKOnly + vbExclamation, ""
Adodc1.Refresh
Else
Exit Sub
End If
delerror:
If Err.Number <> 0 Then
MsgBox Err.Description
End If
End Sub
Private Sub Command2_Click()
Text1.Text = ""
Label15.Caption = ""
Label19.Caption = ""
Label20.Caption = ""
Label21.Caption = ""
Label23.Caption = ""
Adodc1.Refresh
End Sub
Private Sub Command3_Click()
Unload Me
End Sub
Private Sub DataGrid1_Click()
Label23.Caption = DTP1.Value - DTP2.Value
Label15.Caption = Label24.Caption * Label23.Caption
Label19.Caption = Val(Label15.Caption) + Val(Label16.Caption) + Val(Label17.Caption) + Val(Label18.Caption)
Label20.Caption = Val(Label14.Caption) - Val(Label19.Caption)
Label21.Caption = Val(Label19.Caption) - Val(Label14.Caption)
End Sub
Private Sub Form_Activate()
Adodc1.Refresh
End Sub
Private Sub Form_Load()
DTP1.Value = Date
Text1.Text = ""
Label15.Caption = ""
Label19.Caption = ""
Label20.Caption = ""
Label21.Caption = ""
Label23.Caption = ""
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -