📄 cdepartment.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 = "CDepartment"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit
Public DepartmentName As String
Public SubDepartments As Collection
Private mPeople As Variant
Private Sub Class_Initialize()
Set SubDepartments = New Collection
ReDim mPeople(0)
End Sub
Public Property Get People() As Variant
People = mPeople
End Property
Public Function getSubDepartment(DeptName As String) As CDepartment
On Error GoTo ErrHandler
Set getSubDepartment = SubDepartments.Item(DeptName)
ErrHandler:
End Function
'重写,将包含人员的集合传进来,在这里放到SubDepartments集合中
'Public Sub createDepartment(Document As NotesDocument)
' DepartmentName = Document.GetItemValue("depname")(0)
' mPeople = Document.GetItemValue("depmembers")
' Dim docCol As NotesDocumentCollection
' Set docCol = Document.Responses
' Dim dept As CDepartment
' Dim i As Long
' For i = 1 To docCol.Count
' Set dept = New CDepartment
' dept.createDepartment docCol.GetNthDocument(i)
' SubDepartments.Add dept, dept.DepartmentName
' Next i
'End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -