Что такое Actuate Objectarray? - PullRequest
       19

Что такое Actuate Objectarray?

0 голосов
/ 16 ноября 2018

Пример выборки 1

Set StoredProcDataList = Новый AcObjectArray IN START Глобальный StoredProcDataList As AcObjectArray В ГЛОБАЛЬНОМ ..........

Функция Fetch () As AcDataRow Set Fetch = Super :: Fetch ()

Dim OutputRow As rootCAMain::drSPS
Dim dataObj As SPDataClass
Set OutputRow = fetch
Set dataObj = New SPDataClass

Если OutputRow - это ничто, тогда Функция выхода
Конец, если

showfactorystatus («Идентификатор выполнения» & OutputRow.RUN_ID) CopyInstance (OutputRow, dataObj) StoredProcDataList.AddToTail (dataObj)

Функция завершения

Выборочный образец 2

Функция Fetch () As AcDataRow Set Fetch = Super :: Fetch ()

Dim TheRow As DR_Top_Ten_Pos
Dim a1Row As DR_Top_Ten_Pos
Dim Sec_Name As String
Dim Select_Param As String


set a1row = newdatarow()
counter = counter + 1

If Fetch Is Nothing Then
    If counter = 1 Then
        a1row.Dummy = "xyz"
        set fetch = a1row
    Else
        Exit Function
    End If
Else
    If g_TopTen_Ctr <=10 Then
        Set TheRow = Fetch
        Build_XML_List(Sec_Name,g_Account_ID,g_Account_Name,g_Benchmark_ID,g_Benchmark_Name,

+ TheRow.Port_Name, "", "", "", Cstr (формат (TheRow.Port_Value, "0.000")), + IIf (IsNull (TheRow.Bench_Value), "---", Cstr (формат (TheRow.Bench_Value, "0.000"))), + IIf (IsNull (TheRow.Bench_Value), "---", Cstr (формат (TheRow.Difference, "0.000"))), "", "", "", "", "", "", " », "", "", "", "", "", Select_Param) g_TopTen_Ctr = g_TopTen_Ctr + 1 еще Set Fetch = Nothing Функция выхода End If Конец, если

Функция завершения

Образец выборки 3

Функция Fetch () As AcDataRow 'Set Fetch = Super :: Fetch () Dim IsuCredit_Events_FetchObj As TopBotIssue_DataClass Dim OutputRow As DR_Issue_Credit_Events Dim a23row As DR_Issue_Credit_Events Дим я как целое счетчик = счетчик + 1 Установите OutputRow = New DR_Issue_Credit_Events Установите a23row = newdatarow ()

ICE_block:
If g_IssueList.GetCount() >= g_ICE_ctr Then
    Set IsuCredit_Events_FetchObj = g_IssueList.GetAt(g_ICE_ctr)
    If Trim(IsuCredit_Events_FetchObj.ACCOUNT) = Trim(g_Account_ID) Then
        g_ICE_ctr = g_ICE_ctr + 1
        OutputRow.ACCOUNT = IsuCredit_Events_FetchObj.ACCOUNT
        OutputRow.AS_OF_DATE = IsuCredit_Events_FetchObj.AS_OF_DATE
        OutputRow.SECTOR_NAME = IsuCredit_Events_FetchObj.SECTOR_NAME
        OutputRow.COUNT = IsuCredit_Events_FetchObj.COUNT
        OutputRow.EXPOSURE = IsuCredit_Events_FetchObj.EXPOSURE
        OutputRow.EXPOSURE_PCT = IsuCredit_Events_FetchObj.EXPOSURE_PCT
        OutputRow.CTR = IsuCredit_Events_FetchObj.CTR

        Build_XML_List(Sec_Name,g_Account_ID,g_Account_Name,

+ g_Benchmark_ID, g_Benchmark_Name, OutputRow.SECTOR_NAME, "", "", ",", "," "," "," "," "," "," "," "," ", OutputRow. COUNT, + Формат (OutputRow.EXPOSURE, "0,00"), Формат (OutputRow.EXPOSURE_PCT, "0,000"), "", "", Формат (OutputRow.CTR, "0,000"), Select_Param)

        Set Fetch = OutputRow
        g_Flag_ICE = 1
    Else
        g_ICE_ctr = g_ICE_ctr + 1
            If g_Flag_ICE <> 1 Then
                Goto ICE_block
            End If
    End If
Else
    Set Fetch = Nothing
End If

If Fetch Is Nothing Then
    If counter = 1 Then
        a23row.Dummy = "xyz"
        set fetch = a23row
    Else
        Exit Function
    End If
End If

Функция завершения

Выборочный образец 4

В ГЛОБАЛЬНОМ

Функция Get_CurrExposure () As Boolean

Dim l_DBStmt    As AcDBStatement
Dim l_DB2Conn   As AcDB2Connection
Dim l_AcDBCur   As AcDBCursor
Dim l_SQL_str   As String
Dim l_CurrExposureRow   As CurrExposure_DataClass
Dim i As Integer
Dim k As Integer
Dim p As Integer
Dim q As Integer

l_SQL_str = Get_CurrExposure_SP()
Set l_DB2Conn = gConnection
Set l_DBStmt = New AcDBStatement(l_DB2Conn)
l_DBStmt.Prepare(l_SQL_str)
If l_DBStmt Is Nothing Then
    Exit Function
End If
Set l_AcDBCur = l_DBStmt.OpenCursor()

    l_AcDBCur.BindColumn(1, "CurrExposure_DataClass", "ACCOUNT")
    l_AcDBCur.BindColumn(2, "CurrExposure_DataClass", "AS_OF_DATE")
    l_AcDBCur.BindColumn(3, "CurrExposure_DataClass", "CURRENCY_CODE")
    l_AcDBCur.BindColumn(4, "CurrExposure_DataClass", "CURRENCY_DESC")
    l_AcDBCur.BindColumn(5, "CurrExposure_DataClass", "EXPOSURE")

Set l_CurrExposureRow = New CurrExposure_DataClass
Dim CurrExposureRowObj as CurrExposure_DataClass

Do While l_AcDBCur.Fetch(l_CurrExposureRow) 
    set CurrExposureRowObj = new CurrExposure_DataClass
    CopyInstance(l_CurrExposureRow, CurrExposureRowObj)
    g_CurrExposureList.AddToTail(CurrExposureRowObj)
Loop

l_AcDBCur.CloseCursor()
    Set l_AcDBCur = Nothing     

Функция завершения

Функция Get_CurrExposure_SP () As String Dim stmtText As String Тусклый перевод строки как As String перевод строки = Chr $ (13) + Chr $ (10)

'StmtText = "{CALL PRAMSPS1.SR_MAG_CURR_CONV ("
StmtText = "{CALL PRAMSPS1.PR_MAG_CURR_EXP (" '--- Запрос на изменение # 0010, будет выпущен 12/10

stmtText = stmtText & " '" & rootIMExpress::DB2Alias & "',"
stmtText = stmtText & " '" & Account_ID_01 & "',"
stmtText = stmtText & " '" & g_SQL_Date_Str & "',"
stmtText = stmtText & " '" & Data_Display_Top10CE & "',"
stmtText = stmtText & g_PooledFund & "," 
stmtText = stmtText & " 0" 
stmtText = stmtText & ")}"

Get_CurrExposure_SP = stmtText 
ShowFactoryStatus("MAAG Currency Exposure SP Call:" & stmtText)

Функция завершения

В ОТЧЕТНОМ РАЗДЕЛЕ - ПОТОК ДАННЫХ

Функция Start () как логическое значение Start = Super :: Start () Dim Curr_Exposure_FetchObj As CurrExposure_DataClass Dim DummyRow As CurrExposure_DataClass Dim DummyRow1 As CurrExposure_DataClass Dim DummyRow2 As CurrExposure_DataClass Дим я как целое g_Chrt_sizer = 0

For i = 1 to g_CurrExposureList.GetCount() 
    Set Curr_Exposure_FetchObj = g_CurrExposureList.GetAt(i)
    If Curr_Exposure_FetchObj.Account = Trim(g_Account_ID) Then
        g_SelectList(0).AddToTail(Curr_Exposure_FetchObj)
        g_Chrt_sizer = g_Chrt_sizer + 1
    End If
Next i



set DummyRow = new CurrExposure_DataClass
Select Case g_Chrt_sizer 
    Case 1
        set DummyRow = new CurrExposure_DataClass
        DummyRow.ACCOUNT = g_Account_ID
        DummyRow.CURRENCY_CODE = "001"
        DummyRow.CURRENCY_DESC = "001"
        DummyRow.EXPOSURE = NULL
        g_SelectList(0).AddToHead(DummyRow)

        set DummyRow1 = new CurrExposure_DataClass
        DummyRow1.ACCOUNT = g_Account_ID
        DummyRow1.CURRENCY_CODE = "002"
        DummyRow1.CURRENCY_DESC = "002"
        DummyRow1.EXPOSURE = NULL
        g_SelectList(0).AddToHead(DummyRow1)

        set DummyRow2 = new CurrExposure_DataClass
        DummyRow2.ACCOUNT = g_Account_ID
        DummyRow2.CURRENCY_CODE = "003" 
        DummyRow2.CURRENCY_DESC = "003"
        DummyRow2.EXPOSURE = NULL
        g_SelectList(0).AddToHead(DummyRow2)
    Case 2
        set DummyRow = new CurrExposure_DataClass
        DummyRow.ACCOUNT = g_Account_ID
        DummyRow.CURRENCY_CODE = "001"
        DummyRow.CURRENCY_DESC = "001"
        DummyRow.EXPOSURE = NULL
        g_SelectList(0).AddToHead(DummyRow)

        set DummyRow1 = new CurrExposure_DataClass
        DummyRow1.ACCOUNT = g_Account_ID
        DummyRow1.CURRENCY_CODE = "002"
        DummyRow1.CURRENCY_DESC = "002"
        DummyRow1.EXPOSURE = NULL
        g_SelectList(0).AddToHead(DummyRow1)
    Case 3
        set DummyRow = new CurrExposure_DataClass
        DummyRow.ACCOUNT = g_Account_ID
        DummyRow.CURRENCY_CODE = "001"
        DummyRow.CURRENCY_DESC = "001"
        DummyRow.EXPOSURE = NULL
        g_SelectList(0).AddToHead(DummyRow)
End Select

Set Iter = g_SelectList(0).NewIterator()

Функция завершения

......... ..

Функция Fetch () As AcDataRow 'Set Fetch = Super :: Fetch () Dim CurrExposure_FetchObj As CurrExposure_DataClass Dim OutputRow As DR_Currency_Exposure Dim a26row As DR_Currency_Exposure

counter =  counter + 1
Set OutputRow = New DR_Currency_Exposure
Set a26row = newdatarow()


If Iter.HasMore() Then
    Set CurrExposure_FetchObj = Iter.GetNext
        OutputRow.ACCOUNT = CurrExposure_FetchObj.ACCOUNT
        OutputRow.AS_OF_DATE = CurrExposure_FetchObj.AS_OF_DATE
        OutputRow.CURRENCY_CODE = CurrExposure_FetchObj.CURRENCY_CODE
        OutputRow.CURRENCY_DESC = CurrExposure_FetchObj.CURRENCY_DESC 
        OutputRow.EXPOSURE = CurrExposure_FetchObj.EXPOSURE

If Left $ (OutputRow.CURRENCY_CODE, 2) <> "00" Тогда Build_XML_List (Sec_Name, g_Account_ID, g_Account_Name, + g_Benchmark_ID, g_Benchmark_Name, OutputRow.CURRENCY_DESC, "", "", "", + Формат (OutputRow.EXPOSURE, "0.000"), "", "", "", "", "", "", "", "", "", "", "", "", "" , "", Select_Param) Конец, если

    Set Fetch = OutputRow
Else
    Set Fetch = Nothing
End If

If Fetch Is Nothing Then
    If counter = 1 Then
        a26row.Dummy = "xyz"
        set fetch = a26row
    Else
        Exit Function
    End If
End If

Функция завершения

...................

Sub Finish () 'Супер :: Готово () g_SelectList (0) .RemoveAll () End Sub

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...