Reconfigure for GIT
This commit is contained in:
+83
@@ -0,0 +1,83 @@
|
||||
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)> _
|
||||
Public Class InvoiceFactoringBank
|
||||
Inherits BaseObject
|
||||
|
||||
Private _CustomersFrom As CustomersFrom
|
||||
Private _Customers As Customers
|
||||
Private _Factoring_Send_Number As String 'Bankba küldés sorszáma
|
||||
Private _FileData As FileData 'Csatolt dokumentum
|
||||
Private _Factoring_Send_Date As Date 'Beküldés dátuma
|
||||
|
||||
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 CustomersFrom As CustomersFrom
|
||||
Get
|
||||
Return _CustomersFrom
|
||||
End Get
|
||||
Set(value As CustomersFrom)
|
||||
SetPropertyValue("CustomersFrom", _CustomersFrom, value)
|
||||
End Set
|
||||
End Property
|
||||
Property Customers As Customers
|
||||
Get
|
||||
Return _Customers
|
||||
End Get
|
||||
Set(value As Customers)
|
||||
SetPropertyValue("Customers", _Customers, value)
|
||||
End Set
|
||||
End Property
|
||||
Property Factoring_Send_Number As String
|
||||
Get
|
||||
Return _Factoring_Send_Number
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("Factoring_Send_Number", _Factoring_Send_Number, value)
|
||||
End Set
|
||||
End Property
|
||||
Property Factoring_Send_Date As Date
|
||||
Get
|
||||
Return _Factoring_Send_Date
|
||||
End Get
|
||||
Set(value As Date)
|
||||
SetPropertyValue("Factoring_Send_Date", _Factoring_Send_Date, 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
|
||||
|
||||
ReadOnly Property InvoiceHeader As XPCollection(Of InvoiceHeader)
|
||||
Get
|
||||
Return New XPCollection(Of InvoiceHeader)(Session, CriteriaOperator.Parse("InvoiceFactoringBank=?", Me))
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
+105
@@ -0,0 +1,105 @@
|
||||
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)> _
|
||||
Public Class InvoiceFactoringHeader 'Faktorálási engedményezési szerzõdés
|
||||
Inherits BaseObject
|
||||
|
||||
Private _DocumentNumber As String 'A bank által jóváhagyott sorszám
|
||||
Private _ContractFile As FileData 'A bank által visszaküldött engedményezési szerzõdés
|
||||
Private _Description As String 'Egyéb megjegyzés
|
||||
Private _DateExecution As Date 'Dátum
|
||||
Private _InterestPercent As Double ' faktor kamat
|
||||
|
||||
Private _SpreadXML As String
|
||||
Private _SpreadFile As FileData
|
||||
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 DocumentNumber As String
|
||||
Get
|
||||
Return _DocumentNumber
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("DocumentNumber", _DocumentNumber, value)
|
||||
End Set
|
||||
End Property
|
||||
Property ContractFile As FileData
|
||||
Get
|
||||
Return _ContractFile
|
||||
End Get
|
||||
Set(value As FileData)
|
||||
SetPropertyValue("ContractFile", _ContractFile, value)
|
||||
End Set
|
||||
End Property
|
||||
<Size(-1)> _
|
||||
Property Description As String
|
||||
Get
|
||||
Return _Description
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("Description", _Description, value)
|
||||
End Set
|
||||
End Property
|
||||
Property DateExecution As Date
|
||||
Get
|
||||
Return _DateExecution
|
||||
End Get
|
||||
Set(value As Date)
|
||||
SetPropertyValue("DateExecution", _DateExecution, value)
|
||||
End Set
|
||||
End Property
|
||||
Property InterestPercent As Double
|
||||
Get
|
||||
Return _InterestPercent
|
||||
End Get
|
||||
Set(value As Double)
|
||||
SetPropertyValue("InterestPercent", _InterestPercent, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
<Size(-1)> _
|
||||
Property SpreadXML As String
|
||||
Get
|
||||
Return _SpreadXML
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("SpreadXML", _SpreadXML, value)
|
||||
End Set
|
||||
End Property
|
||||
Property SpreadFile As FileData
|
||||
Get
|
||||
Return _SpreadFile
|
||||
End Get
|
||||
Set(value As FileData)
|
||||
SetPropertyValue("SpreadFile", _SpreadFile, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
<Association("InvoiceFactoringHeader-InvoiceFactoringRows", GetType(InvoiceFactoringRows)), VisibleInListView(False), VisibleInLookupListView(False)> _
|
||||
ReadOnly Property InvoiceFactoringRows As XPCollection(Of InvoiceFactoringRows)
|
||||
Get
|
||||
Return GetCollection(Of InvoiceFactoringRows)("InvoiceFactoringRows")
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
+123
@@ -0,0 +1,123 @@
|
||||
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)> _
|
||||
Public Class InvoiceFactoringParameter
|
||||
Inherits BaseObject
|
||||
|
||||
Private _LiquidAssets As LiquidAssets 'Melyik pénzeszköz
|
||||
Private _NumberGenerator As NumberGenerator 'Bankba küldési csomag sorszáma (ezt lehet majd nyomtatni !!!)
|
||||
Private _InterestPercent As Double ' Faktor kamat éves !
|
||||
Private _InterestPercentMonth As Double 'Havi faktordíj plusz !
|
||||
Private _RiskPercent As Double ' Kockázati összeg !
|
||||
Private _GracePeriod As Long ' Türelmi idõ (nap)
|
||||
Private _Controlling_Interest As Controlling 'Banki rögzítésnél hova pontozódjon (kamat)
|
||||
Private _Controlling_Risk As Controlling 'Banki rögzítés hova pontozódjon (kockázat)
|
||||
Private _Controlling_Fee As Controlling 'Banki rögzítés hova pontozódjon (faktordíj)
|
||||
Private _ReportData_Question As ReportData 'Kérelem nyomtatvány
|
||||
|
||||
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 LiquidAssets As LiquidAssets
|
||||
Get
|
||||
Return _LiquidAssets
|
||||
End Get
|
||||
Set(value As LiquidAssets)
|
||||
SetPropertyValue("LiquidAssets", _LiquidAssets, value)
|
||||
End Set
|
||||
End Property
|
||||
Property NumberGenerator As NumberGenerator
|
||||
Get
|
||||
Return _NumberGenerator
|
||||
End Get
|
||||
Set(value As NumberGenerator)
|
||||
SetPropertyValue("NumberGenerator", _NumberGenerator, value)
|
||||
End Set
|
||||
End Property
|
||||
Property InterestPercent As Double
|
||||
Get
|
||||
Return _InterestPercent
|
||||
End Get
|
||||
Set(value As Double)
|
||||
SetPropertyValue("InterestPercent", _InterestPercent, value)
|
||||
End Set
|
||||
End Property
|
||||
Property InterestPercentMonth As Double
|
||||
Get
|
||||
Return _InterestPercentMonth
|
||||
End Get
|
||||
Set(value As Double)
|
||||
SetPropertyValue("InterestPercentMonth", _InterestPercentMonth, value)
|
||||
End Set
|
||||
End Property
|
||||
Property RiskPercent As Double
|
||||
Get
|
||||
Return _RiskPercent
|
||||
End Get
|
||||
Set(value As Double)
|
||||
SetPropertyValue("RiskPercent", _RiskPercent, value)
|
||||
End Set
|
||||
End Property
|
||||
Property GracePeriod As Long
|
||||
Get
|
||||
Return _GracePeriod
|
||||
End Get
|
||||
Set(value As Long)
|
||||
SetPropertyValue("GracePeriod", _GracePeriod, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property Controlling_Interest As Controlling
|
||||
Get
|
||||
Return _Controlling_Interest
|
||||
End Get
|
||||
Set(value As Controlling)
|
||||
SetPropertyValue("Controlling_Interest", _Controlling_Interest, value)
|
||||
End Set
|
||||
End Property
|
||||
Property Controlling_Risk As Controlling
|
||||
Get
|
||||
Return _Controlling_Risk
|
||||
End Get
|
||||
Set(value As Controlling)
|
||||
SetPropertyValue("Controlling_Risk", _Controlling_Risk, value)
|
||||
End Set
|
||||
End Property
|
||||
Property Controlling_Fee As Controlling
|
||||
Get
|
||||
Return _Controlling_Fee
|
||||
End Get
|
||||
Set(value As Controlling)
|
||||
SetPropertyValue("Controlling_Fee", _Controlling_Fee, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property ReportData_Question As ReportData
|
||||
Get
|
||||
Return _ReportData_Question
|
||||
End Get
|
||||
Set(value As ReportData)
|
||||
SetPropertyValue("ReportData_Question", _ReportData_Question, value)
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
+125
@@ -0,0 +1,125 @@
|
||||
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)> _
|
||||
Public Class InvoiceFactoringRows
|
||||
Inherits BaseObject
|
||||
|
||||
Private _InvoiceFactoringHeader As InvoiceFactoringHeader
|
||||
Private _InvoiceHeader As InvoiceHeader
|
||||
Private _InterestValueHUF As Double ' Faktor kamat összege
|
||||
Private _CapitalValueHUF As Double ' "TÕKE" összege
|
||||
Private _RiskValueHUF As Double ' Kockázat összege
|
||||
|
||||
Private _FeeValueHUF As Double ' Faktor díj összege
|
||||
Private _DiscountInterestPercent As Double 'Diszkont kamat !!!
|
||||
Private _InterestDay As Long
|
||||
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.
|
||||
InterestValueHUF = 0
|
||||
CapitalValueHUF = 0
|
||||
RiskValueHUF = 0
|
||||
End Sub
|
||||
Protected Overrides Sub OnSaving()
|
||||
MyBase.OnSaving()
|
||||
|
||||
If IsDeleted = False Then
|
||||
RecalculateValues()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
<Association("InvoiceFactoringHeader-InvoiceFactoringRows", GetType(InvoiceFactoringHeader))> _
|
||||
Property InvoiceFactoringHeader As InvoiceFactoringHeader
|
||||
Get
|
||||
Return _InvoiceFactoringHeader
|
||||
End Get
|
||||
Set(value As InvoiceFactoringHeader)
|
||||
SetPropertyValue("InvoiceFactoringHeader", _InvoiceFactoringHeader, value)
|
||||
End Set
|
||||
End Property
|
||||
Property InvoiceHeader As InvoiceHeader
|
||||
Get
|
||||
Return _InvoiceHeader
|
||||
End Get
|
||||
Set(value As InvoiceHeader)
|
||||
SetPropertyValue("InvoiceHeader", _InvoiceHeader, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property InterestValueHUF As Double
|
||||
Get
|
||||
Return _InterestValueHUF
|
||||
End Get
|
||||
Set(value As Double)
|
||||
SetPropertyValue("InterestValueHUF", _InterestValueHUF, value)
|
||||
End Set
|
||||
End Property
|
||||
Property CapitalValueHUF As Double
|
||||
Get
|
||||
Return _CapitalValueHUF
|
||||
End Get
|
||||
Set(value As Double)
|
||||
SetPropertyValue("CapitalValueHUF", _CapitalValueHUF, value)
|
||||
End Set
|
||||
End Property
|
||||
Property RiskValueHUF As Double
|
||||
Get
|
||||
Return _RiskValueHUF
|
||||
End Get
|
||||
Set(value As Double)
|
||||
SetPropertyValue("RiskValueHUF", _RiskValueHUF, value)
|
||||
End Set
|
||||
End Property
|
||||
Property FeeValueHUF As Double
|
||||
Get
|
||||
Return _FeeValueHUF
|
||||
End Get
|
||||
Set(value As Double)
|
||||
SetPropertyValue("FeeValueHUF", _FeeValueHUF, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Sub RecalculateValues()
|
||||
Dim _InterestPercent As Double = 0
|
||||
|
||||
If InvoiceFactoringHeader.InterestPercent > 0 Then
|
||||
_InterestPercent = InvoiceFactoringHeader.InterestPercent
|
||||
Else
|
||||
_InterestPercent = InvoiceHeader.InvoiceFactoringParameter.InterestPercent
|
||||
End If
|
||||
|
||||
If InvoiceHeader IsNot Nothing Then
|
||||
If InvoiceHeader.InvoiceFactoringParameter IsNot Nothing Then
|
||||
_InterestDay = DateDiff(DateInterval.Day, InvoiceFactoringHeader.DateExecution, _InvoiceHeader.DatePayment) + _InvoiceHeader.InvoiceFactoringParameter.GracePeriod
|
||||
_DiscountInterestPercent = (360 * _InterestPercent / 100) /
|
||||
(360 + (_InterestPercent / 100) * _InterestDay)
|
||||
|
||||
FeeValueHUF = Math.Round(((_InterestDay \ 30) + 1) * (InvoiceHeader.InvoiceFactoringParameter.InterestPercentMonth / 100) * InvoiceHeader.TotalBruttoHUF, 0, MidpointRounding.AwayFromZero)
|
||||
RiskValueHUF = Math.Round(InvoiceHeader.TotalBruttoHUF * InvoiceHeader.InvoiceFactoringParameter.RiskPercent / 100, 0, MidpointRounding.AwayFromZero)
|
||||
InterestValueHUF = Math.Round(((InvoiceHeader.TotalBruttoHUF - RiskValueHUF) * _InterestDay * _DiscountInterestPercent) / 360, 0, MidpointRounding.AwayFromZero)
|
||||
CapitalValueHUF = Math.Round(InvoiceHeader.TotalBruttoHUF - InterestValueHUF - RiskValueHUF - FeeValueHUF, 0, MidpointRounding.AwayFromZero)
|
||||
|
||||
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
+110
@@ -0,0 +1,110 @@
|
||||
Partial Class InvoiceFactoring_VC
|
||||
|
||||
<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.aFactoringSet = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aFactoringSendToBank = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
|
||||
Me.aFactoringBackFromBank = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aFactoringCreate = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
|
||||
Me.aFactoringDestroy = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aFactoringSendToBankPrintPreview = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
'
|
||||
'aFactoringSet
|
||||
'
|
||||
Me.aFactoringSet.Caption = "aFactoring Set"
|
||||
Me.aFactoringSet.Category = "RecordEdit"
|
||||
Me.aFactoringSet.ConfirmationMessage = Nothing
|
||||
Me.aFactoringSet.Id = "aFactoringSet"
|
||||
Me.aFactoringSet.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireMultipleObjects
|
||||
Me.aFactoringSet.TargetViewId = "InvoiceHeader_ListView"
|
||||
Me.aFactoringSet.ToolTip = Nothing
|
||||
'
|
||||
'aFactoringSendToBank
|
||||
'
|
||||
Me.aFactoringSendToBank.AcceptButtonCaption = Nothing
|
||||
Me.aFactoringSendToBank.CancelButtonCaption = Nothing
|
||||
Me.aFactoringSendToBank.Caption = "aFactoring Send To Bank"
|
||||
Me.aFactoringSendToBank.Category = "RecordEdit"
|
||||
Me.aFactoringSendToBank.ConfirmationMessage = Nothing
|
||||
Me.aFactoringSendToBank.Id = "aFactoringSendToBank"
|
||||
Me.aFactoringSendToBank.TargetViewId = "InvoiceHeader_ListView_Factoring_Not_Send"
|
||||
Me.aFactoringSendToBank.ToolTip = Nothing
|
||||
'
|
||||
'aFactoringBackFromBank
|
||||
'
|
||||
Me.aFactoringBackFromBank.Caption = "aFactoring Back From Bank"
|
||||
Me.aFactoringBackFromBank.Category = "RecordEdit"
|
||||
Me.aFactoringBackFromBank.ConfirmationMessage = Nothing
|
||||
Me.aFactoringBackFromBank.Id = "aFactoringBackFromBank"
|
||||
Me.aFactoringBackFromBank.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireMultipleObjects
|
||||
Me.aFactoringBackFromBank.TargetViewId = "InvoiceFactoringBank_ListView"
|
||||
Me.aFactoringBackFromBank.ToolTip = Nothing
|
||||
'
|
||||
'aFactoringCreate
|
||||
'
|
||||
Me.aFactoringCreate.AcceptButtonCaption = Nothing
|
||||
Me.aFactoringCreate.CancelButtonCaption = Nothing
|
||||
Me.aFactoringCreate.Caption = "aFactoring Create"
|
||||
Me.aFactoringCreate.Category = "ObjectsCreation"
|
||||
Me.aFactoringCreate.ConfirmationMessage = Nothing
|
||||
Me.aFactoringCreate.Id = "aFactoringCreate"
|
||||
Me.aFactoringCreate.TargetViewId = "InvoiceHeader_ListView_Factoring_Sended"
|
||||
Me.aFactoringCreate.ToolTip = Nothing
|
||||
'
|
||||
'aFactoringDestroy
|
||||
'
|
||||
Me.aFactoringDestroy.Caption = "aFactoring Destroy"
|
||||
Me.aFactoringDestroy.Category = "ObjectsCreation"
|
||||
Me.aFactoringDestroy.ConfirmationMessage = Nothing
|
||||
Me.aFactoringDestroy.Id = "aFactoringDestroy"
|
||||
Me.aFactoringDestroy.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireMultipleObjects
|
||||
Me.aFactoringDestroy.TargetViewId = "InvoiceFactoringHeader_ListView"
|
||||
Me.aFactoringDestroy.ToolTip = Nothing
|
||||
'
|
||||
'aFactoringSendToBankPrintPreview
|
||||
'
|
||||
Me.aFactoringSendToBankPrintPreview.Caption = "aFactoring Send To Bank Print Preview"
|
||||
Me.aFactoringSendToBankPrintPreview.Category = "View"
|
||||
Me.aFactoringSendToBankPrintPreview.ConfirmationMessage = Nothing
|
||||
Me.aFactoringSendToBankPrintPreview.Id = "aFactoringSendToBankPrintPreview"
|
||||
Me.aFactoringSendToBankPrintPreview.ImageName = "Action_Printing_Print"
|
||||
Me.aFactoringSendToBankPrintPreview.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
|
||||
Me.aFactoringSendToBankPrintPreview.TargetObjectType = GetType(SISBusiness.[Module].InvoiceFactoringBank)
|
||||
Me.aFactoringSendToBankPrintPreview.TargetViewType = DevExpress.ExpressApp.ViewType.ListView
|
||||
Me.aFactoringSendToBankPrintPreview.ToolTip = Nothing
|
||||
Me.aFactoringSendToBankPrintPreview.TypeOfView = GetType(DevExpress.ExpressApp.ListView)
|
||||
|
||||
End Sub
|
||||
Friend WithEvents aFactoringSet As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aFactoringSendToBank As DevExpress.ExpressApp.Actions.PopupWindowShowAction
|
||||
Friend WithEvents aFactoringBackFromBank As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aFactoringCreate As DevExpress.ExpressApp.Actions.PopupWindowShowAction
|
||||
Friend WithEvents aFactoringDestroy As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aFactoringSendToBankPrintPreview As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
|
||||
End Class
|
||||
+141
@@ -0,0 +1,141 @@
|
||||
<?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="aFactoringSet.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 134</value>
|
||||
</metadata>
|
||||
<metadata name="aFactoringSendToBank.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 173</value>
|
||||
</metadata>
|
||||
<metadata name="aFactoringBackFromBank.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 212</value>
|
||||
</metadata>
|
||||
<metadata name="aFactoringCreate.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 95</value>
|
||||
</metadata>
|
||||
<metadata name="aFactoringDestroy.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 56</value>
|
||||
</metadata>
|
||||
<metadata name="aFactoringSendToBankPrintPreview.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>-4, 257</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
</root>
|
||||
+257
@@ -0,0 +1,257 @@
|
||||
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 System.IO
|
||||
Imports DevExpress.Persistent.BaseImpl
|
||||
Imports DevExpress.Xpo
|
||||
Imports DevExpress.Data.Filtering
|
||||
Imports DevExpress.ExpressApp.Utils
|
||||
|
||||
Public Class InvoiceFactoring_VC
|
||||
Inherits DevExpress.ExpressApp.ViewController
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
|
||||
'This call is required by the Component Designer.
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
|
||||
End Sub
|
||||
Protected Overrides Sub OnActivated()
|
||||
MyBase.OnActivated()
|
||||
|
||||
If View.Id = "InvoiceHeader_ListView_Factoring_Sended" Then
|
||||
'// Bankba elküldött faktorálandó számlák
|
||||
Frame.GetController(Of InvoiceVC).aRecalculateHUF.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of InvoiceVC).aViewInvoiceHold.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of InvoiceVC).aCreateInvoiceCreditNote.Active.SetItemValue("", False)
|
||||
|
||||
End If
|
||||
If View.Id = "InvoiceHeader_ListView_Factoring_Contracted" Then
|
||||
'// Elfogadott engedményezett szlák
|
||||
Frame.GetController(Of InvoiceVC).aRecalculateHUF.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of InvoiceVC).aViewInvoiceHold.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of InvoiceVC).aCreateInvoiceCreditNote.Active.SetItemValue("", False)
|
||||
|
||||
End If
|
||||
If View.Id = "InvoiceHeader_ListView_Factoring_Not_Send" Then
|
||||
'// Elõkészítés alatti faktorálandó számlák
|
||||
Frame.GetController(Of InvoiceVC).aRecalculateHUF.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of InvoiceVC).aViewInvoiceHold.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of InvoiceVC).aCreateInvoiceCreditNote.Active.SetItemValue("", False)
|
||||
End If
|
||||
If View.Id = "InvoiceHeader_ListView" Then
|
||||
'// Végleges számlák
|
||||
End If
|
||||
End Sub
|
||||
Protected Overrides Sub OnDeactivated()
|
||||
MyBase.OnDeactivated()
|
||||
Frame.GetController(Of DevExpress.ExpressApp.Validation.PersistenceValidationController)().Active.SetItemValue("", True)
|
||||
End Sub
|
||||
|
||||
Private Sub aFactoringSet_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aFactoringSet.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _InvoiceHeader As InvoiceHeader
|
||||
|
||||
Frame.GetController(Of DevExpress.ExpressApp.Validation.PersistenceValidationController)().Active.SetItemValue("", False)
|
||||
For Each _InvoiceHeader In View.SelectedObjects
|
||||
If _InvoiceHeader.IsFactoring = False Then
|
||||
_InvoiceHeader.IsFactoring = True
|
||||
ElseIf _InvoiceHeader.IsFactoring = True And _InvoiceHeader.Factoring_Send = False Then
|
||||
_InvoiceHeader.IsFactoring = False
|
||||
End If
|
||||
Next
|
||||
_ocur.CommitChanges()
|
||||
Frame.GetController(Of DevExpress.ExpressApp.Validation.PersistenceValidationController)().Active.SetItemValue("", True)
|
||||
End Sub
|
||||
|
||||
Private Sub aFactoringSendToBank_CustomizePopupWindowParams(sender As Object, e As CustomizePopupWindowParamsEventArgs) Handles aFactoringSendToBank.CustomizePopupWindowParams
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _InvoiceFactoringPopup As InvoiceFactoringPopup = _onew.CreateObject(Of InvoiceFactoringPopup)()
|
||||
|
||||
_InvoiceFactoringPopup.Factoring_Send_Date = Now
|
||||
|
||||
Dim _InvoiceFactoringParameter As InvoiceFactoringParameter
|
||||
|
||||
Dim _InvoiceFactoringParameter_Collection As New XPCollection(Of InvoiceFactoringParameter)(_onew.Session)
|
||||
If _InvoiceFactoringParameter_Collection.Count = 1 Then
|
||||
For Each _InvoiceFactoringParameter In _InvoiceFactoringParameter_Collection
|
||||
_InvoiceFactoringPopup.InvoiceFactoringParameter = _InvoiceFactoringParameter
|
||||
Exit For
|
||||
Next
|
||||
End If
|
||||
|
||||
e.View = Application.CreateDetailView(_onew, "InvoiceFactoringPopup_DetailView", True, _InvoiceFactoringPopup)
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub aFactoringSendToBank_Execute(sender As Object, e As PopupWindowShowActionExecuteEventArgs) Handles aFactoringSendToBank.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _InvoiceHeader As InvoiceHeader
|
||||
Dim _InvoiceFactoringPopup As InvoiceFactoringPopup = TryCast(e.PopupWindow.View.SelectedObjects(0), InvoiceFactoringPopup)
|
||||
Dim _Factoring_Send_Number As String = ""
|
||||
Dim _InvoiceFactoringBank As InvoiceFactoringBank
|
||||
Frame.GetController(Of DevExpress.ExpressApp.Validation.PersistenceValidationController)().Active.SetItemValue("", False)
|
||||
|
||||
For Each _InvoiceHeader In View.SelectedObjects
|
||||
If _InvoiceHeader.IsFactoring = True Then
|
||||
If _Factoring_Send_Number = "" Then
|
||||
_Factoring_Send_Number = _InvoiceFactoringPopup.InvoiceFactoringParameter.NumberGenerator.GetNewNumber(_InvoiceFactoringPopup.InvoiceFactoringParameter.NumberGenerator)
|
||||
End If
|
||||
_InvoiceHeader.Factoring_Send = True
|
||||
_InvoiceHeader.Factoring_Send_Date = _InvoiceFactoringPopup.Factoring_Send_Date
|
||||
_InvoiceHeader.Factoring_Send_Number = _Factoring_Send_Number
|
||||
_InvoiceHeader.InvoiceFactoringParameter = _ocur.GetObject(_InvoiceFactoringPopup.InvoiceFactoringParameter)
|
||||
End If
|
||||
Next
|
||||
|
||||
_InvoiceFactoringBank = _ocur.CreateObject(Of InvoiceFactoringBank)()
|
||||
_InvoiceFactoringBank.Factoring_Send_Date = _InvoiceFactoringPopup.Factoring_Send_Date
|
||||
_InvoiceFactoringBank.Factoring_Send_Number = _Factoring_Send_Number
|
||||
_InvoiceFactoringBank.CustomersFrom = _InvoiceHeader.CustomersFrom
|
||||
_InvoiceFactoringBank.Customers = _InvoiceHeader.Customers
|
||||
|
||||
For Each _InvoiceHeader In View.SelectedObjects
|
||||
_InvoiceHeader.InvoiceFactoringBank = _InvoiceFactoringBank
|
||||
Next
|
||||
|
||||
_ocur.CommitChanges()
|
||||
Frame.GetController(Of DevExpress.ExpressApp.Validation.PersistenceValidationController)().Active.SetItemValue("", True)
|
||||
|
||||
'// Most kell a kérelmet kinyomtatni !!!!
|
||||
|
||||
Dim _ReportData As ReportData = _ocur.GetObject(_InvoiceFactoringPopup.InvoiceFactoringParameter.ReportData_Question)
|
||||
If _ReportData IsNot Nothing Then
|
||||
Frame.GetController(Of Reports.ReportServiceController).ShowPreview(_ReportData, CriteriaOperator.Parse("Factoring_Send_Number=?", _Factoring_Send_Number), True)
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub aFactoringBackFromBank_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aFactoringBackFromBank.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _InvoiceFactoringBank As InvoiceFactoringBank
|
||||
Dim _InvoiceHeader As InvoiceHeader
|
||||
Dim _ReadyForDelete As Boolean = False
|
||||
Dim _InvoiceFactoringBank_Collection As New XPCollection(Of InvoiceFactoringBank)(_ocur.Session, CriteriaOperator.Parse("1=2"))
|
||||
Frame.GetController(Of DevExpress.ExpressApp.Validation.PersistenceValidationController)().Active.SetItemValue("", False)
|
||||
|
||||
For Each _InvoiceFactoringBank In View.SelectedObjects
|
||||
_ReadyForDelete = False
|
||||
For Each _InvoiceHeader In _InvoiceFactoringBank.InvoiceHeader
|
||||
If _InvoiceHeader.Factoring_Send = True And _InvoiceHeader.InvoiceFactoringRows Is Nothing Then
|
||||
_ReadyForDelete = True
|
||||
_InvoiceHeader.Factoring_Send = False
|
||||
_InvoiceHeader.Factoring_Send_Date = Nothing
|
||||
_InvoiceHeader.Factoring_Send_Number = ""
|
||||
_InvoiceHeader.InvoiceFactoringBank = Nothing
|
||||
End If
|
||||
Next
|
||||
If _ReadyForDelete Then
|
||||
_InvoiceFactoringBank_Collection.Add(_InvoiceFactoringBank)
|
||||
End If
|
||||
Next
|
||||
_ocur.Delete(_InvoiceFactoringBank_Collection)
|
||||
_ocur.CommitChanges()
|
||||
|
||||
Frame.GetController(Of DevExpress.ExpressApp.Validation.PersistenceValidationController)().Active.SetItemValue("", True)
|
||||
End Sub
|
||||
|
||||
Private Sub aFactoringCreate_CustomizePopupWindowParams(sender As Object, e As CustomizePopupWindowParamsEventArgs) Handles aFactoringCreate.CustomizePopupWindowParams
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _InvoiceFactoringHeaderPopup As InvoiceFactoringHeaderPopup = _onew.CreateObject(Of InvoiceFactoringHeaderPopup)()
|
||||
|
||||
e.View = Application.CreateDetailView(_onew, "InvoiceFactoringHeaderPopup_DetailView", True, _InvoiceFactoringHeaderPopup)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub aFactoringCreate_Execute(sender As Object, e As PopupWindowShowActionExecuteEventArgs) Handles aFactoringCreate.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _InvoiceHeader As InvoiceHeader
|
||||
Dim _InvoiceFactoringHeaderPopup As InvoiceFactoringHeaderPopup = TryCast(e.PopupWindow.View.SelectedObjects(0), InvoiceFactoringHeaderPopup)
|
||||
|
||||
Dim _InvoiceFactoringHeader As InvoiceFactoringHeader = _ocur.CreateObject(Of InvoiceFactoringHeader)()
|
||||
_InvoiceFactoringHeader.DocumentNumber = _InvoiceFactoringHeaderPopup.DocumentNumber
|
||||
_InvoiceFactoringHeader.Description = _InvoiceFactoringHeaderPopup.Description
|
||||
_InvoiceFactoringHeader.DateExecution = _InvoiceFactoringHeaderPopup.DateExecution
|
||||
_InvoiceFactoringHeader.InterestPercent = _InvoiceFactoringHeaderPopup.InterestPercent
|
||||
|
||||
'// FILEDATA áthozása másik objectspace-rõl !!!!
|
||||
If _InvoiceFactoringHeaderPopup.ContractFile IsNot Nothing Then
|
||||
Dim _MemoryStream As New MemoryStream
|
||||
_InvoiceFactoringHeaderPopup.ContractFile.SaveToStream(_MemoryStream)
|
||||
_MemoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
||||
Dim _FileData As FileData = _ocur.CreateObject(Of FileData)()
|
||||
_FileData.LoadFromStream(_InvoiceFactoringHeaderPopup.ContractFile.FileName, _MemoryStream)
|
||||
_InvoiceFactoringHeader.ContractFile = _FileData
|
||||
End If
|
||||
'// EXCEL TÁBLÁZAT MENTÉSE
|
||||
|
||||
If _InvoiceFactoringHeaderPopup.SpreadFile IsNot Nothing Then
|
||||
Dim _MemoryStreamXML As New MemoryStream
|
||||
_InvoiceFactoringHeaderPopup.ContractFile.SaveToStream(_MemoryStreamXML)
|
||||
_MemoryStreamXML.Seek(0, System.IO.SeekOrigin.Begin)
|
||||
Dim _SpreadFile As FileData = _ocur.CreateObject(Of FileData)()
|
||||
_SpreadFile.LoadFromStream(_InvoiceFactoringHeaderPopup.SpreadFile.FileName, _MemoryStreamXML)
|
||||
_InvoiceFactoringHeader.SpreadFile = _SpreadFile
|
||||
End If
|
||||
|
||||
Dim _InvoiceFactoringRows As InvoiceFactoringRows
|
||||
Frame.GetController(Of DevExpress.ExpressApp.Validation.PersistenceValidationController)().Active.SetItemValue("", False)
|
||||
For Each _InvoiceHeader In View.SelectedObjects
|
||||
_InvoiceFactoringRows = _ocur.CreateObject(Of InvoiceFactoringRows)()
|
||||
_InvoiceFactoringRows.InvoiceFactoringHeader = _InvoiceFactoringHeader
|
||||
_InvoiceFactoringRows.InvoiceHeader = _InvoiceHeader
|
||||
_InvoiceHeader.InvoiceFactoringRows = _InvoiceFactoringRows
|
||||
Next
|
||||
_ocur.CommitChanges()
|
||||
Frame.GetController(Of DevExpress.ExpressApp.Validation.PersistenceValidationController)().Active.SetItemValue("", True)
|
||||
End Sub
|
||||
|
||||
Private Sub aFactoringDestroy_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aFactoringDestroy.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _InvoiceFactoringHeader As InvoiceFactoringHeader
|
||||
Dim _InvoiceFactoringRows As InvoiceFactoringRows
|
||||
|
||||
Frame.GetController(Of DevExpress.ExpressApp.Validation.PersistenceValidationController)().Active.SetItemValue("", False)
|
||||
|
||||
For Each _InvoiceFactoringHeader In View.SelectedObjects
|
||||
For Each _InvoiceFactoringRows In _InvoiceFactoringHeader.InvoiceFactoringRows
|
||||
_InvoiceFactoringRows.InvoiceHeader.InvoiceFactoringRows = Nothing
|
||||
_InvoiceFactoringRows.InvoiceHeader = Nothing
|
||||
Next
|
||||
_ocur.Delete(_InvoiceFactoringHeader.InvoiceFactoringRows)
|
||||
_ocur.Delete(_InvoiceFactoringHeader)
|
||||
Next
|
||||
_ocur.CommitChanges()
|
||||
Frame.GetController(Of DevExpress.ExpressApp.Validation.PersistenceValidationController)().Active.SetItemValue("", True)
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub aFactoringSendToBankPrintPreview_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aFactoringSendToBankPrintPreview.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _InvoiceFactoringBank As InvoiceFactoringBank = View.SelectedObjects(0)
|
||||
|
||||
If _InvoiceFactoringBank IsNot Nothing Then
|
||||
|
||||
Dim _InvoiceHeader_Collection As New XPCollection(Of InvoiceHeader)(_ocur.Session, CriteriaOperator.Parse("InvoiceFactoringBank =?", _InvoiceFactoringBank))
|
||||
|
||||
If _InvoiceHeader_Collection.Count > 0 Then
|
||||
Dim _ReportData As ReportData = _ocur.GetObject(_InvoiceHeader_Collection(0).InvoiceFactoringParameter.ReportData_Question)
|
||||
If _ReportData IsNot Nothing Then
|
||||
Frame.GetController(Of Reports.ReportServiceController).ShowPreview(_ReportData, CriteriaOperator.Parse("Factoring_Send_Number=?", _InvoiceFactoringBank.Factoring_Send_Number), True)
|
||||
End If
|
||||
Else
|
||||
MsgBox("Az összeállított kérelemhez nem tartozik faktorizált számla(k)!", MsgBoxStyle.OkOnly, String.Format(CaptionHelper.GetLocalizedText("Exceptions\SISBusinessExceptions", "MsgBoxCheckItAgain")))
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user