Public Class HistorialIngresoBusinessObject
    Inherits BusinessObject(Of HistorialIngreso)

#Region "Contructores"
    Public Sub New()
        MyBase.New()
        DbHelper = New HistorialIngresoDbHelper
    End Sub

    Public Sub New(ByVal entity As HistorialIngreso)
        MyBase.New(entity)
        DbHelper = New HistorialIngresoDbHelper
    End Sub

    Public Sub New(ByVal idHistorialIngreso As Int32, Optional ByVal foreignLevel As Integer=0)
        Me.New()
        _Entity.idHistorialIngreso = idHistorialIngreso
        Dim Entity_Aux As HistorialIngreso = DbHelper.SelectEntity(_Entity,foreignLevel)
        If Not Entity_Aux Is Nothing Then
            _IsNew = False
            _Entity = Entity_Aux
        End If
    End Sub
#End Region

#Region "Metodos Estaticos"
    Protected Shared _Instance As HistorialIngresoBusinessObject
    Protected Shared Function GetDdHelperInstance() As HistorialIngresoDbHelper
        If _Instance Is Nothing Then
            _Instance = New HistorialIngresoBusinessObject
        End If
    Return CType(_Instance.DbHelper, HistorialIngresoDbHelper)
    End Function

    Public Shared Function GetListHistorialIngreso(Optional ByVal foreignLevel As Integer=0) As EntityList(Of HistorialIngreso)
        Return GetDdHelperInstance.SelectList(foreignLevel)
    End Function

#End Region
End Class
