?? frmregman.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 FrmRegMan
Caption = "客房入住管理"
ClientHeight = 5130
ClientLeft = 60
ClientTop = 345
ClientWidth = 10320
Icon = "FrmRegMan.frx":0000
LinkTopic = "Form1"
LockControls = -1 'True
ScaleHeight = 5130
ScaleWidth = 10320
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Cmd_Edit
Caption = "修 改"
Height = 495
Left = 4553
TabIndex = 6
Top = 4440
Width = 1215
End
Begin VB.CommandButton Cmd_Add
Caption = "登記入住"
Height = 495
Left = 2513
TabIndex = 5
Top = 4440
Width = 1215
End
Begin MSDataGridLib.DataGrid DataGrid1
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 = 5880
Top = 120
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 = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=Hoter;Data Source=D5029"
OLEDBString = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=Hoter;Data Source=D5029"
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.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 = 6593
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 = "FrmRegMan"
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=1"
If Trim(txtCustName) <> "" Then
TmpSource = TmpSource + " And c.CustName LIKE '%" + MakeStr(txtCustName) + "%'"
End If
Adodc1.ConnectionString = Conn
Adodc1.RecordSource = TmpSource
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_Add_Click()
'設置入住編號、當前用戶姓名、入住時間
FrmRegEdit.TmpId = 0
FrmRegEdit.lblCid = ""
FrmRegEdit.lblCname = ""
FrmRegEdit.lblCtype = ""
FrmRegEdit.lblRoomNo = ""
FrmRegEdit.lblEmpName = CurUser.EmpName
FrmRegEdit.Modify = False
FrmRegEdit.Show 1
'刷新紀錄
Refresh_Reg
End Sub
Private Sub Cmd_Close_Click()
Unload Me
End Sub
Private Sub Cmd_Edit_Click()
'修改預定信息
If Adodc1.Recordset.EOF = True Then
MsgBox "請選擇記錄"
Exit Sub
End If
'如果是修改當前記錄在案,則不允許修改客戶和房間等信息,也不允許從預定中選擇
FrmRegEdit.Check1.Visible = False
FrmRegEdit.DataGrid1.Visible = False
FrmRegEdit.Cmd_Cust.Visible = False
'登記編號
FrmRegEdit.TmpId = Trim(Adodc1.Recordset.Fields(0))
'房間編號
FrmRegEdit.lblRoomNo = Trim(Adodc1.Recordset.Fields(3))
'客戶信息
If Trim(Adodc1.Recordset.Fields(1)) <> "" Then
FrmRegEdit.lblCid = Trim(Adodc1.Recordset.Fields(1))
MyCust.GetInfo (Trim(Adodc1.Recordset.Fields(1)))
FrmRegEdit.lblCname = MyCust.CustName
FrmRegEdit.lblCtype = MyCust.CustType
End If
'入住日期
If Trim(Adodc1.Recordset.Fields(4)) <> "" Then
FrmRegEdit.txtInDate = Adodc1.Recordset.Fields(4)
End If
'退房日期
If Trim(Adodc1.Recordset.Fields(5)) <> "" Then
FrmRegEdit.txtLeaveDate = Adodc1.Recordset.Fields(5)
End If
'入住天數
If Trim(Adodc1.Recordset.Fields(6)) <> "" Then
FrmRegEdit.txtDays = Adodc1.Recordset.Fields(6)
End If
'報價
If Trim(Adodc1.Recordset.Fields(7)) <> "" Then
FrmRegEdit.txtPrice = Adodc1.Recordset.Fields(7)
End If
'折扣
If Trim(Adodc1.Recordset.Fields(8)) <> "" Then
FrmRegEdit.ComboRate = Adodc1.Recordset.Fields(8)
End If
'其他費用
If Trim(Adodc1.Recordset.Fields(9)) <> "" Then
FrmRegEdit.txtOtherFee = Adodc1.Recordset.Fields(9)
End If
'押金
If Trim(Adodc1.Recordset.Fields(10)) <> "" Then
FrmRegEdit.txtFirstPay = Adodc1.Recordset.Fields(10)
End If
'其他說明
If Trim(Adodc1.Recordset.Fields(11)) <> "" Then
FrmRegEdit.txtMemo = Adodc1.Recordset.Fields(11)
End If
'操作人
If Trim(Adodc1.Recordset.Fields(12)) <> "" Then
FrmRegEdit.lblEmpName = Trim(Adodc1.Recordset.Fields(12))
End If
FrmRegEdit.Modify = True
FrmRegEdit.Show 1
Refresh_Reg
End Sub
Private Sub Cmd_Search_Click()
'按客戶姓名查找客戶入住信息
Refresh_Reg
End Sub
Private Sub Form_Load()
'刷新入住信息
Refresh_Reg
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -