Imports System Imports System.ComponentModel Imports DevExpress.Xpo Imports DevExpress.Data.Filtering Imports DevExpress.ExpressApp Imports DevExpress.Persistent.Base Imports DevExpress.Persistent.BaseImpl Imports DevExpress.Persistent.Validation Public Enum eWinLoss eRateDiffWin = 0 eRateDiffLoss = 1 eRoundingWin = 2 eRoundingLoss = 3 eRevaluationWin = 4 eRevaluationLoss = 5 End Enum _ _ Public Class GLHeader_RateDiffParameter Inherits BaseObject Private _ChartOfAccounts_RateDiff_Win As ChartOfAccounts '(deb) Private _ChartOfAccounts_RateDiff_Loss As ChartOfAccounts '(deb) Private _Controlling_RateDiff_Win As Controlling Private _Controlling_RateDiff_Loss As Controlling Private _ChartOfAccounts_Rounding_Win As ChartOfAccounts '(deb) Private _ChartOfAccounts_Rounding_Loss As ChartOfAccounts '(deb) Private _Controlling_Rounding_Win As Controlling Private _Controlling_Rounding_Loss As Controlling Private _Controlling_Revaluation_Win As Controlling Private _Controlling_Revaluation_Loss As Controlling Public Sub New(ByVal session As Session) MyBase.New(session) End Sub _ Property ChartOfAccounts_RateDiff_Win As ChartOfAccounts Get Return _ChartOfAccounts_RateDiff_Win End Get Set(value As ChartOfAccounts) SetPropertyValue("ChartOfAccounts_RateDiff_Win", _ChartOfAccounts_RateDiff_Win, value) End Set End Property _ Property ChartOfAccounts_RateDiff_Loss As ChartOfAccounts Get Return _ChartOfAccounts_RateDiff_Loss End Get Set(value As ChartOfAccounts) SetPropertyValue("ChartOfAccounts_RateDiff_Loss", _ChartOfAccounts_RateDiff_Loss, value) End Set End Property Property Controlling_RateDiff_Win As Controlling Get Return _Controlling_RateDiff_Win End Get Set(value As Controlling) SetPropertyValue("Controlling_RateDiff_Win", _Controlling_RateDiff_Win, value) End Set End Property Property Controlling_RateDiff_Loss As Controlling Get Return _Controlling_RateDiff_Loss End Get Set(ByVal value As Controlling) SetPropertyValue("Controlling_RateDiff_Loss", _Controlling_RateDiff_Loss, value) End Set End Property Property ChartOfAccounts_Rounding_Win As ChartOfAccounts Get Return _ChartOfAccounts_Rounding_Win End Get Set(value As ChartOfAccounts) SetPropertyValue("ChartOfAccounts_Rounding_Win", _ChartOfAccounts_Rounding_Win, value) End Set End Property Property ChartOfAccounts_Rounding_Loss As ChartOfAccounts Get Return _ChartOfAccounts_Rounding_Loss End Get Set(value As ChartOfAccounts) SetPropertyValue("ChartOfAccounts_Rounding_Loss", _ChartOfAccounts_Rounding_Loss, value) End Set End Property Property Controlling_Rounding_Win As Controlling Get Return _Controlling_Rounding_Win End Get Set(value As Controlling) SetPropertyValue("Controlling_Rounding_Win", _Controlling_Rounding_Win, value) End Set End Property Property Controlling_Rounding_Loss As Controlling Get Return _Controlling_Rounding_Loss End Get Set(ByVal value As Controlling) SetPropertyValue("Controlling_Rounding_Loss", _Controlling_Rounding_Loss, value) End Set End Property Property Controlling_Revaluation_Win As Controlling Get Return _Controlling_Revaluation_Win End Get Set(value As Controlling) SetPropertyValue("Controlling_Revaluation_Win", _Controlling_Revaluation_Win, value) End Set End Property Property Controlling_Revaluation_Loss As Controlling Get Return _Controlling_Revaluation_Loss End Get Set(value As Controlling) SetPropertyValue("Controlling_Revaluation_Loss", _Controlling_Revaluation_Loss, value) End Set End Property ReadOnly Property GLHeader_RateDiffParameterYear As XPCollection(Of GLHeader_RateDiffParameterYear) Get Return GetCollection(Of GLHeader_RateDiffParameterYear)("GLHeader_RateDiffParameterYear") End Get End Property Public Function GetChartOfAccounts(_AccountYear As Long, _WinLoss As eWinLoss) As ChartOfAccounts Dim _ChartOfAccounts As ChartOfAccounts = Nothing Dim _GLHeader_RateDiffParameterYear As GLHeader_RateDiffParameterYear Select Case _WinLoss Case eWinLoss.eRateDiffLoss For Each _GLHeader_RateDiffParameterYear In Me.GLHeader_RateDiffParameterYear If _GLHeader_RateDiffParameterYear.AccountYear = _AccountYear Then _ChartOfAccounts = _GLHeader_RateDiffParameterYear.ChartOfAccounts_RateDiff_Loss Exit For End If Next Case eWinLoss.eRateDiffWin For Each _GLHeader_RateDiffParameterYear In Me.GLHeader_RateDiffParameterYear If _GLHeader_RateDiffParameterYear.AccountYear = _AccountYear Then _ChartOfAccounts = _GLHeader_RateDiffParameterYear.ChartOfAccounts_RateDiff_Win Exit For End If Next Case eWinLoss.eRoundingLoss For Each _GLHeader_RateDiffParameterYear In Me.GLHeader_RateDiffParameterYear If _GLHeader_RateDiffParameterYear.AccountYear = _AccountYear Then _ChartOfAccounts = _GLHeader_RateDiffParameterYear.ChartOfAccounts_Rounding_Loss Exit For End If Next Case eWinLoss.eRoundingWin For Each _GLHeader_RateDiffParameterYear In Me.GLHeader_RateDiffParameterYear If _GLHeader_RateDiffParameterYear.AccountYear = _AccountYear Then _ChartOfAccounts = _GLHeader_RateDiffParameterYear.ChartOfAccounts_Rounding_Win Exit For End If Next Case eWinLoss.eRevaluationWin For Each _GLHeader_RateDiffParameterYear In Me.GLHeader_RateDiffParameterYear If _GLHeader_RateDiffParameterYear.AccountYear = _AccountYear Then _ChartOfAccounts = _GLHeader_RateDiffParameterYear.ChartOfAccounts_Revaluation_Win Exit For End If Next Case eWinLoss.eRevaluationLoss For Each _GLHeader_RateDiffParameterYear In Me.GLHeader_RateDiffParameterYear If _GLHeader_RateDiffParameterYear.AccountYear = _AccountYear Then _ChartOfAccounts = _GLHeader_RateDiffParameterYear.ChartOfAccounts_Revaluation_Loss Exit For End If Next End Select Return _ChartOfAccounts End Function End Class Public Class GLHeader_RateDiffParameterYear Inherits BaseObject Private _GLHeader_RateDiffParameter As GLHeader_RateDiffParameter Private _AccountYear As Long Private _ChartOfAccounts_RateDiff_Win As ChartOfAccounts 'Árfolyam nyereség Private _ChartOfAccounts_RateDiff_Loss As ChartOfAccounts 'Árfolyam veszteség Private _ChartOfAccounts_Rounding_Win As ChartOfAccounts 'Elengedési nyereség Private _ChartOfAccounts_Rounding_Loss As ChartOfAccounts 'Elengedési veszteség Private _ChartOfAccounts_Revaluation_Win As ChartOfAccounts 'Átértékelési nyereség Private _ChartOfAccounts_Revaluation_Loss As ChartOfAccounts 'Átértékelési veszteség Public Sub New(ByVal session As Session) MyBase.New(session) End Sub Property GLHeader_RateDiffParameter As GLHeader_RateDiffParameter Get Return _GLHeader_RateDiffParameter End Get Set(value As GLHeader_RateDiffParameter) SetPropertyValue("GLHeader_RateDiffParameter", _GLHeader_RateDiffParameter, value) End Set End Property Property AccountYear As Long Get Return _AccountYear End Get Set(value As Long) SetPropertyValue("AccountYear", _AccountYear, value) End Set End Property Property ChartOfAccounts_RateDiff_Win As ChartOfAccounts Get Return _ChartOfAccounts_RateDiff_Win End Get Set(value As ChartOfAccounts) SetPropertyValue("ChartOfAccounts_RateDiff_Win", _ChartOfAccounts_RateDiff_Win, value) End Set End Property Property ChartOfAccounts_RateDiff_Loss As ChartOfAccounts Get Return _ChartOfAccounts_RateDiff_Loss End Get Set(value As ChartOfAccounts) SetPropertyValue("ChartOfAccounts_RateDiff_Loss", _ChartOfAccounts_RateDiff_Loss, value) End Set End Property Property ChartOfAccounts_Rounding_Win As ChartOfAccounts Get Return _ChartOfAccounts_Rounding_Win End Get Set(value As ChartOfAccounts) SetPropertyValue("ChartOfAccounts_Rounding_Win", _ChartOfAccounts_Rounding_Win, value) End Set End Property Property ChartOfAccounts_Rounding_Loss As ChartOfAccounts Get Return _ChartOfAccounts_Rounding_Loss End Get Set(value As ChartOfAccounts) SetPropertyValue("ChartOfAccounts_Rounding_Loss", _ChartOfAccounts_Rounding_Loss, value) End Set End Property Property ChartOfAccounts_Revaluation_Win As ChartOfAccounts Get Return _ChartOfAccounts_Revaluation_Win End Get Set(value As ChartOfAccounts) SetPropertyValue("ChartOfAccounts_Revaluation_Win", _ChartOfAccounts_Revaluation_Win, value) End Set End Property Property ChartOfAccounts_Revaluation_Loss As ChartOfAccounts Get Return _ChartOfAccounts_Revaluation_Loss End Get Set(value As ChartOfAccounts) SetPropertyValue("ChartOfAccounts_Revaluation_Loss", _ChartOfAccounts_Revaluation_Loss, value) End Set End Property End Class