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.Persistent.Base.General
Imports System.Data.SqlClient
Imports System.Configuration
Imports System.Linq
Imports System.Linq.Expressions
Imports DevExpress.ExpressApp.ConditionalAppearance
Public Enum eGLReportRowsType
    eBallance = 0 'Eredmény
    eIncoming = 1 'Mérleg
End Enum
Public Enum eGLReportRowsState
    eGLFinal = 0 'Végleges főkönyvből
    eGLEditable = 3 'Szerkeszthető főkönyvből
    eRegistry = 1 'Nem feladott iktatás
    eInvoice = 2 'Nem feladott számla
End Enum
<DefaultClassOptions()> _
<NavigationItem(False), CreatableItem(False)> _
<ImageName("BO_Report")> _
<DeferredDeletion(False)> _
<Appearance("Color Blue when not from GLRows", AppearanceItemType:="ViewItem", Fontcolor:="Blue", targetitems:="*", Criteria:="isnull(GLRows)=True")> _
<Appearance("Hide GLReportRows-ChangeVariant Actions when InPublic", AppearanceItemType:="Action", targetitems:="ChangeVariant", criteria:="GLReport.InPublic=True", visibility:=Editors.ViewItemVisibility.Hide)> _
Public Class GLReportRows
    Inherits BaseObject
    Private _GLReport As GLReport
    Private _GLReportRowsType As eGLReportRowsType
    Private _GLReportRowsState As eGLReportRowsState
    Private _GLRows As GLRows
    Private _DebitAmount As Double
    Private _CreditAmount As Double
    Private _BallanceAmount As Double
    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 _RegistryHeader As RegistryHeader
    Private _InvoiceHeader As InvoiceHeader
    Private _InvoiceRows As InvoiceRows
    Private _RegistryRowsFinancialControlling As RegistryRowsFinancialControlling

    Private _CurrencyName As CurrencyName
    Private _DebitAmountDEV As Double = 0
    Private _CreditAmountDEV As Double = 0
    Private _BallanceAmountDEV As Double = 0
    Public Sub New(ByVal session As Session)
        MyBase.New(session)
    End Sub
    
    <Association("GLReport-GLReportRows", GetType(GLReport))> _
    Property GLReport As GLReport
        Get
            Return _GLReport
        End Get
        Set(value As GLReport)
            SetPropertyValue("GLReport", _GLReport, value)
        End Set
    End Property
    
    Property GLReportRowsType As eGLReportRowsType
        Get
            Return _GLReportRowsType
        End Get
        Set(value As eGLReportRowsType)
            SetPropertyValue("GLReportRowsType", _GLReportRowsType, value)
        End Set
    End Property
    Property GLReportRowsState As eGLReportRowsState
        Get
            Return _GLReportRowsState
        End Get
        Set(value As eGLReportRowsState)
            SetPropertyValue("GLReportRowsState", _GLReportRowsState, value)
        End Set
    End Property
    Property GLRows As GLRows
        Get
            Return _GLRows
        End Get
        Set(value As GLRows)
            SetPropertyValue("GLRows", _GLRows, value)
        End Set
    End Property
    Property DebitAmount As Double
        Get
            Return _DebitAmount
        End Get
        Set(value As Double)
            SetPropertyValue("DebitAmount", _DebitAmount, value)
        End Set
    End Property
    Property CreditAmount As Double
        Get
            Return _CreditAmount
        End Get
        Set(value As Double)
            SetPropertyValue("CreditAmount", _CreditAmount, value)
        End Set
    End Property
    Property BallanceAmount As Double
        Get
            Return _BallanceAmount
        End Get
        Set(value As Double)
            SetPropertyValue("BallanceAmount", _BallanceAmount, value)
        End Set
    End Property
    <DataSourceCriteria("IsParent=False")> _
    Property ChartOfAccounts As ChartOfAccounts
        Get
            Return _ChartOfAccounts
        End Get
        Set(value As ChartOfAccounts)
            SetPropertyValue("ChartOfAccounts", _ChartOfAccounts, value)
        End Set
    End Property
    <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 RegistryHeader As RegistryHeader
        Get
            Return _RegistryHeader
        End Get
        Set(value As RegistryHeader)
            SetPropertyValue("RegistryHeader", _RegistryHeader, value)
        End Set
    End Property
    Property InvoiceHeader As InvoiceHeader
        Get
            Return _InvoiceHeader
        End Get
        Set(value As InvoiceHeader)
            SetPropertyValue("InvoiceHeader", _InvoiceHeader, value)
        End Set
    End Property
    Property InvoiceRows As InvoiceRows
        Get
            Return _InvoiceRows
        End Get
        Set(value As InvoiceRows)
            SetPropertyValue("InvoiceRows", _InvoiceRows, value)
        End Set
    End Property
    Property RegistryRowsFinancialControlling As RegistryRowsFinancialControlling
        Get
            Return _RegistryRowsFinancialControlling
        End Get
        Set(value As RegistryRowsFinancialControlling)
            SetPropertyValue("RegistryRowsFinancialControlling", _RegistryRowsFinancialControlling, value)
        End Set
    End Property

    Property CurrencyName As CurrencyName
        Get
            Return _CurrencyName
        End Get
        Set(value As CurrencyName)
            SetPropertyValue("CurrencyName", _CurrencyName, value)
        End Set
    End Property
    Property DebitAmountDEV As Double
        Get
            Return _DebitAmountDEV
        End Get
        Set(value As Double)
            SetPropertyValue("DebitAmountDEV", _DebitAmountDEV, value)
        End Set
    End Property
    Property CreditAmountDEV As Double
        Get
            Return _CreditAmountDEV
        End Get
        Set(value As Double)
            SetPropertyValue("CreditAmountDEV", _CreditAmountDEV, value)
        End Set
    End Property
    Property BallanceAmountDEV As Double
        Get
            Return _BallanceAmountDEV
        End Get
        Set(value As Double)
            SetPropertyValue("BallanceAmountDEV", _BallanceAmountDEV, value)
        End Set
    End Property

End Class
