📄 dt_kffp.frm
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Object = "{0D452EE1-E08F-101A-852E-02608C4D0BB4}#2.0#0"; "FM20.DLL"
Begin VB.Form dt_kffp
BorderStyle = 3 'Fixed Dialog
ClientHeight = 5850
ClientLeft = 45
ClientTop = 45
ClientWidth = 3315
ControlBox = 0 'False
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 5850
ScaleWidth = 3315
ShowInTaskbar = 0 'False
StartUpPosition = 3 'Windows Default
Begin VB.Frame Frame1
Height = 1065
Left = 180
TabIndex = 9
Top = 720
Width = 2865
Begin VB.TextBox tx_kflx_dm
Height = 300
Left = 1080
MaxLength = 1
TabIndex = 0
Text = "1"
Top = 270
Width = 435
End
Begin VB.TextBox tx_kflc
Height = 300
Left = 1080
MaxLength = 2
TabIndex = 2
Text = "12"
Top = 630
Width = 435
End
Begin VB.Label Label2
Alignment = 1 'Right Justify
Caption = "楼 层 号"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 120
TabIndex = 11
Top = 690
Width = 855
End
Begin VB.Label Label1
Alignment = 1 'Right Justify
Caption = "客房类型"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 150
TabIndex = 10
Top = 300
Width = 855
End
Begin MSForms.ComboBox cm_kflx_mc
Height = 300
Left = 1620
TabIndex = 1
Top = 270
Width = 1125
VariousPropertyBits= 746604571
MaxLength = 4
DisplayStyle = 3
Size = "1984;529"
ColumnCount = 2
cColumnInfo = 2
MatchEntry = 1
ShowDropButtonWhen= 2
FontName = "宋体"
FontHeight = 180
FontCharSet = 134
FontPitchAndFamily= 34
Object.Width = "705;1058"
End
End
Begin MSFlexGridLib.MSFlexGrid gd1
Height = 3210
Left = 180
TabIndex = 3
Top = 2190
Width = 2910
_ExtentX = 5133
_ExtentY = 5662
_Version = 327680
FixedCols = 0
BackColor = 12648447
FocusRect = 0
ScrollBars = 2
SelectionMode = 1
End
Begin VB.Label Label4
Alignment = 2 'Center
Caption = "按 Enter 键为选中"
ForeColor = &H00000000&
Height = 255
Left = 150
TabIndex = 8
Top = 5490
Width = 2955
End
Begin VB.Label lb_jls
Alignment = 1 'Right Justify
Caption = "0"
ForeColor = &H00000000&
Height = 195
Left = 2670
TabIndex = 7
Top = 1890
Width = 375
End
Begin VB.Label Label3
Alignment = 1 'Right Justify
Caption = "房间数:"
ForeColor = &H00000000&
Height = 195
Left = 1950
TabIndex = 6
Top = 1890
Width = 645
End
Begin VB.Label Label5
Alignment = 2 'Center
Caption = "客 房 派 房"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 210
TabIndex = 5
Top = 390
Width = 2895
End
Begin VB.Label frm_msg
Alignment = 1 'Right Justify
ForeColor = &H00C00000&
Height = 255
Left = 180
TabIndex = 4
Top = 60
Width = 2955
End
End
Attribute VB_Name = "dt_kffp"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim t_bt As String '存储列表显示的表头
Dim t_fields As Variant '存储列表显示的字段名
Dim t_fdxs As Variant '显示列是否有特殊处理 0 无, 1 有
Dim t_fdcounts As Integer '表示列表所显示的字段的个数
Dim ftk_rec As Recordset
Dim kffp_zh As String '传递参数 派房程序中选定的房号
'***********************************************************************
'* 功 能 : 给 Form 赋焦点
'* 作 成 者 : 梁 卫
'* 生成日期 : 1999.03.18
'* 修改日期 : 1999.03.18
'***********************************************************************
Private Sub Form_Activate()
tx_kflx_dm.SetFocus
End Sub
'**************************************************************************************************
'* 功 能 :
'* 作 者 : 梁卫
'* 作成日期 : 1999.03.19
'* 修改日期 : 1999.03.19
'**************************************************************************************************
Private Sub gd1_KeyDown(KeyCode As Integer, Shift As Integer)
Dim aa As String
If KeyCode = vbKeyReturn Then
If gd1.Rows > 1 Then
kffp_zh = Trim(gd1.TextArray(gd1.Row * t_fdcounts))
Else
kffp_zh = ""
End If
Unload Me
End If
End Sub
Private Sub tx_kflc_KeyDown(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
Case vbKeyUp
cm_kflx_mc.SetFocus
Case vbKeyReturn
gd1.SetFocus
End Select
End Sub
'**************************************************************************************************
'* 功 能 :
'* 作 者 : 梁卫
'* 作成日期 : 1999.03.19
'* 修改日期 : 1999.03.19
'**************************************************************************************************
Private Sub tx_kflc_LostFocus()
Dim temp_ft As Boolean
frm_msg.Visible = False
frm_msg.Caption = ""
temp_ft = True
If Trim(tx_kflc.Text) = "" Then
Else
tx_kflc.Text = Trim(tx_kflc.Text)
If IsNumeric(tx_kflc.Text) Then
If tx_kflc.Text >= SYS_LCS And tx_kflc.Text <= SYS_LCE Then
Else
temp_ft = False
End If
Else
temp_ft = False
End If
End If
If Not temp_ft Then
frm_msg.Visible = True
frm_msg.Caption = "楼层号应在 " & SYS_LCS & " 和 " & SYS_LCE & " 之间"
tx_kflc.SetFocus
Else
'全部显示可卖房
If Trim(tx_kflc.Text) = "" And tx_kflx_dm.Text = "" Then
Set ftk_rec = PUB_data.OpenRecordset("SELECT * FROM KF_FTK WHERE KF_ZR='0' and KF_ZF='0' and KF_GZ='0' and KF_NB='0' and KF_WX='0'", 4, 0, 2)
If Not ftk_rec.BOF Then
ftk_rec.MoveLast
End If
End If
'按客房类型显示可卖房
If Trim(tx_kflc.Text) = "" And tx_kflx_dm.Text <> "" Then
Set ftk_rec = PUB_data.OpenRecordset("SELECT * FROM KF_FTK WHERE KF_ZR='0' and KF_ZF='0' and KF_GZ='0' and KF_NB='0' and KF_WX='0' and KF_LXN=" & tx_kflx_dm, 4, 0, 2)
If Not ftk_rec.BOF Then
ftk_rec.MoveLast
End If
End If
'按楼层显示可卖房
If Trim(tx_kflc.Text) <> "" And tx_kflx_dm.Text = "" Then
Set ftk_rec = PUB_data.OpenRecordset("SELECT * FROM KF_FTK WHERE KF_ZR='0' and KF_ZF='0' and KF_GZ='0' and KF_NB='0' and mid(KF_FH,1," & Len(Trim(tx_kflc.Text)) & ")=" & Trim(tx_kflc.Text), 4, 0, 2)
If Not ftk_rec.BOF Then
ftk_rec.MoveLast
End If
End If
'按楼层及客房类型显示可卖房
If Trim(tx_kflc.Text) <> "" And tx_kflx_dm.Text <> "" Then
Set ftk_rec = PUB_data.OpenRecordset("SELECT * FROM KF_FTK WHERE KF_ZR='0' and KF_ZF='0' and KF_GZ='0' and KF_NB='0' and KF_WX='0' and KF_LXN=" & tx_kflx_dm & " and mid(KF_FH,1," & Len(Trim(tx_kflc.Text)) & ")=" & Trim(tx_kflc.Text), 4, 0, 2)
If Not ftk_rec.BOF Then
ftk_rec.MoveLast
End If
End If
t_fields = Array("KF_FH", "KF_LXC") '设置显示字段
t_fdxs = Array(0, 0) '设置显示字段
t_bt = "^ 房号 |^客房类型 " '设置显示表头格式
t_fdcounts = 2
Call Flex_full(gd1, t_bt, ftk_rec, t_fields, t_fdcounts - 1, t_fdxs)
lb_jls.Caption = gd1.Rows - 1
gd1.Refresh
If gd1.Rows = 1 Then
tx_kflx_dm.SetFocus
End If
ftk_rec.Close
gd1.SetFocus
End If
End Sub
Private Sub tx_kflx_dm_KeyDown(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
Case vbKeyUp
tx_kflc.SetFocus
Case vbKeyDown, vbKeyReturn
cm_kflx_mc.SetFocus
End Select
End Sub
'**************************************************************************************************
'* 功 能 :
'* 作 者 : 梁卫
'* 作成日期 : 1999.03.19
'* 修改日期 : 1999.03.19
'**************************************************************************************************
Private Sub tx_kflx_dm_LostFocus()
tx_kflx_dm.Text = UCase(Trim(tx_kflx_dm.Text))
If Trim(tx_kflx_dm.Text) = "" Or Trim(tx_kflx_dm.Text) = "*" Then
tx_kflx_dm.Text = ""
cm_kflx_mc.Text = ""
Else
If IsNumeric(tx_kflx_dm.Text) Then
If tx_kflx_dm.Text = 0 Then
tx_kflx_dm.Text = ""
cm_kflx_mc.Text = ""
Else
Call PUB_DMLostFocus(tx_kflx_dm, cm_kflx_mc, frm_msg, "不适当的客房类型代码")
End If
Else
frm_msg.Visible = True
frm_msg.Caption = "客房类型代码应在 1" & " 和 " & SYS_LXN & " 之间"
tx_kflx_dm.SetFocus
End If
End If
End Sub
'**************************************************************************************************
'* 功 能 :
'* 作 者 : 梁卫
'* 作成日期 : 1999.03.19
'* 修改日期 : 1999.03.19
'**************************************************************************************************
Private Sub cm_kflx_mc_LostFocus()
If tx_kflx_dm.Text = "" Then
cm_kflx_mc.Text = ""
Else
Call PUB_MCLostFocus(tx_kflx_dm, cm_kflx_mc, frm_msg, "不适当的客房类型信息")
End If
End Sub
'**************************************************************************************************
'* 功 能 :
'* 作 者 : 梁卫
'* 作成日期 : 1999.03.19
'* 修改日期 : 1999.03.19
'**************************************************************************************************
Private Sub cm_kflx_mc_Click()
tx_kflx_dm.Text = cm_kflx_mc.List(cm_kflx_mc.ListIndex, 0)
cm_kflx_mc.Text = cm_kflx_mc.List(cm_kflx_mc.ListIndex, 1)
End Sub
'***********************************************************************
'* 功 能 : 按 Esc 键时, 退出
'* 作 成 者 : 梁 卫
'* 生成日期 : 1999.03.18
'* 修改日期 : 1999.03.18
'***********************************************************************
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyEscape Then
kffp_zh = ""
Unload Me
End If
End Sub
'***********************************************************************
'* 功 能 :
'* 作 成 者 : 梁 卫
'* 生成日期 : 1999.03.04
'* 修改日期 : 1999.03.04
'***********************************************************************
Private Sub Form_Load()
dt_kffp.KeyPreview = True
Me.Left = (Screen.Width - Me.Width) / 2 ' 在水平方向上居中。
Me.Top = (Screen.Height - Me.Height) / 2 ' 在垂直方向上居中。
'初始化
frm_msg.Visible = False
frm_msg.Caption = ""
tx_kflx_dm.Text = ""
cm_kflx_mc.Text = ""
tx_kflc.Text = ""
pub_combox cm_kflx_mc, SYS_LXN, SYS_LXC
End Sub
'***********************************************************************
'* 功 能 :
'* 作 成 者 : 梁 卫
'* 生成日期 : 1999.03.21
'* 修改日期 : 1999.03.21
'***********************************************************************
Public Property Get ZHCL() As String
ZHCL = kffp_zh
End Property
'***********************************************************************
'* 功 能 :
'* 作 成 者 : 梁 卫
'* 生成日期 : 1999.03.21
'* 修改日期 : 1999.03.21
'***********************************************************************
Public Property Let ZHCL(ByVal temp_zh As String)
kffp_zh = temp_zh
End Property
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -