📄 frminaddman.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form FrmInAddMan
Caption = "客房续住管理"
ClientHeight = 5070
ClientLeft = 60
ClientTop = 345
ClientWidth = 10320
Icon = "FrmInAddMan.frx":0000
LinkTopic = "Form1"
LockControls = -1 'True
ScaleHeight = 5070
ScaleWidth = 10320
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Cmd_Cont
Caption = "续 住"
Height = 495
Left = 3473
TabIndex = 5
Top = 4440
Width = 1215
End
Begin MSDataGridLib.DataGrid DataGrid1
Bindings = "FrmInAddMan.frx":0CCA
Height = 3495
Left = 120
TabIndex = 4
Top = 720
Width = 10095
_ExtentX = 17806
_ExtentY = 6165
_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
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = 120
Top = 4440
Visible = 0 'False
Width = 1695
_ExtentX = 2990
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 3
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "DSN=HotelSys"
OLEDBString = ""
OLEDBFile = ""
DataSourceName = "HotelSys"
OtherAttributes = ""
UserName = "hotelman"
Password = "hotelman"
RecordSource = "select * from orderroom"
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.CommandButton Cmd_Search
Caption = "查 询"
Height = 375
Left = 3240
TabIndex = 3
Top = 180
Width = 1095
End
Begin VB.TextBox txtCltName
Height = 270
Left = 1200
TabIndex = 2
Top = 232
Width = 1455
End
Begin VB.CommandButton Cmd_Close
Caption = "关 闭"
Height = 495
Left = 5633
TabIndex = 0
Top = 4440
Width = 1215
End
Begin VB.Label Label1
Caption = "客户姓名"
Height = 255
Left = 240
TabIndex = 1
Top = 240
Width = 855
End
End
Attribute VB_Name = "FrmInAddMan"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public TmpOId As Integer
Private Sub Refresh_InRoom()
'入住信息记录
Dim strSearch As String
If Trim(txtCltName.Text) = "" Then
strSearch = ""
Else
strSearch = " WHERE c.CltName LIKE '%" + MakeStr(txtCltName.Text) + "%'"
End If
Adodc1.RecordSource = "SELECT o.OrderId As 编号, c.CltId As 客户编号, c.CltName As 客户姓名," _
+ " o.RealInDate As 入住时间, o.LeaveDate As 退房时间, o.Rate As 折扣," _
+ " l.Total As 总额, o.Firstpay As 押金" _
+ " FROM OrderRoom o, Client c , OrderList l WHERE o.CltId=c.CltId" _
+ " And l.OrderId=o.OrderId And l.Status=2 And o.Status=2" + strSearch
Adodc1.Refresh
End Sub
Private Sub Cmd_Close_Click()
Unload Me
End Sub
'办理续住手续,需要更改入住天数、押金、总额
Private Sub Cmd_Cont_Click()
Dim TmpRoomNo As String
If Adodc1.Recordset.EOF = True Then
MsgBox "请选择记录"
Exit Sub
End If
FrmInAddEdit.OId = Adodc1.Recordset.Fields(0)
'客户信息
If Trim(Adodc1.Recordset.Fields(1)) <> "" Then
FrmInAddEdit.txtCId = Trim(Adodc1.Recordset.Fields(1))
'根据客户编号取得客户详细信息
MyClt.GetInfo (Trim(Adodc1.Recordset.Fields(1)))
FrmInAddEdit.txtCType = MyClt.CltType
End If
If Trim(Adodc1.Recordset.Fields(2)) <> "" Then
FrmInAddEdit.txtCName = Trim(Adodc1.Recordset.Fields(2))
End If
'入住日期
If Trim(Adodc1.Recordset.Fields(3)) <> "" Then
FrmInAddEdit.lblInDate = Trim(Adodc1.Recordset.Fields(3))
End If
'退房日期
If Trim(Adodc1.Recordset.Fields(4)) <> "" Then
FrmInAddEdit.lblLeaveDate = Trim(Adodc1.Recordset.Fields(4))
End If
'折扣
If Trim(Adodc1.Recordset.Fields(5)) <> "" Then
FrmInAddEdit.Cmb_Rate.Text = Adodc1.Recordset.Fields(5)
End If
'押金
If Trim(Adodc1.Recordset.Fields(7)) <> "" Then
FrmInAddEdit.txtFPay = Adodc1.Recordset.Fields(7)
End If
'实付金额
If Trim(Adodc1.Recordset.Fields(6)) <> "" Then
FrmInAddEdit.lblTotal = Adodc1.Recordset.Fields(6)
End If
'根据入住编号取得此入住客房详细信息
MyOrderList.GetInfo (Adodc1.Recordset.Fields(0))
TmpRoomNo = MyOrderList.RoomNo
FrmInAddEdit.lblRoomNo = TmpRoomNo
FrmInAddEdit.txtDays = MyOrderList.Days
' FrmInAddEdit.txtTotal = MyOrderList.Total
FrmInAddEdit.txtMemo = MyOrderList.Memo
'根据客房编号取得客房价格,同时计算应付金额
MyRoom.GetInfo (TmpRoomNo)
FrmInAddEdit.lblPrice = MyRoom.Price
FrmInAddEdit.lblPay = MyRoom.Price * MyOrderList.Days
FrmInAddEdit.Show 1
Refresh_InRoom
End Sub
Private Sub Cmd_Search_Click()
'按客户姓名查找客户入住信息
Refresh_InRoom
End Sub
Private Sub Form_Load()
'刷新入住信息
Refresh_InRoom
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -