VERSION 5.00
Begin VB.Form frmDPC_Subconstruction 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "#Subconstruction system"
   ClientHeight    =   11025
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   15180
   ControlBox      =   0   'False
   LinkTopic       =   "Form2"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   11025
   ScaleWidth      =   15180
   ShowInTaskbar   =   0   'False
   StartUpPosition =   1  'CenterOwner
   Visible         =   0   'False
   Begin Project1.DPC_Subconstruction DPC_Subconstruction 
      Height          =   11445
      Left            =   15
      TabIndex        =   0
      Top             =   -75
      Width           =   15120
      _ExtentX        =   26670
      _ExtentY        =   19315
   End
End
Attribute VB_Name = "frmDPC_Subconstruction"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
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 = "©"
Private Const SCREEN_NAME As String = "frmDPC_Subconstruction"

Private mo_Tools As DPC_Tools
Private mo_Db As Object
Private ml_U_Code As Long

Property Let U_Code(al_Code As Long)
On Error GoTo ErrHandler

  DPC_Subconstruction.U_Code = al_Code
  ml_U_Code = al_Code
  Exit Property
ErrHandler:
  Call ErrorMessage("U_Code.Let")
End Property

Property Let Language_Code(as_Value As String)
On Error GoTo ErrHandler

  DPC_Subconstruction.Language_Code = as_Value
  Exit Property
ErrHandler:
  Call ErrorMessage("Language_Code.Let")
End Property

Property Let COF_Lang(as_Value As String)
On Error GoTo ErrHandler

  DPC_Subconstruction.COF_Lang = as_Value
  Exit Property
ErrHandler:
  Call ErrorMessage("COF_Lang.Let")
End Property

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

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

Public Property Set ArmDb(ByRef lo_ArmDb As Object)
On Error GoTo ErrHandler
        
  Set DPC_Subconstruction.ArmDb = lo_ArmDb
  Set mo_Db = lo_ArmDb
  Exit Property
ErrHandler:
  Call ErrorMessage("ArmDb.Set")
End Property

Property Let CURR_Code(as_Value As String)
On Error GoTo ErrHandler

  DPC_Subconstruction.CURR_Code = as_Value
  Exit Property
ErrHandler:
  Call ErrorMessage("CURR_Code.Let")
End Property
              
Property Let COF_Id(as_Value As String)
On Error GoTo ErrHandler

  DPC_Subconstruction.COF_Id = as_Value
  Exit Property
ErrHandler:
  Call ErrorMessage("COF_Id.Let")
End Property

Public Property Let LEN_Id(ByVal as_Value As Long)
On Error GoTo ErrHandler
  
  DPC_Subconstruction.LEN_Id = as_Value
  Exit Property
ErrHandler:
  Call ErrorMessage("LEN_Id.Let")
End Property

Property Let CT_Code(as_Value As String)
On Error GoTo ErrHandler

  DPC_Subconstruction.CT_Code = as_Value
  Exit Property
ErrHandler:
  Call ErrorMessage("CT_Code.Let")
End Property
              
Property Let ValidityDate(ad_Value As Date)
On Error GoTo ErrHandler

  DPC_Subconstruction.ValidityDate = ad_Value
  Exit Property
ErrHandler:
  Call ErrorMessage("ValidityDate.Let")
End Property
              
Property Let CanChangeManualPrice(ab_Value As Boolean)
On Error GoTo ErrHandler

  DPC_Subconstruction.CanChangeManualPrice = ab_Value
  Exit Property
ErrHandler:
  Call ErrorMessage("CanChangeManualPrice.Let")
End Property
              
Property Let OFD_Pos(al_Value As Long)
On Error GoTo ErrHandler

  DPC_Subconstruction.OFD_Pos = al_Value
  Exit Property
ErrHandler:
  Call ErrorMessage("OFD_Pos.Let")
End Property

Property Get OFD_Pos() As Long
On Error GoTo ErrHandler

  OFD_Pos = DPC_Subconstruction.OFD_Pos
  Exit Property
ErrHandler:
  Call ErrorMessage("OFD_Pos.Get")
End Property

Public Property Let OFD_WshDat(ByVal ad_Value As Date)
On Error GoTo ErrHandler
  
  DPC_Subconstruction.OFD_WshDat = ad_Value
  Exit Property
ErrHandler:
  Call ErrorMessage("OFD_WshDat.Let")
End Property

Public Property Get OFD_WshDat() As Date
On Error GoTo ErrHandler
  
  OFD_WshDat = DPC_Subconstruction.OFD_WshDat
  Exit Property
ErrHandler:
  Call ErrorMessage("OFD_WshDat.Get")
End Property

Public Property Let OFD_ShpDat(ByVal ad_Value As Date)
On Error GoTo ErrHandler
  
  DPC_Subconstruction.OFD_ShpDat = ad_Value
  Exit Property
ErrHandler:
  Call ErrorMessage("OFD_ShpDat.Let")
End Property

Public Property Get OFD_ShpDat() As Date
On Error GoTo ErrHandler
  
  OFD_ShpDat = DPC_Subconstruction.OFD_ShpDat
  Exit Property
ErrHandler:
  Call ErrorMessage("OFD_ShpDat.Get")
End Property

Public Property Let OFD_DelDat(ByVal ad_Value As Date)
On Error GoTo ErrHandler
  
  DPC_Subconstruction.OFD_DelDat = ad_Value
  Exit Property
ErrHandler:
  Call ErrorMessage("OFD_DelDat.Let")
End Property

Public Property Get OFD_DelDat() As Date
On Error GoTo ErrHandler
  
  OFD_DelDat = DPC_Subconstruction.OFD_DelDat
  Exit Property
ErrHandler:
  Call ErrorMessage("OFD_DelDat.Get")
End Property

Public Property Let IsProduction(ByVal ab_Value As Boolean)
On Error GoTo ErrHandler

  DPC_Subconstruction.IsProduction = ab_Value
  Exit Property
ErrHandler:
  Call ErrorHandler("IsProduction.Let")
End Property

Public Property Get IsProduction() As Boolean
On Error GoTo ErrHandler

  IsProduction = DPC_Subconstruction.IsProduction
  Exit Property
ErrHandler:
  Call ErrorHandler("IsProduction.Get")
End Property

Public Property Get DPC_SubSys() As DPC_SubSys
On Error GoTo ErrHandler
  
  Set DPC_SubSys = DPC_Subconstruction.DPC_SubSys
  Exit Property
ErrHandler:
  Call ErrorHandler("DPC_SubSys.Get")
End Property

Public Property Get Result() As Boolean
On Error GoTo ErrHandler

  Result = DPC_Subconstruction.Result
  Exit Property
ErrHandler:
  Call ErrorHandler("Result.Get")
End Property

Public Sub Load_A_COM()
On Error GoTo ErrHandler
  
  Call DPC_Subconstruction.Load_A_COM
  Caption = DPC_Subconstruction.Caption
  Call mo_Tools.ChangeCharset(Me.Controls, gl_CodePage, gl_CodePage, Me)
  Exit Sub
ErrHandler:
  Call ErrorHandler("Load_A_Com")
End Sub

Public Sub Unload_A_COM()
On Error GoTo ErrHandler
  
  DPC_Subconstruction.Unload_A_COM
  Exit Sub
ErrHandler:
  Call ErrorHandler("Unload_A_Com")
End Sub

Public Sub ItemAdd()
On Error GoTo ErrHandler

  Call DPC_Subconstruction.ItemAdd
  Exit Sub
ErrHandler:
  Call ErrorHandler("ItemAdd")
End Sub

Public Sub ItemUpdate(ByVal as_PUS_Id As String)
On Error GoTo ErrHandler

  Call DPC_Subconstruction.ItemUpdate(as_PUS_Id)
  Exit Sub
ErrHandler:
  Call ErrorHandler("ItemUpdate")
End Sub

Public Sub LoadOffer(ByVal as_COF_Id As String, ByVal as_OFD_IdPar As String)
On Error GoTo ErrHandler

  Call DPC_Subconstruction.LoadOffer(as_COF_Id, as_OFD_IdPar)
  Exit Sub
ErrHandler:
  Call ErrorHandler("LoadOffer")
End Sub

Public Sub ItemSave()
On Error GoTo ErrHandler

  Call DPC_Subconstruction.ItemSave
  Exit Sub
ErrHandler:
  Call ErrorHandler("ItemSave")
End Sub

Public Function GenerateOfferDetail() As Collection
On Error GoTo ErrHandler

  Set GenerateOfferDetail = DPC_Subconstruction.GenerateOfferDetail
  Exit Function
ErrHandler:
  Call ErrorHandler("GenerateOfferDetail")
End Function

Private Sub DPC_Subconstruction_Quit()
On Error GoTo ErrHandler
  
  Hide
  Exit Sub
ErrHandler:
  Call ErrorMessage("DPC_Subconstruction_Quit")
End Sub

' display standard error message
Public Sub ErrorMessage(ByVal as_Fct As String)
    Dim ls_ErrSource As String
    Dim ls_errDescription As String
    Dim ls_Message As String
    
    ls_ErrSource = as_Fct & SEP1 & Err.Source
    ls_errDescription = Err.Description
    ls_Message = SCREEN_NAME & " exception. Nr:" & Err.Number & ",Desc: " & ls_errDescription & ",Src:" & ls_ErrSource & "@"
    Call mo_Tools.LogMessage(mo_Db, ml_U_Code, SCREEN_NAME, ls_Message, "E")
    Call MsgBox("Error occured, please contact IT. Application will now shutdown." & vbCrLf & ls_ErrSource & vbCrLf & "Description: " & ls_errDescription, vbCritical, App.Title & " " & App.Major & "." & App.Minor & "." & App.Revision)
    End
End Sub

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



