VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "DPC_File"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit

Private Const SEP = "®©"
Private Const C_SEP As String = "@@"
Private Const SEP1 As String = "®"
Private Const SEP2 As String = "©"

Public PFI_Id As String
Public FIL_Id As Long
Public PFI_Order As Long
Public FIL_FileName As String
Public FIL_Name As String
Public FIL_Ext As String

Public Idx As String
Public RowStatus As eDPCRowStatus

Private mo_Tools As DPC_Tools

Public Property Set Tools(ByRef ao_Tools As Object)
On Error GoTo ErrorHandler

  Set mo_Tools = ao_Tools
  Exit Property
ErrorHandler:
  Call ErrorHandler("Tools.Set")
End Property

Public Sub CopyFrom(ByVal ao_File As DPC_File)
On Error GoTo ErrHandler

  PFI_Id = ao_File.PFI_Id
  FIL_Id = ao_File.FIL_Id
  PFI_Order = ao_File.PFI_Order
  FIL_FileName = ao_File.FIL_FileName
  FIL_Name = ao_File.FIL_Name
  FIL_Ext = ao_File.FIL_Ext
  Exit Sub
ErrHandler:
  Call ErrorHandler("CopyFrom")
End Sub

Public Sub Clear()
On Error GoTo ErrHandler

  PFI_Id = ""
  FIL_Id = 0
  PFI_Order = 0
  FIL_FileName = ""
  FIL_Name = ""
  FIL_Ext = ""
  Exit Sub
ErrHandler:
  Call ErrorHandler("Clear")
End Sub

Public Sub ReadFile(ByVal ao_Db As Object, ByVal ac_Cursor As Long)
On Error GoTo ErrHandler

  PFI_Id = ao_Db.GetFields(ac_Cursor, "PFI_Id")
  FIL_Id = ao_Db.GetFields(ac_Cursor, "FIL_Id")
  PFI_Order = ao_Db.GetFields(ac_Cursor, "PFI_Order")
  FIL_FileName = ao_Db.GetFields(ac_Cursor, "FIL_FileName")
  FIL_Name = ao_Db.GetFields(ac_Cursor, "FIL_Name")
  FIL_Ext = ao_Db.GetFields(ac_Cursor, "FIL_Ext")
  Exit Sub
ErrHandler:
  Call ErrorHandler("ReadFile")
End Sub

' Standard error handler
Private Sub ErrorHandler(ByVal as_Fct As String)
  
    Call Err.Raise(Err.Number, as_Fct & SEP1 & Err.Source, Err.Description)
End Sub


