⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 baselib.cls

📁 一套企业设备管理系统源代码,所有的业务单据和流程都可以自定义,业务报表也可以通过SQL的存储过程来定义.
💻 CLS
字号:
VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "BaseLib"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Option Explicit

Private ResSign As Long
Private ErrInfo As String

'//类属性
'--用户内码
Public Property Let setUserID(ByVal cUserID As Long)
 BaseDllLib.setUserID = cUserID
End Property
Public Property Get getUserID() As Long
 getUserID = BaseDllLib.getUserID
End Property
'--数据类型内码
Public Property Let setClassID(ByVal cItemID As Long)
 BaseDllLib.setClassID = cItemID
End Property
Public Property Get getClassID() As Long
 getClassID = BaseDllLib.getClassID
End Property

Public Property Let setFormID(ByVal FormID As Long)
 BaseDllLib.setFormID = FormID
End Property
Public Property Get getFormID() As Long
 getFormID = BaseDllLib.getFormID
End Property

Public Property Let setParentStr(ByVal ParentStr As String)
 BaseDllLib.setParentStr = ParentStr
End Property
Public Property Get getParentStr() As String
 getParentStr = BaseDllLib.getParentStr
End Property

Public Property Let setQueryStr(ByVal QueryStr As String)
 BaseDllLib.setQueryStr = QueryStr
End Property
Public Property Get getQueryStr() As String
 getQueryStr = BaseDllLib.getQueryStr
End Property

Public Property Let setMapCol(ByVal MapColStr As String)
 SysPara.MapColStr = MapColStr
End Property
Public Property Let setMapType(ByVal MapTypeStr As String)
 SysPara.MapTypeStr = MapTypeStr
End Property

Public Property Let setMulChoiceSign(ByVal ChoiceSign As Boolean)
 SysPara.MulChoice = ChoiceSign
End Property
Public Property Get getMulChoiceSign() As Boolean
 getMulChoiceSign = SysPara.MulChoice
End Property

Public Property Get getSignRowRes() As Collection
 Set getSignRowRes = SysPara.RetChoice
End Property
Public Property Get getMulRowRes() As Collection
 Set getMulRowRes = SysPara.RetMulChoice
End Property

Public Property Get getTreeID() As Long
 getTreeID = SysPara.TreeID
End Property

'//类方法
Public Function mShow(ByRef ErrInfo As String, ByVal ShowSign As Long) As Long
 On Error GoTo ErrHandle
 '//判断参数是否满足启动需求
 BaseClass.FItemClassID = BaseDllLib.getClassID
 Call BaseClass.getItemClassText(ResSign, ErrInfo)
 With SysPara
  .TShowSign = Split(BaseClass.FItemShowSign, "|")
  .TAlign = Split(BaseClass.FItemAlign, "|")
  .TWidth = Split(BaseClass.FItemWidth, "|")
  .TTitle = Split(BaseClass.FTitle, "|")
  .MapCol = Split(SysPara.MapColStr, "|")
  .MapType = Split(SysPara.MapTypeStr, "|")
  If UBound(.TShowSign) <> UBound(.TAlign) Or UBound(.TAlign) <> UBound(.TWidth) Or UBound(.TWidth) <> UBound(.TTitle) Or UBound(.TTitle) <> UBound(.MapCol) Or UBound(.MapCol) <> UBound(.MapType) Then
   ErrInfo = "初始化资料列表信息错误"
   MsgBox ErrInfo, vbCritical + vbOKOnly, BaseDllLib.getSysInfo
   mShow = 1
   Exit Function
  End If
  .cMin = LBound(.TShowSign)
  .cMax = UBound(.TShowSign)
 End With
 SysPara.Title = BaseClass.FTitle & "|"
 SysPara.SqlProName = BaseClass.FSqlProName
 frmMain.Show ShowSign
 ErrInfo = ""
 mShow = 0
 Exit Function
ErrHandle:
 ErrInfo = "执行错误:" & Chr(13) & "    错误编码:" & Err.Number & Chr(13) & "    错误信息:" & Err.Description
 mShow = 1
End Function

Private Sub Class_Initialize()
 Set BaseDllLib = CreateObject("BaseDllLib.BaseLib")
 Set BaseClass = CreateObject("BaseDllLib.ItemClssText")
 Set ItemText = CreateObject("BaseDllLib.ItemText")
 With SysPara
  .ResLibIco = App.Path & "\ResLib\Ico\"
 End With
End Sub

Private Sub Class_Terminate()
 Set BaseDllLib = Nothing
 Set BaseClass = Nothing
 Set ItemText = Nothing
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -