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
Imports DevExpress.ExpressApp.ConditionalAppearance

<DefaultClassOptions(), NavigationItem(False), CreatableItem(False)> _
<Appearance("Color Blue when not from GLRows II", AppearanceItemType:="ViewItem", Fontcolor:="Blue", targetitems:="*", Criteria:="GLReportRowsState in ('eRegistry','eInvoice')")> _
Public Class GLReportCashflowRows
    Inherits BaseObject
    Private _GLReportRowsState As eGLReportRowsState
    Private _GLReportCashflowHeader As GLReportCashflowHeader
    Private _ChartOfAccounts As ChartOfAccounts
    Private _Controlling As Controlling
    Private _CostHolder As CostHolder
    Private _CostPlace As CostPlace
    Private _UniqueObjects As UniqueObjects
    Private _JobNumberObjects As JobNumberObjects
    Private _CustomersFrom As CustomersFrom
    Private _Customers As Customers
    Private _ConnectInfo As String
    Private _DateExecution_Y As String
    Private _DateExecution_Q As String
    Private _DateExecution_M As String
    Private _DateExecution_W As String
    Private _DateExecution As Date
    Private _LiquidAssets As LiquidAssets
    Private _AmountHUF_Open As Double
    Private _AmountDEV_Open As Double
    Private _InAmountHUF As Double = 0 'Pénztár miatt befizetés
    Private _OutAmountHUF As Double = 0 'Pénztár miatt kifizetés
    Private _InAmountDEV As Double = 0 'Pénztár miatt befizetés
    Private _OutAmountDEV As Double = 0 'Pénztár miatt kifizetés


    Public Sub New(ByVal session As Session)
        MyBase.New(session)
        ' This constructor is used when an object is loaded from a persistent storage.
        ' Do not place any code here or place it only when the IsLoading property is false:
        ' if (!IsLoading){
        '   It is now OK to place your initialization code here.
        ' }
        ' or as an alternative, move your initialization code into the AfterConstruction method.
    End Sub
    Public Overrides Sub AfterConstruction()
        MyBase.AfterConstruction()
        ' Place here your initialization code.
    End Sub

    Property GLReportRowsState As eGLReportRowsState
        Get
            Return _GLReportRowsState
        End Get
        Set(value As eGLReportRowsState)
            SetPropertyValue("GLReportRowsState", _GLReportRowsState, value)
        End Set
    End Property
    <Association("GLReportCashflowHeader-GLReportCashflowRows", GetType(GLReportCashflowHeader))> _
    Property GLReportCashflowHeader As GLReportCashflowHeader
        Get
            Return _GLReportCashflowHeader
        End Get
        Set(value As GLReportCashflowHeader)
            SetPropertyValue("GLReportCashflowHeader", _GLReportCashflowHeader, value)
        End Set
    End Property
    Property ChartOfAccounts As ChartOfAccounts
        Get
            Return _ChartOfAccounts
        End Get
        Set(value As ChartOfAccounts)
            SetPropertyValue("ChartOfAccounts", _ChartOfAccounts, value)
        End Set
    End Property
    <ImmediatePostData(True), DataSourceCriteria("IsParent=False")>
    Property Controlling As Controlling
        Get
            Return _Controlling
        End Get
        Set(ByVal value As Controlling)
            SetPropertyValue("Controlling", _Controlling, value)
        End Set
    End Property
    Property UniqueObjects As UniqueObjects
        Get
            Return _UniqueObjects
        End Get
        Set(ByVal value As UniqueObjects)
            SetPropertyValue("UniqueObjects", _UniqueObjects, value)
        End Set
    End Property
    Property CostHolder As CostHolder
        Get
            Return _CostHolder
        End Get
        Set(ByVal value As CostHolder)
            SetPropertyValue("CostHolder", _CostHolder, value)
        End Set
    End Property
    Property CostPlace As CostPlace
        Get
            Return _CostPlace
        End Get
        Set(ByVal value As CostPlace)
            SetPropertyValue("CostPlace", _CostPlace, value)
        End Set
    End Property
    Property JobNumberObjects As JobNumberObjects
        Get
            Return _JobNumberObjects
        End Get
        Set(ByVal value As JobNumberObjects)
            SetPropertyValue("JobNumberObjects", _JobNumberObjects, value)
        End Set
    End Property
    Property CustomersFrom As CustomersFrom
        Get
            Return _CustomersFrom
        End Get
        Set(value As CustomersFrom)
            SetPropertyValue("CustomersFrom", _CustomersFrom, value)
        End Set
    End Property
    Property Customers As Customers
        Get
            Return _Customers
        End Get
        Set(value As Customers)
            SetPropertyValue("Customers", _Customers, value)
        End Set
    End Property
    Property ConnectInfo As String
        Get
            Return _ConnectInfo
        End Get
        Set(value As String)
            SetPropertyValue("ConnectInfo", _ConnectInfo, value)
        End Set
    End Property
    Property DateExecution_Y As String
        Get
            Return _DateExecution_Y
        End Get
        Set(value As String)
            SetPropertyValue("DateExecution_Y", _DateExecution_Y, value)
        End Set
    End Property
    Property DateExecution_Q As String
        Get
            Return _DateExecution_Q
        End Get
        Set(value As String)
            SetPropertyValue("DateExecution_Q", _DateExecution_Q, value)
        End Set
    End Property
    Property DateExecution_M As String
        Get
            Return _DateExecution_M
        End Get
        Set(value As String)
            SetPropertyValue("DateExecution_M", _DateExecution_M, value)
        End Set
    End Property
    Property DateExecution_W As String
        Get
            Return _DateExecution_W
        End Get
        Set(value As String)
            SetPropertyValue("DateExecution_W", _DateExecution_W, value)
        End Set
    End Property
    Property DateExecution As Date
        Get
            Return _DateExecution
        End Get
        Set(value As Date)
            SetPropertyValue("DateExecution", _DateExecution, value)
        End Set
    End Property
    Property LiquidAssets As LiquidAssets
        Get
            Return _LiquidAssets
        End Get
        Set(value As LiquidAssets)
            SetPropertyValue("LiquidAssets", _LiquidAssets, value)
        End Set
    End Property
    Property AmountHUF_Open As Double
        Get
            Return _AmountHUF_Open
        End Get
        Set(value As Double)
            SetPropertyValue("AmountHUF_Open", _AmountHUF_Open, value)
        End Set
    End Property
    Property AmountDEV_Open As Double
        Get
            Return _AmountDEV_Open
        End Get
        Set(value As Double)
            SetPropertyValue("AmountDEV_Open", _AmountDEV_Open, value)
        End Set
    End Property
    Property InAmountHUF As Double
        Get
            Return _InAmountHUF
        End Get
        Set(ByVal value As Double)
            SetPropertyValue("InAmountHUF", _InAmountHUF, value)
        End Set
    End Property
    Property OutAmountHUF As Double
        Get
            Return _OutAmountHUF
        End Get
        Set(ByVal value As Double)
            SetPropertyValue("OutAmountHUF", _OutAmountHUF, value)
        End Set
    End Property
    Property InAmountDEV As Double
        Get
            Return _InAmountDEV
        End Get
        Set(ByVal value As Double)
            SetPropertyValue("InAmountDEV", _InAmountDEV, Math.Round(value, 4, MidpointRounding.AwayFromZero))
        End Set
    End Property
    Property OutAmountDEV As Double
        Get
            Return _OutAmountDEV
        End Get
        Set(ByVal value As Double)
            SetPropertyValue("OutAmountDEV", _OutAmountDEV, Math.Round(value, 4, MidpointRounding.AwayFromZero))
        End Set
    End Property
End Class
