?? frmleaveman.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 FrmLeaveMan
Caption = "客房退房管理"
ClientHeight = 5280
ClientLeft = 60
ClientTop = 450
ClientWidth = 10275
LinkTopic = "Form1"
ScaleHeight = 5280
ScaleWidth = 10275
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Cmd_Leave
Caption = "退 房"
Height = 495
Left = 3360
TabIndex = 4
Top = 4237
Width = 1215
End
Begin VB.CommandButton Cmd_Search
Caption = "查 詢"
Height = 375
Left = 6480
TabIndex = 3
Top = 0
Width = 1095
End
Begin VB.TextBox txtCltName
Height = 270
Left = 4440
TabIndex = 2
Top = 52
Width = 1455
End
Begin VB.CommandButton Cmd_Close
Caption = "關 閉"
Height = 495
Left = 5520
TabIndex = 1
Top = 4237
Width = 1215
End
Begin VB.ComboBox ComboStatus
Height = 300
ItemData = "FrmLeaveMan.frx":0000
Left = 1320
List = "FrmLeaveMan.frx":000A
Style = 2 'Dropdown List
TabIndex = 0
Top = 37
Width = 1455
End
Begin MSDataGridLib.DataGrid DataGrid1
Height = 3495
Left = 0
TabIndex = 5
Top = 517
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 = 0
Top = 4237
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= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
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.Label Label1
AutoSize = -1 'True
Caption = "客戶姓名"
Height = 180
Left = 3480
TabIndex = 7
Top = 97
Width = 720
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "選擇狀態"
Height = 180
Left = 240
TabIndex = 6
Top = 97
Width = 720
End
End
Attribute VB_Name = "FrmLeaveMan"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Sub Refresh_Reg()
'入住信息記錄
Dim TmpSource As String
TmpSource = "SELECT r.RegId As 編號, c.CustId As 客戶編號, c.CustName As 客戶姓名," _
+ " r.RoomNo As 房間編號, r.InDate As 入住時間, r.LeaveDate As 退房時間," _
+ " r.Days As 入住天數, r.Price As 報價, r.Rate As 折扣, r.OtherFee As 其他收費," _
+ " r.FirstPay As 押金, r.Memo As 其他說明, u.EmpName As 操作人" _
+ " FROM Registration r, Customer c , Users u WHERE r.CustId=c.CustId" _
+ " And r.UserName=u.UserName And r.Status=" + Trim(ComboStatus.ListIndex + 1)
'TmpSource = "select * from Customer c "
If Trim(txtCltName) <> " " Then
Adodc1.RecordSource = TmpSource + " And c.CustName LIKE '%" + MakeStr(txtCltName) + "%'"
End If
Adodc1.ConnectionString = Conn
Adodc1.Refresh
Set DataGrid1.DataSource = Adodc1
DataGrid1.Columns(0).Width = 0
DataGrid1.Columns(1).Width = 1000
DataGrid1.Columns(2).Width = 1000 '客戶姓名
DataGrid1.Columns(3).Width = 1000 '房間編號
DataGrid1.Columns(4).Width = 1000 '入住時間
DataGrid1.Columns(5).Width = 1000 '退房時間
DataGrid1.Columns(6).Width = 800 '入住天數
DataGrid1.Columns(7).Width = 1000 '報價
DataGrid1.Columns(8).Width = 1000 '折扣
DataGrid1.Columns(9).Width = 1000 '其他收費
DataGrid1.Columns(10).Width = 1000 '押金
DataGrid1.Columns(11).Width = 1000 '其他說明
DataGrid1.Columns(11).Width = 1000
End Sub
Private Sub Cmd_Close_Click()
Unload Me
End Sub
Private Sub Cmd_Leave_Click()
'修改預定信息
If Adodc1.Recordset.EOF = True Then
MsgBox "請選擇記錄"
Exit Sub
End If
'登記編號
FrmLeaveEdit.TmpId = Trim(Adodc1.Recordset.Fields(0))
'房間編號
FrmLeaveEdit.lblRoomNo = Trim(Adodc1.Recordset.Fields(3))
'客戶信息
If Trim(Adodc1.Recordset.Fields(1)) <> "" Then
FrmLeaveEdit.lblCid = Trim(Adodc1.Recordset.Fields(1))
MyCust.GetInfo (Trim(Adodc1.Recordset.Fields(1)))
FrmLeaveEdit.lblCname = MyCust.CustName
FrmLeaveEdit.lblCtype = MyCust.CustType
End If
'入住日期
If Trim(Adodc1.Recordset.Fields(4)) <> "" Then
FrmLeaveEdit.txtInDate = Adodc1.Recordset.Fields(4)
End If
'退房日期
If Trim(Adodc1.Recordset.Fields(5)) <> "" Then
FrmLeaveEdit.txtLeaveDate = Adodc1.Recordset.Fields(5)
End If
'入住天數
If Trim(Adodc1.Recordset.Fields(6)) <> "" Then
FrmLeaveEdit.txtDays = Adodc1.Recordset.Fields(6)
End If
'報價
If Trim(Adodc1.Recordset.Fields(7)) <> "" Then
FrmLeaveEdit.txtPrice = Adodc1.Recordset.Fields(7)
End If
'折扣
If Trim(Adodc1.Recordset.Fields(8)) <> "" Then
FrmLeaveEdit.ComboRate = Adodc1.Recordset.Fields(8)
End If
'其他費用
If Trim(Adodc1.Recordset.Fields(9)) <> "" Then
FrmLeaveEdit.txtOtherFee = Adodc1.Recordset.Fields(9)
End If
'押金
If Trim(Adodc1.Recordset.Fields(10)) <> "" Then
FrmLeaveEdit.txtFirstPay = Adodc1.Recordset.Fields(10)
End If
'其他說明
If Trim(Adodc1.Recordset.Fields(11)) <> "" Then
FrmLeaveEdit.txtMemo = Adodc1.Recordset.Fields(11)
End If
'操作人
If Trim(Adodc1.Recordset.Fields(12)) <> "" Then
FrmLeaveEdit.lblEmpName = Trim(Adodc1.Recordset.Fields(12))
End If
FrmLeaveEdit.Show 1
Refresh_Reg
End Sub
Private Sub Cmd_Search_Click()
'按客戶姓名查找客戶入住信息
Refresh_Reg
End Sub
Private Sub ComboStatus_Click()
Refresh_Reg
'如果是已退房記錄,則不能再執行退房操作
If ComboStatus.ListIndex = 0 Then
Cmd_Leave.Enabled = True
Else
Cmd_Leave.Enabled = False
End If
End Sub
Private Sub Form_Load()
ComboStatus.ListIndex = 0
'刷新入住信息
Refresh_Reg
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -