' SummaryPage2_PoolAccounts_PoolSummary
Option Explicit On
Option Strict On

' #################################################################
' Account Summary Page on Pools Form, Accounts page

' Version: 2.01 (17/09/2019)

' Usage: Pools form
' #################################################################

Public Function Main(source As Object, eventId As String, eventArgs As ISKeyValueList, ByRef handled As Boolean, ByRef returnValues As ISKeyValueList, ByRef text As String) As Boolean

  Dim Index As Integer
  Dim Pool As finPool

  ' Assume Success
  Main = True

  ' Initialise
  Pool = DirectCast(source, finPool)
  Index = eventArgs.GetInteger("Index", -1)

  ' Use Built-In Scripts to generate Account Summary
  text = finBL.ScriptFunctions.BuiltInAccountGeneralSummaryScript2(Pool.Accounts(Index).Account, eventId, eventArgs, handled, returnValues, ScriptInfo.ContextData.ToKeyValueList())

  ' Function should return a Boolean value indicating success
  Return True

End Function