VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "ArmItemInfo"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit
'current status of item (this was changed by user or by framework)
Public CurrentChecked As Boolean
'original status of item (loaded originaly from SQL database)
Public OriginalChecked As Boolean
'set flag if this item is readonly or not
Public ReadOnly As Boolean
'reference to parent checklist
Public CheckList As ArmCheckList
'array of data loaded from SQL server for this item
Public Data As Variant

'get data value from iteminfo
Public Function GetData(ByVal li_Index As Integer) As Variant

  GetData = ""
  If li_Index >= 0 Then
    If li_Index <= UBound(Data) Then
      GetData = Data(li_Index)
    ElseIf li_Index <= UBound(Data) + UBound(CheckList.CommonRoleFields) + 1 Then
      GetData = CheckList.CommonRoleValues(li_Index - UBound(Data) - 1)
    End If
  End If
End Function

'set data value in data array of this instance
Public Sub SetData(ByVal li_Index As Integer, lv_Value As Variant)

  If li_Index >= 0 Then
    If li_Index <= UBound(Data) Then
      Data(li_Index) = lv_Value
    ElseIf li_Index <= UBound(Data) + UBound(CheckList.CommonRoleFields) + 1 Then
      CheckList.CommonRoleValues(li_Index - UBound(Data) - 1) = lv_Value
    End If
  End If
End Sub

'clear (uncheck item)
Public Sub Clear()
  CurrentChecked = False
  OriginalChecked = False
End Sub

