First create solution
This commit is contained in:
+260
@@ -0,0 +1,260 @@
|
||||
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 System.Data.SqlClient
|
||||
Imports DevExpress.ExpressApp.ConditionalAppearance
|
||||
|
||||
Imports System.Linq
|
||||
Imports System.Linq.Expressions
|
||||
|
||||
'-- POPUP-HOZ osztályok-------------------------------------------------------------
|
||||
<NavigationItem(False), CreatableItem(False)> _
|
||||
<NonPersistent()> _
|
||||
<Appearance("Hide DEV properties", AppearanceItemType.ViewItem, "CurrencyName.ShortName='HUF'", TargetItems:="AmountDEV;CurrencyRate", visibility:=Editors.ViewItemVisibility.Hide)> _
|
||||
<Appearance("Hide BankInformation", AppearanceItemType.ViewItem, "PaymentOption.PayMode != 1", TargetItems:="BankInformation", visibility:=Editors.ViewItemVisibility.Hide)> _
|
||||
<Appearance("Hide when IsEditable=False", AppearanceItemType.ViewItem, "IsEditable=False", TargetItems:="Controlling;CostHolder;CostPlace;UniqueObjects;JobNumberObjects;VAT;InvoiceType;PaymentOption;Controlling;DatePayment", visibility:=Editors.ViewItemVisibility.Hide)> _
|
||||
<Appearance("Disable when IsEditable=False", AppearanceItemType.ViewItem, "IsEditable=False", TargetItems:="CustomersFrom;Customers;CurrencyName", Enabled:=False)> _
|
||||
Public Class InvoiceAdvancePopup 'Előlegszámla készítő, ez csinál InvoiceHeader és InvoiceRows-t
|
||||
Inherits BaseObject
|
||||
Private _CustomersFrom As CustomersFrom ' -- Saját cég
|
||||
Private _Customers As Customers ' -- Ügyfél
|
||||
Private _CurrencyRate As Double ' -- Árfolyam
|
||||
Private _CurrencyName As CurrencyName ' -- Deviza
|
||||
Private _Description As String ' -- Leírás
|
||||
Private _DateExecution As Date ' -- Teljesítés dátuma
|
||||
Private _DatePayment As Date ' -- Fizetési határidő
|
||||
Private _PaymentOption As PaymentOption ' -- Fizetési opció
|
||||
Private _AmountHUF As Double ' -- Összeg HUF (Bruttó!!!)
|
||||
Private _AmountDEV As Double ' -- Összeg DEV (Bruttó!!!)
|
||||
|
||||
Private _Controlling As Controlling ' -- Kontroll szám
|
||||
Private _CostHolder As CostHolder ' -- Költségviselő
|
||||
Private _CostPlace As CostPlace ' -- Költséghely
|
||||
Private _UniqueObjects As UniqueObjects
|
||||
Private _JobNumberObjects As JobNumberObjects
|
||||
|
||||
|
||||
Private _VAT As VAT ' -- ÁFA kód
|
||||
Private _BankInformation As BankInformation ' -- Bankszámlaszám
|
||||
Private _InvoiceType As InvoiceType ' -- Számla típusa
|
||||
Private _IsEditable As Boolean
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
VAT = Session.FindObject(Of VAT)(CriteriaOperator.Parse("DefaultForBusinnes=True"))
|
||||
CurrencyName = Session.FindObject(Of CurrencyName)(CriteriaOperator.Parse("ShortName='HUF'"))
|
||||
CurrencyRate = 1
|
||||
IsEditable = True
|
||||
End Sub
|
||||
<RuleRequiredField("InvoiceAdvancePopup.CustomersFrom", DefaultContexts.Save)> _
|
||||
Property CustomersFrom As CustomersFrom
|
||||
Get
|
||||
Return _CustomersFrom
|
||||
End Get
|
||||
Set(ByVal value As CustomersFrom)
|
||||
SetPropertyValue("CustomersFrom", _CustomersFrom, value)
|
||||
End Set
|
||||
End Property
|
||||
<RuleRequiredField("InvoiceAdvancePopup.Customers", DefaultContexts.Save)> _
|
||||
Property Customers As Customers
|
||||
Get
|
||||
Return _Customers
|
||||
End Get
|
||||
Set(ByVal value As Customers)
|
||||
SetPropertyValue("Customers", _Customers, value)
|
||||
End Set
|
||||
End Property
|
||||
Property CurrencyRate As Double
|
||||
Get
|
||||
Return _CurrencyRate
|
||||
End Get
|
||||
Set(ByVal value As Double)
|
||||
SetPropertyValue("CurrencyRate", _CurrencyRate, value)
|
||||
End Set
|
||||
End Property
|
||||
<ImmediatePostData()> _
|
||||
<RuleRequiredField("InvoiceAdvancePopup.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
|
||||
<Size(-1)> _
|
||||
Property Description As String
|
||||
Get
|
||||
Return _Description
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
SetPropertyValue("Description", _Description, value)
|
||||
End Set
|
||||
End Property
|
||||
<ImmediatePostData()> _
|
||||
<RuleRequiredField("InvoiceAdvancePopup.DateExecution", DefaultContexts.Save)> _
|
||||
Property DateExecution As Date
|
||||
Get
|
||||
Return _DateExecution
|
||||
End Get
|
||||
Set(ByVal value As Date)
|
||||
SetPropertyValue("DateExecution", _DateExecution, value)
|
||||
If Session.IsObjectsLoading = False And Session.IsObjectsSaving = False Then
|
||||
Me.DatePayment = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Property DatePayment As Date
|
||||
Get
|
||||
Return _DatePayment
|
||||
End Get
|
||||
Set(ByVal value As Date)
|
||||
SetPropertyValue("DatePayment", _DatePayment, value)
|
||||
End Set
|
||||
End Property
|
||||
<RuleRequiredField("InvoiceAdvancePopup.PaymentOption", DefaultContexts.Save)> _
|
||||
<ImmediatePostData()> _
|
||||
Property PaymentOption As PaymentOption
|
||||
Get
|
||||
Return _PaymentOption
|
||||
End Get
|
||||
Set(ByVal value As PaymentOption)
|
||||
SetPropertyValue("PaymentOption", _PaymentOption, value)
|
||||
If Session.IsObjectsLoading = False And Session.IsObjectsSaving = False Then
|
||||
If value.PayMode = ePayMode.InCash Then
|
||||
Me.DateExecution = GetSQLTime(Session)
|
||||
End If
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Property AmountHUF As Double
|
||||
Get
|
||||
Return _AmountHUF
|
||||
End Get
|
||||
Set(ByVal value As Double)
|
||||
SetPropertyValue("AmountHUF", _AmountHUF, value)
|
||||
End Set
|
||||
End Property
|
||||
<ImmediatePostData()>
|
||||
Property AmountDEV As Double
|
||||
Get
|
||||
Return _AmountDEV
|
||||
End Get
|
||||
Set(ByVal value As Double)
|
||||
SetPropertyValue("AmountDEV", _AmountDEV, value)
|
||||
If Session.IsObjectsLoading = False And Session.IsObjectsSaving = False Then
|
||||
If CurrencyName.ShortName <> "HUF" Then AmountHUF = Math.Round(AmountDEV * CurrencyRate, 0, MidpointRounding.AwayFromZero)
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'-- Rule5DMatrix ------------------------------------
|
||||
<RuleRequiredField("InvoiceAdvancePopup-Controlling", DefaultContexts.Save, TargetCriteria:="InvoiceType.Rule5DMatrix.RequireControlling=True")>
|
||||
<ImmediatePostData(True), DataSourceCriteria("IsAdvancePayment=True and IsParent=False")>
|
||||
Property Controlling As Controlling
|
||||
Get
|
||||
Return _Controlling
|
||||
End Get
|
||||
Set(ByVal value As Controlling)
|
||||
SetPropertyValue("Controlling", _Controlling, value)
|
||||
End Set
|
||||
End Property
|
||||
<RuleRequiredField("InvoiceAdvancePopup-CostHolder", DefaultContexts.Save, TargetCriteria:="InvoiceType.Rule5DMatrix.RequireCostHolder=True")>
|
||||
Property CostHolder As CostHolder
|
||||
Get
|
||||
Return _CostHolder
|
||||
End Get
|
||||
Set(value As CostHolder)
|
||||
SetPropertyValue("CostHolder", _CostHolder, value)
|
||||
End Set
|
||||
End Property
|
||||
<RuleRequiredField("InvoiceAdvancePopup-CostPlace", DefaultContexts.Save, TargetCriteria:="InvoiceType.Rule5DMatrix.RequireCostPlace=True")>
|
||||
Property CostPlace As CostPlace
|
||||
Get
|
||||
Return _CostPlace
|
||||
End Get
|
||||
Set(value As CostPlace)
|
||||
SetPropertyValue("CostPlace", _CostPlace, value)
|
||||
End Set
|
||||
End Property
|
||||
<RuleRequiredField("InvoiceAdvancePopup-UniqueObjects", DefaultContexts.Save, TargetCriteria:="InvoiceType.Rule5DMatrix.RequireUniqueObjects=True")>
|
||||
Property UniqueObjects As UniqueObjects
|
||||
Get
|
||||
Return _UniqueObjects
|
||||
End Get
|
||||
Set(value As UniqueObjects)
|
||||
SetPropertyValue("UniqueObjects", _UniqueObjects, value)
|
||||
End Set
|
||||
End Property
|
||||
<RuleRequiredField("InvoiceAdvancePopup-JobNumberObjects", DefaultContexts.Save, TargetCriteria:="InvoiceType.Rule5DMatrix.RequireJobNumberObjects=True")>
|
||||
Property JobNumberObjects As JobNumberObjects
|
||||
Get
|
||||
Return _JobNumberObjects
|
||||
End Get
|
||||
Set(value As JobNumberObjects)
|
||||
SetPropertyValue("JobNumberObjects", _JobNumberObjects, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
<RuleRequiredField("InvoiceAdvancePopup.VAT", DefaultContexts.Save)>
|
||||
Property VAT As VAT
|
||||
Get
|
||||
Return _VAT
|
||||
End Get
|
||||
Set(ByVal value As VAT)
|
||||
SetPropertyValue("VAT", _VAT, value)
|
||||
End Set
|
||||
End Property
|
||||
<RuleRequiredField("InvoiceAdvancePopup.BankInformation", DefaultContexts.Save, TargetCriteria:="PaymentOption.PayMode = 1")>
|
||||
<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
|
||||
<ImmediatePostData(True), DataSourceCriteria("CustomersFrom ='@This.CustomersFrom' AND InvoiceTypeBase = 0 OR InvoiceTypeBase = 1")>
|
||||
<RuleRequiredField("InvoiceAdvancePopup.InvoiceType", DefaultContexts.Save)> _
|
||||
Property InvoiceType As InvoiceType
|
||||
Get
|
||||
Return _InvoiceType
|
||||
End Get
|
||||
Set(ByVal value As InvoiceType)
|
||||
SetPropertyValue("InvoiceType", _InvoiceType, value)
|
||||
End Set
|
||||
End Property
|
||||
<Browsable(False)> _
|
||||
Property IsEditable As Boolean
|
||||
Get
|
||||
Return _IsEditable
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
SetPropertyValue("IsEditable", _IsEditable, value)
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
|
||||
#Region "Cool Codes"
|
||||
'<CustomQueryProperties("DisplayableProperties", "Employee_Linq;Orders_Sum_Linq")> _
|
||||
'Public Shared Function OrdersLinq(ByVal s As Session) As IQueryable
|
||||
' Dim orders As New XPQuery(Of Order)(s)
|
||||
' Dim queryOrders = _
|
||||
' From o In orders _
|
||||
' Order By o.Employee.FirstName Ascending _
|
||||
' Group o By GroupKey = o.Employee.FirstName & " " & o.Employee.LastName Into oo = Group _
|
||||
' Where oo.Sum(Function(o) o.Freight) > 10000 _
|
||||
' Select New With {Key .OrderID = oo.Sum(Function(o) o.OrderID), Key .Employee_Linq = GroupKey, Key .Orders_Sum_Linq = oo.Sum(Function(o) o.Freight)}
|
||||
' Return queryOrders
|
||||
'End Function
|
||||
#End Region
|
||||
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
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)> _
|
||||
Public Class InvoiceFactoringHeaderPopup
|
||||
Inherits BaseObject
|
||||
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 'A bank által jóváhagyott sorszám
|
||||
Property ContractFile As FileData 'A bank által visszaküldött engedményezési szerzõdés
|
||||
Property Description As String 'Egyéb megjegyzés
|
||||
Property DateExecution As Date 'Dátum
|
||||
Property InterestPercent As Double '3 havi BUBOR + mars!!!
|
||||
Property SpreadFile As FileData
|
||||
End Class
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
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)> _
|
||||
Public Class InvoiceFactoringPopup
|
||||
Inherits BaseObject
|
||||
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 Factoring_Send_Date As Date 'Mikor lett elküldve
|
||||
Property Factoring_Send_Number As String 'Milyen sorszámon !
|
||||
Property InvoiceFactoringParameter As InvoiceFactoringParameter 'Milyen paraméterrel !
|
||||
End Class
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
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)> _
|
||||
Public Class InvoiceHeaderWithPopup
|
||||
Inherits BaseObject
|
||||
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
|
||||
|
||||
<Size(-1)> Property Description As String
|
||||
<Size(-1)> Property DescriptionHeader As String
|
||||
Property NotNeedFinancial As Boolean = False
|
||||
|
||||
End Class
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
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)> _
|
||||
Public Class InvoiceHeader_DescriptionChanger_PopUp
|
||||
Inherits BaseObject
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
End Sub
|
||||
|
||||
Private _Description As String 'Számlán szereplõ megjegyzés
|
||||
|
||||
Overloads Property Description As String
|
||||
Get
|
||||
Return _Description
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("Description", _Description, value)
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
+118
@@ -0,0 +1,118 @@
|
||||
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(), NonPersistent(), NavigationItem(False), CreatableItem(False)> _
|
||||
<Appearance("Hide when CurrencyName is not HUF", AppearanceItemType:="ViewItem", criteria:="InvoiceHeader.CurrencyName.ShortName='HUF'", _
|
||||
targetitems:="row_AmountDEV;", visibility:=Editors.ViewItemVisibility.Hide)> _
|
||||
<Appearance("Hide when CurrencyName is HUF", AppearanceItemType:="ViewItem", criteria:="InvoiceHeader.CurrencyName.ShortName<>'HUF'", _
|
||||
targetitems:="row_AmountHUF;", visibility:=Editors.ViewItemVisibility.Hide)> _
|
||||
<Appearance("Hide when Finalized Action", AppearanceItemType:="Action", criteria:="InvoiceHeader.IsEditable=False and InvoiceHeader.IsProforma=False", _
|
||||
targetitems:="aToTable_InvoiceHold;aToTableD_InvoiceHold;aBackToRowEdit_InvoiceHold;aUp_InvoiceHold;aDown_InvoiceHold", visibility:=Editors.ViewItemVisibility.Hide)> _
|
||||
<Appearance("Hide when Finalized ViewItem", AppearanceItemType:="Action", criteria:="InvoiceHeader.IsEditable=False and InvoiceHeader.IsProforma=False", _
|
||||
targetitems:="row_DatePayment;row_ShortName;row_AmountDEV;row_AmountHUF;row_Percent", visibility:=Editors.ViewItemVisibility.Hide)> _
|
||||
Public Class InvoiceHoldPopup
|
||||
Inherits BaseObject
|
||||
|
||||
Private _InvoiceHeader As InvoiceHeader
|
||||
|
||||
Private _row_DatePayment As Date
|
||||
Private _row_ShortName As String
|
||||
Private _row_AmountHUF As Double
|
||||
Private _row_AmountDEV As Double
|
||||
Private _row_Percent As Double
|
||||
|
||||
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.
|
||||
'row_Percent = 5
|
||||
End Sub
|
||||
|
||||
Property InvoiceHeader As InvoiceHeader
|
||||
Get
|
||||
Return _InvoiceHeader
|
||||
End Get
|
||||
Set(value As InvoiceHeader)
|
||||
SetPropertyValue("InvoiceHeader", _InvoiceHeader, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
<NonPersistent()> _
|
||||
<RuleRequiredField("InvoiceHoldPopup-row_DatePayment", "aToTable_InvoiceHold_Contexts")> _
|
||||
Property row_DatePayment As Date
|
||||
Get
|
||||
Return _row_DatePayment
|
||||
End Get
|
||||
Set(value As Date)
|
||||
SetPropertyValue("row_DatePayment", _row_DatePayment, value)
|
||||
End Set
|
||||
End Property
|
||||
<NonPersistent()> _
|
||||
Property row_ShortName As String
|
||||
Get
|
||||
Return _row_ShortName
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("row_ShortName", _row_ShortName, value)
|
||||
End Set
|
||||
End Property
|
||||
<NonPersistent()> _
|
||||
<RuleValueComparison("InvoiceHoldPopup-row_AmountHUF", "aToTable_InvoiceHold_Contexts", ValueComparisonType.GreaterThan, "0", targetcriteria:="InvoiceHeader.CurrencyName.ShortName='HUF'")> _
|
||||
Property row_AmountHUF As Double
|
||||
Get
|
||||
Return _row_AmountHUF
|
||||
End Get
|
||||
Set(value As Double)
|
||||
SetPropertyValue("row_AmountHUF", _row_AmountHUF, value)
|
||||
End Set
|
||||
End Property
|
||||
<NonPersistent()> _
|
||||
<RuleValueComparison("InvoiceHoldPopup-row_AmountDEV", "aToTable_InvoiceHold_Contexts", ValueComparisonType.GreaterThan, "0", targetcriteria:="InvoiceHeader.CurrencyName.ShortName<>'HUF'")> _
|
||||
Property row_AmountDEV As Double
|
||||
Get
|
||||
Return _row_AmountDEV
|
||||
End Get
|
||||
Set(value As Double)
|
||||
SetPropertyValue("row_AmountDEV", _row_AmountDEV, value)
|
||||
End Set
|
||||
End Property
|
||||
<NonPersistent()> _
|
||||
<RuleRange("InvoiceHoldPopup", "aToTable_InvoiceHold_Contexts", "1", "99")> _
|
||||
Property row_Percent As Double
|
||||
Get
|
||||
Return _row_Percent
|
||||
End Get
|
||||
Set(value As Double)
|
||||
SetPropertyValue("row_Percent", _row_Percent, value)
|
||||
If Session.IsObjectsLoading = False And Session.IsObjectsSaving = False Then
|
||||
row_AmountHUF = Math.Round(InvoiceHeader.TotalBruttoHUF * (value / 100), 0, MidpointRounding.AwayFromZero)
|
||||
row_AmountDEV = Math.Round(InvoiceHeader.TotalBruttoDEV * (value / 100), 2, MidpointRounding.AwayFromZero)
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
<VisibleInListView(False), VisibleInLookupListView(False)> _
|
||||
ReadOnly Property InvoiceHold As XPCollection(Of InvoiceHold)
|
||||
Get
|
||||
Return New XPCollection(Of InvoiceHold)(Session, CriteriaOperator.Parse("InvoiceHeader=?", Me.InvoiceHeader))
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
+119
@@ -0,0 +1,119 @@
|
||||
Partial Class InvoiceHoldPopupVC
|
||||
|
||||
<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.aBackToRowEdit_InvoiceHold = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aToTable_InvoiceHold = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aToTableD_InvoiceHold = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aDown_InvoiceHold = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aUp_InvoiceHold = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
'
|
||||
'aBackToRowEdit_InvoiceHold
|
||||
'
|
||||
Me.aBackToRowEdit_InvoiceHold.Caption = "Edit row"
|
||||
Me.aBackToRowEdit_InvoiceHold.Category = "aBackToRowEdit_Invoice"
|
||||
Me.aBackToRowEdit_InvoiceHold.ConfirmationMessage = Nothing
|
||||
Me.aBackToRowEdit_InvoiceHold.Id = "aBackToRowEdit_InvoiceHold"
|
||||
Me.aBackToRowEdit_InvoiceHold.ImageName = "table_refresh"
|
||||
Me.aBackToRowEdit_InvoiceHold.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
|
||||
Me.aBackToRowEdit_InvoiceHold.Shortcut = Nothing
|
||||
Me.aBackToRowEdit_InvoiceHold.Tag = Nothing
|
||||
Me.aBackToRowEdit_InvoiceHold.TargetObjectsCriteria = Nothing
|
||||
Me.aBackToRowEdit_InvoiceHold.TargetViewId = "InvoiceHoldPopup_DetailView"
|
||||
Me.aBackToRowEdit_InvoiceHold.ToolTip = Nothing
|
||||
Me.aBackToRowEdit_InvoiceHold.TypeOfView = Nothing
|
||||
'
|
||||
'aToTable_InvoiceHold
|
||||
'
|
||||
Me.aToTable_InvoiceHold.Caption = "aToTable"
|
||||
Me.aToTable_InvoiceHold.Category = "aToTable_Invoice"
|
||||
Me.aToTable_InvoiceHold.ConfirmationMessage = Nothing
|
||||
Me.aToTable_InvoiceHold.Id = "aToTable_InvoiceHold"
|
||||
Me.aToTable_InvoiceHold.ImageName = "row_add_after"
|
||||
Me.aToTable_InvoiceHold.Shortcut = Nothing
|
||||
Me.aToTable_InvoiceHold.Tag = Nothing
|
||||
Me.aToTable_InvoiceHold.TargetObjectsCriteria = Nothing
|
||||
Me.aToTable_InvoiceHold.TargetViewId = "InvoiceHoldPopup_DetailView"
|
||||
Me.aToTable_InvoiceHold.ToolTip = Nothing
|
||||
Me.aToTable_InvoiceHold.TypeOfView = GetType(DevExpress.ExpressApp.View)
|
||||
'
|
||||
'aToTableD_InvoiceHold
|
||||
'
|
||||
Me.aToTableD_InvoiceHold.Caption = "Delete row"
|
||||
Me.aToTableD_InvoiceHold.Category = "aToTableD_InvoiceHold"
|
||||
Me.aToTableD_InvoiceHold.ConfirmationMessage = Nothing
|
||||
Me.aToTableD_InvoiceHold.Id = "aToTableD_InvoiceHold"
|
||||
Me.aToTableD_InvoiceHold.ImageName = "row_delete"
|
||||
Me.aToTableD_InvoiceHold.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
|
||||
Me.aToTableD_InvoiceHold.Shortcut = Nothing
|
||||
Me.aToTableD_InvoiceHold.Tag = Nothing
|
||||
Me.aToTableD_InvoiceHold.TargetObjectsCriteria = Nothing
|
||||
Me.aToTableD_InvoiceHold.TargetViewId = "InvoiceHoldPopup_DetailView"
|
||||
Me.aToTableD_InvoiceHold.ToolTip = Nothing
|
||||
Me.aToTableD_InvoiceHold.TypeOfView = Nothing
|
||||
'
|
||||
'aDown_InvoiceHold
|
||||
'
|
||||
Me.aDown_InvoiceHold.Caption = "Down"
|
||||
Me.aDown_InvoiceHold.Category = "RecordsNavigation"
|
||||
Me.aDown_InvoiceHold.ConfirmationMessage = Nothing
|
||||
Me.aDown_InvoiceHold.Id = "aDown_InvoiceHold"
|
||||
Me.aDown_InvoiceHold.ImageName = "arrow_down_green"
|
||||
Me.aDown_InvoiceHold.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
|
||||
Me.aDown_InvoiceHold.Shortcut = Nothing
|
||||
Me.aDown_InvoiceHold.Tag = Nothing
|
||||
Me.aDown_InvoiceHold.TargetObjectsCriteria = Nothing
|
||||
Me.aDown_InvoiceHold.TargetObjectType = GetType(Nuvolar.[Module].InvoiceHold)
|
||||
Me.aDown_InvoiceHold.TargetViewId = ""
|
||||
Me.aDown_InvoiceHold.ToolTip = Nothing
|
||||
Me.aDown_InvoiceHold.TypeOfView = GetType(DevExpress.ExpressApp.View)
|
||||
'
|
||||
'aUp_InvoiceHold
|
||||
'
|
||||
Me.aUp_InvoiceHold.Caption = "Up"
|
||||
Me.aUp_InvoiceHold.Category = "RecordsNavigation"
|
||||
Me.aUp_InvoiceHold.ConfirmationMessage = Nothing
|
||||
Me.aUp_InvoiceHold.Id = "aUp_InvoiceHold"
|
||||
Me.aUp_InvoiceHold.ImageName = "arrow_up_green"
|
||||
Me.aUp_InvoiceHold.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
|
||||
Me.aUp_InvoiceHold.Shortcut = Nothing
|
||||
Me.aUp_InvoiceHold.Tag = Nothing
|
||||
Me.aUp_InvoiceHold.TargetObjectsCriteria = Nothing
|
||||
Me.aUp_InvoiceHold.TargetObjectType = GetType(Nuvolar.[Module].InvoiceHold)
|
||||
Me.aUp_InvoiceHold.TargetViewId = ""
|
||||
Me.aUp_InvoiceHold.ToolTip = Nothing
|
||||
Me.aUp_InvoiceHold.TypeOfView = GetType(DevExpress.ExpressApp.View)
|
||||
|
||||
End Sub
|
||||
Friend WithEvents aDown_InvoiceHold As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aUp_InvoiceHold As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aBackToRowEdit_InvoiceHold As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aToTable_InvoiceHold As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aToTableD_InvoiceHold As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
|
||||
End Class
|
||||
+138
@@ -0,0 +1,138 @@
|
||||
<?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="aBackToRowEdit_InvoiceHold.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 56</value>
|
||||
</metadata>
|
||||
<metadata name="aToTable_InvoiceHold.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 134</value>
|
||||
</metadata>
|
||||
<metadata name="aToTableD_InvoiceHold.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 173</value>
|
||||
</metadata>
|
||||
<metadata name="aDown_InvoiceHold.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 95</value>
|
||||
</metadata>
|
||||
<metadata name="aUp_InvoiceHold.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 95</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
</root>
|
||||
+167
@@ -0,0 +1,167 @@
|
||||
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.ExpressApp.Editors
|
||||
Imports DevExpress.Data.Filtering
|
||||
Imports DevExpress.Xpo
|
||||
|
||||
Public Class InvoiceHoldPopupVC
|
||||
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()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub aToTable_InvoiceHold_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aToTable_InvoiceHold.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _InvoiceHoldPopup As InvoiceHoldPopup = TryCast(View.SelectedObjects(0), InvoiceHoldPopup)
|
||||
Dim _InvoiceHold_Collection As XPCollection(Of InvoiceHold)
|
||||
Dim _InvoiceHold As InvoiceHold
|
||||
Dim _AmountRemainingHUF As Double = _InvoiceHoldPopup.InvoiceHeader.TotalBruttoHUF
|
||||
Dim _AmountRemainingDEV As Double = _InvoiceHoldPopup.InvoiceHeader.TotalBruttoDEV
|
||||
|
||||
|
||||
_InvoiceHold = _ocur.FindObject(Of InvoiceHold)(CriteriaOperator.Parse("RowType='Normal' and InvoiceHeader.Oid=?", _InvoiceHoldPopup.InvoiceHeader.Oid), PersistentCriteriaEvaluationBehavior.InTransaction)
|
||||
|
||||
If _InvoiceHold IsNot Nothing Then
|
||||
_ocur.Delete(_InvoiceHold)
|
||||
End If
|
||||
|
||||
_ocur.CommitChanges()
|
||||
|
||||
_InvoiceHold = _ocur.CreateObject(Of InvoiceHold)()
|
||||
_InvoiceHold.RowType = eHoldRowType.Hold
|
||||
_InvoiceHold.InvoiceHeader = _InvoiceHoldPopup.InvoiceHeader
|
||||
_InvoiceHold.ShortName = _InvoiceHoldPopup.row_ShortName
|
||||
_InvoiceHold.AmountHUF = _InvoiceHoldPopup.row_AmountHUF
|
||||
_InvoiceHold.AmountDEV = _InvoiceHoldPopup.row_AmountDEV
|
||||
_InvoiceHold.DatePayment = _InvoiceHoldPopup.row_DatePayment
|
||||
|
||||
_ocur.CommitChanges()
|
||||
|
||||
_InvoiceHold_Collection = New XPCollection(Of InvoiceHold)(PersistentCriteriaEvaluationBehavior.InTransaction, _ocur.Session, CriteriaOperator.Parse("InvoiceHeader.Oid=?", _InvoiceHoldPopup.InvoiceHeader.Oid))
|
||||
For Each _InvoiceHold In _InvoiceHold_Collection
|
||||
_AmountRemainingHUF -= _InvoiceHold.AmountHUF
|
||||
_AmountRemainingDEV -= _InvoiceHold.AmountDEV
|
||||
Next
|
||||
|
||||
_InvoiceHold = _ocur.CreateObject(Of InvoiceHold)()
|
||||
_InvoiceHold.RowType = eHoldRowType.Normal
|
||||
_InvoiceHold.InvoiceHeader = _InvoiceHoldPopup.InvoiceHeader
|
||||
_InvoiceHold.ShortName = ""
|
||||
_InvoiceHold.AmountHUF = _AmountRemainingHUF
|
||||
_InvoiceHold.AmountDEV = _AmountRemainingDEV
|
||||
_InvoiceHold.DatePayment = _InvoiceHoldPopup.InvoiceHeader.DatePayment
|
||||
|
||||
_ocur.CommitChanges()
|
||||
|
||||
|
||||
Dim _DetailView As DetailView = TryCast(View, DetailView)
|
||||
If _DetailView IsNot Nothing Then
|
||||
Dim _ListPropertyEditor As ListPropertyEditor = _DetailView.FindItem("InvoiceHold")
|
||||
|
||||
If _ListPropertyEditor IsNot Nothing Then
|
||||
TryCast(_ListPropertyEditor.ListView, ListView).CollectionSource.Reload()
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub aToTableD_InvoiceHold_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aToTableD_InvoiceHold.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _InvoiceHoldPopup As InvoiceHoldPopup = TryCast(View.SelectedObjects(0), InvoiceHoldPopup)
|
||||
Dim _InvoiceHold_Collection As XPCollection(Of InvoiceHold) = Nothing
|
||||
Dim _InvoiceHold As InvoiceHold = Nothing
|
||||
Dim _AmountRemainingHUF As Double = _InvoiceHoldPopup.InvoiceHeader.TotalBruttoHUF
|
||||
Dim _AmountRemainingDEV As Double = _InvoiceHoldPopup.InvoiceHeader.TotalBruttoDEV
|
||||
Dim _DetailView As DetailView = TryCast(View, DetailView)
|
||||
Dim _ListPropertyEditor As ListPropertyEditor = _DetailView.FindItem("InvoiceHold")
|
||||
Dim _IsNormal = False
|
||||
|
||||
If _ListPropertyEditor IsNot Nothing Then
|
||||
|
||||
|
||||
Dim _ListView As ListView = TryCast(_ListPropertyEditor.ListView, ListView)
|
||||
|
||||
For Each _InvoiceHold In _ListView.SelectedObjects
|
||||
If _InvoiceHold.RowType = eHoldRowType.Hold Then
|
||||
_ocur.Delete(_InvoiceHold)
|
||||
End If
|
||||
Next
|
||||
_ocur.CommitChanges()
|
||||
|
||||
_InvoiceHold = _ocur.FindObject(Of InvoiceHold)(CriteriaOperator.Parse("RowType='Normal' and InvoiceHeader.Oid=?", _InvoiceHoldPopup.InvoiceHeader.Oid), PersistentCriteriaEvaluationBehavior.InTransaction)
|
||||
If _InvoiceHold IsNot Nothing Then
|
||||
_ocur.Delete(_InvoiceHold)
|
||||
End If
|
||||
_ocur.CommitChanges()
|
||||
|
||||
_InvoiceHold_Collection = New XPCollection(Of InvoiceHold)(PersistentCriteriaEvaluationBehavior.InTransaction, _ocur.Session, CriteriaOperator.Parse("InvoiceHeader.Oid=?", _InvoiceHoldPopup.InvoiceHeader.Oid))
|
||||
For Each _InvoiceHold In _InvoiceHold_Collection
|
||||
_AmountRemainingHUF -= _InvoiceHold.AmountHUF
|
||||
_AmountRemainingDEV -= _InvoiceHold.AmountDEV
|
||||
_IsNormal = True
|
||||
Next
|
||||
|
||||
If _IsNormal Then
|
||||
_InvoiceHold = _ocur.CreateObject(Of InvoiceHold)()
|
||||
_InvoiceHold.RowType = eHoldRowType.Normal
|
||||
_InvoiceHold.InvoiceHeader = _InvoiceHoldPopup.InvoiceHeader
|
||||
_InvoiceHold.ShortName = ""
|
||||
_InvoiceHold.AmountHUF = _AmountRemainingHUF
|
||||
_InvoiceHold.AmountDEV = _AmountRemainingDEV
|
||||
_InvoiceHold.DatePayment = _InvoiceHoldPopup.InvoiceHeader.DatePayment
|
||||
|
||||
_ocur.CommitChanges()
|
||||
End If
|
||||
|
||||
|
||||
_ListView.CollectionSource.Reload()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub aBackToRowEdit_InvoiceHold_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aBackToRowEdit_InvoiceHold.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _InvoiceHoldPopup As InvoiceHoldPopup = TryCast(View.SelectedObjects(0), InvoiceHoldPopup)
|
||||
Dim _InvoiceHold_Collection As XPCollection(Of InvoiceHold) = Nothing
|
||||
Dim _InvoiceHold As InvoiceHold = Nothing
|
||||
|
||||
Dim _DetailView As DetailView = TryCast(View, DetailView)
|
||||
Dim _ListPropertyEditor As ListPropertyEditor = _DetailView.FindItem("InvoiceHold")
|
||||
Dim _IsNormal = False
|
||||
|
||||
If _ListPropertyEditor IsNot Nothing Then
|
||||
Dim _ListView As ListView = TryCast(_ListPropertyEditor.ListView, ListView)
|
||||
If _ListView IsNot Nothing Then
|
||||
_InvoiceHold = TryCast(_ListView.SelectedObjects(0), InvoiceHold)
|
||||
If _InvoiceHold IsNot Nothing Then
|
||||
_InvoiceHoldPopup.row_AmountHUF = _InvoiceHold.AmountHUF
|
||||
_InvoiceHoldPopup.row_AmountDEV = _InvoiceHold.AmountDEV
|
||||
_InvoiceHoldPopup.row_DatePayment = _InvoiceHold.DatePayment
|
||||
_InvoiceHoldPopup.row_ShortName = _InvoiceHold.ShortName
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
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 InvoiceRows_Changer_Popup
|
||||
Inherits BaseObject
|
||||
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 DateExecution As Date
|
||||
Property Controlling As Controlling
|
||||
Property CostPlace As CostPlace
|
||||
Property CostHolder As CostHolder
|
||||
Property UniqueObjects As UniqueObjects
|
||||
Property JobNumberObjects As JobNumberObjects
|
||||
|
||||
End Class
|
||||
Reference in New Issue
Block a user