First create solution
This commit is contained in:
+78
@@ -0,0 +1,78 @@
|
||||
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("Disable UserCreated-BankImportHeader", AppearanceItemType.ViewItem, "1=1", TargetItems:="UserCreated", Enabled:=False)> _
|
||||
<Appearance("Disable ObjectCreated-BankImportHeader", AppearanceItemType.ViewItem, "1=1", TargetItems:="ObjectCreated", Enabled:=False)> _
|
||||
Public Class BankImportHeader 'Banki kivonat betöltõ fejléc
|
||||
Inherits BaseObject
|
||||
Private _ShortName As String 'Banki elektronikus kivonat megnevezése
|
||||
Private _FileData As FileData 'Elektronikus kivonat file.
|
||||
Private _ObjectCreated As Date 'Létrehozva
|
||||
Private _UserCreated As User 'Létrehozta
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
End Sub
|
||||
Protected Overrides Sub OnSaving()
|
||||
MyBase.OnSaving()
|
||||
If Session.IsNewObject(Me) Then
|
||||
ObjectCreated = GetSQLTime(Session)
|
||||
UserCreated = Session.GetObjectByKey(Of User)(Session.GetKeyValue(SecuritySystem.CurrentUser))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Property ShortName As String
|
||||
Get
|
||||
Return _ShortName
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("ShortName", _ShortName, value)
|
||||
End Set
|
||||
End Property
|
||||
Property FileData As FileData
|
||||
Get
|
||||
Return _FileData
|
||||
End Get
|
||||
Set(value As FileData)
|
||||
SetPropertyValue("FileData", _FileData, value)
|
||||
End Set
|
||||
End Property
|
||||
<NonCloneable> _
|
||||
Property ObjectCreated As Date
|
||||
Get
|
||||
Return _ObjectCreated
|
||||
End Get
|
||||
Set(value As Date)
|
||||
SetPropertyValue("ObjectCreated", _ObjectCreated, value)
|
||||
End Set
|
||||
End Property
|
||||
<NonCloneable> _
|
||||
Property UserCreated As User
|
||||
Get
|
||||
Return _UserCreated
|
||||
End Get
|
||||
Set(value As User)
|
||||
SetPropertyValue("UserCreated", _UserCreated, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
<Association("BankImportHeader-BankImportHeaderSum", GetType(BankImportHeaderSum)), VisibleInListView(False)> _
|
||||
ReadOnly Property BankImportHeaderSum As XPCollection(Of BankImportHeaderSum)
|
||||
Get
|
||||
Return GetCollection(Of BankImportHeaderSum)("BankImportHeaderSum")
|
||||
End Get
|
||||
End Property
|
||||
|
||||
End Class
|
||||
+137
@@ -0,0 +1,137 @@
|
||||
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
|
||||
|
||||
<DefaultClassOptions()> _
|
||||
<NavigationItem(False), CreatableItem(False)> _
|
||||
<DeferredDeletion(False)> _
|
||||
Public Class BankImportHeaderSum
|
||||
Inherits BaseObject
|
||||
Private _BankImportHeader As BankImportHeader
|
||||
Private _DateOpen As Date 'Nyitó dátumn
|
||||
Private _DateClose As Date 'Záró dátum
|
||||
Private _AccountNumber As String 'Bankszámlaszám amire a kivonat szól (saját számláink egyike)
|
||||
Private _CurrencyName As CurrencyName 'Deviza
|
||||
Private _AmountOpen As Double 'Nyitó összeg
|
||||
Private _AmountClose As Double 'Záró összeg
|
||||
Private _DocumentNumber As String 'Kionat száma
|
||||
Private _LiquidAssets As LiquidAssets ' Saját pénzeszközünk !!!
|
||||
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
End Sub
|
||||
<Association("BankImportHeader-BankImportHeaderSum", GetType(BankImportHeader))> _
|
||||
Property BankImportHeader As BankImportHeader
|
||||
Get
|
||||
Return _BankImportHeader
|
||||
End Get
|
||||
Set(value As BankImportHeader)
|
||||
SetPropertyValue("BankImportHeader", _BankImportHeader, value)
|
||||
End Set
|
||||
End Property
|
||||
Property DateOpen As Date
|
||||
Get
|
||||
Return _DateOpen
|
||||
End Get
|
||||
Set(value As Date)
|
||||
SetPropertyValue("DateOpen", _DateOpen, value)
|
||||
End Set
|
||||
End Property
|
||||
Property DateClose As Date
|
||||
Get
|
||||
Return _DateClose
|
||||
End Get
|
||||
Set(value As Date)
|
||||
SetPropertyValue("DateClose", _DateClose, value)
|
||||
End Set
|
||||
End Property
|
||||
Property AccountNumber As String
|
||||
Get
|
||||
Return _AccountNumber
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("AccountNumber", _AccountNumber, 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 AmountOpen As Double
|
||||
Get
|
||||
Return _AmountOpen
|
||||
End Get
|
||||
Set(value As Double)
|
||||
SetPropertyValue("AmountOpen", _AmountOpen, value)
|
||||
End Set
|
||||
End Property
|
||||
Property AmountClose As Double
|
||||
Get
|
||||
Return _AmountClose
|
||||
End Get
|
||||
Set(value As Double)
|
||||
SetPropertyValue("AmountClose", _AmountClose, value)
|
||||
End Set
|
||||
End Property
|
||||
Property DocumentNumber As String
|
||||
Get
|
||||
Return _DocumentNumber
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("DocumentNumber", _DocumentNumber, 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
|
||||
<VisibleInListView(False)> _
|
||||
<Association("BankImportHeaderSum-BankImportHeaderSumDetail", GetType(BankImportHeaderSumDetail))> _
|
||||
ReadOnly Property BankImportHeaderSumDetail As XPCollection(Of BankImportHeaderSumDetail)
|
||||
Get
|
||||
Return GetCollection(Of BankImportHeaderSumDetail)("BankImportHeaderSumDetail")
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property GLBank As GLBank
|
||||
Get
|
||||
Dim _GLBank As GLBank
|
||||
_GLBank = Session.FindObject(Of GLBank)(CriteriaOperator.Parse("BankImportHeaderSum.Oid=?", Me.Oid))
|
||||
Return _GLBank
|
||||
End Get
|
||||
End Property
|
||||
<VisibleInListView(False)> _
|
||||
ReadOnly Property GLRows As XPCollection(Of GLRows)
|
||||
Get
|
||||
If GLBank Is Nothing Then
|
||||
Return Nothing
|
||||
Else
|
||||
Return New XPCollection(Of GLRows)(Session, CriteriaOperator.Parse("GLHeader.Oid=?", GLBank.Oid))
|
||||
End If
|
||||
|
||||
End Get
|
||||
End Property
|
||||
<VisibleInListView(False)> _
|
||||
ReadOnly Property BankImportNameParameters As XPCollection(Of BankImportNameParameters)
|
||||
Get
|
||||
Return New XPCollection(Of BankImportNameParameters)(Session)
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
+90
@@ -0,0 +1,90 @@
|
||||
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
|
||||
|
||||
'<DeferredDeletion(False)> _ 'Foreign key miatt ez nem jó.
|
||||
<DefaultClassOptions()> _
|
||||
<NavigationItem(False), CreatableItem(False)> _
|
||||
Public Class BankImportHeaderSumDetail
|
||||
Inherits BaseObject
|
||||
Private _BankImportHeader As BankImportHeader
|
||||
Private _BankImportHeaderSum As BankImportHeaderSum
|
||||
Private _NoteRow As String 'Sorhoz tartozó közlemény
|
||||
Private _AccountNumber As String 'Bankszámla
|
||||
Private _PartnerString As String 'Partner azonosítása
|
||||
Private _DebitAmount As Double
|
||||
Private _CreditAmount As Double
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
End Sub
|
||||
Property BankImportHeader As BankImportHeader
|
||||
Get
|
||||
Return _BankImportHeader
|
||||
|
||||
End Get
|
||||
Set(value As BankImportHeader)
|
||||
SetPropertyValue("BankImportHeader", _BankImportHeader, value)
|
||||
End Set
|
||||
End Property
|
||||
<Association("BankImportHeaderSum-BankImportHeaderSumDetail", GetType(BankImportHeaderSum))> _
|
||||
Property BankImportHeaderSum As BankImportHeaderSum
|
||||
Get
|
||||
Return _BankImportHeaderSum
|
||||
End Get
|
||||
Set(value As BankImportHeaderSum)
|
||||
SetPropertyValue("BankImportHeaderSum", _BankImportHeaderSum, value)
|
||||
End Set
|
||||
End Property
|
||||
<Size(255)> _
|
||||
Property NoteRow As String
|
||||
Get
|
||||
Return _NoteRow
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("NoteRow", _NoteRow, value)
|
||||
End Set
|
||||
End Property
|
||||
Property AccountNumber As String
|
||||
Get
|
||||
Return _AccountNumber
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("AccountNumber", _AccountNumber, value)
|
||||
End Set
|
||||
End Property
|
||||
<Size(255)> _
|
||||
Property PartnerString As String
|
||||
Get
|
||||
Return _PartnerString
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("PartnerString", _PartnerString, 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
|
||||
End Class
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
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
|
||||
|
||||
<DefaultClassOptions()> _
|
||||
<NavigationItem("FinancialStocks")> _
|
||||
Public Class BankImportNameParameters
|
||||
Inherits BaseObject
|
||||
Private _NoteRow As String 'Sorhoz tartozó közlemény
|
||||
Private _ChartOfAccounts As ChartOfAccounts
|
||||
Private _Controlling As Controlling
|
||||
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
End Sub
|
||||
Property NoteRow As String
|
||||
Get
|
||||
Return _NoteRow
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("NoteRow", _NoteRow, value)
|
||||
End Set
|
||||
End Property
|
||||
<ImmediatePostData(True), DataSourceCriteria("IsParent=False")>
|
||||
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(value As Controlling)
|
||||
SetPropertyValue("Controlling", _Controlling, value)
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
+576
@@ -0,0 +1,576 @@
|
||||
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
|
||||
Imports DevExpress.Xpo.DB
|
||||
'<Appearance("Disable, all properties when IsEditable = False GLBank",
|
||||
' AppearanceItemType:="ViewItem",
|
||||
' TargetItems:="*",
|
||||
' Criteria:="IsEditable=False",
|
||||
' Enabled:=False,
|
||||
' Context:="DetailView")> _
|
||||
<DefaultClassOptions()>
|
||||
<NavigationItem("FinancialTransactions")>
|
||||
<DefaultProperty("DisplayName")>
|
||||
<Appearance("Hide properties if Correction",
|
||||
AppearanceItemType:="ViewItem",
|
||||
TargetItems:="row_AmountDEV;row_CurrencyRate2;row_CurrencyRate;row_CurrencyName2;row_AmountDEV2",
|
||||
Criteria:="row_TransactionType in (5,6)",
|
||||
Visibility:=Editors.ViewItemVisibility.Hide)>
|
||||
<Appearance("Hide row_AmountDEV in GLBank",
|
||||
AppearanceItemType:="ViewItem",
|
||||
TargetItems:="row_AmountDEV",
|
||||
Criteria:="LiquidAssets_Main.CurrencyName.ShortName = 'HUF'",
|
||||
Visibility:=Editors.ViewItemVisibility.Hide)>
|
||||
<Appearance("Hide row_CurrencyRate in GLBank",
|
||||
TargetItems:="row_CurrencyRate",
|
||||
Criteria:="LiquidAssets_Main.CurrencyName.ShortName = 'HUF' and row_CurrencyName2.ShortName='HUF'",
|
||||
Visibility:=Editors.ViewItemVisibility.Hide)>
|
||||
<Appearance("Hide row_CurrencyRate2 in GLBank",
|
||||
TargetItems:="row_CurrencyRate2",
|
||||
Criteria:="LiquidAssets_Main.CurrencyName.ShortName = row_CurrencyName2.ShortName",
|
||||
Visibility:=Editors.ViewItemVisibility.Hide)>
|
||||
<Appearance("Hide row_CurrencyRate2 in GLBank and HUF",
|
||||
TargetItems:="row_CurrencyRate2",
|
||||
Criteria:="LiquidAssets_Main.CurrencyName.ShortName ='HUF' or row_CurrencyName2.ShortName='HUF'",
|
||||
Visibility:=Editors.ViewItemVisibility.Hide)>
|
||||
<Appearance("ChartOfAccounts-hide",
|
||||
TargetItems:="row_ChartOfAccounts",
|
||||
Criteria:="row_TransactionType in (0,1) OR IsEditable=False",
|
||||
Visibility:=Editors.ViewItemVisibility.Hide)>
|
||||
<Appearance("Normal transactions hide",
|
||||
TargetItems:="row_CurrencyName2;row_CurrencyRate2",
|
||||
Criteria:="row_TransactionType in (2,3,4) OR IsEditable=False",
|
||||
Visibility:=Editors.ViewItemVisibility.Hide)>
|
||||
<Appearance("Partnerconnection-hide",
|
||||
TargetItems:="row_PCIGroup;row_PartnerType",
|
||||
Criteria:="row_TransactionType in (2,3) OR IsEditable=False",
|
||||
Visibility:=Editors.ViewItemVisibility.Hide)>
|
||||
<Appearance("Hide GLCassa-LiquidAssets",
|
||||
AppearanceItemType:="ViewItem",
|
||||
TargetItems:="LiquidAssets_Main",
|
||||
Criteria:="(IsNull(LiquidAssets_Main))=False",
|
||||
Enabled:=False,
|
||||
Context:="DetailView")>
|
||||
<Appearance("Hide DEV info in HUF",
|
||||
AppearanceItemType:="ViewItem",
|
||||
TargetItems:="TotalInAmountDEV;TotalOutAmountDEV;BallanceDEV;CloseDEV",
|
||||
Criteria:="CurrencyName.ShortName='HUF'",
|
||||
Visibility:=Editors.ViewItemVisibility.Hide,
|
||||
Context:="DetailView")>
|
||||
<Appearance("Hide HUF info in DEV",
|
||||
AppearanceItemType:="ViewItem",
|
||||
TargetItems:="TotalInAmountHUF;TotalOutAmountHUF;BallanceHUF;CloseHUF",
|
||||
Criteria:="CurrencyName.ShortName!='HUF'",
|
||||
Visibility:=Editors.ViewItemVisibility.Hide,
|
||||
Context:="DetailView")>
|
||||
<Appearance("Disable GLBank.row_AmountHUF when DEV != HUF",
|
||||
AppearanceItemType:="ViewItem",
|
||||
TargetItems:="row_AmountHUF",
|
||||
Criteria:="LiquidAssets_Main.CurrencyName.ShortName != 'HUF' and not (row_TransactionType in (5,6))",
|
||||
Enabled:=False,
|
||||
Context:="DetailView")>
|
||||
<Appearance("Hide row_Amount2 when CurrencyName2=CurrencyName",
|
||||
AppearanceItemType:="ViewItem",
|
||||
Criteria:="row_CurrencyName2.ShortName=LiquidAssets_Main.CurrencyName.ShortName",
|
||||
TargetItems:="row_CurrencyRate2;row_AmountDEV2",
|
||||
Visibility:=Editors.ViewItemVisibility.Hide)>
|
||||
<Appearance("Hide row_ info when IsEditable=False",
|
||||
AppearanceItemType:="ViewItem",
|
||||
Criteria:="IsEditable=False",
|
||||
TargetItems:="row_PartnerType;row_TransactionType;row_ChartOfAccounts;" +
|
||||
"row_PCIGroup;row_AmountDEV2;row_CurrencyRate;row_CurrencyRate2;row_CurrencyName2",
|
||||
Visibility:=Editors.ViewItemVisibility.Hide)>
|
||||
<Appearance("Hide aImportSavedBank when CurrencyName2=CurrencyName",
|
||||
AppearanceItemType:="Action",
|
||||
Criteria:="LiquidAssets_Main.CurrencyName.ShortName<>'HUF'",
|
||||
TargetItems:="aImportSavedBank",
|
||||
Visibility:=DevExpress.ExpressApp.Editors.ViewItemVisibility.Hide)>
|
||||
<Appearance("Hide aImportPCIGroupBank when row_PartnerType=-1",
|
||||
AppearanceItemType:="Action",
|
||||
Criteria:="row_PartnerType=-1",
|
||||
TargetItems:="aImportPCIGroupBank",
|
||||
Visibility:=DevExpress.ExpressApp.Editors.ViewItemVisibility.Hide)>
|
||||
<Appearance("Hide aGetCurrencyRateBank",
|
||||
AppearanceItemType:="Action",
|
||||
TargetItems:="aGetCurrencyRateBank",
|
||||
Criteria:="CurrencyName.ShortName='HUF'",
|
||||
Visibility:=DevExpress.ExpressApp.Editors.ViewItemVisibility.Hide)>
|
||||
<RuleCriteria("RuleCriteria GLAccounts-row_ChartOfAccounts", "aToTable_GLBank_Contexts", "row_ChartOfAccounts.Children.Count=0", "Csak gyermek objektum választható ki!", SkipNullOrEmptyValues:=False)> _
|
||||
Public Class GLBank
|
||||
Inherits GLHeader
|
||||
Private _PartnerType As ePartnerType
|
||||
Private _TransactionType As eTransactionType
|
||||
|
||||
Private _ChartOfAccounts As ChartOfAccounts
|
||||
Private _TotalInAmountHUF As Double = 0
|
||||
Private _TotalOutAmountHUF As Double = 0
|
||||
Private _TotalInAmountDEV As Double = 0
|
||||
Private _TotalOutAmountDEV As Double = 0
|
||||
Private _LiquidAssets As LiquidAssets
|
||||
Private _BallanceHUF As Double
|
||||
Private _BallanceDEV As Double
|
||||
Private _PCIGroup As PCIGroup
|
||||
Private _GLHeader_RateDiff As GLHeader 'Kapcsolódó árf. kül. elszámolási vegyes bizonylat
|
||||
|
||||
'-- A másodlagos
|
||||
Private _row_CurrencyRate As Double
|
||||
Private _row_AmountDEV2 As Double = 0
|
||||
Private _row_CurrencyRate2 As Double = 0
|
||||
Private _row_CurrencyName2 As CurrencyName
|
||||
Private _BankImportHeaderSum As BankImportHeaderSum
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
If Session.IsNewObject(Me) Then
|
||||
Me.GLDocumentType = eGLDocumentType.eGLBank
|
||||
Me.DateExecution = Now
|
||||
Me.row_PartnerType = ePartnerType.eNotSet
|
||||
Me.row_TransactionType = eTransactionType.eNotSet
|
||||
End If
|
||||
End Sub
|
||||
|
||||
<NonPersistent()> _
|
||||
<VisibleInListView(False)> _
|
||||
<RuleValueComparison("GLBank-row_PartnerType", "aToTable_GLBank_Contexts", ValueComparisonType.NotEquals, ePartnerType.eNotSet, TargetCriteria:="row_TransactionType in (0,1)")> _
|
||||
Property row_PartnerType() As ePartnerType
|
||||
Get
|
||||
Return _PartnerType
|
||||
End Get
|
||||
Set(ByVal value As ePartnerType)
|
||||
SetPropertyValue("row_PartnerType", _PartnerType, value)
|
||||
End Set
|
||||
End Property
|
||||
<NonPersistent()> _
|
||||
<ImmediatePostData(True)> _
|
||||
<VisibleInListView(False)> _
|
||||
<RuleValueComparison("GLBank-row_TransactionType", "aToTable_GLBank_Contexts", ValueComparisonType.NotEquals, eTransactionType.eNotSet)> _
|
||||
Property row_TransactionType() As eTransactionType
|
||||
Get
|
||||
Return _TransactionType
|
||||
End Get
|
||||
Set(ByVal value As eTransactionType)
|
||||
SetPropertyValue("row_TransactionType", _TransactionType, value)
|
||||
If Session.IsObjectsLoading = False And Session.IsObjectsSaving = False Then
|
||||
If LiquidAssets_Main IsNot Nothing Then
|
||||
Select Case row_TransactionType
|
||||
Case eTransactionType.eNormalCredit, eTransactionType.eNormalDebit, eTransactionType.eNotSet, eTransactionType.eCorrectionCreditHUF, eTransactionType.eCorrectionDebitHUF
|
||||
row_PartnerType = ePartnerType.eNotSet
|
||||
row_CurrencyName2 = LiquidAssets_Main.CurrencyName
|
||||
Case eTransactionType.ePartnerCredit
|
||||
row_PartnerType = ePartnerType.eReceivables
|
||||
Case eTransactionType.ePartnerDebit
|
||||
row_PartnerType = ePartnerType.ePayabels
|
||||
End Select
|
||||
End If
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
<NonPersistent()>
|
||||
<ImmediatePostData(True), DataSourceCriteria("AccountYear=GetYear('@This.DateExecution')")>
|
||||
<RuleRequiredField("GLBank-row_ChartOfAccounts", "aToTable_GLBank_Contexts", TargetCriteria:="row_TransactionType in (2,3,4)")>
|
||||
<VisibleInListView(False)>
|
||||
Property row_ChartOfAccounts() As ChartOfAccounts
|
||||
Get
|
||||
Return _ChartOfAccounts
|
||||
End Get
|
||||
Set(ByVal value As ChartOfAccounts)
|
||||
SetPropertyValue("row_ChartOfAccounts", _ChartOfAccounts, value)
|
||||
End Set
|
||||
End Property
|
||||
<NonPersistent()>
|
||||
<ImmediatePostData(True), DataSourceCriteria("CustomersFrom='@This.CustomersFrom' and PartnerType='@This.row_PartnerType' and BallanceState=0 and isnull(CurrencyName_Account)=False ")>
|
||||
<VisibleInListView(False)>
|
||||
Property row_PCIGroup() As PCIGroup
|
||||
Get
|
||||
Return _PCIGroup
|
||||
End Get
|
||||
Set(ByVal value As PCIGroup)
|
||||
SetPropertyValue("row_PCIGroup", _PCIGroup, value)
|
||||
If Session.IsObjectsLoading = False And Session.IsObjectsSaving = False Then
|
||||
If value IsNot Nothing Then
|
||||
row_ConnectInfo = value.ConnectInfo
|
||||
row_Customer = value.Customers
|
||||
row_PartnerType = value.PartnerType
|
||||
If value.CurrencyName_Account Is Nothing Then
|
||||
If Me.CurrencyName.ShortName = "HUF" Then
|
||||
Me.row_AmountHUF = Math.Abs(value.BallanceHUF)
|
||||
row_CurrencyName2 = Session.FindObject(Of CurrencyName)(CriteriaOperator.Parse("ShortName='HUF'"))
|
||||
Else
|
||||
row_CurrencyName2 = Session.FindObject(Of CurrencyName)(CriteriaOperator.Parse("ShortName='HUF'"))
|
||||
|
||||
End If
|
||||
Else
|
||||
If value.CurrencyName_Account.ShortName = "HUF" Then
|
||||
If Me.CurrencyName.ShortName = "HUF" Then
|
||||
Me.row_AmountHUF = Math.Abs(value.BallanceHUF)
|
||||
row_CurrencyName2 = Session.FindObject(Of CurrencyName)(CriteriaOperator.Parse("ShortName='HUF'"))
|
||||
Else
|
||||
row_CurrencyName2 = Session.FindObject(Of CurrencyName)(CriteriaOperator.Parse("ShortName='HUF'"))
|
||||
|
||||
End If
|
||||
Else
|
||||
If Me.CurrencyName.ShortName = value.CurrencyName_Account.ShortName Then
|
||||
Me.row_AmountDEV = Math.Abs(value.BallanceDEV)
|
||||
row_CurrencyName2 = Session.FindObject(Of CurrencyName)(CriteriaOperator.Parse("ShortName=?", value.CurrencyName_Account.ShortName))
|
||||
Else
|
||||
row_CurrencyName2 = Session.FindObject(Of CurrencyName)(CriteriaOperator.Parse("ShortName=?", value.CurrencyName_Account.ShortName))
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
<ImmediatePostData(True), DataSourceCriteria("LiquidAssetsType=1 and CustomerFrom='@This.CustomersFrom'")>
|
||||
<RuleRequiredField("GLBank-LiquidAssets_Cassa", "aFinal_GLBank_Context")> _
|
||||
<RuleRequiredField("GLBank-LiquidAssets_Cassa2", "aFinalAndNew_GLBank_Context")> _
|
||||
<VisibleInListView(False)> _
|
||||
Property LiquidAssets_Main() As LiquidAssets
|
||||
Get
|
||||
Return _LiquidAssets
|
||||
End Get
|
||||
Set(ByVal value As LiquidAssets)
|
||||
SetPropertyValue("LiquidAssets_Main", _LiquidAssets, value)
|
||||
If Session.IsObjectsSaving = False And Session.IsObjectsLoading = False Then
|
||||
row_LiquidAssets = value
|
||||
row_CurrencyName2 = value.CurrencyName
|
||||
If value IsNot Nothing Then
|
||||
|
||||
Me.CurrencyName = value.CurrencyName
|
||||
Me.row_CurrencyName2 = CurrencyName
|
||||
|
||||
If Me.DateExecution > Now.AddYears(-1) Then
|
||||
BallanceHUF = GetBallanceHUF(value, Me.DateExecution)
|
||||
BallanceDEV = GetBallanceDEV(value, Me.DateExecution)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
<NonPersistent()> _
|
||||
<ImmediatePostData(True)> _
|
||||
<VisibleInListView(False)> _
|
||||
<RuleRange("GLBank-row_CurrencyRate", "aToTable_GLBank_Contexts", 0.01, 999999, TargetCriteria:="LiquidAssets_Main.CurrencyName.ShortName != 'HUF' and not (row_TransactionType in (5,6))")> _
|
||||
Property row_CurrencyRate As Double
|
||||
Get
|
||||
Return _row_CurrencyRate
|
||||
End Get
|
||||
Set(value As Double)
|
||||
SetPropertyValue("row_CurrencyRate", _row_CurrencyRate, value)
|
||||
If Session.IsObjectsLoading = False And Session.IsObjectsSaving = False Then
|
||||
If row_CurrencyName2 Is Nothing Then row_CurrencyName2 = LiquidAssets_Main.CurrencyName
|
||||
|
||||
If LiquidAssets_Main.CurrencyName.ShortName = "HUF" And row_CurrencyName2.ShortName <> "HUF" Then
|
||||
If row_CurrencyRate <> 0 Then row_AmountDEV2 = Math.Round(row_AmountHUF / row_CurrencyRate, 2, MidpointRounding.AwayFromZero)
|
||||
End If
|
||||
If LiquidAssets_Main.CurrencyName.ShortName <> "HUF" And row_CurrencyName2.ShortName = "HUF" Then
|
||||
row_AmountHUF = row_AmountDEV * Math.Round(row_CurrencyRate, 2, MidpointRounding.AwayFromZero)
|
||||
row_AmountDEV2 = row_AmountHUF
|
||||
End If
|
||||
If LiquidAssets_Main.CurrencyName.ShortName <> "HUF" And row_CurrencyName2.ShortName <> "HUF" Then
|
||||
row_AmountHUF = row_AmountDEV * Math.Round(row_CurrencyRate, 2, MidpointRounding.AwayFromZero)
|
||||
|
||||
End If
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
<NonPersistent()> _
|
||||
<ImmediatePostData(True)> _
|
||||
<VisibleInListView(False)> _
|
||||
Property row_AmountDEV2 As Double
|
||||
Get
|
||||
Return _row_AmountDEV2
|
||||
End Get
|
||||
Set(value As Double)
|
||||
SetPropertyValue("row_AmountDEV2", _row_AmountDEV2, value)
|
||||
If Session.IsObjectsLoading = False And Session.IsObjectsSaving = False Then
|
||||
If row_CurrencyName2 Is Nothing Then row_CurrencyName2 = LiquidAssets_Main.CurrencyName
|
||||
If LiquidAssets_Main.CurrencyName.ShortName <> "HUF" And _
|
||||
row_CurrencyName2.ShortName <> "HUF" And _
|
||||
LiquidAssets_Main.CurrencyName.ShortName <> row_CurrencyName2.ShortName Then
|
||||
If row_AmountDEV <> 0 Then
|
||||
row_CurrencyRate2 = Math.Round(row_AmountDEV2 / row_AmountDEV, 4, MidpointRounding.AwayFromZero)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
<NonPersistent()> _
|
||||
<ImmediatePostData(True)> _
|
||||
<VisibleInListView(False)> _
|
||||
<RuleRange("GLBank.CurrencyName.ToTable", "aToTable_GLBank_Contexts", 0.01, 999999999999999999, _
|
||||
TargetCriteria:="LiquidAssets_Main.CurrencyName.ShortName != row_CurrencyName2.ShortName and " +
|
||||
"LiquidAssets_Main.CurrencyName.ShortName !='HUF' and " +
|
||||
"row_CurrencyName2.ShortName !='HUF'")> _
|
||||
Property row_CurrencyRate2 As Double
|
||||
Get
|
||||
Return _row_CurrencyRate2
|
||||
End Get
|
||||
Set(ByVal value As Double)
|
||||
SetPropertyValue("row_CurrencyRate2", _row_CurrencyRate2, value)
|
||||
End Set
|
||||
End Property
|
||||
<NonPersistent()> _
|
||||
<ImmediatePostData(True)> _
|
||||
<VisibleInListView(False)> _
|
||||
Property row_CurrencyName2 As CurrencyName
|
||||
Get
|
||||
Return _row_CurrencyName2
|
||||
End Get
|
||||
Set(value As CurrencyName)
|
||||
SetPropertyValue("row_CurrencyName2", _row_CurrencyName2, value)
|
||||
If Session.IsObjectsLoading = False And Session.IsObjectsSaving = False Then
|
||||
row_AmountDEV2 = 0
|
||||
row_CurrencyRate2 = 0
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property TotalInAmountHUF As Double
|
||||
Get
|
||||
Return _TotalInAmountHUF
|
||||
End Get
|
||||
Set(ByVal value As Double)
|
||||
SetPropertyValue("TotalInAmountHUF", _TotalInAmountHUF, value)
|
||||
End Set
|
||||
End Property
|
||||
Property TotalOutAmountHUF As Double
|
||||
Get
|
||||
Return _TotalOutAmountHUF
|
||||
End Get
|
||||
Set(ByVal value As Double)
|
||||
SetPropertyValue("TotalOutAmountHUF", _TotalOutAmountHUF, value)
|
||||
End Set
|
||||
End Property
|
||||
Property TotalInAmountDEV As Double
|
||||
Get
|
||||
Return _TotalInAmountDEV
|
||||
End Get
|
||||
Set(ByVal value As Double)
|
||||
SetPropertyValue("TotalInAmountDEV", _TotalInAmountDEV, value)
|
||||
End Set
|
||||
End Property
|
||||
Property TotalOutAmountDEV As Double
|
||||
Get
|
||||
Return _TotalOutAmountDEV
|
||||
End Get
|
||||
Set(ByVal value As Double)
|
||||
SetPropertyValue("TotalOutAmountDEV", _TotalOutAmountDEV, value)
|
||||
End Set
|
||||
End Property
|
||||
Property BallanceHUF As Double
|
||||
Get
|
||||
Return _BallanceHUF
|
||||
End Get
|
||||
Set(ByVal value As Double)
|
||||
SetPropertyValue("BallanceHUF", _BallanceHUF, value)
|
||||
End Set
|
||||
End Property
|
||||
Property BallanceDEV As Double
|
||||
Get
|
||||
Return _BallanceDEV
|
||||
End Get
|
||||
Set(ByVal value As Double)
|
||||
SetPropertyValue("BallanceDEV", _BallanceDEV, value)
|
||||
End Set
|
||||
End Property
|
||||
Property BankImportHeaderSum As BankImportHeaderSum
|
||||
Get
|
||||
Return _BankImportHeaderSum
|
||||
End Get
|
||||
Set(value As BankImportHeaderSum)
|
||||
SetPropertyValue("BankImportHeaderSum", _BankImportHeaderSum, value)
|
||||
End Set
|
||||
End Property
|
||||
Property GLHeader_RateDiff As GLHeader
|
||||
Get
|
||||
Return _GLHeader_RateDiff
|
||||
End Get
|
||||
Set(value As GLHeader)
|
||||
SetPropertyValue("GLHeader_RateDiff", _GLHeader_RateDiff, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub RecalculateTotal()
|
||||
Dim _GLRows As GLRows
|
||||
TotalInAmountHUF = 0
|
||||
TotalOutAmountHUF = 0
|
||||
TotalInAmountDEV = 0
|
||||
TotalOutAmountDEV = 0
|
||||
For Each _GLRows In Me.GLRows
|
||||
Me.TotalInAmountHUF += _GLRows.InAmountHUF
|
||||
Me.TotalOutAmountHUF += _GLRows.OutAmountHUF
|
||||
Me.TotalInAmountDEV += _GLRows.InAmountDEV
|
||||
Me.TotalOutAmountDEV += _GLRows.OutAmountDEV
|
||||
Next
|
||||
Me.Save()
|
||||
End Sub
|
||||
ReadOnly Property CloseHUF As Double
|
||||
Get
|
||||
Return BallanceHUF + TotalInAmountHUF - TotalOutAmountHUF
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property CloseDEV As Double
|
||||
Get
|
||||
Return BallanceDEV + TotalInAmountDEV - TotalOutAmountDEV
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property DisplayName As String
|
||||
Get
|
||||
If Me.LiquidAssets_Main IsNot Nothing Then
|
||||
Return Me.LiquidAssets_Main.ShortName
|
||||
Else
|
||||
Return Nothing
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
<RuleValueComparison("GLBank-row_AmountDEV", "aToTable_GLBank_Contexts", ValueComparisonType.GreaterThan, 0, TargetCriteria:="CurrencyName.ShortName != 'HUF' and not (row_TransactionType in (5,6))")> _
|
||||
Overrides Property row_AmountDEV As Double
|
||||
Get
|
||||
Return MyBase.row_AmountDEV
|
||||
End Get
|
||||
Set(value As Double)
|
||||
MyBase.row_AmountDEV = value
|
||||
If Session.IsObjectsLoading = False And Session.IsObjectsSaving = False Then
|
||||
If row_CurrencyName2 Is Nothing Then row_CurrencyName2 = LiquidAssets_Main.CurrencyName
|
||||
If Me.row_CurrencyRate > 0 Then
|
||||
Me.row_AmountHUF = value * Me.row_CurrencyRate
|
||||
End If
|
||||
If LiquidAssets_Main.CurrencyName.ShortName <> "HUF" Then
|
||||
If LiquidAssets_Main.CurrencyName.ShortName = row_CurrencyName2.ShortName Then
|
||||
Else
|
||||
row_AmountDEV2 = row_AmountDEV * Math.Round(row_CurrencyRate2, 2, MidpointRounding.AwayFromZero)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
<RuleRequiredField("GLBank-row_Customers", "aToTable_GLBank_Contexts", TargetCriteria:="row_TransactionType in (0,1)")> _
|
||||
<ImmediatePostData(True)> _
|
||||
Overrides Property row_Customer As Customers
|
||||
Get
|
||||
Return MyBase.row_Customer
|
||||
End Get
|
||||
Set(value As Customers)
|
||||
MyBase.row_Customer = value
|
||||
End Set
|
||||
End Property
|
||||
Overrides Property row_Controlling As Controlling
|
||||
Get
|
||||
Return MyBase.row_Controlling
|
||||
End Get
|
||||
Set(value As Controlling)
|
||||
MyBase.row_Controlling = value
|
||||
If Session.IsObjectsSaving = False And Session.IsObjectsLoading = False Then
|
||||
If value.ChartOfAccounts IsNot Nothing Then
|
||||
|
||||
row_ChartOfAccounts = value.GetChartOfAccounts(Me.DateExecution.Year, False)
|
||||
End If
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Function GetBallanceHUF(ByVal _LiquidAssets As LiquidAssets, ByVal _ToDate As Date) As Double
|
||||
Dim _SQL As String
|
||||
Dim _SelectedData As SelectedData = Nothing
|
||||
Dim _BallanceHUF As Double = 0
|
||||
_SQL = " SELECT t1.LiquidAssets_Main AS LiquidAssets,"
|
||||
_SQL += " SUM(t3.InAmountHUF)-SUM(t3.OutAmountHUF) As BallanceHUF,"
|
||||
_SQL += " SUM(t3.InAmountDEV)-SUM(t3.OutAmountDEV) As BallanceDEV"
|
||||
_SQL += " FROM GLBank t1 JOIN GLHeader t2 ON"
|
||||
_SQL += " t1.Oid=t2.Oid JOIN GLRows t3 On"
|
||||
_SQL += " t2.Oid=t3.GLHeader"
|
||||
_SQL += " WHERE t2.GCRecord IS NULL AND t3.GCRecord IS NULL AND t1.LiquidAssets_Main=@Bank AND "
|
||||
_SQL += " DATE(t2.DateExecution)<=@Date"
|
||||
Dim _stringparam() As String = New String() {"@Bank", "@Date"}
|
||||
Dim _objectparam() As Object = New Object() {_LiquidAssets.Oid, _ToDate.Date}
|
||||
|
||||
_SelectedData = Session.ExecuteQuery(_SQL, _stringparam, _objectparam)
|
||||
For Each row As SelectStatementResultRow In _SelectedData.ResultSet(0).Rows
|
||||
_BallanceHUF = row.Values(1)
|
||||
Next row
|
||||
Return _BallanceHUF
|
||||
End Function
|
||||
Function GetBallanceOpenHUF(ByVal _LiquidAssets As LiquidAssets, ByVal _ToDate As Date) As Double
|
||||
Dim _SQL As String
|
||||
Dim _SelectedData As SelectedData = Nothing
|
||||
Dim _BallanceHUF As Double = 0
|
||||
_SQL = " SELECT t1.LiquidAssets_Main AS LiquidAssets,"
|
||||
_SQL += " SUM(t3.InAmountHUF)-SUM(t3.OutAmountHUF) As BallanceHUF,"
|
||||
_SQL += " SUM(t3.InAmountDEV)-SUM(t3.OutAmountDEV) As BallanceDEV"
|
||||
_SQL += " FROM GLBank t1 JOIN GLHeader t2 ON"
|
||||
_SQL += " t1.Oid=t2.Oid JOIN GLRows t3 On"
|
||||
_SQL += " t2.Oid=t3.GLHeader"
|
||||
_SQL += " WHERE t2.GCRecord IS NULL AND t3.GCRecord IS NULL AND t1.LiquidAssets_Main=@Bank AND "
|
||||
_SQL += " DATE(t2.DateExecution)<@Date"
|
||||
Dim _stringparam() As String = New String() {"@Bank", "@Date"}
|
||||
Dim _objectparam() As Object = New Object() {_LiquidAssets.Oid, _ToDate.Date}
|
||||
|
||||
_SelectedData = Session.ExecuteQuery(_SQL, _stringparam, _objectparam)
|
||||
For Each row As SelectStatementResultRow In _SelectedData.ResultSet(0).Rows
|
||||
_BallanceHUF = row.Values(1)
|
||||
Next row
|
||||
Return _BallanceHUF
|
||||
End Function
|
||||
Function GetBallanceDEV(ByVal _LiquidAssets As LiquidAssets, ByVal _ToDate As Date) As Double
|
||||
Dim _SQL As String
|
||||
Dim _SelectedData As SelectedData = Nothing
|
||||
Dim _BallanceDEV As Double = 0
|
||||
_SQL = " SELECT t1.LiquidAssets_Main AS LiquidAssets,"
|
||||
_SQL += " SUM(t3.InAmountHUF)-SUM(t3.OutAmountHUF) As BallanceHUF,"
|
||||
_SQL += " SUM(t3.InAmountDEV)-SUM(t3.OutAmountDEV) As BallanceDEV"
|
||||
_SQL += " FROM GLBank t1 JOIN GLHeader t2 ON"
|
||||
_SQL += " t1.Oid=t2.Oid JOIN GLRows t3 On"
|
||||
_SQL += " t2.Oid=t3.GLHeader"
|
||||
_SQL += " WHERE t2.GCRecord IS NULL AND t3.GCRecord IS NULL AND t1.LiquidAssets_Main=@Bank AND "
|
||||
_SQL += " DATE(t2.DateExecution)<=@Date"
|
||||
Dim _stringparam() As String = New String() {"@Bank", "@Date"}
|
||||
Dim _objectparam() As Object = New Object() {_LiquidAssets.Oid, _ToDate.Date}
|
||||
|
||||
_SelectedData = Session.ExecuteQuery(_SQL, _stringparam, _objectparam)
|
||||
For Each row As SelectStatementResultRow In _SelectedData.ResultSet(0).Rows
|
||||
_BallanceDEV = row.Values(2)
|
||||
Next row
|
||||
Return _BallanceDEV
|
||||
|
||||
End Function
|
||||
Function GetBallanceOpenDEV(ByVal _LiquidAssets As LiquidAssets, ByVal _ToDate As Date) As Double
|
||||
Dim _SQL As String
|
||||
Dim _SelectedData As SelectedData = Nothing
|
||||
Dim _BallanceDEV As Double = 0
|
||||
_SQL = " SELECT t1.LiquidAssets_Main AS LiquidAssets,"
|
||||
_SQL += " SUM(t3.InAmountHUF)-SUM(t3.OutAmountHUF) As BallanceHUF,"
|
||||
_SQL += " SUM(t3.InAmountDEV)-SUM(t3.OutAmountDEV) As BallanceDEV"
|
||||
_SQL += " FROM GLBank t1 JOIN GLHeader t2 ON"
|
||||
_SQL += " t1.Oid=t2.Oid JOIN GLRows t3 On"
|
||||
_SQL += " t2.Oid=t3.GLHeader"
|
||||
_SQL += " WHERE t2.GCRecord IS NULL AND t3.GCRecord IS NULL AND t1.LiquidAssets_Main=@Bank AND "
|
||||
_SQL += " DATE(t2.DateExecution)<@Date"
|
||||
Dim _stringparam() As String = New String() {"@Bank", "@Date"}
|
||||
Dim _objectparam() As Object = New Object() {_LiquidAssets.Oid, _ToDate.Date}
|
||||
|
||||
_SelectedData = Session.ExecuteQuery(_SQL, _stringparam, _objectparam)
|
||||
For Each row As SelectStatementResultRow In _SelectedData.ResultSet(0).Rows
|
||||
_BallanceDEV = row.Values(2)
|
||||
Next row
|
||||
Return _BallanceDEV
|
||||
|
||||
End Function
|
||||
|
||||
End Class
|
||||
+136
@@ -0,0 +1,136 @@
|
||||
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
|
||||
<DefaultClassOptions()> _
|
||||
<NavigationItem(False), CreatableItem(False)> _
|
||||
Public Class BankParameterDEV
|
||||
Inherits BaseObject
|
||||
Private _CustomersFrom As CustomersFrom '-- Saját cég
|
||||
Private _BankCost As eBankCost '-- Ki fizeti az utalást
|
||||
Private _CurrencyName As CurrencyName '-- A teljesítés milyen devizában legyen
|
||||
Private _Ref As String '-- Referencia string
|
||||
Private _Urgent As Boolean = False '-- Sürgõs vagy nem
|
||||
Private _DateExecution As Date '-- Teljesítés dátuma
|
||||
Private _BankInformation As BankInformation '-- Milyen számlaszámról menjen az utalás
|
||||
Private _FolderName As String
|
||||
Private _TransferCount As Long '? db számlát akar utalni
|
||||
Private _TransferTotalHUF As Double '? az utalni kívánt tételek összege
|
||||
Private _TransferTotalDEV As Double '? az utalni mkívánt tételek összege devizában
|
||||
Private _CustomFileName As String 'Opciós, ha meg van adva, akkor ez lesz a letöltéskori file neve
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
CustomFileName = ""
|
||||
End Sub
|
||||
Property CustomersFrom As CustomersFrom
|
||||
Get
|
||||
Return _CustomersFrom
|
||||
End Get
|
||||
Set(ByVal value As CustomersFrom)
|
||||
SetPropertyValue("CustomersFrom", _CustomersFrom, value)
|
||||
|
||||
End Set
|
||||
End Property
|
||||
Property BankCost As eBankCost
|
||||
Get
|
||||
Return _BankCost
|
||||
End Get
|
||||
Set(ByVal value As eBankCost)
|
||||
SetPropertyValue("BankCost", _BankCost, value)
|
||||
End Set
|
||||
End Property
|
||||
<RuleRequiredField("BankParameterDEV-CurrencyName", DefaultContexts.Save)> _
|
||||
Property CurrencyName As CurrencyName
|
||||
Get
|
||||
Return _CurrencyName
|
||||
End Get
|
||||
Set(ByVal value As CurrencyName)
|
||||
SetPropertyValue("CurrencyName", _CurrencyName, value)
|
||||
End Set
|
||||
End Property
|
||||
Property Urgent As Boolean
|
||||
Get
|
||||
Return _Urgent
|
||||
End Get
|
||||
Set(ByVal value As Boolean)
|
||||
SetPropertyValue("Urgent", _Urgent, value)
|
||||
End Set
|
||||
End Property
|
||||
Property DateExecution As Date
|
||||
Get
|
||||
Return _DateExecution
|
||||
End Get
|
||||
Set(ByVal value As Date)
|
||||
SetPropertyValue("DateExecution", _DateExecution, value)
|
||||
End Set
|
||||
End Property
|
||||
<RuleRequiredField("BankParameterDEV-BankInformation", DefaultContexts.Save)>
|
||||
<ImmediatePostData(True), DataSourceCriteria("LiquidAssests.CustomerFrom='@This.CustomersFrom'")>
|
||||
Property BankInformation As BankInformation
|
||||
Get
|
||||
Return _BankInformation
|
||||
End Get
|
||||
Set(ByVal value As BankInformation)
|
||||
SetPropertyValue("BankInformation", _BankInformation, value)
|
||||
End Set
|
||||
End Property
|
||||
<Size(255)> _
|
||||
Property FolderName As String
|
||||
Get
|
||||
Return _FolderName
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
SetPropertyValue("FolderName", _FolderName, value)
|
||||
End Set
|
||||
End Property
|
||||
Property TransferCount As Long
|
||||
Get
|
||||
Return _TransferCount
|
||||
End Get
|
||||
Set(ByVal value As Long)
|
||||
SetPropertyValue("TransferCount", _TransferCount, value)
|
||||
End Set
|
||||
End Property
|
||||
Property TransferTotalHUF As Double
|
||||
Get
|
||||
Return _TransferTotalHUF
|
||||
End Get
|
||||
Set(ByVal value As Double)
|
||||
SetPropertyValue("TransferTotalHUF", _TransferTotalHUF, value)
|
||||
End Set
|
||||
End Property
|
||||
Property TransferTotalDEV As Double
|
||||
Get
|
||||
Return _TransferTotalDEV
|
||||
End Get
|
||||
Set(ByVal value As Double)
|
||||
SetPropertyValue("TransferTotalDEV", _TransferTotalDEV, value)
|
||||
End Set
|
||||
End Property
|
||||
Property CustomFileName As String
|
||||
Get
|
||||
Return _CustomFileName
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("CustomFileName", _CustomFileName, value)
|
||||
End Set
|
||||
End Property
|
||||
Public ReadOnly Property PCIGroup As XPCollection(Of PCIGroup)
|
||||
Get
|
||||
Return New XPCollection(Of PCIGroup)(Session, CriteriaOperator.Parse("PartnerType=1 and BallanceHUF<0"))
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
+262
@@ -0,0 +1,262 @@
|
||||
Partial Class GLBankVC
|
||||
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Public Sub New(ByVal Container As System.ComponentModel.IContainer)
|
||||
MyClass.New()
|
||||
|
||||
'Required for Windows.Forms Class Composition Designer support
|
||||
Container.Add(Me)
|
||||
|
||||
End Sub
|
||||
|
||||
'Component overrides dispose to clean up the component list.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
MyBase.Dispose(disposing)
|
||||
End Sub
|
||||
|
||||
'Required by the Component Designer
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'NOTE: The following procedure is required by the Component Designer
|
||||
'It can be modified using the Component Designer.
|
||||
'Do not modify it using the code editor.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Me.aRecalculateBallance = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aFinalAndNew_GLBank = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aImportSavedBank = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
|
||||
Me.aFinal_GLBank = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aToTable_GLBank = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aGenerateGLBankRateDiff = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aGLBankDivideRows = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
|
||||
Me.aToTableD_GLBank = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aBackToRowEdit_GLBank = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aMakeEditable_GLBank = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aImportPCIGroupBank = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
|
||||
Me.aPCICheckBankTransfer = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aGetCurrencyRateBank = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
'
|
||||
'aRecalculateBallance
|
||||
'
|
||||
Me.aRecalculateBallance.Caption = "Recalculate ballance"
|
||||
Me.aRecalculateBallance.ConfirmationMessage = Nothing
|
||||
Me.aRecalculateBallance.Id = "aRecalculateBallance"
|
||||
Me.aRecalculateBallance.ImageName = Nothing
|
||||
Me.aRecalculateBallance.Shortcut = Nothing
|
||||
Me.aRecalculateBallance.Tag = Nothing
|
||||
Me.aRecalculateBallance.TargetObjectsCriteria = Nothing
|
||||
Me.aRecalculateBallance.TargetObjectType = GetType(Nuvolar.[Module].GLBank)
|
||||
Me.aRecalculateBallance.TargetViewId = Nothing
|
||||
Me.aRecalculateBallance.ToolTip = Nothing
|
||||
Me.aRecalculateBallance.TypeOfView = Nothing
|
||||
'
|
||||
'aFinalAndNew_GLBank
|
||||
'
|
||||
Me.aFinalAndNew_GLBank.Caption = "aFinalAndNew_GLBank"
|
||||
Me.aFinalAndNew_GLBank.Category = "ObjectsCreation"
|
||||
Me.aFinalAndNew_GLBank.ConfirmationMessage = Nothing
|
||||
Me.aFinalAndNew_GLBank.Id = "aFinalAndNew_GLBank"
|
||||
Me.aFinalAndNew_GLBank.ImageName = "MenuBar_SaveAndNew"
|
||||
Me.aFinalAndNew_GLBank.Shortcut = Nothing
|
||||
Me.aFinalAndNew_GLBank.Tag = Nothing
|
||||
Me.aFinalAndNew_GLBank.TargetObjectsCriteria = Nothing
|
||||
Me.aFinalAndNew_GLBank.TargetObjectType = GetType(Nuvolar.[Module].GLBank)
|
||||
Me.aFinalAndNew_GLBank.TargetViewId = Nothing
|
||||
Me.aFinalAndNew_GLBank.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
|
||||
Me.aFinalAndNew_GLBank.ToolTip = Nothing
|
||||
Me.aFinalAndNew_GLBank.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
|
||||
'
|
||||
'aImportSavedBank
|
||||
'
|
||||
Me.aImportSavedBank.AcceptButtonCaption = Nothing
|
||||
Me.aImportSavedBank.CancelButtonCaption = Nothing
|
||||
Me.aImportSavedBank.Caption = "Get exported "
|
||||
Me.aImportSavedBank.Category = "aImportSavedBank"
|
||||
Me.aImportSavedBank.ConfirmationMessage = Nothing
|
||||
Me.aImportSavedBank.Id = "aImportSavedBank"
|
||||
Me.aImportSavedBank.ImageName = Nothing
|
||||
Me.aImportSavedBank.Shortcut = Nothing
|
||||
Me.aImportSavedBank.Tag = Nothing
|
||||
Me.aImportSavedBank.TargetObjectsCriteria = Nothing
|
||||
Me.aImportSavedBank.TargetViewId = "GLBank_DetailView"
|
||||
Me.aImportSavedBank.ToolTip = Nothing
|
||||
Me.aImportSavedBank.TypeOfView = Nothing
|
||||
'
|
||||
'aFinal_GLBank
|
||||
'
|
||||
Me.aFinal_GLBank.Caption = "aFinal_GLBank"
|
||||
Me.aFinal_GLBank.Category = "ObjectsCreation"
|
||||
Me.aFinal_GLBank.ConfirmationMessage = Nothing
|
||||
Me.aFinal_GLBank.Id = "aFinal_GLBank"
|
||||
Me.aFinal_GLBank.ImageName = "MenuBar_SaveAndClose"
|
||||
Me.aFinal_GLBank.Shortcut = Nothing
|
||||
Me.aFinal_GLBank.Tag = Nothing
|
||||
Me.aFinal_GLBank.TargetObjectsCriteria = Nothing
|
||||
Me.aFinal_GLBank.TargetObjectType = GetType(Nuvolar.[Module].GLBank)
|
||||
Me.aFinal_GLBank.TargetViewId = Nothing
|
||||
Me.aFinal_GLBank.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
|
||||
Me.aFinal_GLBank.ToolTip = Nothing
|
||||
Me.aFinal_GLBank.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
|
||||
'
|
||||
'aToTable_GLBank
|
||||
'
|
||||
Me.aToTable_GLBank.Caption = "aToTable"
|
||||
Me.aToTable_GLBank.Category = "aToTable_GLBank"
|
||||
Me.aToTable_GLBank.ConfirmationMessage = Nothing
|
||||
Me.aToTable_GLBank.Id = "aToTable_GLBank"
|
||||
Me.aToTable_GLBank.ImageName = Nothing
|
||||
Me.aToTable_GLBank.Shortcut = Nothing
|
||||
Me.aToTable_GLBank.Tag = Nothing
|
||||
Me.aToTable_GLBank.TargetObjectsCriteria = Nothing
|
||||
Me.aToTable_GLBank.TargetObjectType = GetType(Nuvolar.[Module].GLBank)
|
||||
Me.aToTable_GLBank.TargetViewId = ""
|
||||
Me.aToTable_GLBank.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
|
||||
Me.aToTable_GLBank.ToolTip = Nothing
|
||||
Me.aToTable_GLBank.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
|
||||
'
|
||||
'aGenerateGLBankRateDiff
|
||||
'
|
||||
Me.aGenerateGLBankRateDiff.Caption = "Generate rate diff"
|
||||
Me.aGenerateGLBankRateDiff.Category = "ObjectsCreation"
|
||||
Me.aGenerateGLBankRateDiff.ConfirmationMessage = "Do you want to execute command ?"
|
||||
Me.aGenerateGLBankRateDiff.Id = "aGenerateGLBankRateDiff"
|
||||
Me.aGenerateGLBankRateDiff.ImageName = "money"
|
||||
Me.aGenerateGLBankRateDiff.Shortcut = Nothing
|
||||
Me.aGenerateGLBankRateDiff.Tag = Nothing
|
||||
Me.aGenerateGLBankRateDiff.TargetObjectsCriteria = Nothing
|
||||
Me.aGenerateGLBankRateDiff.TargetViewId = "GLBank_ListView"
|
||||
Me.aGenerateGLBankRateDiff.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
|
||||
Me.aGenerateGLBankRateDiff.ToolTip = Nothing
|
||||
Me.aGenerateGLBankRateDiff.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
|
||||
'
|
||||
'aGLBankDivideRows
|
||||
'
|
||||
Me.aGLBankDivideRows.AcceptButtonCaption = Nothing
|
||||
Me.aGLBankDivideRows.CancelButtonCaption = Nothing
|
||||
Me.aGLBankDivideRows.Caption = "Divide rows"
|
||||
Me.aGLBankDivideRows.ConfirmationMessage = Nothing
|
||||
Me.aGLBankDivideRows.Id = "aGLBankDivideRows"
|
||||
Me.aGLBankDivideRows.ImageName = "row_add_after"
|
||||
Me.aGLBankDivideRows.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
|
||||
Me.aGLBankDivideRows.Shortcut = Nothing
|
||||
Me.aGLBankDivideRows.Tag = Nothing
|
||||
Me.aGLBankDivideRows.TargetObjectsCriteria = Nothing
|
||||
Me.aGLBankDivideRows.TargetViewId = "GLHeader_GLRows_ListView_Bank"
|
||||
Me.aGLBankDivideRows.ToolTip = Nothing
|
||||
Me.aGLBankDivideRows.TypeOfView = Nothing
|
||||
'
|
||||
'aToTableD_GLBank
|
||||
'
|
||||
Me.aToTableD_GLBank.Caption = "Delete row"
|
||||
Me.aToTableD_GLBank.Category = "aToTableD_GLBank"
|
||||
Me.aToTableD_GLBank.ConfirmationMessage = Nothing
|
||||
Me.aToTableD_GLBank.Id = "aToTableD_GLBank"
|
||||
Me.aToTableD_GLBank.ImageName = Nothing
|
||||
Me.aToTableD_GLBank.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
|
||||
Me.aToTableD_GLBank.Shortcut = Nothing
|
||||
Me.aToTableD_GLBank.Tag = Nothing
|
||||
Me.aToTableD_GLBank.TargetObjectsCriteria = Nothing
|
||||
Me.aToTableD_GLBank.TargetViewId = "GLBank_DetailView"
|
||||
Me.aToTableD_GLBank.ToolTip = Nothing
|
||||
Me.aToTableD_GLBank.TypeOfView = Nothing
|
||||
'
|
||||
'aBackToRowEdit_GLBank
|
||||
'
|
||||
Me.aBackToRowEdit_GLBank.Caption = "Edit row"
|
||||
Me.aBackToRowEdit_GLBank.Category = "aBackToRowEdit_GLBank"
|
||||
Me.aBackToRowEdit_GLBank.ConfirmationMessage = Nothing
|
||||
Me.aBackToRowEdit_GLBank.Id = "aBackToRowEdit_GLBank"
|
||||
Me.aBackToRowEdit_GLBank.ImageName = Nothing
|
||||
Me.aBackToRowEdit_GLBank.Shortcut = Nothing
|
||||
Me.aBackToRowEdit_GLBank.Tag = Nothing
|
||||
Me.aBackToRowEdit_GLBank.TargetObjectsCriteria = Nothing
|
||||
Me.aBackToRowEdit_GLBank.TargetViewId = "GLBank_DetailView"
|
||||
Me.aBackToRowEdit_GLBank.ToolTip = Nothing
|
||||
Me.aBackToRowEdit_GLBank.TypeOfView = Nothing
|
||||
'
|
||||
'aMakeEditable_GLBank
|
||||
'
|
||||
Me.aMakeEditable_GLBank.Caption = "aMakeEditable_GLBank"
|
||||
Me.aMakeEditable_GLBank.Category = "ObjectsCreation"
|
||||
Me.aMakeEditable_GLBank.ConfirmationMessage = Nothing
|
||||
Me.aMakeEditable_GLBank.Id = "aMakeEditable_GLBank"
|
||||
Me.aMakeEditable_GLBank.ImageName = "Images.replace2.png"
|
||||
Me.aMakeEditable_GLBank.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
|
||||
Me.aMakeEditable_GLBank.Shortcut = Nothing
|
||||
Me.aMakeEditable_GLBank.Tag = Nothing
|
||||
Me.aMakeEditable_GLBank.TargetObjectsCriteria = Nothing
|
||||
Me.aMakeEditable_GLBank.TargetViewId = Nothing
|
||||
Me.aMakeEditable_GLBank.TargetViewType = DevExpress.ExpressApp.ViewType.ListView
|
||||
Me.aMakeEditable_GLBank.ToolTip = Nothing
|
||||
Me.aMakeEditable_GLBank.TypeOfView = GetType(DevExpress.ExpressApp.ListView)
|
||||
'
|
||||
'aImportPCIGroupBank
|
||||
'
|
||||
Me.aImportPCIGroupBank.AcceptButtonCaption = Nothing
|
||||
Me.aImportPCIGroupBank.CancelButtonCaption = Nothing
|
||||
Me.aImportPCIGroupBank.Caption = "Get exported "
|
||||
Me.aImportPCIGroupBank.Category = "aImportPCIGroupBank"
|
||||
Me.aImportPCIGroupBank.ConfirmationMessage = Nothing
|
||||
Me.aImportPCIGroupBank.Id = "aImportPCIGroupBank"
|
||||
Me.aImportPCIGroupBank.ImageName = Nothing
|
||||
Me.aImportPCIGroupBank.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireMultipleObjects
|
||||
Me.aImportPCIGroupBank.Shortcut = Nothing
|
||||
Me.aImportPCIGroupBank.Tag = Nothing
|
||||
Me.aImportPCIGroupBank.TargetObjectsCriteria = Nothing
|
||||
Me.aImportPCIGroupBank.TargetViewId = "GLBank_DetailView"
|
||||
Me.aImportPCIGroupBank.ToolTip = Nothing
|
||||
Me.aImportPCIGroupBank.TypeOfView = Nothing
|
||||
'
|
||||
'aPCICheckBankTransfer
|
||||
'
|
||||
Me.aPCICheckBankTransfer.Caption = "aPCICheck Bank Transfer"
|
||||
Me.aPCICheckBankTransfer.Category = "RecordEdit"
|
||||
Me.aPCICheckBankTransfer.ConfirmationMessage = Nothing
|
||||
Me.aPCICheckBankTransfer.Id = "aPCICheckBankTransfer"
|
||||
Me.aPCICheckBankTransfer.ImageName = Nothing
|
||||
Me.aPCICheckBankTransfer.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireMultipleObjects
|
||||
Me.aPCICheckBankTransfer.Shortcut = Nothing
|
||||
Me.aPCICheckBankTransfer.Tag = Nothing
|
||||
Me.aPCICheckBankTransfer.TargetObjectsCriteria = Nothing
|
||||
Me.aPCICheckBankTransfer.TargetObjectType = GetType(Nuvolar.[Module].RegistryBankTransferView)
|
||||
Me.aPCICheckBankTransfer.TargetViewId = Nothing
|
||||
Me.aPCICheckBankTransfer.ToolTip = Nothing
|
||||
Me.aPCICheckBankTransfer.TypeOfView = Nothing
|
||||
'
|
||||
'aGetCurrencyRateBank
|
||||
'
|
||||
Me.aGetCurrencyRateBank.Caption = "aGet Currency Rate Bank"
|
||||
Me.aGetCurrencyRateBank.Category = "aGetCurrencyRateBank"
|
||||
Me.aGetCurrencyRateBank.ConfirmationMessage = Nothing
|
||||
Me.aGetCurrencyRateBank.Id = "aGetCurrencyRateBank"
|
||||
Me.aGetCurrencyRateBank.ImageName = Nothing
|
||||
Me.aGetCurrencyRateBank.Shortcut = Nothing
|
||||
Me.aGetCurrencyRateBank.Tag = Nothing
|
||||
Me.aGetCurrencyRateBank.TargetObjectsCriteria = Nothing
|
||||
Me.aGetCurrencyRateBank.TargetObjectType = GetType(Nuvolar.[Module].GLBank)
|
||||
Me.aGetCurrencyRateBank.TargetViewId = Nothing
|
||||
Me.aGetCurrencyRateBank.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
|
||||
Me.aGetCurrencyRateBank.ToolTip = Nothing
|
||||
Me.aGetCurrencyRateBank.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
|
||||
|
||||
End Sub
|
||||
Friend WithEvents aRecalculateBallance As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aFinalAndNew_GLBank As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aImportSavedBank As DevExpress.ExpressApp.Actions.PopupWindowShowAction
|
||||
Friend WithEvents aFinal_GLBank As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aToTable_GLBank As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aGenerateGLBankRateDiff As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aGLBankDivideRows As DevExpress.ExpressApp.Actions.PopupWindowShowAction
|
||||
Friend WithEvents aToTableD_GLBank As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aBackToRowEdit_GLBank As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aMakeEditable_GLBank As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aImportPCIGroupBank As DevExpress.ExpressApp.Actions.PopupWindowShowAction
|
||||
Friend WithEvents aPCICheckBankTransfer As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aGetCurrencyRateBank As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
|
||||
End Class
|
||||
+162
@@ -0,0 +1,162 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="aRecalculateBallance.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="aFinalAndNew_GLBank.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>181, 17</value>
|
||||
</metadata>
|
||||
<metadata name="aImportSavedBank.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>357, 17</value>
|
||||
</metadata>
|
||||
<metadata name="aFinal_GLBank.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>690, 17</value>
|
||||
</metadata>
|
||||
<metadata name="aToTable_GLBank.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>992, 17</value>
|
||||
</metadata>
|
||||
<metadata name="aGenerateGLBankRateDiff.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>1139, 17</value>
|
||||
</metadata>
|
||||
<metadata name="aGLBankDivideRows.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 56</value>
|
||||
</metadata>
|
||||
<metadata name="aToTableD_GLBank.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>179, 56</value>
|
||||
</metadata>
|
||||
<metadata name="aBackToRowEdit_GLBank.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>335, 56</value>
|
||||
</metadata>
|
||||
<metadata name="aMakeEditable_GLBank.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>522, 56</value>
|
||||
</metadata>
|
||||
<metadata name="aImportPCIGroupBank.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>819, 17</value>
|
||||
</metadata>
|
||||
<metadata name="aPCICheckBankTransfer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>511, 17</value>
|
||||
</metadata>
|
||||
<metadata name="aGetCurrencyRateBank.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>699, 56</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
</root>
|
||||
+911
@@ -0,0 +1,911 @@
|
||||
Imports System
|
||||
Imports System.ComponentModel
|
||||
Imports System.Collections.Generic
|
||||
Imports System.Diagnostics
|
||||
Imports System.Text
|
||||
|
||||
Imports DevExpress.ExpressApp
|
||||
Imports DevExpress.ExpressApp.Actions
|
||||
Imports DevExpress.Persistent.Base
|
||||
Imports DevExpress.Data.Filtering
|
||||
Imports DevExpress.Xpo
|
||||
Imports DevExpress.ExpressApp.SystemModule
|
||||
Imports System.IO
|
||||
Imports DevExpress.ExpressApp.Editors
|
||||
Imports DevExpress.Persistent.Validation
|
||||
Imports DevExpress.ExpressApp.Model
|
||||
|
||||
Public Class GLBankVC
|
||||
Inherits DevExpress.ExpressApp.ViewController
|
||||
Protected selection As ArrayList
|
||||
Public Event InitWork(ByVal _Minimum As Long, ByVal _Step As Long, ByVal _Maximum As Long)
|
||||
Public Event DoWork()
|
||||
Public Event FinalWork
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
selection = New ArrayList()
|
||||
'This call is required by the Component Designer.
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
End Sub
|
||||
Protected Overrides Sub OnActivated()
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
MyBase.OnActivated()
|
||||
Frame.GetController(Of GLBankVC).aMakeEditable_GLBank.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of GLBankVC).aRecalculateBallance.Active.SetItemValue("", False)
|
||||
|
||||
If View.Id Like "GLHeader_GLRows_ListView_Bank" Then
|
||||
Frame.GetController(Of LinkUnlinkController)().Active.SetItemValue("", False)
|
||||
Frame.GetController(Of NewObjectViewController)().Active.SetItemValue("", False)
|
||||
Frame.GetController(Of DeleteObjectsViewController)().Active.SetItemValue("", False)
|
||||
Frame.GetController(Of CloneObject.CloneObjectViewController)().Active.SetItemValue("", False)
|
||||
Frame.GetController(Of ListViewProcessCurrentObjectController).Active.SetItemValue("", False)
|
||||
|
||||
Dim nv As ListView = CType(View, ListView)
|
||||
Dim cs As PropertyCollectionSource = CType(nv.CollectionSource, PropertyCollectionSource)
|
||||
AddHandler cs.MasterObjectChanged, AddressOf cs_MasterObjectChanged
|
||||
End If
|
||||
If View.Id = "GLBank_DetailView" Then
|
||||
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of CloneObject.CloneObjectViewController)().Active.SetItemValue("", False)
|
||||
Dim _GLBank As GLBank = TryCast(View.CurrentObject, GLBank)
|
||||
If _GLBank Is Nothing Then
|
||||
Else
|
||||
|
||||
If _GLBank.IsEditable = False Then
|
||||
Frame.GetController(Of ModificationsController).Active.SetItemValue("", False)
|
||||
|
||||
Frame.GetController(Of GLBankVC).aFinal_GLBank.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of GLBankVC).aFinalAndNew_GLBank.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of GLBankVC).aToTable_GLBank.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of GLBankVC).aToTableD_GLBank.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of GLBankVC).aBackToRowEdit_GLBank.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of GLBankVC).aImportSavedBank.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of GLBankVC).aImportPCIGroupBank.Active.SetItemValue("", False)
|
||||
|
||||
Else
|
||||
If _ocur.Session.IsNewObject(_GLBank) = False Then
|
||||
|
||||
_GLBank.BallanceHUF = _GLBank.GetBallanceOpenHUF(_GLBank.LiquidAssets_Main, _GLBank.DateExecution)
|
||||
_GLBank.BallanceDEV = _GLBank.GetBallanceOpenDEV(_GLBank.LiquidAssets_Main, _GLBank.DateExecution)
|
||||
_GLBank.RecalculateTotal()
|
||||
|
||||
End If
|
||||
End If
|
||||
If _GLBank.IsStorno = True Then
|
||||
Frame.GetController(Of ModificationsController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", False)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
If View.Id = "GLBank_ListView" Then
|
||||
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of CloneObject.CloneObjectViewController)().Active.SetItemValue("", False)
|
||||
Frame.GetController(Of GLBankVC).aMakeEditable_GLBank.Active.SetItemValue("", True)
|
||||
Frame.GetController(Of GLBankVC).aRecalculateBallance.Active.SetItemValue("", True)
|
||||
End If
|
||||
If View.Id = "GLBank_ListView_Editable" Then
|
||||
AddHandler Frame.GetController(Of DeleteObjectsViewController).DeleteAction.Executed, AddressOf GLBank_DeleteAction_Executed
|
||||
Frame.GetController(Of CloneObject.CloneObjectViewController)().Active.SetItemValue("", False)
|
||||
End If
|
||||
If View.Id = "PCIGroup_ListView_HUF" Then
|
||||
Frame.GetController(Of LinkUnlinkController)().Active.SetItemValue("", False)
|
||||
Frame.GetController(Of NewObjectViewController)().Active.SetItemValue("", False)
|
||||
Frame.GetController(Of DeleteObjectsViewController)().Active.SetItemValue("", False)
|
||||
End If
|
||||
If View.Id = "GLBankPrepareName_GLBankPrepareNameGroup_ListView" Then
|
||||
Frame.GetController(Of NewObjectViewController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of LinkUnlinkController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", False)
|
||||
AddHandler View.SelectionChanged, AddressOf view_SelectionChanged
|
||||
End If
|
||||
|
||||
'If View.Id = "PCIGroup_ListView_Find" Then
|
||||
' Dim ListView As ListView = TryCast(View, ListView)
|
||||
' ListView.CollectionSource.Criteria.Clear()
|
||||
'End If
|
||||
|
||||
End Sub
|
||||
Protected Overrides Sub OnDeactivated()
|
||||
MyBase.OnDeactivated()
|
||||
If View.Id = "GLBank_ListView" Then
|
||||
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", True)
|
||||
End If
|
||||
If View.Id Like "GLHeader_GLRows_ListView_Bank" Then
|
||||
Frame.GetController(Of LinkUnlinkController)().Active.SetItemValue("", True)
|
||||
Frame.GetController(Of NewObjectViewController)().Active.SetItemValue("", True)
|
||||
Frame.GetController(Of DeleteObjectsViewController)().Active.SetItemValue("", True)
|
||||
Frame.GetController(Of CloneObject.CloneObjectViewController)().Active.SetItemValue("", True)
|
||||
Frame.GetController(Of ListViewProcessCurrentObjectController).Active.SetItemValue("", True)
|
||||
|
||||
Dim nv As ListView = CType(View, ListView)
|
||||
Dim cs As PropertyCollectionSource = CType(nv.CollectionSource, PropertyCollectionSource)
|
||||
RemoveHandler cs.MasterObjectChanged, AddressOf cs_MasterObjectChanged
|
||||
End If
|
||||
If View.Id = "PCIGroup_ListView_HUF" Then
|
||||
Frame.GetController(Of LinkUnlinkController)().Active.SetItemValue("", True)
|
||||
Frame.GetController(Of NewObjectViewController)().Active.SetItemValue("", True)
|
||||
Frame.GetController(Of DeleteObjectsViewController)().Active.SetItemValue("", True)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub view_SelectionChanged(ByVal sender As Object, ByVal e As System.EventArgs)
|
||||
|
||||
If View Is Nothing Then Exit Sub
|
||||
If View.Id = "GLBankPrepareName_GLBankPrepareNameGroup_ListView" Then
|
||||
Dim nv As ListView = CType(View, ListView)
|
||||
Dim cs As PropertyCollectionSource = CType(nv.CollectionSource, PropertyCollectionSource)
|
||||
Dim _GLBankPrepareName As GLBankPrepareName
|
||||
Dim _GLBankPrepareNameGroup As GLBankPrepareNameGroup
|
||||
_GLBankPrepareName = TryCast(cs.MasterObject, GLBankPrepareName)
|
||||
|
||||
If _GLBankPrepareName IsNot Nothing Then
|
||||
If View.SelectedObjects.Count > 0 Then
|
||||
_GLBankPrepareNameGroup = TryCast(View.SelectedObjects(0), GLBankPrepareNameGroup)
|
||||
If _GLBankPrepareNameGroup IsNot Nothing Then
|
||||
_GLBankPrepareName.BankPrepareName = _GLBankPrepareNameGroup.BankPrepareName
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub cs_MasterObjectChanged(ByVal sender As Object, ByVal e As EventArgs)
|
||||
Dim _GLBank As GLBank = TryCast((CType(sender, PropertyCollectionSource)).MasterObject, GLBank)
|
||||
If _GLBank.IsEditable = False Then
|
||||
Frame.GetController(Of GLBankVC).aToTable_GLBank.Active.SetItemValue("", False)
|
||||
End If
|
||||
End Sub
|
||||
Private Sub aMakeEditable_GLBank_Execute(ByVal sender As System.Object, ByVal e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aMakeEditable_GLBank.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _GLBank As GLBank = TryCast(View.SelectedObjects(0), GLBank)
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
|
||||
If _GLBank IsNot Nothing Then
|
||||
|
||||
_GLBank.IsEditable = True
|
||||
_ocur.CommitChanges()
|
||||
|
||||
e.ShowViewParameters.CreatedView = Application.CreateDetailView(_onew, "GLBank_DetailView", True, _onew.GetObject(_GLBank))
|
||||
End If
|
||||
End Sub
|
||||
Private Sub aFinalAndNew_GLBank_Execute(ByVal sender As System.Object, ByVal e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aFinalAndNew_GLBank.Execute
|
||||
GLBank_Final(e)
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _GLBank_Finalized = _onew.GetObject(TryCast(e.SelectedObjects(0), GLBank))
|
||||
Dim _GLBank As GLBank = _onew.CreateObject(Of GLBank)()
|
||||
|
||||
_GLBank.CustomersFrom = _GLBank_Finalized.CustomersFrom
|
||||
_GLBank.LiquidAssets_Main = _GLBank_Finalized.LiquidAssets_Main
|
||||
_GLBank.DateExecution = _GLBank_Finalized.DateExecution
|
||||
|
||||
e.ShowViewParameters.CreatedView = Application.CreateDetailView(_onew, TryCast(View.Model, Model.IModelDetailView).Id, True, _GLBank)
|
||||
e.ShowViewParameters.TargetWindow = TargetWindow.Current
|
||||
|
||||
End Sub
|
||||
Private Sub aToTable_GLBank_Execute(ByVal sender As System.Object, ByVal e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aToTable_GLBank.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
|
||||
Dim _GLBank As GLBank = TryCast(View.SelectedObjects(0), GLBank)
|
||||
Dim _GLHeader As GLHeader = TryCast(_GLBank, GLHeader)
|
||||
Dim _GLRows As GLRows
|
||||
Dim _GUID As Guid = Guid.NewGuid()
|
||||
Dim _CashType As eCashType
|
||||
|
||||
If _GLBank Is Nothing Then Exit Sub
|
||||
|
||||
_GLRows = _ocur.CreateObject(Of GLRows)()
|
||||
|
||||
If _GLBank.row_TransactionType = eTransactionType.ePartnerCredit Or _GLBank.row_TransactionType = eTransactionType.ePartnerDebit Then
|
||||
_CashType = eCashType.ePartner
|
||||
If _GLBank.row_PartnerType = ePartnerType.eReceivables Then
|
||||
If _GLBank.row_TransactionType = eTransactionType.ePartnerCredit Then
|
||||
_GLHeader.row_DebitChartOfAccounts = _GLBank.LiquidAssets_Main.GetChartOfAccounts(_GLBank.DateExecution.Year, 0)
|
||||
_GLHeader.row_CreditChartOfAccounts = _GLBank.row_Customer.CustomersGLParameters.GetChartOfAccounts(_GLBank.DateExecution.Year, eVATMode.eOut)
|
||||
ElseIf _GLBank.row_TransactionType = eTransactionType.ePartnerDebit Then
|
||||
_GLHeader.row_DebitChartOfAccounts = _GLBank.row_Customer.CustomersGLParameters.GetChartOfAccounts(_GLBank.DateExecution.Year, eVATMode.eOut)
|
||||
_GLHeader.row_CreditChartOfAccounts = _GLBank.LiquidAssets_Main.GetChartOfAccounts(_GLBank.DateExecution.Year, 0)
|
||||
End If
|
||||
Else
|
||||
If _GLBank.row_TransactionType = eTransactionType.ePartnerCredit Then
|
||||
_GLHeader.row_DebitChartOfAccounts = _GLBank.LiquidAssets_Main.GetChartOfAccounts(_GLBank.DateExecution.Year, 0)
|
||||
_GLHeader.row_CreditChartOfAccounts = _GLBank.row_Customer.CustomersGLParameters.GetChartOfAccounts(_GLBank.DateExecution.Year, eVATMode.eIn)
|
||||
ElseIf _GLBank.row_TransactionType = eTransactionType.ePartnerDebit Then
|
||||
_GLHeader.row_DebitChartOfAccounts = _GLBank.row_Customer.CustomersGLParameters.GetChartOfAccounts(_GLBank.DateExecution.Year, eVATMode.eIn)
|
||||
_GLHeader.row_CreditChartOfAccounts = _GLBank.LiquidAssets_Main.GetChartOfAccounts(_GLBank.DateExecution.Year, 0)
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
_CashType = eCashType.eNormal
|
||||
If _GLBank.row_TransactionType = eTransactionType.eNormalCredit Or _GLBank.row_TransactionType = eTransactionType.eCorrectionCreditHUF Then
|
||||
_GLHeader.row_DebitChartOfAccounts = _GLBank.LiquidAssets_Main.GetChartOfAccounts(_GLBank.DateExecution.Year, 0)
|
||||
_GLHeader.row_CreditChartOfAccounts = _GLBank.row_ChartOfAccounts
|
||||
Else
|
||||
_GLHeader.row_DebitChartOfAccounts = _GLBank.row_ChartOfAccounts
|
||||
_GLHeader.row_CreditChartOfAccounts = _GLBank.LiquidAssets_Main.GetChartOfAccounts(_GLBank.DateExecution.Year, 0)
|
||||
End If
|
||||
|
||||
End If
|
||||
Select Case _GLBank.row_TransactionType
|
||||
Case eTransactionType.eNormalCredit, eTransactionType.ePartnerCredit, eTransactionType.eCorrectionCreditHUF
|
||||
_GLRows.CreditAmountHUF = _GLHeader.row_AmountHUF
|
||||
_GLRows.CreditAmountDEV = _GLHeader.row_AmountDEV
|
||||
_GLRows.DebitAmountHUF = 0
|
||||
_GLRows.DebitAmountDEV = 0
|
||||
_GLRows.InAmountHUF = _GLHeader.row_AmountHUF
|
||||
_GLRows.InAmountDEV = _GLHeader.row_AmountDEV
|
||||
_GLRows.InAmountDEV2 = _GLBank.row_AmountDEV2
|
||||
_GLRows.CurrencyRate2 = _GLBank.row_CurrencyRate2
|
||||
Case eTransactionType.eNormalDebit, eTransactionType.ePartnerDebit, eTransactionType.eCorrectionDebitHUF
|
||||
_GLRows.DebitAmountHUF = _GLHeader.row_AmountHUF
|
||||
_GLRows.DebitAmountDEV = _GLHeader.row_AmountDEV
|
||||
_GLRows.CreditAmountDEV = 0
|
||||
_GLRows.CreditAmountDEV = 0
|
||||
_GLRows.OutAmountHUF = _GLHeader.row_AmountHUF
|
||||
_GLRows.OutAmountDEV = _GLHeader.row_AmountDEV
|
||||
_GLRows.OutAmountDEV2 = _GLBank.row_AmountDEV2
|
||||
_GLRows.CurrencyRate2 = _GLBank.row_CurrencyRate2
|
||||
End Select
|
||||
_GLRows.PartnerType = _GLBank.row_PartnerType
|
||||
|
||||
_GLRows.AddGLRows(_GLHeader, _GLHeader.row_DebitChartOfAccounts, _GLHeader.row_CreditChartOfAccounts, _
|
||||
_GLHeader.row_AmountDEV, _GLHeader.row_AmountHUF, _GLBank.LiquidAssets_Main, _
|
||||
_GLHeader.row_Customer, _GLHeader.row_DateVAT, _GLHeader.row_VAT, _
|
||||
_GLHeader.row_NoteRows, _GLHeader.row_UniqueObjects, _GLHeader.row_Controlling, _
|
||||
_GLHeader.row_JobNumberObjects, _GLHeader.row_CostPlace, _GLHeader.row_CostHolder, _
|
||||
_GLHeader.row_ConnectInfo, eGLRowsTypeVAT.eNettoRow, _GUID, _
|
||||
_GLBank.row_TransactionType, _CashType, _GLBank.row_PartnerType)
|
||||
_GLBank.RecalculateTotal()
|
||||
_GLBank.GetBallanceDEV(_GLBank.LiquidAssets_Main, _GLBank.DateExecution)
|
||||
_GLBank.GetBallanceHUF(_GLBank.LiquidAssets_Main, _GLBank.DateExecution)
|
||||
|
||||
_ocur.CommitChanges()
|
||||
|
||||
'--- Pontozás ellenőrzése !!!! ----------------------------------------------------------------------------------------------------------------
|
||||
Select Case _GLBank.row_TransactionType
|
||||
Case eTransactionType.ePartnerCredit, eTransactionType.ePartnerDebit
|
||||
Dim _uow_pci As New UnitOfWork(_ocur.Session.DataLayer)
|
||||
GLFunctions.ReconfigurePCI(_uow_pci, _GLBank.CustomersFrom, _GLRows.Customer, _GLRows.PartnerType, _GLRows.ConnectInfo)
|
||||
End Select
|
||||
|
||||
'----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
_GLBank.row_NoteRows = ""
|
||||
_GLBank.row_AmountDEV = 0
|
||||
_GLBank.row_AmountHUF = 0
|
||||
_GLBank.row_PCIGroup = Nothing
|
||||
_GLBank.row_Customer = Nothing
|
||||
_GLBank.row_ConnectInfo = ""
|
||||
_GLBank.row_ChartOfAccounts = Nothing
|
||||
_GLBank.row_AmountDEV2 = 0
|
||||
_GLBank.row_CurrencyRate2 = 0
|
||||
|
||||
'// Fókusz beállítása !!!!!!!!!!!!!!!!!!!!!!----------------------------------------------------------------
|
||||
|
||||
Dim _Action As IModelAction
|
||||
Dim _IModelActionExtender As IModelActionExtender
|
||||
For Each _Action In Application.Model.ActionDesign.Actions
|
||||
If _Action.Id = e.Action.Id Then
|
||||
_IModelActionExtender = TryCast(_Action, IModelActionExtender)
|
||||
If _IModelActionExtender IsNot Nothing Then
|
||||
If String.IsNullOrEmpty(_IModelActionExtender.FocusItem) = False Then
|
||||
Dim ItemToFocus As ViewItem = TryCast(View, DetailView).FindItem(_IModelActionExtender.FocusItem)
|
||||
If ItemToFocus IsNot Nothing Then
|
||||
Dim ItemControl As Object
|
||||
ItemControl = ItemToFocus.Control
|
||||
ItemControl.Focus()
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
'--------------------------------------------------------------------------------------------------------
|
||||
|
||||
View.Refresh()
|
||||
|
||||
End Sub
|
||||
Private Sub aFinal_Execute(ByVal sender As System.Object, ByVal e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aFinal_GLBank.Execute
|
||||
GLBank_Final(e)
|
||||
View.Close(False)
|
||||
End Sub
|
||||
|
||||
#Region "SIS"
|
||||
Public Sub GLBank_Final(ByVal e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs)
|
||||
If View.SelectedObjects.Count > 0 Then
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _GLBank As GLBank = TryCast(e.SelectedObjects(0), GLBank)
|
||||
Dim _GLRows As GLRows
|
||||
For Each _GLBank In e.SelectedObjects
|
||||
If _GLBank.GLRows.Count <= 0 Then
|
||||
Throw New Exception("*Nincs rögzített sor !")
|
||||
End If
|
||||
For Each _GLRows In _GLBank.GLRows
|
||||
_GLRows.LiquidAssets = _GLBank.LiquidAssets_Main
|
||||
Next
|
||||
|
||||
_GLBank.GetBallanceHUF(_GLBank.LiquidAssets_Main, _GLBank.DateExecution)
|
||||
_GLBank.GetBallanceDEV(_GLBank.LiquidAssets_Main, _GLBank.DateExecution)
|
||||
_GLBank.IsEditable = False
|
||||
|
||||
_ocur.CommitChanges()
|
||||
|
||||
'// Az összes sorra vonatkozó pontozás újragenerálása, mert változhat a dátum !
|
||||
For Each _GLRows In _GLBank.GLRows
|
||||
Dim _uow As New UnitOfWork(_ocur.Session.DataLayer)
|
||||
GLFunctions.ReconfigurePCI(_uow, _GLRows.GLHeader.CustomersFrom, _GLRows.Customer, _GLRows.PartnerType, _GLRows.ConnectInfo)
|
||||
Next
|
||||
Next
|
||||
|
||||
If _GLBank.CurrencyName.ShortName <> "HUF" Then
|
||||
Dim _uow As New UnitOfWork(_ocur.Session.DataLayer)
|
||||
GenerateCurrencyRateAverageStart(_uow, _GLBank.DateExecution.Year, _GLBank)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub GenerateCurrencyRateAverageStart(_uow As UnitOfWork, _Year As Long, _GLBank As GLBank)
|
||||
|
||||
|
||||
Dim _GLRows_Collection As New XPCollection(Of GLRows) _
|
||||
(PersistentCriteriaEvaluationBehavior.InTransaction, _uow, _
|
||||
CriteriaOperator.Parse("LiquidAssets.Oid=? and GLHeader.IsEditable=False and GetDate(GLHeader.DateExecution)>=?", _
|
||||
_GLBank.LiquidAssets_Main.Oid, New Date(_Year, 1, 1)))
|
||||
|
||||
Dim _GLRows As GLRows
|
||||
Dim _SumAmountDEV As Double = 0
|
||||
Dim _SumAmountHUF As Double = 0
|
||||
Dim _LiquidAssetsRate As LiquidAssetsRate = _uow.FindObject(Of LiquidAssetsRate)(CriteriaOperator.Parse("LiquidAssets.oid=? and GetYear(DateExecution)=?", _
|
||||
_GLBank.LiquidAssets_Main.Oid, _
|
||||
_Year))
|
||||
If _LiquidAssetsRate IsNot Nothing Then
|
||||
_SumAmountDEV = _LiquidAssetsRate.AmountDEV
|
||||
_SumAmountHUF = _LiquidAssetsRate.AmountHUF
|
||||
Else
|
||||
'// HA NINCS BEÁLLÍTVA AKKOR NEM FUT LE !"
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
_GLRows_Collection.Sorting.Add(New SortProperty("GetDate(GLHeader.DateExecution)", DB.SortingDirection.Ascending))
|
||||
_GLRows_Collection.Sorting.Add(New SortProperty("InAmountDEV", DB.SortingDirection.Descending))
|
||||
|
||||
RaiseEvent InitWork(1, 1, _GLRows_Collection.Count)
|
||||
For Each _GLRows In _GLRows_Collection
|
||||
'// A deviza a fix és az MNB árfolyammal újra kell számolni mindent
|
||||
RaiseEvent DoWork()
|
||||
If _GLRows.InAmountDEV > 0 Then
|
||||
Dim _CurrencyRate_MNB_Collection = New XPCollection(Of CurrencyRate) _
|
||||
(_uow, CriteriaOperator.Parse("CurrencyName.ShortName=? and IsMNB=True and GetDate(DateValid)<=?", _
|
||||
_GLBank.LiquidAssets_Main.CurrencyName.ShortName, _GLRows.GLHeader.DateExecution.Date))
|
||||
_CurrencyRate_MNB_Collection.Sorting.Add(New SortProperty("DateValid", DB.SortingDirection.Descending))
|
||||
If _CurrencyRate_MNB_Collection.Count > 0 Then
|
||||
For Each _CurrencyRate_MNB In _CurrencyRate_MNB_Collection
|
||||
If _CurrencyRate_MNB.DateValid.Date = _GLRows.GLHeader.DateExecution.Date Then
|
||||
_GLRows.InAmountHUF = Math.Round(_CurrencyRate_MNB.RateAverage * _GLRows.InAmountDEV, 2, MidpointRounding.AwayFromZero)
|
||||
_GLRows.AmountHUF = _GLRows.InAmountHUF
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
RaiseEvent FinalWork
|
||||
_uow.CommitChanges()
|
||||
|
||||
_GLRows_Collection = New XPCollection(Of GLRows) _
|
||||
(PersistentCriteriaEvaluationBehavior.InTransaction, _uow, _
|
||||
CriteriaOperator.Parse("LiquidAssets.Oid=? and GLHeader.IsEditable=False and GetDate(GLHeader.DateExecution)>=?", _
|
||||
_GLBank.LiquidAssets_Main.Oid, New Date(_Year, 1, 1)))
|
||||
|
||||
_GLRows_Collection.Sorting.Add(New SortProperty("GetDate(GLHeader.DateExecution)", DB.SortingDirection.Ascending))
|
||||
_GLRows_Collection.Sorting.Add(New SortProperty("InAmountDEV", DB.SortingDirection.Descending))
|
||||
_GLRows_Collection.Sorting.Add(New SortProperty("OutAmountDEV", DB.SortingDirection.Ascending))
|
||||
|
||||
RaiseEvent InitWork(1, 1, _GLRows_Collection.Count)
|
||||
For Each _GLRows In _GLRows_Collection
|
||||
RaiseEvent DoWork()
|
||||
|
||||
'// Árfolyamok helyrerakása
|
||||
If _GLRows.OutAmountDEV > 0 Then
|
||||
If _SumAmountDEV <> 0 Then
|
||||
_GLRows.OutAmountHUF = Math.Round(_GLRows.OutAmountDEV * (_SumAmountHUF / _SumAmountDEV), 2, MidpointRounding.AwayFromZero)
|
||||
_GLRows.AmountHUF = _GLRows.OutAmountHUF
|
||||
_GLRows.Save()
|
||||
_uow.CommitChanges()
|
||||
|
||||
If _GLRows.PartnerType <> ePartnerType.eNotSet Then
|
||||
GLFunctions.ReconfigurePCI(_uow, _GLRows.GLHeader.CustomersFrom, _GLRows.Customer, _GLRows.PartnerType, _GLRows.ConnectInfo)
|
||||
_uow.CommitChanges()
|
||||
End If
|
||||
Else
|
||||
Dim _CurrencyRate_MNB_Collection = New XPCollection(Of CurrencyRate) _
|
||||
(_uow, CriteriaOperator.Parse("CurrencyName.ShortName=? and IsMNB=True and GetDate(DateValid)<=?", _
|
||||
_GLBank.LiquidAssets_Main.CurrencyName.ShortName, _GLRows.GLHeader.DateExecution.Date))
|
||||
_CurrencyRate_MNB_Collection.Sorting.Add(New SortProperty("DateValid", DB.SortingDirection.Descending))
|
||||
If _CurrencyRate_MNB_Collection.Count > 0 Then
|
||||
For Each _CurrencyRate_MNB In _CurrencyRate_MNB_Collection
|
||||
If _CurrencyRate_MNB.DateValid.Date = _GLRows.GLHeader.DateExecution.Date Then
|
||||
_GLRows.OutAmountHUF = Math.Round(_CurrencyRate_MNB.RateAverage * _GLRows.OutAmountDEV, 2, MidpointRounding.AwayFromZero)
|
||||
_GLRows.AmountHUF = _GLRows.OutAmountHUF
|
||||
_GLRows.Save()
|
||||
_uow.CommitChanges()
|
||||
If _GLRows.PartnerType <> ePartnerType.eNotSet Then
|
||||
GLFunctions.ReconfigurePCI(_uow, _GLRows.GLHeader.CustomersFrom, _GLRows.Customer, _GLRows.PartnerType, _GLRows.ConnectInfo)
|
||||
_uow.CommitChanges()
|
||||
End If
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
|
||||
_SumAmountDEV -= Math.Round(_GLRows.OutAmountDEV, 2, MidpointRounding.AwayFromZero)
|
||||
_SumAmountHUF -= Math.Round(_GLRows.OutAmountHUF, 2, MidpointRounding.AwayFromZero)
|
||||
|
||||
If _SumAmountDEV < 0 Then _SumAmountDEV = 0
|
||||
If _SumAmountHUF < 0 Then _SumAmountHUF = 0
|
||||
Else
|
||||
_SumAmountDEV += Math.Round(_GLRows.InAmountDEV, 2, MidpointRounding.AwayFromZero)
|
||||
_SumAmountHUF += Math.Round(_GLRows.InAmountHUF, 2, MidpointRounding.AwayFromZero)
|
||||
End If
|
||||
Next
|
||||
_uow.CommitChanges()
|
||||
|
||||
RaiseEvent FinalWork
|
||||
End Sub
|
||||
#End Region
|
||||
Private Sub aToTableD_GLBank_Execute(ByVal sender As System.Object, ByVal e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aToTableD_GLBank.Execute
|
||||
'Törli a táblázatban lévő sort
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _GUID As Guid
|
||||
Dim _GLBank As GLBank = TryCast(View.SelectedObjects(0), GLBank)
|
||||
Dim _GLRows_ListEditor As ListPropertyEditor
|
||||
Dim _GLRows As GLRows
|
||||
Dim i As Long
|
||||
|
||||
Dim _CustomersFrom As CustomersFrom
|
||||
Dim _Customers As Customers
|
||||
Dim _PartnerType As ePartnerType
|
||||
Dim _ConnectInfo As String
|
||||
|
||||
|
||||
_GLRows_ListEditor = TryCast(View, DetailView).FindItem("GLRows")
|
||||
|
||||
_GLRows = TryCast(_GLRows_ListEditor.ListView.CurrentObject, GLRows)
|
||||
|
||||
If _GLRows.GLRowsRateDiff IsNot Nothing Then
|
||||
Throw New Exception("*Nem lehet a sort törölni mert van árfolyam elszámolás !")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If _GLRows IsNot Nothing Then
|
||||
_GUID = _GLRows.GLRowsGUID
|
||||
selection.Clear()
|
||||
For Each _GLRows In _GLBank.GLRows
|
||||
If _GLRows.GLRowsGUID = _GUID Then
|
||||
selection.Add(_GLRows)
|
||||
End If
|
||||
Next
|
||||
For i = 0 To selection.Count - 1
|
||||
_GLRows = TryCast(selection(i), GLRows)
|
||||
If _GLRows.PartnerType = ePartnerType.ePayabels Or _GLRows.PartnerType = ePartnerType.eReceivables Then
|
||||
_CustomersFrom = _GLBank.CustomersFrom
|
||||
_Customers = _GLRows.Customer
|
||||
_ConnectInfo = _GLRows.ConnectInfo
|
||||
_PartnerType = _GLRows.PartnerType
|
||||
End If
|
||||
_GLRows.Delete()
|
||||
_ocur.CommitChanges()
|
||||
|
||||
Dim _uow_pci As New UnitOfWork(_ocur.Session.DataLayer)
|
||||
GLFunctions.ReconfigurePCI(_uow_pci, _CustomersFrom, _Customers, _PartnerType, _ConnectInfo)
|
||||
|
||||
Next
|
||||
_GLBank.RecalculateTotal()
|
||||
_ocur.CommitChanges()
|
||||
|
||||
View.Refresh()
|
||||
End If
|
||||
End Sub
|
||||
Private Sub aBackToRowEdit_GLBank_Execute(ByVal sender As System.Object, ByVal e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aBackToRowEdit_GLBank.Execute
|
||||
'Visszatölti a sort editáláshoz
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _GLBank As GLBank = TryCast(View.SelectedObjects(0), GLBank)
|
||||
Dim _GLRows_ListEditor As ListPropertyEditor
|
||||
Dim _GLRows As GLRows
|
||||
Dim _PCIGroup As PCIGroup
|
||||
|
||||
Dim _CustomersFrom As CustomersFrom
|
||||
Dim _Customers As Customers
|
||||
Dim _PartnerType As ePartnerType
|
||||
Dim _ConnectInfo As String
|
||||
|
||||
_GLRows_ListEditor = TryCast(View, DetailView).FindItem("GLRows")
|
||||
_GLRows = TryCast(_GLRows_ListEditor.ListView.CurrentObject, GLRows)
|
||||
|
||||
If _GLRows IsNot Nothing Then
|
||||
|
||||
If _GLRows.GLRowsRateDiff IsNot Nothing Then
|
||||
Throw New Exception("*Nem lehet a sort törölni mert van árfolyam elszámolás !")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
_GLBank.row_CurrencyName2 = _ocur.FindObject(Of CurrencyName)(CriteriaOperator.Parse("ShortName=?", _GLBank.CurrencyName.ShortName))
|
||||
_PCIGroup = _ocur.FindObject(Of PCIGroup) _
|
||||
(CriteriaOperator.Parse("CustomersFrom=? and Customers=? and PartnerType=? and ConnectInfo=? ", _GLRows.GLHeader.CustomersFrom, _
|
||||
_GLRows.Customer, _GLRows.PartnerType, _GLRows.ConnectInfo), True)
|
||||
If _PCIGroup IsNot Nothing Then
|
||||
_GLBank.row_PCIGroup = _PCIGroup
|
||||
If _PCIGroup.CurrencyName_Account Is Nothing Then
|
||||
_GLBank.row_CurrencyName2 = _ocur.FindObject(Of CurrencyName)(CriteriaOperator.Parse("ShortName=?", _PCIGroup.CurrencyName.ShortName))
|
||||
Else
|
||||
_GLBank.row_CurrencyName2 = _ocur.FindObject(Of CurrencyName)(CriteriaOperator.Parse("ShortName=?", _PCIGroup.CurrencyName_Account.ShortName))
|
||||
End If
|
||||
|
||||
If _GLBank.row_CurrencyName2 Is Nothing Then
|
||||
_GLBank.row_CurrencyName2 = _ocur.FindObject(Of CurrencyName)(CriteriaOperator.Parse("ShortName=?", _GLBank.CurrencyName.ShortName))
|
||||
End If
|
||||
End If
|
||||
|
||||
_GLBank.row_TransactionType = _GLRows.TransactionType
|
||||
_GLBank.row_PartnerType = _GLRows.PartnerType
|
||||
_GLBank.row_Customer = _GLRows.Customer
|
||||
_GLBank.row_ConnectInfo = _GLRows.ConnectInfo
|
||||
|
||||
_GLBank.row_NoteRows = _GLRows.NoteRows
|
||||
_GLBank.row_CurrencyRate = _GLRows.CurrencyRate
|
||||
_GLBank.row_CurrencyRate2 = _GLRows.CurrencyRate2
|
||||
|
||||
If _GLRows.InAmountHUF > 0 Then
|
||||
_GLBank.row_ChartOfAccounts = _GLRows.CreditChartOfAccounts
|
||||
_GLBank.row_AmountDEV2 = _GLRows.InAmountDEV2
|
||||
Else
|
||||
_GLBank.row_ChartOfAccounts = _GLRows.DebitChartOfAccounts
|
||||
_GLBank.row_AmountDEV2 = _GLRows.OutAmountDEV2
|
||||
End If
|
||||
|
||||
selection.Clear()
|
||||
Dim _GLRows_GUID_Collection As New XPCollection(Of GLRows)(PersistentCriteriaEvaluationBehavior.InTransaction, _ocur.Session, CriteriaOperator.Parse("GLRowsGUID=?", _GLRows.GLRowsGUID))
|
||||
Dim _AmountDEV As Double = 0
|
||||
Dim _AmountHUF As Double = 0
|
||||
For Each _GLRows In _GLRows_GUID_Collection
|
||||
_AmountDEV += _GLRows.AmountDEV
|
||||
_AmountHUF += _GLRows.AmountHUF
|
||||
selection.Add(_GLRows)
|
||||
Next
|
||||
_GLBank.row_AmountDEV = _AmountDEV
|
||||
_GLBank.row_AmountHUF = _AmountHUF
|
||||
|
||||
For i = 0 To selection.Count - 1
|
||||
_GLRows = TryCast(selection(i), GLRows)
|
||||
If _GLRows.PartnerType = ePartnerType.ePayabels Or _GLRows.PartnerType = ePartnerType.eReceivables Then
|
||||
_CustomersFrom = _GLBank.CustomersFrom
|
||||
_Customers = _GLRows.Customer
|
||||
_ConnectInfo = _GLRows.ConnectInfo
|
||||
_PartnerType = _GLRows.PartnerType
|
||||
End If
|
||||
_GLRows.Delete()
|
||||
_ocur.CommitChanges()
|
||||
|
||||
Dim _uow_pci As New UnitOfWork(_ocur.Session.DataLayer)
|
||||
GLFunctions.ReconfigurePCI(_uow_pci, _CustomersFrom, _Customers, _PartnerType, _ConnectInfo)
|
||||
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
View.Refresh()
|
||||
End Sub
|
||||
Private Sub aImportSavedBank_CustomizePopupWindowParams(ByVal sender As Object, ByVal e As DevExpress.ExpressApp.Actions.CustomizePopupWindowParamsEventArgs) Handles aImportSavedBank.CustomizePopupWindowParams
|
||||
Dim _GLBank As GLBank = View.SelectedObjects(0)
|
||||
Dim _ocur As Xpo.XPObjectSpace = View.ObjectSpace
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _CS As New CollectionSource(_onew, GetType(RegistryBankTransferView))
|
||||
Dim _RegistryBankTransferviewCollection As XPCollection = _onew.CreateCollection(GetType(RegistryBankTransferView), _
|
||||
CriteriaOperator.Parse("BankSavedFileName !='' and RegistryHeader.CustomersFrom=? and (BallanceHUF <> 0 Or BallanceDEV <> 0)", _onew.GetObject(_GLBank.CustomersFrom)))
|
||||
Dim _KeyCollection As Collection = New Collection()
|
||||
Dim _RegistryBankTransferView As RegistryBankTransferView
|
||||
For Each _RegistryBankTransferView In _RegistryBankTransferviewCollection
|
||||
_KeyCollection.Add(_RegistryBankTransferView.Oid)
|
||||
Next
|
||||
Dim _InOperator As New InOperator("Oid", _KeyCollection)
|
||||
_CS.BeginUpdateCriteria()
|
||||
|
||||
_CS.Criteria.Clear()
|
||||
_CS.Criteria("First") = _InOperator
|
||||
_CS.EndUpdateCriteria()
|
||||
|
||||
e.View = Application.CreateListView("RegistryBankTransfer_ListView_Import", _CS, False)
|
||||
e.View.Refresh()
|
||||
End Sub
|
||||
Private Sub aImportSavedBank_Execute(ByVal sender As System.Object, ByVal e As DevExpress.ExpressApp.Actions.PopupWindowShowActionExecuteEventArgs) Handles aImportSavedBank.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _uow As New UnitOfWork(_ocur.Session.DataLayer)
|
||||
Dim _GLRows As GLRows
|
||||
Dim _GLHeader As GLHeader = TryCast(View.SelectedObjects(0), GLHeader)
|
||||
Dim _GLBank As GLBank = TryCast(View.SelectedObjects(0), GLBank)
|
||||
Dim _RegistryBankTransfer_view_onew As RegistryBankTransferView
|
||||
Dim _RegistryBankTransfer_view As RegistryBankTransferView
|
||||
Dim _RegistryBankTransfer As RegistryBankTransfer
|
||||
Dim _DebitChartOfAccounts As ChartOfAccounts
|
||||
Dim _CreditChartOfAccounts As ChartOfAccounts
|
||||
Dim _GUID As Guid
|
||||
For Each _RegistryBankTransfer_view_onew In e.PopupWindow.View.SelectedObjects
|
||||
_RegistryBankTransfer_view = _ocur.GetObject(_RegistryBankTransfer_view_onew)
|
||||
_RegistryBankTransfer = _ocur.FindObject(Of RegistryBankTransfer)(CriteriaOperator.Parse("Oid=?", _RegistryBankTransfer_view.Oid))
|
||||
_GLRows = _ocur.CreateObject(Of GLRows)()
|
||||
_GUID = Guid.NewGuid
|
||||
_DebitChartOfAccounts = _RegistryBankTransfer.RegistryHeader.Customers.CustomersGLParameters.GetChartOfAccounts(_RegistryBankTransfer.RegistryHeader.F_DateExecution.Year, eVATMode.eIn)
|
||||
_CreditChartOfAccounts = _GLBank.LiquidAssets_Main.GetChartOfAccounts(_RegistryBankTransfer.RegistryHeader.F_DateExecution.Year, 0)
|
||||
_GLRows.DebitAmountHUF = _RegistryBankTransfer.AmountHUF
|
||||
_GLRows.DebitAmountDEV = _RegistryBankTransfer.AmountDEV
|
||||
_GLRows.OutAmountHUF = _RegistryBankTransfer.AmountHUF
|
||||
_GLRows.OutAmountDEV = _RegistryBankTransfer.AmountDEV
|
||||
_GLRows.AddGLRows(_GLHeader, _DebitChartOfAccounts, _CreditChartOfAccounts, _
|
||||
_RegistryBankTransfer.AmountDEV, _RegistryBankTransfer.AmountHUF, _GLHeader.row_LiquidAssets, _
|
||||
_RegistryBankTransfer.RegistryHeader.Customers, _GLHeader.row_DateVAT, _GLHeader.row_VAT, _
|
||||
_GLHeader.row_NoteRows, _GLHeader.row_UniqueObjects, _GLHeader.row_Controlling, _
|
||||
_GLHeader.row_JobNumberObjects, _GLHeader.row_CostPlace, _GLHeader.row_CostHolder, _
|
||||
_RegistryBankTransfer.RegistryHeader.DocumentNumber, eGLRowsTypeVAT.eNettoRow, _GUID, _
|
||||
eTransactionType.ePartnerDebit, eCashType.ePartner, ePartnerType.ePayabels)
|
||||
_ocur.CommitChanges()
|
||||
GLFunctions.ReconfigurePCI(_uow, _GLBank.CustomersFrom, _RegistryBankTransfer.RegistryHeader.Customers, ePartnerType.ePayabels, _RegistryBankTransfer.RegistryHeader.DocumentNumber)
|
||||
|
||||
Next
|
||||
_GLBank.RecalculateTotal()
|
||||
View.Refresh()
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub aRecalculateBallance_Execute(ByVal sender As System.Object, ByVal e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aRecalculateBallance.Execute
|
||||
Dim _LiquidAssets As LiquidAssets = TryCast(e.SelectedObjects(0), GLBank).LiquidAssets_Main
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _GLBank_Collection As New XPCollection(Of GLBank)(_ocur.Session, CriteriaOperator.Parse("LiquidAssets_Main=? and IsEditable=False ", _LiquidAssets))
|
||||
Dim _GLBank As GLBank
|
||||
Dim _GLRows As GLRows
|
||||
Dim _InAmountHUF As Double = 0
|
||||
Dim _OutAmountHUF As Double = 0
|
||||
Dim _InAmountDEV As Double = 0
|
||||
Dim _OutAmountDEV As Double = 0
|
||||
Dim I As Long = 0
|
||||
|
||||
Dim _InAmountHUF_Open As Double = 0
|
||||
Dim _OutAmountHUF_Open As Double = 0
|
||||
Dim _InAmountDEV_Open As Double = 0
|
||||
Dim _OutAmountDEV_Open As Double = 0
|
||||
|
||||
Dim _InAmountHUF_Close As Double = 0
|
||||
Dim _OutAmountHUF_Close As Double = 0
|
||||
Dim _InAmountDEV_Close As Double = 0
|
||||
Dim _OutAmountDEV_Close As Double = 0
|
||||
|
||||
Try
|
||||
GLOBAL_HAS_Audit = False
|
||||
If _LiquidAssets IsNot Nothing Then
|
||||
_GLBank_Collection.Sorting.Add(New SortProperty("DateExecution", DB.SortingDirection.Ascending))
|
||||
_GLBank_Collection.Sorting.Add(New SortProperty("DocumentNumber", DB.SortingDirection.Ascending))
|
||||
_InAmountHUF = 0
|
||||
_InAmountDEV = 0
|
||||
_OutAmountHUF = 0
|
||||
_OutAmountDEV = 0
|
||||
|
||||
|
||||
RaiseEvent InitWork(1, 1, _GLBank_Collection.Count)
|
||||
For Each _GLBank In _GLBank_Collection
|
||||
_GLBank.BallanceHUF = 0
|
||||
_GLBank.BallanceDEV = 0
|
||||
RaiseEvent DoWork()
|
||||
I += 1
|
||||
If I > 1 Then
|
||||
_GLBank.BallanceHUF = _InAmountHUF - _OutAmountHUF
|
||||
_GLBank.BallanceDEV = _InAmountDEV - _OutAmountDEV
|
||||
_ocur.CommitChanges()
|
||||
End If
|
||||
|
||||
|
||||
For Each _GLRows In _GLBank.GLRows
|
||||
_InAmountDEV += _GLRows.InAmountDEV
|
||||
_InAmountHUF += _GLRows.InAmountHUF
|
||||
_OutAmountDEV += _GLRows.OutAmountDEV
|
||||
_OutAmountHUF += _GLRows.OutAmountHUF
|
||||
Next
|
||||
|
||||
_GLBank.RecalculateTotal()
|
||||
Next
|
||||
End If
|
||||
_ocur.CommitChanges()
|
||||
View.Refresh()
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message)
|
||||
Finally
|
||||
GLOBAL_HAS_Audit = True
|
||||
RaiseEvent FinalWork
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub aGLBankDivideRows_CustomizePopupWindowParams(sender As Object, e As DevExpress.ExpressApp.Actions.CustomizePopupWindowParamsEventArgs) Handles aGLBankDivideRows.CustomizePopupWindowParams
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _GLRowsDivideH As GLRowsDivideH = _onew.CreateObject(Of GLRowsDivideH)()
|
||||
Dim _GLRows As GLRows = TryCast(View.SelectedObjects(0), GLRows)
|
||||
|
||||
If _GLRows IsNot Nothing Then
|
||||
If _GLRows.PartnerType = ePartnerType.ePayabels Or _GLRows.PartnerType = ePartnerType.eReceivables Then
|
||||
_GLRowsDivideH.GLRows_Oid = _GLRows.Oid
|
||||
_GLRowsDivideH.row_Customers = _onew.GetObject(_GLRows.Customer)
|
||||
_GLRowsDivideH.row_PartnerType = _GLRows.PartnerType
|
||||
e.View = Application.CreateDetailView(_onew, "GLRowsDivideH_DetailView_ConnectionDivide", False, _GLRowsDivideH)
|
||||
Else
|
||||
_GLRowsDivideH.GLRows_Oid = _GLRows.Oid
|
||||
e.View = Application.CreateDetailView(_onew, "GLRowsDivideH_DetailView", False, _GLRowsDivideH)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Private Sub aGLBankDivideRows_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.PopupWindowShowActionExecuteEventArgs) Handles aGLBankDivideRows.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _GLRowsDivideH As GLRowsDivideH = TryCast(e.PopupWindow.View.SelectedObjects(0), GLRowsDivideH)
|
||||
Dim _GLRows As GLRows = TryCast(View.SelectedObjects(0), GLRows)
|
||||
|
||||
If _GLRows IsNot Nothing Then
|
||||
_GLRows.DivideRows(_ocur, _GLRows, _GLRowsDivideH, True)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub aGenerateGLBankRateDiff_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aGenerateGLBankRateDiff.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _GLBank As GLBank = TryCast(e.SelectedObjects(0), GLBank)
|
||||
|
||||
For Each _GLBank In e.SelectedObjects
|
||||
If Not _GLBank.CurrencyName.ShortName = "HUF" Then
|
||||
_GLBank.Reconfigure_RateDiff(_ocur, _GLBank)
|
||||
End If
|
||||
Next
|
||||
_ocur.CommitChanges()
|
||||
View.Refresh()
|
||||
End Sub
|
||||
|
||||
Private Sub aImportPCIGroupBank_CustomizePopupWindowParams(sender As Object, e As DevExpress.ExpressApp.Actions.CustomizePopupWindowParamsEventArgs) Handles aImportPCIGroupBank.CustomizePopupWindowParams
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _ocur As Xpo.XPObjectSpace = View.ObjectSpace
|
||||
Dim _GLBank As GLBank = TryCast(View.SelectedObjects(0), GLBank)
|
||||
Dim _CollectionSource As CollectionSource = New CollectionSource(_onew, GetType(PCIGroup))
|
||||
|
||||
Dim _P As PCIGroup
|
||||
If _GLBank IsNot Nothing Then
|
||||
|
||||
_CollectionSource.Criteria.Clear()
|
||||
_CollectionSource.BeginUpdateCriteria()
|
||||
_CollectionSource.Criteria("1") = CriteriaOperator.Parse("CurrencyName_Account.ShortName=?", _GLBank.LiquidAssets_Main.CurrencyName.ShortName)
|
||||
_CollectionSource.Criteria("2") = CriteriaOperator.Parse("PartnerType=?", _GLBank.row_PartnerType)
|
||||
_CollectionSource.Criteria("3") = CriteriaOperator.Parse("CustomersFrom.Oid=?", _GLBank.CustomersFrom.Oid)
|
||||
If _GLBank.LiquidAssets_Main.CurrencyName.ShortName = "HUF" Then
|
||||
_CollectionSource.Criteria("4") = CriteriaOperator.Parse("BallanceHUF>0")
|
||||
Else
|
||||
_CollectionSource.Criteria("4") = CriteriaOperator.Parse("BallanceDEV>0")
|
||||
End If
|
||||
|
||||
_CollectionSource.EndUpdateCriteria()
|
||||
|
||||
e.View = Application.CreateListView("PCIGroup_ListView_Find", _CollectionSource, True)
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub aImportPCIGroupBank_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.PopupWindowShowActionExecuteEventArgs) Handles aImportPCIGroupBank.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _PCIGroup As PCIGroup
|
||||
Dim _PCIGroup_P As PCIGroup
|
||||
Dim _GLBank As GLBank = TryCast(View.SelectedObjects(0), GLBank)
|
||||
Dim _GLHeader As GLHeader = TryCast(_GLBank, GLHeader)
|
||||
Dim _GLRows As GLRows
|
||||
Dim _GUID As Guid
|
||||
Dim _CashType As eCashType
|
||||
Dim _DebitChartOfAccounts As ChartOfAccounts
|
||||
Dim _CreditChartOfAccounts As ChartOfAccounts
|
||||
Dim _TransactionType As eTransactionType
|
||||
If _GLBank Is Nothing Then Exit Sub
|
||||
|
||||
|
||||
For Each _PCIGroup_P In e.PopupWindow.View.SelectedObjects
|
||||
_PCIGroup = _ocur.GetObject(_PCIGroup_P)
|
||||
_GLRows = _ocur.CreateObject(Of GLRows)()
|
||||
_GUID = Guid.NewGuid()
|
||||
_CashType = eCashType.ePartner
|
||||
If _PCIGroup.PartnerType = ePartnerType.eReceivables Then
|
||||
_DebitChartOfAccounts = _GLBank.LiquidAssets_Main.GetChartOfAccounts(_GLBank.DateExecution.Year, 0)
|
||||
_CreditChartOfAccounts = _PCIGroup.Customers.CustomersGLParameters.GetChartOfAccounts(_GLBank.DateExecution.Year, eVATMode.eOut)
|
||||
_TransactionType = eTransactionType.ePartnerCredit
|
||||
Else
|
||||
_DebitChartOfAccounts = _PCIGroup.Customers.CustomersGLParameters.GetChartOfAccounts(_PCIGroup.DateExecution_Account.Year, eVATMode.eIn)
|
||||
_CreditChartOfAccounts = _GLBank.LiquidAssets_Main.GetChartOfAccounts(_GLBank.DateExecution.Year, 0)
|
||||
_TransactionType = eTransactionType.ePartnerDebit
|
||||
End If
|
||||
|
||||
Select Case _PCIGroup.PartnerType
|
||||
Case ePartnerType.eReceivables
|
||||
|
||||
_GLRows.CreditAmountHUF = _PCIGroup.BallanceHUF
|
||||
_GLRows.CreditAmountDEV = _PCIGroup.BallanceDEV
|
||||
_GLRows.DebitAmountHUF = 0
|
||||
_GLRows.DebitAmountDEV = 0
|
||||
_GLRows.InAmountHUF = _PCIGroup.BallanceHUF
|
||||
_GLRows.InAmountDEV = _PCIGroup.BallanceDEV
|
||||
|
||||
Case ePartnerType.ePayabels
|
||||
_GLRows.DebitAmountHUF = _PCIGroup.BallanceHUF
|
||||
_GLRows.DebitAmountDEV = _PCIGroup.BallanceDEV
|
||||
_GLRows.CreditAmountDEV = 0
|
||||
_GLRows.CreditAmountDEV = 0
|
||||
_GLRows.OutAmountHUF = _PCIGroup.BallanceHUF
|
||||
_GLRows.OutAmountDEV = _PCIGroup.BallanceDEV
|
||||
|
||||
End Select
|
||||
_GLRows.PartnerType = _PCIGroup.PartnerType
|
||||
_GLRows.AddGLRows(_GLHeader, _DebitChartOfAccounts, _CreditChartOfAccounts, _
|
||||
_PCIGroup.BallanceDEV, _PCIGroup.BallanceHUF, _GLBank.LiquidAssets_Main, _
|
||||
_PCIGroup.Customers, _GLHeader.row_DateVAT, _GLHeader.row_VAT, _
|
||||
_GLHeader.row_NoteRows, _GLHeader.row_UniqueObjects, _GLHeader.row_Controlling, _
|
||||
_GLHeader.row_JobNumberObjects, _GLHeader.row_CostPlace, _GLHeader.row_CostHolder, _
|
||||
_PCIGroup.ConnectInfo, eGLRowsTypeVAT.eNettoRow, _GUID, _
|
||||
_TransactionType, _CashType, _PCIGroup.PartnerType)
|
||||
_GLBank.RecalculateTotal()
|
||||
_GLBank.GetBallanceDEV(_GLBank.row_LiquidAssets, _GLBank.DateExecution)
|
||||
_GLBank.GetBallanceHUF(_GLBank.row_LiquidAssets, _GLBank.DateExecution)
|
||||
|
||||
_ocur.CommitChanges()
|
||||
|
||||
'--- Pontozás ellenőrzése !!!! ----------------------------------------------------------------------------------------------------------------
|
||||
Dim _uow_pci As New UnitOfWork(_ocur.Session.DataLayer)
|
||||
GLFunctions.ReconfigurePCI(_uow_pci, _GLBank.CustomersFrom, _GLRows.Customer, _GLRows.PartnerType, _GLRows.ConnectInfo)
|
||||
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub GLBank_DeleteAction_Executed(sender As Object, e As ActionBaseEventArgs)
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _uow As New UnitOfWork(_ocur.Session.DataLayer)
|
||||
Dim _GLBank As GLBank
|
||||
Dim _GLRows As GLRows
|
||||
Dim _GLRows_Collection As XPCollection(Of GLRows)
|
||||
|
||||
|
||||
For Each _GLBank In TryCast(e, SimpleActionExecuteEventArgs).SelectedObjects
|
||||
'// Pontozás erre a bankra vonatkozólag törölni !
|
||||
|
||||
_GLRows_Collection = New XPCollection(Of GLRows)(PersistentCriteriaEvaluationBehavior.InTransaction, _ocur.Session, CriteriaOperator.Parse("PartnerType<>'eNotSet' and GLHeader.Oid=?", _GLBank.Oid), True)
|
||||
For Each _GLRows In _GLRows_Collection
|
||||
GLFunctions.ReconfigurePCI(_uow, _GLBank.CustomersFrom, _GLRows.Customer, _GLRows.PartnerType, _GLRows.ConnectInfo)
|
||||
Next
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub aPCICheckBankTransfer_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aPCICheckBankTransfer.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _uow As New UnitOfWork(_ocur.Session.DataLayer)
|
||||
|
||||
Dim _RegistryBankTransferView As RegistryBankTransferView
|
||||
|
||||
RaiseEvent InitWork(1, 1, View.SelectedObjects.Count)
|
||||
For Each _RegistryBankTransferView In View.SelectedObjects
|
||||
RaiseEvent DoWork()
|
||||
If _RegistryBankTransferView IsNot Nothing Then
|
||||
GLFunctions.ReconfigurePCI(_uow, _RegistryBankTransferView.RegistryHeader.CustomersFrom, _RegistryBankTransferView.RegistryHeader.Customers, 1, _RegistryBankTransferView.RegistryHeader.F_ConnectInfo)
|
||||
End If
|
||||
Next
|
||||
RaiseEvent FinalWork
|
||||
|
||||
Frame.GetController(Of RefreshController).RefreshAction.DoExecute()
|
||||
End Sub
|
||||
|
||||
Private Sub aGetCurrencyRateBank_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aGetCurrencyRateBank.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _GLBank As GLBank = TryCast(View.SelectedObjects(0), GLBank)
|
||||
|
||||
If _GLBank IsNot Nothing Then
|
||||
_GLBank.row_CurrencyRate = _GLBank.LiquidAssets_Main.GetCurrencyRateDate(_ocur, _GLBank.row_TransactionType, _GLBank.LiquidAssets_Main, _GLBank.DateExecution)
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
+128
@@ -0,0 +1,128 @@
|
||||
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
|
||||
|
||||
<DefaultClassOptions()> _
|
||||
<NonPersistent()> _
|
||||
<NavigationItem(False), CreatableItem(False)> _
|
||||
<RuleCriteria("BankImportPopup-ChartOfAccounts", DefaultContexts.Save, "ChartOfAccounts.Children.Count=0", "Csak gyermek objektum választható ki!", SkipNullOrEmptyValues:=False)> _
|
||||
Public Class BankImportPopup
|
||||
Inherits BaseObject
|
||||
Private _TransactionType As eTransactionType
|
||||
Private _ChartOfAccounts As ChartOfAccounts
|
||||
Private _Controlling As Controlling
|
||||
Private _Customers As Customers
|
||||
Private _ConnectInfo As String
|
||||
Private _AmountHUF As Double = 0
|
||||
Private _AmountDEV As Double = 0
|
||||
Private _AmountDEV2 As Double = 0
|
||||
Private _CurrencyName2 As CurrencyName
|
||||
Private _PCIGroup As PCIGroup
|
||||
Private _NoteRows As String
|
||||
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
End Sub
|
||||
Property TransactionType As eTransactionType
|
||||
Get
|
||||
Return _TransactionType
|
||||
End Get
|
||||
Set(value As eTransactionType)
|
||||
SetPropertyValue("TransactionType", _TransactionType, value)
|
||||
End Set
|
||||
End Property
|
||||
<RuleRequiredField("Require BankImportPopup-ChartOfAccounts", DefaultContexts.Save)>
|
||||
<ImmediatePostData(True), DataSourceCriteria("AccountYear=GetYear('@This.PCIGroup.DateExecution_Account')")>
|
||||
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(value As Controlling)
|
||||
SetPropertyValue("Controlling", _Controlling, 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 AmountHUF As Double
|
||||
Get
|
||||
Return _AmountHUF
|
||||
End Get
|
||||
Set(value As Double)
|
||||
SetPropertyValue("AmountHUF", _AmountHUF, value)
|
||||
End Set
|
||||
End Property
|
||||
Property AmountDEV As Double
|
||||
Get
|
||||
Return _AmountDEV
|
||||
End Get
|
||||
Set(value As Double)
|
||||
SetPropertyValue("AmountDEV", _AmountDEV, value)
|
||||
End Set
|
||||
End Property
|
||||
Property AmountDEV2 As Double
|
||||
Get
|
||||
Return _AmountDEV2
|
||||
End Get
|
||||
Set(value As Double)
|
||||
SetPropertyValue("AmountDEV2", _AmountDEV2, value)
|
||||
End Set
|
||||
End Property
|
||||
Property CurrencyName2 As CurrencyName
|
||||
Get
|
||||
Return _CurrencyName2
|
||||
End Get
|
||||
Set(value As CurrencyName)
|
||||
SetPropertyValue("CurrencyName2", _CurrencyName2, value)
|
||||
End Set
|
||||
End Property
|
||||
Property PCIGroup As PCIGroup
|
||||
Get
|
||||
Return _PCIGroup
|
||||
End Get
|
||||
Set(value As PCIGroup)
|
||||
SetPropertyValue("PCIGroup", _PCIGroup, value)
|
||||
End Set
|
||||
End Property
|
||||
<Size(-1)> _
|
||||
Property NoteRows As String
|
||||
Get
|
||||
Return _NoteRows
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("NoteRows", _NoteRows, value)
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
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
|
||||
|
||||
<DefaultClassOptions()> _
|
||||
<NavigationItem(False), CreatableItem(False)> _
|
||||
<NonPersistent()>
|
||||
Public Class GLBankPrepareName
|
||||
Inherits BaseObject
|
||||
Private _BankPrepareName As String
|
||||
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 BankPrepareName As String
|
||||
Get
|
||||
Return _BankPrepareName
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("BankPrepareName", _BankPrepareName, value)
|
||||
End Set
|
||||
End Property
|
||||
<VisibleInListView(False)> _
|
||||
ReadOnly Property GLBankPrepareNameGroup As XPCollection(Of GLBankPrepareNameGroup)
|
||||
Get
|
||||
Return New XPCollection(Of GLBankPrepareNameGroup)(Session)
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
<NavigationItem(False), CreatableItem(False)> _
|
||||
<Persistent("vv_RegistryBankTransferPrepareName")> _
|
||||
Public Class GLBankPrepareNameGroup
|
||||
Inherits XPLiteObject
|
||||
<Persistent("Oid"), Key(True)> Property Oid As String
|
||||
<Persistent("BankPrepareName")> Property BankPrepareName As String
|
||||
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
|
||||
End Class
|
||||
Reference in New Issue
Block a user