LotusScript面向對象程序設計

          示例代碼:
          Class DOMobj_Person
           gdoc_Person As NotesDocument
           
          ' ** 屬性
           Property Get Document
            Set Document = gdoc_Person
           End Property
           Property Set Document
            Set gdoc_Person = Document
           End Property
           
           Property Get NotesID
            NotesID = gdoc_Person.GetItemValue("NotesID")(0)
           End Property
           
           Property Get No
            No = gdoc_Person.GetItemValue("EmpNo")(0)
           End Property
           
           Property Get CName
            CName = gdoc_Person.GetItemValue("EmpCName")(0)
           End Property
           
           Property Get EName
            EName = gdoc_Person.GetItemValue("EmpName")(0)
           End Property
           
           Property Get DeptNo
            DeptNo = gdoc_Person.GetItemValue("DeptNo")(0)
           End Property
           
           Property Get DeptName
            DeptName = gdoc_Person.GetItemValue("DeptCName")(0)
           End Property
           
           Property Get DeptLayer
            DeptLayer = gdoc_Person.GetItemValue("DeptLayer")(0)
           End Property
           
          ' ** 代理資訊
           Property Get AgentStatus
            AgentStatus = gdoc_Person.GetItemValue("AgentStart")(0)
           End Property
          ' ** 建構子
           Sub New(pstr_SearchType As String , pstr_SearchKey As String)
            Set gdoc_Person = domf_docGetPersonal(pstr_SearchType , pstr_SearchKey)
           End Sub
           
          ' ** 方法
           Function getPerson(pstr_SearchType As String , pstr_SearchKey As String)
            Set gdoc_Person = domf_docGetPersonal(pstr_SearchType,pstr_SearchKey)
           End Function
          '---get First Item Value
           Function getFirstItemValue(pstr_item As String) As Variant
            getFirstItemValue = Me.gdoc_Person.getFirstItemValue(pstr_item)
           End Function
          '---get Default Deputy
           Function getDefaultDeputy() As DOMobj_Person
            Set getDefaultDeputy = Nothing
            If (Me.AgentStatus) Then
             If gdoc_Person.GetItemValue("DeputyEmpNo")(0) <> "" Then
              Set getDefaultDeputy = New DOMobj_Person("NO" , gdoc_Person.GetItemValue("DeputyEmpNo")(0))
             End If
            End If
           End Function
          '---get Class Deputy
           Function getDeputyByClass(pstr_Class As String)
            
           End Function
          End Class

          posted on 2010-04-08 19:01 明高 閱讀(284) 評論(0)  編輯  收藏 所屬分類: Lotus

          <2025年8月>
          272829303112
          3456789
          10111213141516
          17181920212223
          24252627282930
          31123456

          導航

          統計

          常用鏈接

          留言簿

          隨筆分類

          隨筆檔案

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 浦江县| 江都市| 辛集市| 新竹县| 屏东市| 红安县| 新乐市| 吴堡县| 南川市| 开鲁县| 白沙| 北流市| 沈阳市| 恩施市| 榆社县| 蓝山县| 旬阳县| 白银市| 手游| 桐乡市| 云梦县| 康马县| 阿尔山市| 巴东县| 临安市| 龙游县| 荔浦县| 泾源县| 凉山| 丰原市| 郧西县| 冕宁县| 昭觉县| 贺州市| 武义县| 清涧县| 云安县| 乐都县| 青川县| 清流县| 大连市|