📄 frmtpjob.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"
Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX"
Object = "{F6125AB1-8AB1-11CE-A77F-08002B2F4E98}#2.0#0"; "MSRDC20.OCX"
Begin VB.Form frmTpJobList
Caption = "工程核算列表"
ClientHeight = 3885
ClientLeft = 60
ClientTop = 345
ClientWidth = 6195
LinkTopic = "Form2"
MDIChild = -1 'True
ScaleHeight = 3885
ScaleWidth = 6195
Begin MSRDC.MSRDC datItem
Height = 450
Index = 1
Left = 4320
Top = 3600
Visible = 0 'False
Width = 1200
_ExtentX = 2117
_ExtentY = 794
_Version = 327681
Options = 0
CursorDriver = 0
BOFAction = 0
EOFAction = 0
RecordsetType = 1
LockType = 3
QueryType = 0
Prompt = 3
Appearance = 1
QueryTimeout = 30
RowsetSize = 100
LoginTimeout = 15
KeysetSize = 0
MaxRows = 0
ErrorThreshold = -1
BatchSize = 15
BackColor = -2147483643
ForeColor = -2147483640
Enabled = -1 'True
ReadOnly = 0 'False
Appearance = -1 'True
DataSourceName = ""
RecordSource = ""
UserName = ""
Password = ""
Connect = ""
LogMessages = ""
Caption = "MSRDC1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin MSRDC.MSRDC datItem
Height = 330
Index = 0
Left = 5280
Top = 3480
Visible = 0 'False
Width = 1200
_ExtentX = 2117
_ExtentY = 582
_Version = 327681
Options = 0
CursorDriver = 0
BOFAction = 0
EOFAction = 0
RecordsetType = 1
LockType = 3
QueryType = 0
Prompt = 3
Appearance = 1
QueryTimeout = 30
RowsetSize = 100
LoginTimeout = 15
KeysetSize = 0
MaxRows = 0
ErrorThreshold = -1
BatchSize = 15
BackColor = -2147483643
ForeColor = -2147483640
Enabled = -1 'True
ReadOnly = 0 'False
Appearance = -1 'True
DataSourceName = ""
RecordSource = ""
UserName = ""
Password = ""
Connect = ""
LogMessages = ""
Caption = "MSRDC1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin VB.ComboBox cboFindKind
Height = 276
Left = 840
Style = 2 'Dropdown List
TabIndex = 3
Top = 84
Width = 1515
End
Begin VB.CheckBox chkShowAll
Caption = "全部显示"
Height = 350
Left = 3930
TabIndex = 2
Top = 3390
Width = 1095
End
Begin VB.TextBox txtFind
Height = 300
Left = 4020
TabIndex = 1
Text = "Text1"
Top = 84
Width = 1695
End
Begin VB.CommandButton cmdAgain
BeginProperty Font
Name = "Arial"
Size = 6.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 300
Left = 5700
Style = 1 'Graphical
TabIndex = 0
Tag = "1017"
Top = 84
UseMaskColor = -1 'True
Width = 300
End
Begin TabDlg.SSTab sstTypAct
Height = 2628
Left = 72
TabIndex = 4
Top = 624
Width = 5832
_ExtentX = 10292
_ExtentY = 4630
_Version = 327681
Style = 1
Tabs = 2
TabsPerRow = 4
TabHeight = 529
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
TabCaption(0) = "工程类型(&T)"
TabPicture(0) = "frmTpJob.frx":0000
Tab(0).ControlEnabled= -1 'True
Tab(0).Control(0)= "msgItemType"
Tab(0).Control(0).Enabled= 0 'False
Tab(0).ControlCount= 1
TabCaption(1) = "工程(&I)"
TabPicture(1) = "frmTpJob.frx":001C
Tab(1).ControlEnabled= 0 'False
Tab(1).Control(0)= "msgItem"
Tab(1).Control(0).Enabled= 0 'False
Tab(1).ControlCount= 1
Begin MSFlexGridLib.MSFlexGrid msgItem
Bindings = "frmTpJob.frx":0038
Height = 1995
Left = -74820
TabIndex = 5
Top = 450
Width = 5445
_ExtentX = 9604
_ExtentY = 3519
_Version = 65541
Rows = 10
Cols = 5
FixedCols = 0
BackColor = 16777215
BackColorFixed = -2147483644
BackColorSel = -2147483646
BackColorBkg = 16777215
AllowBigSelection= 0 'False
FocusRect = 0
SelectionMode = 1
End
Begin MSFlexGridLib.MSFlexGrid msgItemType
Bindings = "frmTpJob.frx":004D
DragIcon = "frmTpJob.frx":0062
Height = 1965
Left = 180
TabIndex = 6
Top = 450
Width = 5445
_ExtentX = 9604
_ExtentY = 3466
_Version = 65541
Rows = 10
Cols = 5
FixedCols = 0
BackColor = 16777215
BackColorFixed = -2147483644
BackColorSel = -2147483646
BackColorBkg = 16777215
AllowBigSelection= 0 'False
FocusRect = 0
SelectionMode = 1
AllowUserResizing= 1
End
End
Begin MSForms.CommandButton cmdTypact
Height = 348
Index = 1
Left = 1272
TabIndex = 10
Tag = "1018"
Top = 3468
Width = 1212
Caption = "报表"
PicturePosition = 196613
Size = "2143;617"
FontName = "宋体"
FontHeight = 180
FontCharSet = 134
FontPitchAndFamily= 34
ParagraphAlign = 3
End
Begin MSForms.CommandButton cmdTypact
Height = 348
Index = 0
Left = 60
TabIndex = 9
Tag = "1018"
Top = 3468
Width = 1212
Caption = "编辑"
PicturePosition = 196613
Size = "2143;609"
FontName = "宋体"
FontHeight = 180
FontCharSet = 134
FontPitchAndFamily= 34
ParagraphAlign = 3
End
Begin VB.Label lblFindKind
Caption = "查找(&F)"
Height = 180
Left = 96
TabIndex = 8
Top = 144
Width = 636
End
Begin VB.Label lblFind
Caption = "内容(&C)"
Height = 180
Left = 3216
TabIndex = 7
Top = 144
Width = 636
End
End
Attribute VB_Name = "frmTpJobList"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'''''''''''''''''''''''''''''''''
' 工程核算列表
' 作者:欧中建
' 日期:98.6.23
'
'1.1 所用类模块:List
'1.2 所用钩子函数:mclsSubClass,mclsSubClassForm。
''''''''''''''''''''''''''''''''
Option Explicit
Private mIsShowCard(1) As Boolean '卡片窗口显示标志
Private mblnCheckNoChange As Boolean '不需要响应chkshowAll控件Change事件
Private mblnComboxNoClick As Boolean
Private WithEvents mclsMainControl As MainControl '主控对象
Attribute mclsMainControl.VB_VarHelpID = -1
Private WithEvents mclsSubClass As SubClass32.SubClass '钩子对象
Attribute mclsSubClass.VB_VarHelpID = -1
Private WithEvents mclsSubClassform As SubClass32.SubClass
Attribute mclsSubClassform.VB_VarHelpID = -1
Private mclsList(1) As list '列表对象
Private mblnIsSaveListset(1) As Boolean 'Whether or not save lngViewID in List
Private blnIsLoad(1) As Boolean
Private intViewID(1) As Integer
'
'方法及函数
'
'产生部门职员列表记录集
Public Function GetList(ByVal intTab As Integer) As rdoResultset
Dim recRecordset As rdoResultset
Dim strSelectOfSql As String
Dim strFromOfSql As String
Dim strWhereOfSql As String
Dim strSql As String
strSelectOfSql = mclsList(intTab).ListSet.SelectOfSql
strFromOfSql = mclsList(intTab).ListSet.FromOfSql
strWhereOfSql = mclsList(intTab).ListSet.WhereOfSql
Select Case intTab
Case 0
strSelectOfSql = "Select JobType.lngJobTypeID As id,decode(JobType.blnIsInActive,'1','√','0','') As ""停用""," & strSelectOfSql
If strWhereOfSql <> "" Then
strWhereOfSql = " Where " & strWhereOfSql
End If
Case 1
strSelectOfSql = "Select Job.lngJobID As id,decode(Job.blnIsInActive,'1','√','0','') As ""停用""," & strSelectOfSql
If strWhereOfSql <> "" Then
strWhereOfSql = " Where " & strWhereOfSql
End If
End Select
strSql = strSelectOfSql & strFromOfSql & strWhereOfSql
'Debug.Print strSql
Set recRecordset = gclsBase.BaseDB.OpenResultset(strSql, rdOpenStatic)
'列表是否为空
If recRecordset.RowCount = 0 Then
mclsList(intTab).FlexGrid.HighLight = flexHighlightNever
cmdAgain.Enabled = False
Else
mclsList(intTab).FlexGrid.HighLight = flexHighlightAlways
cmdAgain.Enabled = True
End If
mclsList(intTab).ShowAll = True
Set GetList = recRecordset
End Function
Public Function ShowList(ByVal lngID As Long, Optional intTab As Integer = 0) As Boolean
Dim intCount As Integer
Dim strSortField As String
Dim strSortDec As String
Dim strSql As String
Dim recTemp As rdoResultset
Dim strofFrom As String
Dim strofWhere As String
Me.Show
Me.ZOrder 0
Me.sstTypAct.Tab = intTab
With mclsList(intTab).ListSet
'得到排序字段
For intCount = 1 To .Columns
If .ColumnOrderType(intCount) <> 0 Then
strSortField = .ColumnFieldName(intCount)
strSortDec = .ColumnDesc(intCount)
Exit For
End If
Next
If intCount > .Columns Then
ShowList = False
Exit Function
End If
strofFrom = .FromOfSql
strofWhere = .WhereOfSql
End With
'根据lngID得到排序字段值
strSql = "Select " & strSortField & " As " & strSortDec
Select Case intTab
Case 0
If strofWhere <> "" Then
strofWhere = " where " & strofWhere & "and JobType.lngJobTypeID=" & lngID
Else
strofWhere = " where JobType.lngJobTypeID=" & lngID
End If
Case 1
If strofWhere <> "" Then
strofWhere = " where " & strofWhere & "and Job.lngJobID=" & lngID
Else
strofWhere = " where Job.lngJobID=" & lngID
End If
End Select
strSql = strSql & strofFrom & strofWhere
Set recTemp = gclsBase.BaseDB.OpenResultset(strSql, rdOpenForwardOnly)
With recTemp
If .RowCount > 0 Then
txtFind.Text = recTemp(strSortDec) '查找
With mclsList(intTab).FlexGrid
If .TextMatrix(.Row, 0) = lngID Then '是否找到
ShowList = True
Else
ShowList = False
End If
End With
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -