First create solution

This commit is contained in:
2017-03-08 11:21:27 +01:00
commit a2fb86bacf
5508 changed files with 1082238 additions and 0 deletions
@@ -0,0 +1,531 @@
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
Public Enum eWeightMode
eTotalWeightperQuantity = 0 'Össz súly
eUnitWeightperQuantity = 1 'Egység súly
End Enum
<DefaultClassOptions()>
<NavigationItem("BusinessTransactions")>
<DefaultProperty("DisplayName")>
<Appearance("DeliveryNoteInHeader - Disable IsStorno and IsEditable_DeliveryNoteIn", AppearanceItemType.ViewItem, "1=1", TargetItems:="IsStorno;IsEditable", Enabled:=False)>
<Appearance("DeliveryNoteInHeader - Disable all properties on DetailNoteInHeader when IsEditable = False",
AppearanceItemType.ViewItem,
"IsEditable = False",
TargetItems:="DeliveryNoteInType;DocumentNumber;CustomersFrom;DateCreated;" +
"CurrencyRate;IsEditable;IsStorno;ObjectCreated;UserCreated;IsControlled;IsStoraged", Enabled:=False)>
<Appearance("DeliveryNoteInHeader - Hide payment properties if DeliveryNoteInType.IsPrice = False", AppearanceItemType.ViewItem, "DeliveryNoteInType.IsPrice=False", TargetItems:="PaymentOption;DatePayment;row_ListPriceDEV;row_ListPriceHUF;CurrencyName;CurrencyRate;row_DiscountPercent", Visibility:=Editors.ViewItemVisibility.Hide)>
<Appearance("DeliveryNoteInHeader - Hide DeliveryNoteInHeader-CurrencyRate", AppearanceItemType.ViewItem, "CurrencyName.ShortName='HUF'", TargetItems:="CurrencyRate", Visibility:=Editors.ViewItemVisibility.Hide)>
<Appearance("DeliveryNoteInHeader - Hide _row_ListPriceDEV if CurrencyName is HUF", AppearanceItemType.ViewItem, "CurrencyName.ShortName='HUF' Or IsNull(DeliveryNoteInType)=True", TargetItems:="row_ListPriceDEV", Visibility:=Editors.ViewItemVisibility.Hide)>
<Appearance("DeliveryNoteInHeader - Hide _row_ListPriceHUF if CurrencyName is not HUF", AppearanceItemType.ViewItem, "(CurrencyName.ShortName<>'HUF' And IsNull(CurrencyName)=False) Or IsNull(DeliveryNoteInType)=True", TargetItems:="row_ListPriceHUF", Visibility:=Editors.ViewItemVisibility.Hide)>
<Appearance("DeliveryNoteInHeader - Disable aToTable_DeliveryNoteIn", AppearanceItemType.Action, "IsEditable = False", TargetItems:="aTotable_DeliveryNoteIn", Visibility:=Editors.ViewItemVisibility.Hide)>
<Appearance("DeliveryNoteInHeader - Disable aToTableD_DeliveryNoteIn", AppearanceItemType.Action, "IsEditable = False", TargetItems:="aTotableD_DeliveryNoteIn", Visibility:=Editors.ViewItemVisibility.Hide)>
<Appearance("DeliveryNoteInHeader - Disable aFinalize_DeliveryNoteIn", AppearanceItemType.Action, "IsEditable = False", TargetItems:="aFinalize_DeliveryNoteIn;aFinalize_And_Storage_DeliveryNoteIn", Enabled:=False)>
<Appearance("DeliveryNoteInHeader - Enable aFinalize_DeliveryNoteIn", AppearanceItemType.Action, "IsEditable = True", TargetItems:="aFinalize_DeliveryNoteIn", Enabled:=True)>
<Appearance("DeliveryNoteInHeader - Disable aGenerateStorageIn_From_DeliveryNoteInRows", AppearanceItemType.Action, "IsStorno = True", TargetItems:="aGenerateStorageIn_From_DeliveryNoteInRows", Enabled:=False)>
<Appearance("DeliveryNoteInHeader - Disable aStorno_DeliveryNoteIn", AppearanceItemType.Action, "IsStorno = True Or IsEditable = True", TargetItems:="aStorno_DeliveryNoteIn", Enabled:=False)>
<Appearance("DeliveryNoteInHeader - Enable aStorno_DeliveryNoteIn", AppearanceItemType.Action, "IsStorno = False And IsEditable = False", TargetItems:="aStorno_DeliveryNoteIn", Enabled:=True)>
<Appearance("DeliveryNoteInHeader - Disable OpeneObject_DeliveryNoteIn", AppearanceItemType.Action, "IsEditable = False", TargetItems:="OpenObject", Enabled:=False)>
<Appearance("DeliveryNoteInHeader - Disable Delete_DeliveryNoteIn", AppearanceItemType.Action, "IsEditable = False", TargetItems:="Delete", Enabled:=False)>
<Appearance("DeliveryNoteInHeader - Disable Save_DeliveryNoteIn", AppearanceItemType.Action, "IsEditable = False", TargetItems:="Save", Enabled:=False)>
<Appearance("DeliveryNoteInHeader - Disable SaveAndNew_DeliveryNoteIn", AppearanceItemType.Action, "IsEditable = False", TargetItems:="SaveAndNew", Enabled:=False)>
<Appearance("DeliveryNoteInHeader - Disable SaveAndClose_DeliveryNoteIn", AppearanceItemType.Action, "IsEditable = False", TargetItems:="SaveAndClose", Enabled:=False)>
<Appearance("DeliveryNoteInHeader - Disable ShowAllContexts_DeliveryNoteIn", AppearanceItemType.Action, "IsEditable = False", TargetItems:="ShowAllContexts", Enabled:=False)>
<Appearance("DeliveryNoteInHeader - Disable DeliveryNoteInHeader-CustomersFrom", AppearanceItemType.ViewItem, "IsNull(CustomersFrom)=False", TargetItems:="CustomersFrom", Enabled:=False)>
<Appearance("DeliveryNoteInHeader - Disable DeliveryNoteInHeader-DeliveryNoteInType", AppearanceItemType.ViewItem, "IsNull(DeliveryNoteInType)=False", TargetItems:="DeliveryNoteInType", Enabled:=False)>
<Appearance("DeliveryNoteInHeader - Disable DeliveryNoteInHeader-Customers", AppearanceItemType.ViewItem, "IsNull(Customers)=False", TargetItems:="Customers", Enabled:=False)>
<Appearance("DeliveryNoteInHeader - Disable DocumentNumber", AppearanceItemType.ViewItem, "1=1", TargetItems:="DocumentNumber", Enabled:=False)>
<Appearance("DeliveryNoteInHeader - Set line to red if IsStorno=True", AppearanceItemType:="ViewItem", TargetItems:="*", FontColor:="Red", Criteria:="IsStorno=True", Context:="ListView")>
<Appearance("DeliveryNoteInHeader - Disable ObjectCreated DeliveryNoteInHeader", AppearanceItemType.ViewItem, "1=1", TargetItems:="ObjectCreated", Enabled:=False)>
<Appearance("DeliveryNoteInHeader - Disable UserCreated DeliveryNoteInHeader", AppearanceItemType.ViewItem, "1=1", TargetItems:="UserCreated", Enabled:=False)>
<Appearance("DeliveryNoteInHeader - Hide Tab_DeliveryNoteInRows", AppearanceItemType.LayoutItem, "IsNull(DeliveryNoteInType) Or IsNull(DocumentNumber) Or IsNull(Customers) Or IsNull(CustomersFrom)", TargetItems:="Tab_DeliveryNoteInRows", Visibility:=Editors.ViewItemVisibility.Hide)>
<Appearance("DeliveryNoteInHeader - Hide Tab_StorageInRows", AppearanceItemType.LayoutItem, "IsNull(DeliveryNoteInType) Or IsNull(DocumentNumber) Or IsNull(Customers) Or IsNull(CustomersFrom)", TargetItems:="Tab_StorageInRows", Visibility:=Editors.ViewItemVisibility.Hide)>
<Appearance("DeliveryNoteInHeader - Hide Tab_StorageOutRowsInRows", AppearanceItemType.LayoutItem, "IsNull(DeliveryNoteInType) Or IsNull(DocumentNumber) Or IsNull(Customers) Or IsNull(CustomersFrom)", TargetItems:="Tab_StorageOutRowsInRows", Visibility:=Editors.ViewItemVisibility.Hide)>
<Appearance("DeliveryNoteInHeader - Hide all row_ properties, when IsEditable = False",
AppearanceItemType.ViewItem,
"IsEditable = False",
TargetItems:="row_PacketNumber;row_CountryFrom;row_Weight;row_OrderOutRows;row_Products;row_QTT;" +
"row_ListPriceHUF;row_ListPriceDEV;row_DiscountPercent;row_NoteRows;row_WeightMode;", Visibility:=Editors.ViewItemVisibility.Hide)>
<Appearance("DeliveryNoteInHeader - Disable DatePayment", AppearanceItemType.ViewItem, "1=1", TargetItems:="DatePayment", Enabled:=False)>
Public Class DeliveryNoteInHeader 'Bejövő szállítólevél fejléc
Inherits BaseObject
Private _DeliveryNoteInType As DeliveryNoteInType 'Bejövő szállítólevél tipusa
Private _DocumentNumber As String 'Bizonylat száma
Private _DocumentNumberIn As String 'Belső sorszám (véglegesítéskor kapja)
Private _CustomersFrom As CustomersFrom 'Saját cég
Private _Customers As Customers 'Beszállító
Private _DateCreated As Date 'Kiáll. dátuma
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 _ShipmentOption As ShipmentOption 'Szállítási opció
Private _QualityOption As QualityOption 'Minőségi opció
Private _CurrencyName As CurrencyName 'Deviza
Private _CurrencyRate As Double 'Deviza árfolyam
Private _Note As String 'Fejléc megjegyzés
Private _IsEditable As Boolean = True 'Szerkeszthető
Private _IsStorno As Boolean = False 'Végleges
Private _ObjectCreated As Date 'Objektum keletkezésének dátuma
Private _UserCreated As User
Private _IsControlled As Boolean 'Akkor lesz True, ha a szállítólevélen lévő összes sor össze van pontozva számlával
Private _IsStoraged As Boolean 'Akkor lesz True, ha minden tétele be lett vételezve
Private _DocumentFile As FileData 'A beszkennelt szállítólevél
'-- Non persistent
Private _row_OrderOutRows As OrderOutRows 'Kimenő megrendelési sorok
Private _row_Products As Products 'Termék, ami a szállítólevelen van
Private _row_QTT As Double 'Termék szállított mennyisége
Private _row_ListPriceHUF As Double 'Termék listaára HUF
Private _row_ListPriceDEV As Double 'Termék listaára DEV
Private _row_DiscountPercent As Double 'Termék ár kedvezmény %-ban
Private _row_NoteRows As String 'Sor megjegyzés
Private _row_PacketNumber As String 'Kötegszám, Fémzárszám
Private _row_Weight As Double
Private _row_WeightMode As eWeightMode
Private _row_CountryFrom As Country 'Származási ország !
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
IsEditable = True
IsStorno = False
IsControlled = False
IsStoraged = False
CurrencyName = Session.FindObject(Of CurrencyName)(CriteriaOperator.Parse("ShortName='HUF'"))
End Sub
Protected Overrides Sub OnSaving()
MyBase.OnSaving()
If _DocumentNumber = "" Then
_DocumentNumber = DeliveryNoteInType.NumberGenerator.GetNewNumber(DeliveryNoteInType.NumberGenerator)
End If
If Session.IsNewObject(Me) Then
ObjectCreated = GetSQLTime(Session)
UserCreated = Session.GetObjectByKey(Of User)(Session.GetKeyValue(SecuritySystem.CurrentUser))
End If
End Sub
<ImmediatePostData()>
<RuleRequiredField("DeliveryNoteInHeader.DeliveryNoteInType", DefaultContexts.Save)>
Property DeliveryNoteInType As DeliveryNoteInType
Get
Return _DeliveryNoteInType
End Get
Set(value As DeliveryNoteInType)
SetPropertyValue("DeliveryNoteInType", _DeliveryNoteInType, value)
End Set
End Property
<NonCloneable()>
Property DocumentNumber() As String
Get
Return _DocumentNumber
End Get
Set(ByVal value As String)
SetPropertyValue("DocumentNumber", _DocumentNumber, value)
End Set
End Property
<NonCloneable()>
<RuleRequiredField("DeliveryNoteInHeaderDocumentNumberIn-1", "aFinalize_DeliveryNoteIn_Contexts")>
<RuleRequiredField("DeliveryNoteInHeaderDocumentNumberIn-2", "aFinalize_And_Storage_DeliveryNoteIn_Contexts")>
Property DocumentNumberIn() As String
Get
Return _DocumentNumberIn
End Get
Set(ByVal value As String)
SetPropertyValue("DocumentNumberIn", _DocumentNumberIn, value)
End Set
End Property
<RuleRequiredField("DeliveryNoteInHeader.Customers", DefaultContexts.Save)>
<ImmediatePostData(True)>
Property Customers() As Customers
Get
Return _Customers
End Get
Set(ByVal value As Customers)
SetPropertyValue("Customers", _Customers, value)
End Set
End Property
<RuleRequiredField("DeliveryNoteInHeader.CustomersFrom", DefaultContexts.Save)>
<ImmediatePostData(True)>
Property CustomersFrom() As CustomersFrom
Get
Return _CustomersFrom
End Get
Set(ByVal value As CustomersFrom)
SetPropertyValue("CustomersFrom", _CustomersFrom, value)
End Set
End Property
Property DateCreated() As Date
Get
Return _DateCreated
End Get
Set(ByVal value As Date)
SetPropertyValue("DateCreated", _DateCreated, value)
End Set
End Property
<ImmediatePostData()>
Property DateExecution() As Date
Get
Return _DateExecution
End Get
Set(ByVal value As Date)
SetPropertyValue("DateExecution", _DateExecution, value)
If Not Session.IsObjectsSaving And Not Session.IsObjectsLoading Then
If Me.PaymentOption IsNot Nothing Then
Me.DatePayment = Nothing
If PaymentOption.DatePaymentMode = eDatePaymentMode.eDateCreated Then
Else
Me.DatePayment = value.AddDays(PaymentOption.PayDay)
End If
End If
End If
End Set
End Property
<ImmediatePostData()>
Property DatePayment() As Date
Get
Return _DatePayment
End Get
Set(ByVal value As Date)
SetPropertyValue("DatePayment", _DatePayment, value)
End Set
End Property
<ImmediatePostData()>
Property PaymentOption As PaymentOption
Get
Return _PaymentOption
End Get
Set(value As PaymentOption)
SetPropertyValue("PaymentOption", _PaymentOption, value)
If Not Session.IsObjectsSaving And Not Session.IsObjectsLoading Then
If Me.DateExecution <> Nothing And value IsNot Nothing Then
Me.DatePayment = Nothing
Me.DatePayment = DateExecution.AddDays(value.PayDay)
End If
End If
End Set
End Property
Property ShipmentOption() As ShipmentOption
Get
Return _ShipmentOption
End Get
Set(ByVal value As ShipmentOption)
SetPropertyValue("ShipmentOption", _ShipmentOption, value)
End Set
End Property
Property QualityOption() As QualityOption
Get
Return _QualityOption
End Get
Set(ByVal value As QualityOption)
SetPropertyValue("QualityOption", _QualityOption, value)
End Set
End Property
<ImmediatePostData()>
<RuleRequiredField("DeliveryNoteInHeader.CurrencyName", DefaultContexts.Save, TargetCriteria:="DeliveryNoteInType.IsPrice=True")>
Property CurrencyName() As CurrencyName
Get
Return _CurrencyName
End Get
Set(ByVal value As CurrencyName)
SetPropertyValue("CurrencyName", _CurrencyName, value)
End Set
End Property
<RuleRange("DeliveryNoteInHeader.CurrencyRate", DefaultContexts.Save, 0.001, 999999999, TargetCriteria:="CurrencyName.ShortName<>'HUF' And IsNull(CurrencyName)=False And DeliveryNoteInType.IsPrice=True")>
Property CurrencyRate As Double
Get
Return _CurrencyRate
End Get
Set(value As Double)
SetPropertyValue("CurrencyRate", _CurrencyRate, value)
End Set
End Property
<Size(-1)>
Property Note() As String
Get
Return _Note
End Get
Set(ByVal value As String)
SetPropertyValue("Note", _Note, value)
End Set
End Property
<NonCloneable()>
Property IsEditable() As Boolean
Get
Return _IsEditable
End Get
Set(ByVal value As Boolean)
SetPropertyValue("IsEditable", _IsEditable, value)
End Set
End Property
<NonCloneable()>
Property IsStorno() As Boolean
Get
Return _IsStorno
End Get
Set(ByVal value As Boolean)
SetPropertyValue("IsStorno", _IsStorno, 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
Property IsControlled As Boolean
Get
Return _IsControlled
End Get
Set(value As Boolean)
SetPropertyValue("IsControlled", _IsControlled, value)
End Set
End Property
Property IsStoraged As Boolean
Get
Return _IsStoraged
End Get
Set(value As Boolean)
SetPropertyValue("IsStoraged", _IsStoraged, value)
End Set
End Property
<Aggregated(), ExpandObjectMembers(ExpandObjectMembers.Never)>
Property DocumentFile() As FileData
Get
Return _DocumentFile
End Get
Set(ByVal value As FileData)
SetPropertyValue("DocumentFile", _DocumentFile, value)
End Set
End Property
'-- NON persistent propertyk-------------------------------
<VisibleInListView(False)>
<ImmediatePostData(True), DataSourceProperty("OrderOutRows")>
<NonPersistent>
Property row_OrderOutRows As OrderOutRows
Get
Return _row_OrderOutRows
End Get
Set(value As OrderOutRows)
SetPropertyValue("row_OrderOutRows", _row_OrderOutRows, value)
If Session.IsObjectsLoading = False And Session.IsObjectsSaving = False Then
If value IsNot Nothing Then
Me.row_Products = value.Products
Me.row_QTT = value.QTT - value.QTT_DeliveryNoteIn
Me.row_ListPriceHUF = value.ListPriceHUF
Me.row_ListPriceDEV = value.ListPriceDEV
Me.row_DiscountPercent = value.DiscountPercent
End If
End If
End Set
End Property
<NonPersistent()>
<RuleRequiredField("DeliveryNoteInHeader.row_Products", "aToTableDeliveryNoteIn_Context")>
<VisibleInListView(False)>
<ImmediatePostData()>
Property row_Products As Products
Get
Return _row_Products
End Get
Set(ByVal value As Products)
SetPropertyValue("row_Products", _row_Products, value)
If Session.IsObjectsLoading = False And Session.IsObjectsSaving = False Then
If row_Products IsNot Nothing Then
Me.row_ListPriceHUF = Me.row_Products.ListPriceInHUF
Me.row_ListPriceDEV = Me.row_Products.ListPriceInDEV
End If
End If
End Set
End Property
<NonPersistent()>
<RuleRange("DeliveryNoteInHeader.row_QTT", "aToTableDeliveryNoteIn_Context", 0.001, 999999999)>
<VisibleInListView(False)>
Property row_QTT As Double
Get
Return _row_QTT
End Get
Set(ByVal value As Double)
SetPropertyValue("row_QTT", _row_QTT, value)
End Set
End Property
<NonPersistent()>
<RuleRange("DeliveryNoteInHeader.row_ListPriceHUF", "aToTableDeliveryNoteIn_Context", 0.001, 999999999, TargetCriteria:="CurrencyName.ShortName='HUF' And DeliveryNoteInType.IsPrice=True")>
<VisibleInListView(False)>
Property row_ListPriceHUF As Double
Get
Return _row_ListPriceHUF
End Get
Set(ByVal value As Double)
SetPropertyValue("row_ListPriceHUF", _row_ListPriceHUF, value)
End Set
End Property
<NonPersistent()>
<RuleRange("DeliveryNoteInHeader.row_ListPriceDEV", "aToTableDeliveryNoteIn_Context", 0.001, 999999999, TargetCriteria:="CurrencyName.ShortName<>'HUF' And IsNull(CurrencyName)=False And DeliveryNoteInType.IsPrice=True")>
<VisibleInListView(False)>
Property row_ListPriceDEV As Double
Get
Return _row_ListPriceDEV
End Get
Set(ByVal value As Double)
SetPropertyValue("row_ListPriceDEV", _row_ListPriceDEV, value)
End Set
End Property
<RuleRange("DeliveryNoteInHeader.row_DiscountPercent", "aToTableDeliveryNoteIn_Context", 0, 99)>
<NonPersistent()>
<VisibleInListView(False)>
Property row_DiscountPercent As Double
Get
Return _row_DiscountPercent
End Get
Set(ByVal value As Double)
'If value < 0 Or value > 99 Then
' Throw New Exception("*A kedvemény mértékének 1 és 99 között kell lennie.")
'End If
SetPropertyValue("row_DiscountPercent", _row_DiscountPercent, value)
End Set
End Property
<NonPersistent()>
<VisibleInListView(False)>
Property row_NoteRows As String
Get
Return _row_NoteRows
End Get
Set(value As String)
SetPropertyValue("row_NoteRows", _row_NoteRows, value)
End Set
End Property
<NonPersistent()>
<VisibleInListView(False)>
Property row_PacketNumber As String
Get
Return _row_PacketNumber
End Get
Set(value As String)
SetPropertyValue("row_PacketNumber", _row_PacketNumber, value)
End Set
End Property
<NonPersistent()>
<VisibleInListView(False)>
Property row_Weight As Double
Get
Return _row_Weight
End Get
Set(value As Double)
SetPropertyValue("row_Weight", _row_Weight, value)
End Set
End Property
<NonPersistent>
Property row_WeightMode As eWeightMode
Get
Return _row_WeightMode
End Get
Set(value As eWeightMode)
SetPropertyValue("row_WeightMode", _row_WeightMode, value)
End Set
End Property
<NonPersistent()>
<VisibleInListView(False)>
Property row_CountryFrom As Country
Get
Return _row_CountryFrom
End Get
Set(value As Country)
SetPropertyValue("row_CountryFrom", _row_CountryFrom, value)
End Set
End Property
<VisibleInListView(False)>
<Browsable(False)>
Private ReadOnly Property OrderOutRows As XPCollection(Of OrderOutRows)
Get
'Dim _OrderOutRows As OrderOutRows
Dim _OrderOutRows_Collection As XPCollection(Of OrderOutRows)
Dim _Criteria As String
_Criteria = "OrderOutHeader.IsEditable = False and OrderOutHeader.IsStorno = False and OrderOutHeader.CustomersFrom.Oid=? "
_Criteria += " and OrderOutHeader.CustomersOrder.Oid=? and QTT_DeliveryNoteIn<QTT"
_OrderOutRows_Collection = New XPCollection(Of OrderOutRows)(Session, CriteriaOperator.Parse(_Criteria, Me.CustomersFrom.Oid, Me.Customers.Oid))
Return _OrderOutRows_Collection
End Get
End Property
<Association("DeliveryNoteInHeader-DeliveryNoteInRows", GetType(DeliveryNoteInRows)), VisibleInListView(False)>
ReadOnly Property DeliveryNoteInrows As XPCollection(Of DeliveryNoteInRows)
Get
Return GetCollection(Of DeliveryNoteInRows)("DeliveryNoteInrows")
End Get
End Property
<VisibleInListView(False), VisibleInLookupListView(False)>
ReadOnly Property StorageOutRowsInRows As XPCollection(Of StorageOutRowsInRows)
Get
Return New XPCollection(Of StorageOutRowsInRows)(Session, CriteriaOperator.Parse("StorageInRows.DeliveryNoteInRows.DeliveryNoteInHeader=?", Me))
End Get
End Property
<VisibleInListView(False), VisibleInLookupListView(False)>
ReadOnly Property StorageInRows As XPCollection(Of StorageInRows)
Get
Return New XPCollection(Of StorageInRows)(Session, CriteriaOperator.Parse("DeliveryNoteInRows.DeliveryNoteInHeader=?", Me))
End Get
End Property
<VisibleInListView(False), VisibleInLookupListView(False)>
ReadOnly Property DeliveryNoteInRRFC As XPCollection(Of DeliveryNoteInRRFC)
Get
Return New XPCollection(Of DeliveryNoteInRRFC)(Session, CriteriaOperator.Parse("DeliveryNoteInRows.DeliveryNoteInHeader=?", Me))
End Get
End Property
<VisibleInDetailView(False)>
<VisibleInListView(False)>
<VisibleInLookupListView(False)>
ReadOnly Property DisplayName As String
Get
Return Me.DocumentNumber & ", " & Me.DocumentNumberIn & ", " & Me.DateExecution
End Get
End Property
<VisibleInListView(False), VisibleInLookupListView(False)>
ReadOnly Property OrderInTo As XPCollection(Of OrderInTo)
Get
Dim _OrderInTo_Collection As New XPCollection(Of OrderInTo)(Session, CriteriaOperator.Parse("1=2"))
Dim _OrderInTo As OrderInTo
Dim _DeliveryNoteInRows As DeliveryNoteInRows
For Each _DeliveryNoteInRows In Me.DeliveryNoteInrows
If _DeliveryNoteInRows.OrderOutRows IsNot Nothing Then
Dim _OrderInTo_Collection_1 As New XPCollection(Of OrderInTo)(Session, CriteriaOperator.Parse("OrderOutRows=?", _DeliveryNoteInRows.OrderOutRows))
For Each _OrderInTo In _OrderInTo_Collection_1
_OrderInTo_Collection.Add(_OrderInTo)
Next
End If
Next
Return _OrderInTo_Collection
End Get
End Property
End Class
@@ -0,0 +1,86 @@
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 DeliveryNoteInRRFC 'Szállítói számla igazolási sora és bejövõ szállítólevél sora kapcsolat
Inherits BaseObject
Private _DeliveryNoteInRows As DeliveryNoteInRows 'Szállítólevél sor
Private _RegistryRowsFinancialControlling As RegistryRowsFinancialControlling 'Számla igazolási sor
Private _QTT_Controlled As Double 'Leigazolt mennyiség adott sorra vonatkozólag
Private _BonusHUF As Double ' Bónusz erre a sorra vonatkozólag ! Ez csökkenti, vagy növeli a beszerzési értéket !
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
Protected Overrides Sub OnSaved()
MyBase.OnSaved()
Dim _DeliveryNoteInRRFC_Collection As New XPCollection(Of DeliveryNoteInRRFC)(Session, CriteriaOperator.Parse("DeliveryNoteInRows=?", DeliveryNoteInRows))
Dim _DeliveryNoteInRRFC As DeliveryNoteInRRFC
Dim _QTT_Controlled As Double = 0
For Each _DeliveryNoteInRRFC In _DeliveryNoteInRRFC_Collection
_QTT_Controlled += _DeliveryNoteInRRFC._QTT_Controlled
Next
DeliveryNoteInRows.QTT_Controlled = _QTT_Controlled
DeliveryNoteInRows.Save()
DeliveryNoteInRows.DeliveryNoteInHeader.IsControlled = True
For Each _DeliveryNoteInRows As DeliveryNoteInRows In DeliveryNoteInRows.DeliveryNoteInHeader.DeliveryNoteInrows
If _DeliveryNoteInRows.QTT <> _DeliveryNoteInRows.QTT_Controlled Then
DeliveryNoteInRows.DeliveryNoteInHeader.IsControlled = False
Exit For
End If
Next
DeliveryNoteInRows.DeliveryNoteInHeader.Save()
Session.CommitTransaction()
End Sub
Property DeliveryNoteInRows As DeliveryNoteInRows
Get
Return _DeliveryNoteInRows
End Get
Set(value As DeliveryNoteInRows)
SetPropertyValue("DeliveryNoteInRows", _DeliveryNoteInRows, value)
End Set
End Property
Property RegistryRowsFinancialControlling As RegistryRowsFinancialControlling
Get
Return _RegistryRowsFinancialControlling
End Get
Set(value As RegistryRowsFinancialControlling)
SetPropertyValue("RegistryRowsFinancialControlling", _RegistryRowsFinancialControlling, value)
End Set
End Property
Property QTT_Controlled As Double
Get
Return _QTT_Controlled
End Get
Set(value As Double)
SetPropertyValue("QTT_Controlled", _QTT_Controlled, value)
End Set
End Property
Property BonusHUF As Double
Get
Return _BonusHUF
End Get
Set(value As Double)
SetPropertyValue("BonusHUF", _BonusHUF, value)
End Set
End Property
End Class
@@ -0,0 +1,355 @@
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 DeliveryNoteInRows 'Bejövő szállítólevél sorok
Inherits BaseObject
Private _DeliveryNoteInHeader As DeliveryNoteInHeader
Private _RowIndex As Long = 0 'Sor index
Private _Products As Products 'Termék vagy szolgáltatás
Private _Installation As Installation 'Gyártmány
Private _ListPriceHUF As Double = 0 ' Egységár HUF (nettó !)
Private _ListPriceDEV As Double = 0 ' Egységár DEV (Nettó !)
Private _DiscountPriceHUF As Double = 0 'Kedvezmény összege HUF
Private _DiscountPriceDEV As Double = 0 'Kedvezmény összege DEV
Private _QTT As Double = 0 'Mennyiség
Private _QTT_Process As Double 'Mennyiségi szándék, kézzel beírható
Private _QTT_Controlled As Double 'Erre a sorra vonatkozólag ? lett leigazolva szállítói számlán
Private _QTT_Returned As Double ' Visszárúzott mennyiség
Private _Units As Units ' Mennyiségi egység
Private _VAT As VAT 'ÁFA
Private _OrderOutRows As OrderOutRows 'Kimenő rendelési sor
Private _OfferInRows As OfferInRows
Private _NoteRows As String 'Sor megjegyzés
Private _PacketNumber As String 'Kötegszám
Private _Weight As Double 'Súly (összes mennyiség súlya)
Private _WeightMode As eWeightMode 'Súly értelmezése, egységsúly vagy öszsúly
Private _Area As Double 'Négyzetméter
Private _ITransactionNumber As String 'INRASTAT tranzakciós azonosító
Private _ShipingCode As String 'INTRASTAT szállítási azonosító
Private _row_ListPrice As Double
Private _row_DiscountPercent As Double
Private _row_SumPrice As Double
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
QTT = 0
QTT_Controlled = 0
QTT_Process = 0
QTT_Returned = 0
End Sub
Protected Overrides Sub OnSaving()
MyBase.OnSaving()
End Sub
<Association("DeliveryNoteInHeader-DeliveryNoteInRows", GetType(DeliveryNoteInHeader))> _
Property DeliveryNoteInHeader As DeliveryNoteInHeader
Get
Return _DeliveryNoteInHeader
End Get
Set(ByVal value As DeliveryNoteInHeader)
SetPropertyValue("DeliveryNoteInHeader", _DeliveryNoteInHeader, value)
End Set
End Property
Property RowIndex As Long
Get
Return _RowIndex
End Get
Set(value As Long)
SetPropertyValue("RowIndex", _RowIndex, value)
End Set
End Property
Property Products As Products
Get
Return _Products
End Get
Set(value As Products)
SetPropertyValue("Products", _Products, value)
End Set
End Property
Property Installation As Installation
Get
Return _Installation
End Get
Set(value As Installation)
SetPropertyValue("Installation", _Installation, value)
End Set
End Property
ReadOnly Property SumPriceHUF() As Double
Get
Return Math.Round(_QTT * (_ListPriceHUF - _DiscountPriceHUF), 0, MidpointRounding.AwayFromZero)
End Get
End Property
ReadOnly Property SumPriceDEV() As Double
Get
Return Math.Round(_QTT * (_ListPriceDEV - _DiscountPriceDEV), 2, MidpointRounding.AwayFromZero)
End Get
End Property
ReadOnly Property SumPriceVATHUF As Double
Get
If VAT Is Nothing Then
Return 0
Else
Return Math.Round(SumPriceHUF * VAT.KeyValue, 0, MidpointRounding.AwayFromZero)
End If
End Get
End Property
ReadOnly Property SumPriceVATDEV As Double
Get
If VAT Is Nothing Then
Return 0
Else
Return Math.Round(SumPriceDEV * VAT.KeyValue, 2, MidpointRounding.AwayFromZero)
End If
End Get
End Property
ReadOnly Property SumPriceBruttoHUF As Double
Get
Return SumPriceHUF + SumPriceVATHUF
End Get
End Property
ReadOnly Property SumPriceBruttoDEV As Double
Get
Return SumPriceDEV + SumPriceVATDEV
End Get
End Property
Property ListPriceHUF() As Double
Get
Return _ListPriceHUF
End Get
Set(ByVal value As Double)
SetPropertyValue("ListPriceHUF", _ListPriceHUF, value)
End Set
End Property
Property ListPriceDEV() As Double
Get
Return _ListPriceDEV
End Get
Set(ByVal value As Double)
SetPropertyValue("ListPriceDEV", _ListPriceDEV, value)
End Set
End Property
Property DiscountPriceHUF() As Double
Get
Return _DiscountPriceHUF
End Get
Set(ByVal value As Double)
SetPropertyValue("DiscountPriceHUF", _DiscountPriceHUF, value)
End Set
End Property
Property DiscountPriceDEV() As Double
Get
Return _DiscountPriceDEV
End Get
Set(ByVal value As Double)
SetPropertyValue("DiscountPriceDEV", _DiscountPriceDEV, value)
End Set
End Property
<RuleRequiredField("RuleRequiredField for DeliveryNoteInRows.QTT", DefaultContexts.Save)> _
Property QTT() As Double
Get
Return _QTT
End Get
Set(ByVal value As Double)
SetPropertyValue("QTT", _QTT, value)
End Set
End Property
Property QTT_Process As Double
Get
Return _QTT_Process
End Get
Set(value As Double)
SetPropertyValue("QTT_Process", _QTT_Process, value)
If Not Session.IsObjectsLoading And Not Session.IsObjectsSaving Then
controlled_SumPrice = SetRowSumPrice(value, controlled_ListPrice, controlled_DiscountPercent)
End If
End Set
End Property
Property QTT_Controlled As Double
Get
Return _QTT_Controlled
End Get
Set(value As Double)
SetPropertyValue("QTT_Controlled", _QTT_Controlled, value)
End Set
End Property
Property QTT_Returned As Double
Get
Return _QTT_Returned
End Get
Set(value As Double)
SetPropertyValue("QTT_Returned", _QTT_Returned, value)
End Set
End Property
<RuleRequiredField("RuleRequiredField for DeliveryNoteInRows.Units", DefaultContexts.Save)> _
Property Units() As Units
Get
Return _Units
End Get
Set(ByVal value As Units)
SetPropertyValue("Units", _Units, value)
End Set
End Property
<RuleRequiredField("RuleRequiredField for DeliveryNoteInRows.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
Property OrderOutRows As OrderOutRows
Get
Return _OrderOutRows
End Get
Set(value As OrderOutRows)
SetPropertyValue("OrderOutRows", _OrderOutRows, value)
End Set
End Property
Property OfferInRows As OfferInRows
Get
Return _OfferInRows
End Get
Set(value As OfferInRows)
SetPropertyValue("OfferInRows", _OfferInRows, value)
End Set
End Property
Property NoteRows As String
Get
Return _NoteRows
End Get
Set(value As String)
SetPropertyValue("NoteRows", _NoteRows, value)
End Set
End Property
Property PacketNumber As String
Get
Return _PacketNumber
End Get
Set(value As String)
SetPropertyValue("PacketNumber", _PacketNumber, value)
End Set
End Property
Property Weight As Double
Get
Return _Weight
End Get
Set(value As Double)
SetPropertyValue("Weight", _Weight, value)
End Set
End Property
Property WeightMode As eWeightMode
Get
Return _WeightMode
End Get
Set(value As eWeightMode)
SetPropertyValue("WeightMode", _WeightMode, value)
End Set
End Property
Property Area As Double
Get
Return _Area
End Get
Set(value As Double)
SetPropertyValue("Area", _Area, value)
End Set
End Property
Property ITransactionNumber As String
Get
Return _ITransactionNumber
End Get
Set(value As String)
SetPropertyValue("ITransactionNumber", _ITransactionNumber, value)
End Set
End Property
Property ShipingCode As String
Get
Return _ShipingCode
End Get
Set(value As String)
SetPropertyValue("ShipingCode", _ShipingCode, value)
End Set
End Property
'-----------Nonpersistent------------
<NonPersistent>
Property controlled_ListPrice As Double
Get
Return _row_ListPrice
End Get
Set(value As Double)
SetPropertyValue("controlled_ListPrice", _row_ListPrice, value)
If Not Session.IsObjectsLoading And Not Session.IsObjectsSaving Then
controlled_SumPrice = SetRowSumPrice(QTT_Process, value, controlled_DiscountPercent)
End If
End Set
End Property
<NonPersistent>
Property controlled_DiscountPercent As Double
Get
Return _row_DiscountPercent
End Get
Set(value As Double)
SetPropertyValue("controlled_DiscountPercent", _row_DiscountPercent, value)
If Not Session.IsObjectsLoading And Not Session.IsObjectsSaving Then
controlled_SumPrice = SetRowSumPrice(QTT_Process, controlled_ListPrice, value)
End If
End Set
End Property
<NonPersistent>
Property controlled_SumPrice As Double
Get
Return _row_SumPrice
End Get
Set(value As Double)
SetPropertyValue("controlled_SumPrice", _row_SumPrice, value)
End Set
End Property
'----------Sub----------------
Public Sub AddRows(ByVal _p_DeliveryNoteInHeader As DeliveryNoteInHeader)
' Sor hozzáadása
Me.DeliveryNoteInHeader = _p_DeliveryNoteInHeader
Me.Products = _p_DeliveryNoteInHeader.row_Products
Me.Units = _p_DeliveryNoteInHeader.row_Products.Units
Me.VAT = _p_DeliveryNoteInHeader.row_Products.VAT
Me.QTT = _p_DeliveryNoteInHeader.row_QTT
Me.ListPriceHUF = _p_DeliveryNoteInHeader.row_ListPriceHUF
Me.ListPriceDEV = _p_DeliveryNoteInHeader.row_ListPriceDEV
Me.DiscountPriceDEV = _p_DeliveryNoteInHeader.row_ListPriceDEV * (_p_DeliveryNoteInHeader.row_DiscountPercent / 100)
Me.DiscountPriceHUF = _p_DeliveryNoteInHeader.row_ListPriceHUF * (_p_DeliveryNoteInHeader.row_DiscountPercent / 100)
Me.OrderOutRows = _p_DeliveryNoteInHeader.row_OrderOutRows
Me.RowIndex = _p_DeliveryNoteInHeader.DeliveryNoteInrows.Count
Me.PacketNumber = _p_DeliveryNoteInHeader.row_PacketNumber
Me.Weight = _p_DeliveryNoteInHeader.row_Weight
Me.WeightMode = _p_DeliveryNoteInHeader.row_WeightMode
End Sub
Private Function SetRowSumPrice(pQTT_Process As Double, prow_ListPrice As Double, prow_DiscountPercent As Double) As Double
Return (pQTT_Process * prow_ListPrice) - (pQTT_Process * prow_ListPrice * (prow_DiscountPercent / 100))
End Function
'//XPCollections
<VisibleInListView(False), VisibleInLookupListView(False)> _
ReadOnly Property DeliveryNoteInRRFC As XPCollection(Of DeliveryNoteInRRFC)
Get
Return New XPCollection(Of DeliveryNoteInRRFC)(PersistentCriteriaEvaluationBehavior.InTransaction, Session, CriteriaOperator.Parse("DeliveryNoteInRows=?", Me))
End Get
End Property
End Class
@@ -0,0 +1,148 @@
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("BusinessStocks")> _
<Appearance("DeliveryNoteInType - Hide RegistryType if IsPrice=False", AppearanceItemType.ViewItem, "IsPrice=False", TargetItems:="RegistryType", visibility:=Editors.ViewItemVisibility.Hide)> _
Public Class DeliveryNoteInType 'Bejövő szállítólevél tipusok
Inherits BaseObject
Private _CustomersFrom As CustomersFrom 'Saját cég
Private _ImportMode As eImportMode '
Private _IsPrice As Boolean = True 'Van-e ár
Private _IsOrderOut As Boolean = False 'Van-e rendeléssel ütköztetés
Private _ShortName As String 'Megnevezés
Private _Description As String 'Leírás
Private _NumberGenerator As NumberGenerator 'Sorszám generátor
Private _ReportData As ReportData
Private _RegistryType As RegistryType 'Iktatás tipus kiválasztása számlás bevételezés esetán !!!
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
ImportMode = eImportMode.eInternalwithVAT
IsPrice = True
IsOrderOut = True
End Sub
Property CustomersFrom As CustomersFrom
Get
Return _CustomersFrom
End Get
Set(value As CustomersFrom)
SetPropertyValue("CustomersFrom", _CustomersFrom, value)
End Set
End Property
Property ImportMode As eImportMode
Get
Return _ImportMode
End Get
Set(value As eImportMode)
SetPropertyValue("ImportMode", _ImportMode, value)
End Set
End Property
<ImmediatePostData()> _
<RuleRequiredField("DeliveryNoteInType.IsPrice", DefaultContexts.Save)> _
Property IsPrice As Boolean
Get
Return _IsPrice
End Get
Set(value As Boolean)
SetPropertyValue("IsPrice", _IsPrice, value)
End Set
End Property
Property IsOrderOut As Boolean
Get
Return _IsOrderOut
End Get
Set(value As Boolean)
SetPropertyValue("IsOrderOut", _IsOrderOut, value)
End Set
End Property
<RuleRequiredField("DeliveryNoteInType.ShortName", DefaultContexts.Save)> _
Property ShortName As String
Get
Return _ShortName
End Get
Set(value As String)
SetPropertyValue("ShortName", _ShortName, value)
End Set
End Property
Property Description As String
Get
Return _Description
End Get
Set(value As String)
SetPropertyValue("Description", _Description, value)
End Set
End Property
<RuleRequiredField("DeliveryNoteInType.NumberGenerator", DefaultContexts.Save)> _
Property NumberGenerator As NumberGenerator
Get
Return _NumberGenerator
End Get
Set(value As NumberGenerator)
SetPropertyValue("NumberGenerator", _NumberGenerator, value)
End Set
End Property
Property ReportData As ReportData
Get
Return _ReportData
End Get
Set(value As ReportData)
SetPropertyValue("ReportData", _ReportData, value)
End Set
End Property
<ImmediatePostData(True), DataSourceProperty("RegistryTypeCollection")>
<RuleRequiredField("DeliveryNoteInType-RegistryType", DefaultContexts.Save, targetcriteria:="IsPrice=True")> _
Property RegistryType As RegistryType
Get
Return _RegistryType
End Get
Set(value As RegistryType)
SetPropertyValue("RegistryType", _RegistryType, value)
End Set
End Property
<Browsable(False)> _
ReadOnly Property RegistryTypeCollection As XPCollection(Of RegistryType)
Get
Dim _RegistryTypeReturnCollection As XPCollection(Of RegistryType) = Nothing
Dim _RegistryType_Collection As New XPCollection(Of RegistryType)(Session, CriteriaOperator.Parse("RegistryMainType=0 and CustomersFrom=?", CustomersFrom))
Dim Ok As Boolean = False
If _RegistryType_Collection.Count > 0 Then
Dim _Filter As String = "Oid in("
For Each _RegistryType As RegistryType In _RegistryType_Collection
For Each _WorkflowSystemSteps As WorkflowSystemSteps In _RegistryType.WorkflowSystem.WorkflowSystemSteps
If _WorkflowSystemSteps.StepFinancialType = eStepFinancialType.eCheckVATPlusControlling Or _
_WorkflowSystemSteps.StepFinancialType = eStepFinancialType.eCheckVAT Then
_Filter += "'" + _RegistryType.Oid.ToString + "',"
Ok = True
Exit For
End If
Next
Next
_Filter = _Filter.Remove(_Filter.Length - 1, 1)
_Filter += ")"
If Ok Then
_RegistryTypeReturnCollection = New XPCollection(Of RegistryType)(Session, CriteriaOperator.Parse(_Filter))
Else
End If
End If
Return _RegistryTypeReturnCollection
End Get
End Property
End Class
@@ -0,0 +1,186 @@
Partial Class DeliveryNoteInVC
<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.aTotable_DeliveryNoteIn = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aTotableD_DeliveryNoteIn = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aDown_DeliveryNoteIn = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aUp_DeliveryNoteIn = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aFinalize_DeliveryNoteIn = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aStorno_DeliveryNoteIn = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aGenerateStorageIn_From_DeliveryNoteInRows = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
Me.aFinalize_And_Storage_DeliveryNoteIn = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
Me.aRecalculateDeliveryNoteInRowsSumPrice = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
'
'aTotable_DeliveryNoteIn
'
Me.aTotable_DeliveryNoteIn.Caption = "Add row"
Me.aTotable_DeliveryNoteIn.Category = "aTotable_DeliveryNoteIn"
Me.aTotable_DeliveryNoteIn.ConfirmationMessage = Nothing
Me.aTotable_DeliveryNoteIn.Id = "aTotable_DeliveryNoteIn"
Me.aTotable_DeliveryNoteIn.ImageName = "table_add"
Me.aTotable_DeliveryNoteIn.Shortcut = Nothing
Me.aTotable_DeliveryNoteIn.Tag = Nothing
Me.aTotable_DeliveryNoteIn.TargetObjectsCriteria = Nothing
Me.aTotable_DeliveryNoteIn.TargetViewId = ""
Me.aTotable_DeliveryNoteIn.ToolTip = Nothing
Me.aTotable_DeliveryNoteIn.TypeOfView = Nothing
'
'aTotableD_DeliveryNoteIn
'
Me.aTotableD_DeliveryNoteIn.Caption = "Delete row"
Me.aTotableD_DeliveryNoteIn.Category = "aTotableD_DeliveryNoteIn"
Me.aTotableD_DeliveryNoteIn.ConfirmationMessage = Nothing
Me.aTotableD_DeliveryNoteIn.Id = "aTotableD_DeliveryNoteIn"
Me.aTotableD_DeliveryNoteIn.ImageName = "table_delete"
Me.aTotableD_DeliveryNoteIn.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
Me.aTotableD_DeliveryNoteIn.Shortcut = Nothing
Me.aTotableD_DeliveryNoteIn.Tag = Nothing
Me.aTotableD_DeliveryNoteIn.TargetObjectsCriteria = Nothing
Me.aTotableD_DeliveryNoteIn.TargetViewId = ""
Me.aTotableD_DeliveryNoteIn.ToolTip = Nothing
Me.aTotableD_DeliveryNoteIn.TypeOfView = Nothing
'
'aDown_DeliveryNoteIn
'
Me.aDown_DeliveryNoteIn.Caption = "Down"
Me.aDown_DeliveryNoteIn.Category = "RecordsNavigation"
Me.aDown_DeliveryNoteIn.ConfirmationMessage = Nothing
Me.aDown_DeliveryNoteIn.Id = "aDown_DeliveryNoteIn"
Me.aDown_DeliveryNoteIn.ImageName = "arrow_down_green"
Me.aDown_DeliveryNoteIn.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
Me.aDown_DeliveryNoteIn.Shortcut = Nothing
Me.aDown_DeliveryNoteIn.Tag = Nothing
Me.aDown_DeliveryNoteIn.TargetObjectsCriteria = Nothing
Me.aDown_DeliveryNoteIn.TargetViewId = Nothing
Me.aDown_DeliveryNoteIn.ToolTip = Nothing
Me.aDown_DeliveryNoteIn.TypeOfView = Nothing
'
'aUp_DeliveryNoteIn
'
Me.aUp_DeliveryNoteIn.Caption = "Up"
Me.aUp_DeliveryNoteIn.Category = "RecordsNavigation"
Me.aUp_DeliveryNoteIn.ConfirmationMessage = Nothing
Me.aUp_DeliveryNoteIn.Id = "aUp_DeliveryNoteIn"
Me.aUp_DeliveryNoteIn.ImageName = "arrow_up_green"
Me.aUp_DeliveryNoteIn.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
Me.aUp_DeliveryNoteIn.Shortcut = Nothing
Me.aUp_DeliveryNoteIn.Tag = Nothing
Me.aUp_DeliveryNoteIn.TargetObjectsCriteria = Nothing
Me.aUp_DeliveryNoteIn.TargetViewId = Nothing
Me.aUp_DeliveryNoteIn.ToolTip = Nothing
Me.aUp_DeliveryNoteIn.TypeOfView = Nothing
'
'aFinalize_DeliveryNoteIn
'
Me.aFinalize_DeliveryNoteIn.Caption = "aFinalize_DeliveryNoteIn"
Me.aFinalize_DeliveryNoteIn.Category = "Save"
Me.aFinalize_DeliveryNoteIn.ConfirmationMessage = Nothing
Me.aFinalize_DeliveryNoteIn.Id = "aFinalize_DeliveryNoteIn"
Me.aFinalize_DeliveryNoteIn.ImageName = Nothing
Me.aFinalize_DeliveryNoteIn.Shortcut = Nothing
Me.aFinalize_DeliveryNoteIn.Tag = Nothing
Me.aFinalize_DeliveryNoteIn.TargetObjectsCriteria = Nothing
Me.aFinalize_DeliveryNoteIn.TargetViewId = ""
Me.aFinalize_DeliveryNoteIn.ToolTip = Nothing
Me.aFinalize_DeliveryNoteIn.TypeOfView = Nothing
'
'aStorno_DeliveryNoteIn
'
Me.aStorno_DeliveryNoteIn.Caption = "aStorno_DeliveryNoteIn"
Me.aStorno_DeliveryNoteIn.ConfirmationMessage = Nothing
Me.aStorno_DeliveryNoteIn.Id = "aStorno_DeliveryNoteIn"
Me.aStorno_DeliveryNoteIn.ImageName = Nothing
Me.aStorno_DeliveryNoteIn.Shortcut = Nothing
Me.aStorno_DeliveryNoteIn.Tag = Nothing
Me.aStorno_DeliveryNoteIn.TargetObjectsCriteria = Nothing
Me.aStorno_DeliveryNoteIn.TargetViewId = ""
Me.aStorno_DeliveryNoteIn.ToolTip = Nothing
Me.aStorno_DeliveryNoteIn.TypeOfView = Nothing
'
'aGenerateStorageIn_From_DeliveryNoteInRows
'
Me.aGenerateStorageIn_From_DeliveryNoteInRows.AcceptButtonCaption = Nothing
Me.aGenerateStorageIn_From_DeliveryNoteInRows.CancelButtonCaption = Nothing
Me.aGenerateStorageIn_From_DeliveryNoteInRows.Caption = "Create document"
Me.aGenerateStorageIn_From_DeliveryNoteInRows.Category = "ObjectsCreation"
Me.aGenerateStorageIn_From_DeliveryNoteInRows.ConfirmationMessage = Nothing
Me.aGenerateStorageIn_From_DeliveryNoteInRows.Id = "aGenerateStorageIn_From_DeliveryNoteInRows"
Me.aGenerateStorageIn_From_DeliveryNoteInRows.ImageName = "document_into"
Me.aGenerateStorageIn_From_DeliveryNoteInRows.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
Me.aGenerateStorageIn_From_DeliveryNoteInRows.Shortcut = Nothing
Me.aGenerateStorageIn_From_DeliveryNoteInRows.Tag = Nothing
Me.aGenerateStorageIn_From_DeliveryNoteInRows.TargetObjectsCriteria = Nothing
Me.aGenerateStorageIn_From_DeliveryNoteInRows.TargetViewId = ""
Me.aGenerateStorageIn_From_DeliveryNoteInRows.ToolTip = Nothing
Me.aGenerateStorageIn_From_DeliveryNoteInRows.TypeOfView = Nothing
'
'aFinalize_And_Storage_DeliveryNoteIn
'
Me.aFinalize_And_Storage_DeliveryNoteIn.AcceptButtonCaption = Nothing
Me.aFinalize_And_Storage_DeliveryNoteIn.CancelButtonCaption = Nothing
Me.aFinalize_And_Storage_DeliveryNoteIn.Caption = "aFinalize_And_Storage_DeliveryNoteIn"
Me.aFinalize_And_Storage_DeliveryNoteIn.Category = "Save"
Me.aFinalize_And_Storage_DeliveryNoteIn.ConfirmationMessage = Nothing
Me.aFinalize_And_Storage_DeliveryNoteIn.Id = "aFinalize_And_Storage_DeliveryNoteIn"
Me.aFinalize_And_Storage_DeliveryNoteIn.ImageName = Nothing
Me.aFinalize_And_Storage_DeliveryNoteIn.Shortcut = Nothing
Me.aFinalize_And_Storage_DeliveryNoteIn.Tag = Nothing
Me.aFinalize_And_Storage_DeliveryNoteIn.TargetObjectsCriteria = Nothing
Me.aFinalize_And_Storage_DeliveryNoteIn.TargetViewId = Nothing
Me.aFinalize_And_Storage_DeliveryNoteIn.ToolTip = Nothing
Me.aFinalize_And_Storage_DeliveryNoteIn.TypeOfView = Nothing
'
'aRecalculateDeliveryNoteInRowsSumPrice
'
Me.aRecalculateDeliveryNoteInRowsSumPrice.Caption = "aRecalculate Delivery Note In Rows Sum Price"
Me.aRecalculateDeliveryNoteInRowsSumPrice.ConfirmationMessage = Nothing
Me.aRecalculateDeliveryNoteInRowsSumPrice.Id = "aRecalculateDeliveryNoteInRowsSumPrice"
Me.aRecalculateDeliveryNoteInRowsSumPrice.ImageName = Nothing
Me.aRecalculateDeliveryNoteInRowsSumPrice.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireMultipleObjects
Me.aRecalculateDeliveryNoteInRowsSumPrice.Shortcut = Nothing
Me.aRecalculateDeliveryNoteInRowsSumPrice.Tag = Nothing
Me.aRecalculateDeliveryNoteInRowsSumPrice.TargetObjectsCriteria = Nothing
Me.aRecalculateDeliveryNoteInRowsSumPrice.TargetObjectType = GetType(Nuvolar.[Module].DeliveryNoteInRRFC)
Me.aRecalculateDeliveryNoteInRowsSumPrice.TargetViewId = Nothing
Me.aRecalculateDeliveryNoteInRowsSumPrice.TargetViewType = DevExpress.ExpressApp.ViewType.ListView
Me.aRecalculateDeliveryNoteInRowsSumPrice.ToolTip = Nothing
Me.aRecalculateDeliveryNoteInRowsSumPrice.TypeOfView = GetType(DevExpress.ExpressApp.ListView)
End Sub
Friend WithEvents aTotable_DeliveryNoteIn As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aTotableD_DeliveryNoteIn As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aDown_DeliveryNoteIn As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aUp_DeliveryNoteIn As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aFinalize_DeliveryNoteIn As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aStorno_DeliveryNoteIn As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aGenerateStorageIn_From_DeliveryNoteInRows As DevExpress.ExpressApp.Actions.PopupWindowShowAction
Friend WithEvents aFinalize_And_Storage_DeliveryNoteIn As DevExpress.ExpressApp.Actions.PopupWindowShowAction
Friend WithEvents aRecalculateDeliveryNoteInRowsSumPrice As DevExpress.ExpressApp.Actions.SimpleAction
End Class
@@ -0,0 +1,150 @@
<?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="aTotable_DeliveryNoteIn.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>276, 17</value>
</metadata>
<metadata name="aTotableD_DeliveryNoteIn.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>741, 17</value>
</metadata>
<metadata name="aDown_DeliveryNoteIn.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>935, 17</value>
</metadata>
<metadata name="aUp_DeliveryNoteIn.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>1111, 17</value>
</metadata>
<metadata name="aFinalize_DeliveryNoteIn.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>326, 56</value>
</metadata>
<metadata name="aStorno_DeliveryNoteIn.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>510, 56</value>
</metadata>
<metadata name="aGenerateStorageIn_From_DeliveryNoteInRows.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 56</value>
</metadata>
<metadata name="aFinalize_And_Storage_DeliveryNoteIn.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="aRecalculateDeliveryNoteInRowsSumPrice.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>461, 17</value>
</metadata>
<metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
</root>
@@ -0,0 +1,707 @@
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.Xpo
Imports DevExpress.Data.Filtering
Imports System.Linq
Imports DevExpress.Persistent.Validation
Imports DevExpress.Persistent.BaseImpl
Imports DevExpress.ExpressApp.Utils
Public Class DeliveryNoteInVC
Inherits DevExpress.ExpressApp.ViewController
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()
'This call is required by the Component Designer.
InitializeComponent()
RegisterActions(components)
End Sub
Protected Overrides Sub OnActivated()
MyBase.OnActivated()
Frame.GetController(Of DeliveryNoteInVC).aTotable_DeliveryNoteIn.Active.SetItemValue("", False) ' -- Sor hozzáadása (DeliveryNoteInHeader_DeliveryNoteInRows_ListView)
Frame.GetController(Of DeliveryNoteInVC).aTotableD_DeliveryNoteIn.Active.SetItemValue("", False) ' -- Sor törlése (DeliveryNoteInHeader_DeliveryNoteInRows_ListView)
Frame.GetController(Of DeliveryNoteInVC).aUp_DeliveryNoteIn.Active.SetItemValue("", False) ' kiválasztott sor fel
Frame.GetController(Of DeliveryNoteInVC).aDown_DeliveryNoteIn.Active.SetItemValue("", False) ' kiválasztott sor le
Frame.GetController(Of DeliveryNoteInVC).aFinalize_DeliveryNoteIn.Active.SetItemValue("", False) ' véglegesítés letiltása
Frame.GetController(Of DeliveryNoteInVC).aStorno_DeliveryNoteIn.Active.SetItemValue("", False) ' sztorno letiltása
Frame.GetController(Of DeliveryNoteInVC).aGenerateStorageIn_From_DeliveryNoteInRows.Active.SetItemValue("", False) ' Betárolás bejövő szállítólevél sorokból
Frame.GetController(Of DeliveryNoteInVC).aFinalize_And_Storage_DeliveryNoteIn.Active.SetItemValue("", False)
'------------------------- LISTVIEWS --------------------------------------------------------------------------------------------------------------------------------------
If View.Id = "DeliveryNoteInHeader_DeliveryNoteInrows_ListView" Then ' -- A beágyazott ListView feletti toolbar
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.DeleteObjectsViewController)().Active.SetItemValue("", False)
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.LinkUnlinkController)().Active.SetItemValue("", False)
Frame.GetController(Of DevExpress.ExpressApp.CloneObject.CloneObjectViewController)().Active.SetItemValue("", False)
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.NewObjectViewController)().Active.SetItemValue("", False)
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.ListViewProcessCurrentObjectController)().Active.SetItemValue("", False)
Frame.GetController(Of DeliveryNoteInVC).aUp_DeliveryNoteIn.Active.SetItemValue("", True)
Frame.GetController(Of DeliveryNoteInVC).aDown_DeliveryNoteIn.Active.SetItemValue("", True)
End If
If View.Id = "DeliveryNoteInHeader_ListView" Then
Frame.GetController(Of DeliveryNoteInVC).aGenerateStorageIn_From_DeliveryNoteInRows.Active.SetItemValue("", True)
End If
If View.Id = "StorageInfromDeliveryNoteInRowsHeader_StorageInfromDeliveryNoteInRowsRows_ListView" Then
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.DeleteObjectsViewController)().Active.SetItemValue("", False)
Frame.GetController(Of DevExpress.ExpressApp.CloneObject.CloneObjectViewController)().Active.SetItemValue("", False)
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.NewObjectViewController)().Active.SetItemValue("", False)
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.LinkUnlinkController)().Active.SetItemValue("", False)
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.ListViewProcessCurrentObjectController)().Active.SetItemValue("", False)
End If
If View.Id = "DeliveryNoteInFromOrderOutRowsHeader_DeliveryNoteInFromOrderOutRowsRows_ListView" Then
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.DeleteObjectsViewController)().Active.SetItemValue("", False)
Frame.GetController(Of DevExpress.ExpressApp.CloneObject.CloneObjectViewController)().Active.SetItemValue("", False)
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.NewObjectViewController)().Active.SetItemValue("", False)
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.LinkUnlinkController)().Active.SetItemValue("", False)
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.ListViewProcessCurrentObjectController)().Active.SetItemValue("", False)
End If
'------------------------- DETAILVIEWS ------------------------------------------------------------------------------------------------------------------------------------
If View.Id = "DeliveryNoteInHeader_DetailView" Then
Frame.GetController(Of DeliveryNoteInVC).aFinalize_DeliveryNoteIn.Active.SetItemValue("", True)
Frame.GetController(Of DeliveryNoteInVC).aStorno_DeliveryNoteIn.Active.SetItemValue("", True)
Frame.GetController(Of DeliveryNoteInVC).aFinalize_And_Storage_DeliveryNoteIn.Active.SetItemValue("", True)
Dim _DeliveryNoteInHeader As DeliveryNoteInHeader = TryCast(View.SelectedObjects(0), DeliveryNoteInHeader)
If _DeliveryNoteInHeader IsNot Nothing Then
Frame.GetController(Of DeliveryNoteInVC).aTotable_DeliveryNoteIn.Active.SetItemValue("", True)
Frame.GetController(Of DeliveryNoteInVC).aTotableD_DeliveryNoteIn.Active.SetItemValue("", True)
End If
End If
If View.Id = "StorageInfromDeliveryNoteInRowsHeader_DetailView" Or View.Id = "DeliveryNoteInFromOrderOutRowsHeader_DetailView" Then ' Előleg bekérő készítő view
AddHandler Frame.GetController(Of DevExpress.ExpressApp.SystemModule.DialogController)().AcceptAction.Executing, AddressOf AcceptAction_Executing
End If
If View.Id = "DeliveryNoteInHeader_ListView_Deleted" Then
If TryCast(View, ListView) IsNot Nothing Then
If TryCast(View, ListView).CollectionSource IsNot Nothing Then
If TryCast(View, ListView).CollectionSource.Collection IsNot Nothing Then
If TryCast(TryCast(View, ListView).CollectionSource.Collection, ProxyCollection) IsNot Nothing Then
If TryCast(TryCast(View, ListView).CollectionSource.Collection, ProxyCollection).OriginalCollection IsNot Nothing Then
If TryCast(TryCast(TryCast(View, ListView).CollectionSource.Collection, ProxyCollection).OriginalCollection, XPCollection) IsNot Nothing Then
TryCast(TryCast(TryCast(View, ListView).CollectionSource.Collection, ProxyCollection).OriginalCollection, XPCollection).SelectDeleted = True
End If
End If
End If
End If
End If
End If
End If
End Sub
Protected Overrides Sub OnDeactivated()
MyBase.OnDeactivated()
'------------------------- LISTVIEWS --------------------------------------------------------------------------------------------------------------------------------------
If View.Id = "DeliveryNoteInHeader_DeliveryNoteInRows_ListView" Then
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.DeleteObjectsViewController)().Active.SetItemValue("", True)
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.LinkUnlinkController)().Active.SetItemValue("", True)
Frame.GetController(Of DevExpress.ExpressApp.CloneObject.CloneObjectViewController)().Active.SetItemValue("", True)
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.NewObjectViewController)().Active.SetItemValue("", True)
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.ListViewProcessCurrentObjectController)().Active.SetItemValue("", True)
End If
If View.Id = "StorageInfromDeliveryNoteInRowsHeader_StorageInfromDeliveryNoteInRowsRows_ListView" Then
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.DeleteObjectsViewController)().Active.SetItemValue("", True)
Frame.GetController(Of DevExpress.ExpressApp.CloneObject.CloneObjectViewController)().Active.SetItemValue("", True)
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.NewObjectViewController)().Active.SetItemValue("", True)
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.LinkUnlinkController)().Active.SetItemValue("", True)
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.ListViewProcessCurrentObjectController)().Active.SetItemValue("", True)
End If
If View.Id = "DeliveryNoteInFromOrderOutRowsHeader_DeliveryNoteInFromOrderOutRowsRows_ListView" Then
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.DeleteObjectsViewController)().Active.SetItemValue("", True)
Frame.GetController(Of DevExpress.ExpressApp.CloneObject.CloneObjectViewController)().Active.SetItemValue("", True)
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.NewObjectViewController)().Active.SetItemValue("", True)
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.LinkUnlinkController)().Active.SetItemValue("", True)
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.ListViewProcessCurrentObjectController)().Active.SetItemValue("", True)
End If
'------------------------- DETAILVIEWS ------------------------------------------------------------------------------------------------------------------------------------
If View.Id = "DeliveryNoteInHeader_DeatilView" Then
Frame.GetController(Of DeliveryNoteInVC).aTotable_DeliveryNoteIn.Active.SetItemValue("", False)
Frame.GetController(Of DeliveryNoteInVC).aTotableD_DeliveryNoteIn.Active.SetItemValue("", False)
End If
If View.Id = "StorageInfromDeliveryNoteInRowsHeader_DetailView" Or View.Id = "DeliveryNoteInFromOrderOutRowsHeader_DetailView" Then
RemoveHandler Frame.GetController(Of DevExpress.ExpressApp.SystemModule.DialogController)().AcceptAction.Executing, AddressOf AcceptAction_Executing
End If
End Sub
Private Sub AcceptAction_Executing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs)
Validator.RuleSet.ValidateAll(View.ObjectSpace, View.SelectedObjects, DefaultContexts.Save)
End Sub
Private Sub aTotable_DeliveryNoteIn_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aTotable_DeliveryNoteIn.Execute
' hozzáad egy új sort a fejléchez ------------------------
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _DeliveryNoteInHeader As DeliveryNoteInHeader = CType(e.SelectedObjects(0), DeliveryNoteInHeader)
Dim _DeliveryNoteInRows As DeliveryNoteInRows = New DeliveryNoteInRows(_ocur.Session)
Dim _OrderOutRows As OrderOutRows = _ocur.GetObject(_DeliveryNoteInHeader.row_OrderOutRows)
Dim ItemToFocus As ViewItem = TryCast(View, DetailView).FindItem("row_Products")
Try
If ItemToFocus IsNot Nothing Then
Dim ItemControl As Object
ItemControl = ItemToFocus.Control
ItemControl.Focus()
End If
If _OrderOutRows IsNot Nothing Then
If _DeliveryNoteInHeader.row_QTT + _OrderOutRows.QTT_DeliveryNoteIn > _OrderOutRows.QTT Then
Throw New Exception("*Nem volt ennyi megrendelve ebből a tételből !")
Else
_OrderOutRows.QTT_DeliveryNoteIn += _DeliveryNoteInHeader.row_QTT
End If
End If
_DeliveryNoteInRows.AddRows(_DeliveryNoteInHeader)
_ocur.CommitChanges()
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, String.Format(CaptionHelper.GetLocalizedText("Exceptions\NuvolarExceptions", "MsgBoxCheckItAgain")))
Finally
_DeliveryNoteInHeader.row_Products = Nothing
_DeliveryNoteInHeader.row_QTT = 0
_DeliveryNoteInHeader.row_ListPriceHUF = 0
_DeliveryNoteInHeader.row_ListPriceDEV = 0
_DeliveryNoteInHeader.row_DiscountPercent = 0
_DeliveryNoteInHeader.row_OrderOutRows = Nothing
_DeliveryNoteInHeader.row_PacketNumber = ""
_DeliveryNoteInHeader.row_Weight = 0
_DeliveryNoteInHeader.row_CountryFrom = Nothing
View.Refresh()
End Try
End Sub
Private Sub aTotableD_DeliveryNoteIn_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aTotableD_DeliveryNoteIn.Execute
' a kiválasztott sorokat törli -----------------------------------------------
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _DeliveryNoteInHeader As DeliveryNoteInHeader = TryCast(e.SelectedObjects(0), DeliveryNoteInHeader)
Dim _DeliveryNoteInRows_Collection As ArrayList = New ArrayList
Dim _DeliveryNoteInRows_ListEditor As ListPropertyEditor
_DeliveryNoteInRows_ListEditor = TryCast(View, DetailView).FindItem("DeliveryNoteInrows")
For Each _DeliveryNoteInRows As DeliveryNoteInRows In _DeliveryNoteInRows_ListEditor.ListView.SelectedObjects
Dim _DelivNoteInRows As DeliveryNoteInRows = _DeliveryNoteInRows
For Each _DeliveryNoteInRows2 As DeliveryNoteInRows In _DeliveryNoteInHeader.DeliveryNoteInrows
If _DeliveryNoteInRows2.RowIndex > _DelivNoteInRows.RowIndex Then
_DeliveryNoteInRows2.RowIndex -= 1
End If
Next
Next
For Each _DeliveryNoteInRows As DeliveryNoteInRows In _DeliveryNoteInRows_ListEditor.ListView.SelectedObjects
If _DeliveryNoteInRows.OrderOutRows IsNot Nothing Then
_DeliveryNoteInRows.OrderOutRows.QTT_DeliveryNoteIn -= _DeliveryNoteInRows.QTT
_DeliveryNoteInRows.OrderOutRows.Save()
End If
_DeliveryNoteInRows_Collection.Add(_DeliveryNoteInRows)
Next
_ocur.Delete(_DeliveryNoteInRows_Collection)
_ocur.CommitChanges()
View.Refresh()
End Sub
Private Sub aUp_DeliveryNoteIn_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aUp_DeliveryNoteIn.Execute
' A kiválaszott sort egy sorral feljebb helyezi
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _DeliveryNoteInHeader As DeliveryNoteInHeader = TryCast(View.SelectedObjects(0), DeliveryNoteInRows).DeliveryNoteInHeader
Dim _DeliveryNoteInRowsSelected As DeliveryNoteInRows = Nothing
Dim _DeliveryNoteInRowsMinus As DeliveryNoteInRows = Nothing
Dim _DeliveryNoteInRows As DeliveryNoteInRows = Nothing
Try
_DeliveryNoteInRowsSelected = TryCast(View.SelectedObjects(0), DeliveryNoteInRows) ' Az editor egy listview, kiveszi az első kijelölt sorát
Catch
' TESZT MIATT!!!! ----------------------------------------------------------------
Throw New Exception("*Nincs sor kiválasztva, vagy nem a sor kijelölése az aktív!")
End Try
If _DeliveryNoteInRowsSelected.RowIndex > 0 Then
For Each _DeliveryNoteInRows In _DeliveryNoteInHeader.DeliveryNoteInrows
If _DeliveryNoteInRows.RowIndex = _DeliveryNoteInRowsSelected.RowIndex - 1 Then
_DeliveryNoteInRowsMinus = _DeliveryNoteInRows
Exit For
End If
Next
If _DeliveryNoteInRowsMinus IsNot Nothing Then
_DeliveryNoteInRowsSelected.RowIndex -= 1
_DeliveryNoteInRowsMinus.RowIndex += 1
End If
_DeliveryNoteInRowsMinus.Save()
_DeliveryNoteInRowsSelected.Save()
_ocur.CommitChanges()
View.Refresh()
End If
End Sub
Private Sub aDown_DeliveryNoteIn_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aDown_DeliveryNoteIn.Execute
' A kiválaszott sort egy sorral lejebb helyezi
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _DeliveryNoteInHeader As DeliveryNoteInHeader = TryCast(View.SelectedObjects(0), DeliveryNoteInRows).DeliveryNoteInHeader
Dim _DeliveryNoteInRowsSelected As DeliveryNoteInRows
Dim _DeliveryNoteInRowsPlus As DeliveryNoteInRows = Nothing
Dim _DeliveryNoteInRows As DeliveryNoteInRows
Try
_DeliveryNoteInRowsSelected = TryCast(View.SelectedObjects(0), DeliveryNoteInRows) ' Kiveszi a kijelölt sorok közül az elsőt
Catch
' TESZT MIATT!!!! ----------------------------------------------------------------
Throw New Exception("*Nincs sor kiválasztva, vagy nem a sor kijelölése az aktív!")
End Try
If _DeliveryNoteInRowsSelected.RowIndex < _DeliveryNoteInHeader.DeliveryNoteInrows.Count - 1 Then
For Each _DeliveryNoteInRows In _DeliveryNoteInHeader.DeliveryNoteInrows
If _DeliveryNoteInRows.RowIndex = _DeliveryNoteInRowsSelected.RowIndex + 1 Then
_DeliveryNoteInRowsPlus = _DeliveryNoteInRows
Exit For
End If
Next
If _DeliveryNoteInRowsPlus IsNot Nothing Then
_DeliveryNoteInRowsSelected.RowIndex += 1
_DeliveryNoteInRowsPlus.RowIndex -= 1
End If
_DeliveryNoteInRowsPlus.Save()
_DeliveryNoteInRowsSelected.Save()
_ocur.CommitChanges()
View.Refresh()
End If
End Sub
Private Sub aFinalizeDeliveryNoteIn_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aFinalize_DeliveryNoteIn.Execute
'---Az akció véglegesít egy bejövõ szállítólevelet------------------------------------------------
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _DeliveryNoteInHeader As DeliveryNoteInHeader = TryCast(View.SelectedObjects(0), DeliveryNoteInHeader)
If _DeliveryNoteInHeader.DeliveryNoteInrows.Count <= 0 Then
Throw New Exception("*Nincs mit betárolni !")
End If
_DeliveryNoteInHeader.IsEditable = False
If _DeliveryNoteInHeader.DocumentNumber = "" Then
_DeliveryNoteInHeader.DocumentNumber = _DeliveryNoteInHeader.DeliveryNoteInType.NumberGenerator.GetNewNumber(_DeliveryNoteInHeader.DeliveryNoteInType.NumberGenerator)
End If
_DeliveryNoteInHeader.Save()
_ocur.CommitChanges()
View.Close()
End Sub
Private Sub aStorno_DeliveryNoteIn_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aStorno_DeliveryNoteIn.Execute
'---Az akció sztornóz egy bejövõ szállítólevelet------------------------------------------------
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _DeliveryNoteInHeader As DeliveryNoteInHeader = TryCast(View.SelectedObjects(0), DeliveryNoteInHeader)
Dim _IsFound As Boolean = False
Dim _StorageInRows_XPQuery As New XPQuery(Of StorageInRows)(_ocur.Session)
Dim query = From _SIR In _StorageInRows_XPQuery
Where _SIR.DeliveryNoteInRows.DeliveryNoteInHeader Is _DeliveryNoteInHeader
Group _SIR By _SIR.DeliveryNoteInRows Into g = Group _
Select New With {Key .DeliveryNoteInRows = DeliveryNoteInRows,
Key .QTT_Sum = g.Sum(Function(inv) inv.QTT)}
For Each _DeliveryNoteInRows In _DeliveryNoteInHeader.DeliveryNoteInrows
_DeliveryNoteInRows.OrderOutRows.QTT_DeliveryNoteIn -= _DeliveryNoteInRows.QTT
_DeliveryNoteInRows.OrderOutRows = Nothing
For Each item In query
If item.DeliveryNoteInRows.Oid = _DeliveryNoteInRows.Oid And item.QTT_Sum <> 0 Then ' Ha talál olyan sort aminek azonos a szállítólevél sora az aktuálissal, akkor kiszállunk
_IsFound = True
Exit For
End If
Next
Next
If _IsFound = False Then
_DeliveryNoteInHeader.IsStorno = True
_DeliveryNoteInHeader.Save()
_ocur.CommitChanges()
View.Close()
Else
ThrowNewException("Erről a széllítólevélről már készült betárolás.") 'Teszt
End If
End Sub
Private Sub aGenerateStorageIn_From_DeliveryNoteInRows_CustomizePopupWindowParams(sender As Object, e As DevExpress.ExpressApp.Actions.CustomizePopupWindowParamsEventArgs) Handles aGenerateStorageIn_From_DeliveryNoteInRows.CustomizePopupWindowParams
' Egy kiválaszott végleges szállítólevél azon sorait hozza fel egy listában, ahol a mennyiség még több mint a már erről a betárolt össz mennyiség
Dim _NOStorageInRows As New ArrayList
Try
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace()
Dim _DeliveryNoteInRows As DeliveryNoteInRows
Dim _DeliveryNoteInHeader As DeliveryNoteInHeader = _onew.GetObject(TryCast(View.SelectedObjects(0), DeliveryNoteInHeader))
Dim _StorageInfromDeliveryNoteInRowsHeader As New StorageInfromDeliveryNoteInRowsHeader(_onew.Session)
Dim _QTT_Sum As Double = 0
_StorageInfromDeliveryNoteInRowsHeader.DeliveryNoteInHeader = _DeliveryNoteInHeader
_StorageInfromDeliveryNoteInRowsHeader.DateCreation = GetSQLTime(_onew.Session)
' Az összes olyan betárolási sor keresése adott termékre, ami szállítólevéllről jött
Dim _StorageInRows_XPQuery As New XPQuery(Of StorageInRows)(_onew.Session)
Dim query = From _SIR In _StorageInRows_XPQuery
Where _SIR.DeliveryNoteInRows.DeliveryNoteInHeader Is _DeliveryNoteInHeader
Group _SIR By _SIR.DeliveryNoteInRows Into g = Group _
Select New With {Key .DeliveryNoteInRows = DeliveryNoteInRows,
Key .QTT_Sum = g.Sum(Function(inv) inv.QTT)}
For Each _DeliveryNoteInRows In _DeliveryNoteInHeader.DeliveryNoteInrows
_QTT_Sum = 0
For Each item In query
If item.DeliveryNoteInRows.Oid = _DeliveryNoteInRows.Oid Then ' Ha talál olyan sort aminek azonos a szállítólevél sora az aktuálissal, akkor számolja hogy összesen mennyi van betárolva
_QTT_Sum = item.QTT_Sum
End If
Next
If _DeliveryNoteInRows.QTT > _QTT_Sum Then ' Csak azokat a sorokat hozza fel a ListView-ba amikre még lehet betárolást csinálni
Dim _StorageInfromDeliveryNoteInRowsRows As New StorageInfromDeliveryNoteInRowsRows(_onew.Session)
_StorageInfromDeliveryNoteInRowsRows.DeliveryNoteInRows = _DeliveryNoteInRows
_StorageInfromDeliveryNoteInRowsRows.StorageInfromDeliveryNoteInRowsHeader = _StorageInfromDeliveryNoteInRowsHeader
_StorageInfromDeliveryNoteInRowsRows.QTT_Process = _DeliveryNoteInRows.QTT - _QTT_Sum
_StorageInfromDeliveryNoteInRowsRows.QTT_Max = _StorageInfromDeliveryNoteInRowsRows.QTT_Process
If _StorageInfromDeliveryNoteInRowsRows.DeliveryNoteInRows.Products.Units.ShortName = "zsák" And _StorageInfromDeliveryNoteInRowsRows.DeliveryNoteInRows.Products.ProductGroups.Parent.Name = "VETŐ" Then
If _DeliveryNoteInRows.Weight = 0 Or String.IsNullOrEmpty(_DeliveryNoteInRows.PacketNumber) Then
_NOStorageInRows.Add(_DeliveryNoteInRows.Products)
End If
End If
End If
Next
_onew.CommitChanges()
e.View = Application.CreateDetailView(_onew, _StorageInfromDeliveryNoteInRowsHeader, False)
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, String.Format(CaptionHelper.GetLocalizedText("Exceptions\NuvolarExceptions", "MsgBoxCheckItAgain")))
Finally
If _NOStorageInRows.Count > 0 Then
Dim _ErrorMessage As String = "A következő szállítólevélről az alábbi sorok nem tárolhatóak be :" + vbNewLine
For Each _NOSIR As Products In _NOStorageInRows
_ErrorMessage += vbNewLine + _NOSIR.ProductNumber + " / " + _NOSIR.ShortName + vbNewLine
Next
_ErrorMessage += vbNewLine + "mert NINCS megadva a KÖTEGSZÁM vagy a SÚLY!"
'MsgBox(_ErrorMessage, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, String.Format(CaptionHelper.GetLocalizedText("Exceptions\NuvolarExceptions", "MsgBoxCheckItAgain")))
Throw New UserFriendlyException(_ErrorMessage)
View.Close()
End If
End Try
End Sub
Private Sub aGenerateStorageIn_From_DeliveryNoteInRows_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.PopupWindowShowActionExecuteEventArgs) Handles aGenerateStorageIn_From_DeliveryNoteInRows.Execute
' A popup-on kiválasztott bej. szállítólevél sorokból a kézzel megadott szándékkal végleges bet. bizonylatot hoz létre (Sorokkal)
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
Dim _uow_lock As New UnitOfWork(_onew.Session.DataLayer)
Dim _User As User = _onew.GetObject(TryCast(SecuritySystem.CurrentUser, User))
Try
Dim _DeliveryNoteInHeader As DeliveryNoteInHeader = _onew.GetObject(TryCast(View.SelectedObjects(0), DeliveryNoteInHeader))
If Not LockingModule.LockObject(_uow_lock, GetType(StorageComputed), "-", _User) Then
Dim _LockingObject As LockingObject = _onew.FindObject(Of LockingObject)(CriteriaOperator.Parse("TableName=?", GetType(StorageComputed).Name + "-" + "-"))
Dim _Prompt As String = DevExpress.ExpressApp.Utils.CaptionHelper.GetLocalizedText("Exceptions\NuvolarExceptions\StorageComputed", "CanNotStorageInByLocking")
Dim _Title As String = DevExpress.ExpressApp.Utils.CaptionHelper.GetLocalizedText("Exceptions\NuvolarExceptions", "MsgBoxError")
MsgBox(String.Format(_Prompt, _LockingObject.User.FullName, _LockingObject.ObjectCreated), MsgBoxStyle.Information + MsgBoxStyle.OkOnly, _Title)
Exit Sub
Else
Dim _StorageInfromDeliveryNoteInRowsHeader As StorageInfromDeliveryNoteInRowsHeader = _onew.GetObjectByKey(Of StorageInfromDeliveryNoteInRowsHeader)(TryCast(e.PopupWindow.View.SelectedObjects(0), StorageInfromDeliveryNoteInRowsHeader).Oid)
_StorageInfromDeliveryNoteInRowsHeader.Storage = _onew.GetObjectByKey(Of Storage)(TryCast(e.PopupWindow.View.SelectedObjects(0), StorageInfromDeliveryNoteInRowsHeader).Storage.Oid)
Dim _StorageInfromDeliveryNoteInRowsRows_ListEditor As ListPropertyEditor = TryCast(e.PopupWindow.View, DetailView).FindItem("StorageInfromDeliveryNoteInRowsRows") ' Bekeresi az összes bejövõ megrendelési sort
Dim _StorageInfromDeliveryNoteInRowsRows As StorageInfromDeliveryNoteInRowsRows
Dim _MSGBoxNeed As Boolean = False
For Each _StorageInfromDeliveryNoteInRowsRows In _StorageInfromDeliveryNoteInRowsRows_ListEditor.ListView.SelectedObjects
If _StorageInfromDeliveryNoteInRowsRows.QTT_Process > _StorageInfromDeliveryNoteInRowsRows.QTT_Max Then
_StorageInfromDeliveryNoteInRowsRows.QTT_Process = _StorageInfromDeliveryNoteInRowsRows.QTT_Max
_MSGBoxNeed = True
Exit For
End If
Next
If _MSGBoxNeed = True Then Throw New Exception("*Volt olyan szándék megadva ami több mint amit be lehet tárolni, így az értéke visszaállítódott a maximális értékre!")
' --- Létrehozzuk a bet. fejlécet ----
Dim _StorageInHeader_New As New StorageInHeader(_onew.Session)
With _StorageInHeader_New
.IsEditable = False
.Storage = _onew.GetObject(TryCast(e.PopupWindow.View.SelectedObjects(0), StorageInfromDeliveryNoteInRowsHeader).Storage)
.ObjectCreated = GetSQLTime(_onew.Session)
.StorageMoveType = _onew.GetObject(TryCast(e.PopupWindow.View.SelectedObjects(0), StorageInfromDeliveryNoteInRowsHeader).StorageMoveType)
.DocumentNumber = _StorageInHeader_New.Storage.NumberGeneratorIn.GetNewNumber(_StorageInHeader_New.Storage.NumberGeneratorIn)
End With
' Létrehozzuk a bet. sorokat, minden kiválasztott bejövő szállítólevél sorokhoz ----------------------------------------------------------------------------------------------
For i = 0 To _StorageInfromDeliveryNoteInRowsRows_ListEditor.ListView.SelectedObjects.Count - 1 ' A kiválasztott sorokon végigmegyünk és létrehozzuk a bet. sorokat.
Dim _StorageComputed As StorageComputed = _onew.Session.FindObject(Of StorageComputed)(CriteriaOperator.Parse("Products=? and Storage=?", _
_onew.GetObject(_StorageInfromDeliveryNoteInRowsRows_ListEditor.ListView.SelectedObjects(i).DeliveryNoteInRows.Products), _onew.GetObject(_StorageInfromDeliveryNoteInRowsHeader.Storage)))
Dim _QTT_Process As Double = 0
_QTT_Process = TryCast(_StorageInfromDeliveryNoteInRowsRows_ListEditor.ListView.SelectedObjects(i), StorageInfromDeliveryNoteInRowsRows).QTT_Process ' Kinyerjük az adott sorhoz tartozó szándékot
If _StorageComputed Is Nothing Then
_StorageComputed = _onew.CreateObject(Of StorageComputed)()
With _StorageComputed
.Storage = _StorageInfromDeliveryNoteInRowsHeader.Storage
.Products = _onew.GetObject(_StorageInfromDeliveryNoteInRowsRows_ListEditor.ListView.SelectedObjects(i).DeliveryNoteInRows.Products)
End With
End If
' Új betárolási sorok létrehozása --------------------------------------------
Dim _StorageInRows_New As StorageInRows = _onew.CreateObject(Of StorageInRows)()
With _StorageInRows_New
.DeliveryNoteInRows = _onew.GetObject(_StorageInfromDeliveryNoteInRowsRows_ListEditor.ListView.SelectedObjects(i).DeliveryNoteInRows)
.StorageInHeader = _StorageInHeader_New
.Products = _onew.GetObject(_StorageInfromDeliveryNoteInRowsRows_ListEditor.ListView.SelectedObjects(i).DeliveryNoteInRows.Products)
.QTT_Will = _QTT_Process
.RowIndex = i + 1 ' Sorindexelés
End With
_StorageComputed.QTTReservedIn += _QTT_Process
Next
'--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
For Each _StorageInRows In _StorageInHeader_New.StorageInRows
Dim _StorageComputed As StorageComputed = _onew.FindObject(Of StorageComputed)(CriteriaOperator.Parse("Products=? and Storage=?", _StorageInRows.Products, _StorageInHeader_New.Storage))
Dim _StorageMoveEvents As New StorageMoveEvents(_onew.Session)
If _StorageInRows.QTT_Will > 0 Then
_StorageInRows.QTT = _StorageInRows.QTT_Will
_StorageComputed.QTTFree += _StorageInRows.QTT_Will
_StorageComputed.QTTReservedIn -= _StorageInRows.QTT_Will
_StorageMoveEvents.StorageInRows = _StorageInRows
_StorageMoveEvents.QTT = _StorageInRows.QTT
_StorageMoveEvents.QTT_Free_After = _StorageComputed.QTTFree
_StorageMoveEvents.QTT_Free_Before = _StorageMoveEvents.QTT_Free_After - _StorageMoveEvents.QTT
_StorageMoveEvents.MoveEventsType = eMoveEventsType.StorageInFinal
_StorageMoveEvents.ExecutionDate = _StorageInRows.StorageInHeader.CreateDate
_StorageInRows.QTT_Will = 0
End If
Next
_StorageInHeader_New.IsEditable = False
_StorageInHeader_New.IsFinalized = True
_DeliveryNoteInHeader.IsEditable = False
_onew.CommitChanges()
End If
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, String.Format(CaptionHelper.GetLocalizedText("Exceptions\NuvolarExceptions", "MsgBoxCheckItAgain")))
Finally
LockingModule.UnLockObject(_uow_lock, GetType(StorageComputed), "-", _User)
End Try
End Sub
Private Sub aFinalize_And_Storage_DeliveryNoteIn_CustomizePopupWindowParams(sender As Object, e As DevExpress.ExpressApp.Actions.CustomizePopupWindowParamsEventArgs) Handles aFinalize_And_Storage_DeliveryNoteIn.CustomizePopupWindowParams
'---Létrehoz egy ListView-t ahol a raktárat kell kiválasztani a rendelésből kitárolási akcióhoz
Dim _NOStorageInRows As New ArrayList
Try
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
Dim _DeliveryNoteInToStorageInHeader As DeliveryNoteInToStorageInHeader = _onew.CreateObject(Of DeliveryNoteInToStorageInHeader)()
Dim _DeliveryNoteInHeader As DeliveryNoteInHeader = _onew.GetObject(TryCast(View.SelectedObjects(0), DeliveryNoteInHeader))
For Each _DeliveryNoteInRows As DeliveryNoteInRows In _DeliveryNoteInHeader.DeliveryNoteInrows
If _DeliveryNoteInRows.Products.Units.ShortName = "zsák" And _DeliveryNoteInRows.Products.ProductGroups.Parent.Name = "VETŐ" Then
If _DeliveryNoteInRows.Weight = 0 Or String.IsNullOrEmpty(_DeliveryNoteInRows.PacketNumber) Then
_NOStorageInRows.Add(_DeliveryNoteInRows.Products)
End If
End If
Next
e.View = Application.CreateDetailView(_onew, "DeliveryNoteInToStorageInHeader_DetailView", False, _DeliveryNoteInToStorageInHeader)
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, String.Format(CaptionHelper.GetLocalizedText("Exceptions\NuvolarExceptions", "MsgBoxCheckItAgain")))
Finally
If _NOStorageInRows.Count > 0 Then
Dim _ErrorMessage As String = "A következő szállítólevélről az alábbi sor(ok) nem tárolhatóak be :" + vbNewLine
For Each _NOSIR As Products In _NOStorageInRows
_ErrorMessage += vbNewLine + _NOSIR.ProductNumber + " / " + _NOSIR.ShortName + vbNewLine
Next
_ErrorMessage += vbNewLine + "mert NINCS megadva a KÖTEGSZÁM vagy a SÚLY!"
'MsgBox(_ErrorMessage, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, String.Format(CaptionHelper.GetLocalizedText("Exceptions\NuvolarExceptions", "MsgBoxCheckItAgain")))
Throw New UserFriendlyException(_ErrorMessage)
View.Close()
End If
End Try
End Sub
Private Sub aFinalize_And_Storage_DeliveryNoteIn_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.PopupWindowShowActionExecuteEventArgs) Handles aFinalize_And_Storage_DeliveryNoteIn.Execute
'---Az akció véglegesít egy bejövő szállítólevelet------------------------------------------------
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
Dim _uow_lock As New UnitOfWork(_onew.Session.DataLayer)
Dim _User As User = _onew.GetObject(TryCast(SecuritySystem.CurrentUser, User))
Dim _DeliveryNoteInHeader As DeliveryNoteInHeader = TryCast(View.SelectedObjects(0), DeliveryNoteInHeader)
Dim _StorageInHeader As StorageInHeader
Try
Dim _DeliveryNoteInRows As DeliveryNoteInRows
Dim _DeliveryNoteInToStorageInHeader As DeliveryNoteInToStorageInHeader = TryCast(e.PopupWindow.View.SelectedObjects(0), DeliveryNoteInToStorageInHeader)
Dim _StorageInRows As StorageInRows
If _DeliveryNoteInHeader.DeliveryNoteInrows.Count <= 0 Then Throw New Exception("*A szállítólevélnek nincs egyetlen sora sem!")
Dim _DeliveryNoteInRows_Collection As New ArrayList
For Each _DeliveryNoteInRows In _DeliveryNoteInHeader.DeliveryNoteInrows
If _DeliveryNoteInRows.OrderOutRows IsNot Nothing Then
If _DeliveryNoteInRows.QTT > 0 And _DeliveryNoteInRows.QTT <= _DeliveryNoteInRows.OrderOutRows.QTT Then
_DeliveryNoteInRows_Collection.Add(_DeliveryNoteInRows)
End If
Else
_DeliveryNoteInRows_Collection.Add(_DeliveryNoteInRows)
End If
Next
If _DeliveryNoteInRows_Collection.Count = 0 Then Throw New Exception("*A szállítólevélnek nincs egyetlen olyan sora sem, melyet be lehetne tárolni!")
'zárolás
If Not LockingModule.LockObject(_uow_lock, GetType(StorageComputed), "-", _User) Then
Dim _LockingObject As LockingObject = _onew.FindObject(Of LockingObject)(CriteriaOperator.Parse("TableName=?", GetType(StorageComputed).Name + "-" + "-"))
Dim _Prompt As String = DevExpress.ExpressApp.Utils.CaptionHelper.GetLocalizedText("Exceptions\NuvolarExceptions\StorageComputed", "CanNotStorageInByLocking")
Dim _Title As String = DevExpress.ExpressApp.Utils.CaptionHelper.GetLocalizedText("Exceptions\NuvolarExceptions", "MsgBoxError")
MsgBox(String.Format(_Prompt, _LockingObject.User.FullName, _LockingObject.ObjectCreated), MsgBoxStyle.Information + MsgBoxStyle.OkOnly, _Title)
Exit Sub
Else
_StorageInHeader = _ocur.CreateObject(Of StorageInHeader)()
_StorageInHeader.Active = True
_StorageInHeader.CreateDate = GetSQLTime(_ocur.Session)
_StorageInHeader.Storage = _ocur.GetObjectByKey(Of Storage)(_DeliveryNoteInToStorageInHeader.Storage.Oid)
_StorageInHeader.StorageMoveType = _ocur.GetObjectByKey(Of StorageMoveType)(_DeliveryNoteInToStorageInHeader.StorageMoveType.Oid)
For Each _DeliveryNoteInRows In _DeliveryNoteInRows_Collection
_StorageInRows = _ocur.CreateObject(Of StorageInRows)()
With _StorageInRows
.Active = True
.DeliveryNoteInRows = _DeliveryNoteInRows
.PacketNumber = _DeliveryNoteInRows.PacketNumber
.Products = _DeliveryNoteInRows.Products
.QTT_Will = _DeliveryNoteInRows.QTT
.RowIndex = _StorageInHeader.StorageInRows.Count + 1
.SerialNumber = ""
.StorageInHeader = _StorageInHeader
.Storage = _StorageInHeader.Storage
.Weight = _DeliveryNoteInRows.Weight
.WeightMode = _DeliveryNoteInRows.WeightMode
End With
Dim _StorageComputed As StorageComputed = _ocur.FindObject(Of StorageComputed)(CriteriaOperator.Parse("Products=? and Storage=?", _
_StorageInRows.Products, _StorageInHeader.Storage))
If _StorageComputed Is Nothing Then
_StorageComputed = _ocur.CreateObject(Of StorageComputed)()
With _StorageComputed
.Storage = _StorageInHeader.Storage
.Products = _DeliveryNoteInRows.Products
.QTTReservedIn = _DeliveryNoteInRows.QTT
End With
Else
_StorageComputed.QTTReservedIn += _DeliveryNoteInRows.QTT
End If
Next
'--------- Véglegesítjük a betárolást !
For Each _StorageInRows In _StorageInHeader.StorageInRows
Dim _StorageComputed As StorageComputed = _ocur.FindObject(Of StorageComputed)(CriteriaOperator.Parse("Products=? and Storage=?", _StorageInRows.Products, _StorageInHeader.Storage))
Dim _StorageMoveEvents As New StorageMoveEvents(_ocur.Session)
If _StorageInRows.QTT_Will > 0 Then
_StorageInRows.QTT = _StorageInRows.QTT_Will
_StorageComputed.QTTFree += _StorageInRows.QTT_Will
_StorageComputed.QTTReservedIn -= _StorageInRows.QTT_Will
_StorageMoveEvents.StorageInRows = _StorageInRows
_StorageMoveEvents.QTT = _StorageInRows.QTT
_StorageMoveEvents.QTT_Free_After = _StorageComputed.QTTFree
_StorageMoveEvents.QTT_Free_Before = _StorageMoveEvents.QTT_Free_After - _StorageMoveEvents.QTT
_StorageMoveEvents.MoveEventsType = eMoveEventsType.StorageInFinal
_StorageMoveEvents.ExecutionDate = _StorageInRows.StorageInHeader.CreateDate
_StorageInRows.QTT_Will = 0
End If
Next
_StorageInHeader.IsEditable = False
_StorageInHeader.IsFinalized = True
_DeliveryNoteInHeader.IsEditable = False
_ocur.CommitChanges()
If _DeliveryNoteInToStorageInHeader.IsRegistry Then
Dim _RegistryHeader As New RegistryHeader(_ocur.Session)
With _RegistryHeader
.CustomersFrom = _DeliveryNoteInHeader.CustomersFrom
.Customers = _DeliveryNoteInHeader.Customers
.RegistryType = _DeliveryNoteInHeader.DeliveryNoteInType.RegistryType
End With
Dim _orenew As Xpo.XPObjectSpace = Application.CreateObjectSpace
Dim _ShowViewParameters As New ShowViewParameters
Dim _ShowViewSource As New ShowViewSource(Frame, Nothing)
_ShowViewParameters.CreatedView = Application.CreateDetailView(_orenew, "RegistryHeader_DetailView", True, _orenew.GetObject(_RegistryHeader))
_ShowViewParameters.NewWindowTarget = NewWindowTarget.MdiChild
_ShowViewParameters.TargetWindow = TargetWindow.NewWindow
Application.ShowViewStrategy.ShowView(_ShowViewParameters, _ShowViewSource)
e.ShowViewParameters.CreatedView = Application.CreateDetailView(_orenew, _RegistryHeader)
End If
Dim _ReportData As ReportData = _ocur.FindObject(Of ReportData)(CriteriaOperator.Parse("Oid=?", _StorageInHeader.Storage.ReportIn.Oid), True)
If _ReportData Is Nothing Or _StorageInHeader Is Nothing Then
Else
Frame.GetController(Of Reports.ReportServiceController).ShowPreview(_ReportData, CriteriaOperator.Parse("StorageInHeader.DocumentNumber =?", _StorageInHeader.DocumentNumber), True)
End If
View.Close()
End If
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, String.Format(CaptionHelper.GetLocalizedText("Exceptions\NuvolarExceptions", "MsgBoxCheckItAgain")))
Finally
LockingModule.ReleaseAllLocking(_uow_lock, _User)
End Try
End Sub
Private Sub aRecalculateDeliveryNoteInRowsSumPrice_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aRecalculateDeliveryNoteInRowsSumPrice.Execute
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _DeliveryNoteInRRFC As DeliveryNoteInRRFC
Dim _StorageComputed As StorageComputed
RaiseEvent InitWork(1, 1, View.SelectedObjects.Count)
For Each _DeliveryNoteInRRFC In View.SelectedObjects
RaiseEvent DoWork()
If _DeliveryNoteInRRFC.RegistryRowsFinancialControlling.RegistryHeader.F_CurrencyName.ShortName = "HUF" Then
If _DeliveryNoteInRRFC.DeliveryNoteInRows.QTT <> 0 Then
_DeliveryNoteInRRFC.DeliveryNoteInRows.ListPriceHUF = Math.Round(_DeliveryNoteInRRFC.RegistryRowsFinancialControlling.Amount / _DeliveryNoteInRRFC.DeliveryNoteInRows.QTT, 2, MidpointRounding.AwayFromZero)
_DeliveryNoteInRRFC.DeliveryNoteInRows.ListPriceDEV = 0
_DeliveryNoteInRRFC.DeliveryNoteInRows.DiscountPriceDEV = 0
_DeliveryNoteInRRFC.DeliveryNoteInRows.DiscountPriceHUF = 0
End If
Else
If _DeliveryNoteInRRFC.DeliveryNoteInRows.QTT <> 0 Then
If _DeliveryNoteInRRFC.RegistryRowsFinancialControlling.RegistryHeader.F_CurrencyRate <> 0 Then
_DeliveryNoteInRRFC.DeliveryNoteInRows.ListPriceHUF = Math.Round(_DeliveryNoteInRRFC.RegistryRowsFinancialControlling.Amount / _DeliveryNoteInRRFC.DeliveryNoteInRows.QTT, 2, MidpointRounding.AwayFromZero)
_DeliveryNoteInRRFC.DeliveryNoteInRows.ListPriceDEV = Math.Round(_DeliveryNoteInRRFC.DeliveryNoteInRows.ListPriceHUF / _DeliveryNoteInRRFC.RegistryRowsFinancialControlling.RegistryHeader.F_CurrencyRate, 2, MidpointRounding.AwayFromZero)
_DeliveryNoteInRRFC.DeliveryNoteInRows.DiscountPriceDEV = 0
_DeliveryNoteInRRFC.DeliveryNoteInRows.DiscountPriceHUF = 0
End If
End If
End If
Dim _StorageComputed_Collection As New XPCollection(Of StorageComputed)(_ocur.Session, CriteriaOperator.Parse("Products=?", _DeliveryNoteInRRFC.DeliveryNoteInRows.Products))
For Each _StorageComputed In _StorageComputed_Collection
_StorageComputed.RecalculateAveragePrice()
_StorageComputed.RecalculateMinimumPrice()
Next
Next
_ocur.CommitChanges()
RaiseEvent FinalWork
End Sub
End Class
@@ -0,0 +1,104 @@
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("IntrastatHeader - Disable DocumentNumber", AppearanceItemType.ViewItem, "1=1", TargetItems:="DocumentNumber", Enabled:=False)> _
<Appearance("IntrastatHeader - Disable ObjectCreated", AppearanceItemType.ViewItem, "1=1", TargetItems:="ObjectCreated", Enabled:=False)> _
<Appearance("IntrastatHeader - Disable UserCreate", AppearanceItemType.ViewItem, "1=1", TargetItems:="UserCreate", Enabled:=False)> _
Public Class IntrastatHeader
Inherits BaseObject
Private _IntrastatParameters As IntrastatParameters
Private _UserCreated As User
Private _ObjectCreated As Date
Private _DateExecution As Date 'Idõszak Év, hónap
Private _DocumentNumber As String
Private _DocumentFile As FileData
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
If String.IsNullOrEmpty(DocumentNumber) Then DocumentNumber = IntrastatParameters.NumberGenerator.GetNewNumber(IntrastatParameters.NumberGenerator)
End Sub
<RuleRequiredField("IntrastatHeader - IntrastatParameters", DefaultContexts.Save)> _
Property IntrastatParameters As IntrastatParameters
Get
Return _IntrastatParameters
End Get
Set(value As IntrastatParameters)
SetPropertyValue("IntrastatParameters", _IntrastatParameters, 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
<NonCloneable> _
Property ObjectCreated As Date
Get
Return _ObjectCreated
End Get
Set(value As Date)
SetPropertyValue("ObjectCreated", _ObjectCreated, 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 DocumentNumber As String
Get
Return _DocumentNumber
End Get
Set(value As String)
SetPropertyValue("DocumentNumber", _DocumentNumber, value)
End Set
End Property
Property DocumentFile As FileData
Get
Return _DocumentFile
End Get
Set(value As FileData)
SetPropertyValue("DocumentFile", _DocumentFile, value)
End Set
End Property
'-------ReadONLY-------
<Association("IntrastatHeader - IntrastatRows", GetType(IntrastatRows)), VisibleInListView(False)> _
ReadOnly Property IntrastatRows As XPCollection(Of IntrastatRows)
Get
Return GetCollection(Of IntrastatRows)("IntrastatRows")
End Get
End Property
End Class
@@ -0,0 +1,102 @@
Partial Class IntrastatHeader_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.aIntrastatHeader_GenerateIntrastatRows = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aIntrastatCheckPrice = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aIntrastatCheckWeight = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aPrintIntrastat = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
'
'aIntrastatHeader_GenerateIntrastatRows
'
Me.aIntrastatHeader_GenerateIntrastatRows.Caption = "aIntrastatHeader_GenerateIntrastatRows"
Me.aIntrastatHeader_GenerateIntrastatRows.Category = "RecordEdit"
Me.aIntrastatHeader_GenerateIntrastatRows.ConfirmationMessage = "Are you sure ? All data will lost !"
Me.aIntrastatHeader_GenerateIntrastatRows.Id = "aIntrastatHeader_GenerateIntrastatRows"
Me.aIntrastatHeader_GenerateIntrastatRows.ImageName = Nothing
Me.aIntrastatHeader_GenerateIntrastatRows.Shortcut = Nothing
Me.aIntrastatHeader_GenerateIntrastatRows.Tag = Nothing
Me.aIntrastatHeader_GenerateIntrastatRows.TargetObjectsCriteria = Nothing
Me.aIntrastatHeader_GenerateIntrastatRows.TargetObjectType = GetType(Nuvolar.[Module].IntrastatHeader)
Me.aIntrastatHeader_GenerateIntrastatRows.TargetViewId = Nothing
Me.aIntrastatHeader_GenerateIntrastatRows.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
Me.aIntrastatHeader_GenerateIntrastatRows.ToolTip = Nothing
Me.aIntrastatHeader_GenerateIntrastatRows.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
'
'aIntrastatCheckPrice
'
Me.aIntrastatCheckPrice.Caption = "aIntrastat Check Price"
Me.aIntrastatCheckPrice.ConfirmationMessage = Nothing
Me.aIntrastatCheckPrice.Id = "aIntrastatCheckPrice"
Me.aIntrastatCheckPrice.ImageName = Nothing
Me.aIntrastatCheckPrice.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireMultipleObjects
Me.aIntrastatCheckPrice.Shortcut = Nothing
Me.aIntrastatCheckPrice.Tag = Nothing
Me.aIntrastatCheckPrice.TargetObjectsCriteria = Nothing
Me.aIntrastatCheckPrice.TargetObjectType = GetType(Nuvolar.[Module].DeliveryNoteInRows)
Me.aIntrastatCheckPrice.TargetViewId = "DeliveryNoteInRows_ListView_INTRASTAT"
Me.aIntrastatCheckPrice.ToolTip = Nothing
Me.aIntrastatCheckPrice.TypeOfView = Nothing
'
'aIntrastatCheckWeight
'
Me.aIntrastatCheckWeight.Caption = "aIntrastat Check Weight"
Me.aIntrastatCheckWeight.ConfirmationMessage = Nothing
Me.aIntrastatCheckWeight.Id = "aIntrastatCheckWeight"
Me.aIntrastatCheckWeight.ImageName = Nothing
Me.aIntrastatCheckWeight.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireMultipleObjects
Me.aIntrastatCheckWeight.Shortcut = Nothing
Me.aIntrastatCheckWeight.Tag = Nothing
Me.aIntrastatCheckWeight.TargetObjectsCriteria = Nothing
Me.aIntrastatCheckWeight.TargetObjectType = GetType(Nuvolar.[Module].DeliveryNoteInRows)
Me.aIntrastatCheckWeight.TargetViewId = Nothing
Me.aIntrastatCheckWeight.ToolTip = Nothing
Me.aIntrastatCheckWeight.TypeOfView = Nothing
'
'aPrintIntrastat
'
Me.aPrintIntrastat.Caption = "aPrint Intrastat"
Me.aPrintIntrastat.ConfirmationMessage = Nothing
Me.aPrintIntrastat.Id = "aPrintIntrastat"
Me.aPrintIntrastat.ImageName = "Action_Printing_Print"
Me.aPrintIntrastat.Shortcut = Nothing
Me.aPrintIntrastat.Tag = Nothing
Me.aPrintIntrastat.TargetObjectsCriteria = Nothing
Me.aPrintIntrastat.TargetObjectType = GetType(Nuvolar.[Module].IntrastatHeader)
Me.aPrintIntrastat.TargetViewId = Nothing
Me.aPrintIntrastat.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
Me.aPrintIntrastat.ToolTip = Nothing
Me.aPrintIntrastat.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
End Sub
Friend WithEvents aIntrastatHeader_GenerateIntrastatRows As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aIntrastatCheckPrice As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aIntrastatCheckWeight As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aPrintIntrastat As DevExpress.ExpressApp.Actions.SimpleAction
End Class
@@ -0,0 +1,135 @@
<?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="aIntrastatHeader_GenerateIntrastatRows.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 95</value>
</metadata>
<metadata name="aIntrastatCheckPrice.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 56</value>
</metadata>
<metadata name="aIntrastatCheckWeight.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>288, 56</value>
</metadata>
<metadata name="aPrintIntrastat.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>288, 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>
@@ -0,0 +1,187 @@
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.Xpo
Imports System.Linq
Imports DevExpress.Persistent.BaseImpl
Imports DevExpress.Data.Filtering
Imports DevExpress.ExpressApp.SystemModule
Imports DevExpress.ExpressApp.Utils
Public Class IntrastatHeader_VC
Inherits DevExpress.ExpressApp.ViewController
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()
InitializeComponent()
RegisterActions(components)
End Sub
Private Sub aIntrastatHeader_GenerateIntrastatRows_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aIntrastatHeader_GenerateIntrastatRows.Execute
Try
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _IntrastatHeader As IntrastatHeader = TryCast(View.SelectedObjects(0), IntrastatHeader)
Dim _IntrastatRows_DELCollection As New XPCollection(Of IntrastatRows)(_ocur.Session, DevExpress.Data.Filtering.CriteriaOperator.Parse("IntrastatHeader=?", _IntrastatHeader))
'// Nullás súlyok terméktörzsbõl update
_ocur.Delete(_IntrastatRows_DELCollection)
_ocur.CommitChanges()
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
Dim _DeliveryNoteInRows_XPQuery = New XPQuery(Of DeliveryNoteInRows)(_onew.Session)
Dim query = From _DeliveryNoteInRows In _DeliveryNoteInRows_XPQuery _
Where _DeliveryNoteInRows.DeliveryNoteInHeader.DateExecution.Year = _IntrastatHeader.DateExecution.Year And
_DeliveryNoteInRows.DeliveryNoteInHeader.DateExecution.Month = _IntrastatHeader.DateExecution.Month
Group _DeliveryNoteInRows By _DeliveryNoteInRows.DeliveryNoteInHeader.ShipmentOption,
_DeliveryNoteInRows.Products.CustomsTariff,
_DeliveryNoteInRows.DeliveryNoteInHeader.Customers.Address1.Country,
_DeliveryNoteInRows.Products.CountryFrom,
_DeliveryNoteInRows.ShipingCode,
_DeliveryNoteInRows.ITransactionNumber,
_DeliveryNoteInRows.DeliveryNoteInHeader.DateExecution Into g = Group _
Select New With {Key .ShipmentOption = ShipmentOption, _
Key .CustomTariffs = CustomsTariff, _
Key .ITransactionNumber = ITransactionNumber, _
Key .CountryFrom = CountryFrom, _
Key .ShipingCode = ShipingCode, _
Key .CountrySender = Country, _
Key .DateExecution = DateExecution, _
Key .AmountHUF_Sum = g.Sum(Function(inv) (inv.ListPriceHUF - inv.DiscountPriceHUF) * inv.QTT), _
Key .Area_Sum = g.Sum(Function(inv) inv.Area), _
Key .Weight_Sum = g.Sum(Function(inv) inv.Weight)}
Dim _RowIndex As Long = 1
RaiseEvent InitWork(1, 1, query.Count)
For Each item In query
RaiseEvent DoWork()
If GLOBAL_EUMemberStates.Contains(item.CountrySender.GetMemberValue("ShortName")) Then
Dim _IntrastatRows As New IntrastatRows(_onew.Session)
With _IntrastatRows
.IntrastatHeader = _onew.GetObject(_IntrastatHeader)
.RowIndex = _RowIndex
.ITransactionNumber = item.ITransactionNumber
.ShipmentOption = item.ShipmentOption
.CustomsTariffs = item.CustomTariffs
.CountrySender = item.CountrySender
.ShipingCode = item.ShipingCode
.CountryFrom = item.CountryFrom
.AmountHUF = item.AmountHUF_Sum
.Area = item.Area_Sum
.Weight = item.Weight_Sum
End With
_RowIndex += 1
End If
Next
_onew.CommitChanges()
If Frame.GetController(Of RefreshController).RefreshAction.Enabled Then
Frame.GetController(Of RefreshController).RefreshAction.DoExecute()
End If
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, "Hiba!")
Finally
RaiseEvent FinalWork
End Try
End Sub
Private Sub aIntrastatCheckPrice_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aIntrastatCheckPrice.Execute
'// számlaigazolásból árak ellenõrzése
Dim _DeliveryNoteInRows As DeliveryNoteInRows
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
RaiseEvent InitWork(1, 1, View.SelectedObjects.Count)
For Each _DeliveryNoteInRows In View.SelectedObjects
RaiseEvent DoWork()
If _DeliveryNoteInRows.DeliveryNoteInHeader.CurrencyName.ShortName <> "HUF" Then
If _DeliveryNoteInRows.DeliveryNoteInRRFC.Count > 0 Then
_DeliveryNoteInRows.ListPriceHUF = Math.Round(_DeliveryNoteInRows.ListPriceDEV * _DeliveryNoteInRows.DeliveryNoteInHeader.CurrencyRate, 0, MidpointRounding.AwayFromZero)
If _DeliveryNoteInRows.Weight <= 0 Then
_DeliveryNoteInRows.WeightMode = eWeightMode.eTotalWeightperQuantity
If _DeliveryNoteInRows.Products.NettoWeight <> 0 Then
_DeliveryNoteInRows.Weight = Math.Round(_DeliveryNoteInRows.QTT * _DeliveryNoteInRows.Products.NettoWeight, 4, 0)
End If
End If
End If
End If
Next
_ocur.CommitChanges()
RaiseEvent FinalWork
End Sub
Private Sub SimpleAction1_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aIntrastatCheckWeight.Execute
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _DeliveryNoteInRows As DeliveryNoteInRows
RaiseEvent InitWork(1, 1, View.SelectedObjects.Count)
For Each _DeliveryNoteInRows In View.SelectedObjects
RaiseEvent DoWork()
Dim _StorageInRows_Collection As New XPCollection(Of StorageInRows)(_ocur.Session,
CriteriaOperator.Parse("DeliveryNoteInRows=?", _DeliveryNoteInRows))
Dim _StorageInRows As StorageInRows
For Each _StorageInRows In _StorageInRows_Collection
If _StorageInRows.DeliveryNoteInRows IsNot Nothing Then
If _StorageInRows.DeliveryNoteInRows.Weight <> 0 Then
If _StorageInRows.DeliveryNoteInRows.QTT <> 0 Then
_StorageInRows.Weight = Math.Round((_StorageInRows.DeliveryNoteInRows.Weight / _StorageInRows.DeliveryNoteInRows.QTT) * _StorageInRows.QTT, 2, MidpointRounding.AwayFromZero)
End If
End If
End If
If _StorageInRows.StorageInRowsFrom IsNot Nothing Then
If _StorageInRows.StorageInRowsFrom.DeliveryNoteInRows IsNot Nothing Then
_StorageInRows.DeliveryNoteInRows = _StorageInRows.StorageInRowsFrom.DeliveryNoteInRows
If _StorageInRows.StorageInRowsFrom.DeliveryNoteInRows.Weight <> 0 Then
If _StorageInRows.StorageInRowsFrom.DeliveryNoteInRows.QTT <> 0 Then
_StorageInRows.Weight = Math.Round((_StorageInRows.StorageInRowsFrom.DeliveryNoteInRows.Weight / _StorageInRows.StorageInRowsFrom.DeliveryNoteInRows.QTT) * _StorageInRows.QTT, 2, MidpointRounding.AwayFromZero)
End If
End If
End If
End If
Dim _StorageInRows_From_Collection As New XPCollection(Of StorageInRows)(_ocur.Session, CriteriaOperator.Parse("StorageInRowsFrom=?", _StorageInRows))
Dim _StorageInRows_From As StorageInRows
For Each _StorageInRows_From In _StorageInRows_From_Collection
_StorageInRows_From.DeliveryNoteInRows = _StorageInRows.DeliveryNoteInRows
_StorageInRows_From.Weight = (_StorageInRows.Weight / _StorageInRows.QTT) * _StorageInRows_From.QTT
Next
_ocur.CommitChanges()
Next
Next
RaiseEvent FinalWork
End Sub
Private Sub aPrintIntrastat_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aPrintIntrastat.Execute
Try
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _IntrastatHeader As IntrastatHeader = TryCast(View.SelectedObjects(0), IntrastatHeader)
If _IntrastatHeader Is Nothing Then Throw New Exception("*Váratlan hiba történt, a folyamat megszakadt!")
Dim _ReportData As ReportData = _IntrastatHeader.IntrastatParameters.Report
If _ReportData Is Nothing Then Throw New Exception("*Nincs beállítva nyomtatvány!" + vbNewLine + "A folyamat megszakadt!")
Frame.GetController(Of Reports.ReportServiceController).ShowPreview(_ReportData, CriteriaOperator.Parse("IntrastatHeader.Oid=?", _IntrastatHeader.Oid), True)
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, String.Format(CaptionHelper.GetLocalizedText("Exceptions\NuvolarExceptions", "MsgBoxCheckItAgain")))
End Try
End Sub
End Class
@@ -0,0 +1,58 @@
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 IntrastatParameters
Inherits BaseObject
Private _CustomersFrom As CustomersFrom
Private _NumberGenerator As NumberGenerator
Private _Report As ReportData
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
End Sub
<RuleRequiredField("IntrastatParameters - CustomersFrom", DefaultContexts.Save)> _
Property CustomersFrom As CustomersFrom
Get
Return _CustomersFrom
End Get
Set(value As CustomersFrom)
SetPropertyValue("CustomersFrom", _CustomersFrom, value)
End Set
End Property
<RuleRequiredField("IntrastatParameters - NumberGenerator", DefaultContexts.Save)> _
Property NumberGenerator As NumberGenerator
Get
Return _NumberGenerator
End Get
Set(value As NumberGenerator)
SetPropertyValue("NumberGenerator", _NumberGenerator, value)
End Set
End Property
Public Property Report() As ReportData
Get
Return _Report
End Get
Set(value As ReportData)
SetPropertyValue("Report", _Report, value)
End Set
End Property
End Class
@@ -0,0 +1,126 @@
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 IntrastatRows
Inherits BaseObject
Private _IntrastatHeader As IntrastatHeader
Private _RowIndex As Long
Private _CustomsTariffs As CustomsTariffs
Private _ITransactionNumber As String
Private _ShipmentOption As ShipmentOption
Private _ShipingCode As String
Private _CountrySender As Country 'Szállítóllevél sorhoz tartozó ország
Private _CountryFrom As Country 'Termékhez tartozó származási ország
Private _Weight As Double
Private _Area As Double
Private _AmountHUF As Double 'SUMPrice HUF-os a szállítólevél sorból
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
End Sub
<Association("IntrastatHeader - IntrastatRows", GetType(IntrastatHeader))> _
Property IntrastatHeader As IntrastatHeader
Get
Return _IntrastatHeader
End Get
Set(value As IntrastatHeader)
SetPropertyValue("IntrastatHeader", _IntrastatHeader, value)
End Set
End Property
Property RowIndex As Long
Get
Return _RowIndex
End Get
Set(value As Long)
SetPropertyValue("RowIndex", _RowIndex, value)
End Set
End Property
Property CustomsTariffs As CustomsTariffs
Get
Return _CustomsTariffs
End Get
Set(value As CustomsTariffs)
SetPropertyValue("CustomsTariffs", _CustomsTariffs, value)
End Set
End Property
Property ITransactionNumber As String
Get
Return _ITransactionNumber
End Get
Set(value As String)
SetPropertyValue("ITransactionNumber", _ITransactionNumber, value)
End Set
End Property
Property ShipmentOption As ShipmentOption
Get
Return _ShipmentOption
End Get
Set(value As ShipmentOption)
SetPropertyValue("ShipmentOption", _ShipmentOption, value)
End Set
End Property
Property ShipingCode As String
Get
Return _ShipingCode
End Get
Set(value As String)
SetPropertyValue("ShipingCode", _ShipingCode, value)
End Set
End Property
Property CountrySender As Country
Get
Return _CountrySender
End Get
Set(value As Country)
SetPropertyValue("CountrySender", _CountrySender, value)
End Set
End Property
Property CountryFrom As Country
Get
Return _CountryFrom
End Get
Set(value As Country)
SetPropertyValue("CountryFrom", _CountryFrom, value)
End Set
End Property
Property Weight As Double
Get
Return _Weight
End Get
Set(value As Double)
SetPropertyValue("Weight", _Weight, value)
End Set
End Property
Property Area As Double
Get
Return _Area
End Get
Set(value As Double)
SetPropertyValue("Area", _Area, 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
End Class
@@ -0,0 +1,53 @@
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("DeliveryNoteInFromOffersInRowsHeader - Disable OfferInHeader", AppearanceItemType.ViewItem, "1=1", TargetItems:="OfferInHeader", Enabled:=False)> _
Public Class DeliveryNoteInFromOffersInRowsHeader
Inherits BaseObject
Private _OfferInHeader As OfferInHeader
Private _DeliveryNoteInType As DeliveryNoteInType
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
End Sub
Property OfferInHeader As OfferInHeader
Get
Return _OfferInHeader
End Get
Set(value As OfferInHeader)
SetPropertyValue("OfferInHeader", _OfferInHeader, value)
End Set
End Property
<RuleRequiredField("DeliveryNoteInFromOffersInRowsHeader.DeliveryNoteInType", DefaultContexts.Save)> _
Property DeliveryNoteInType As DeliveryNoteInType
Get
Return _DeliveryNoteInType
End Get
Set(value As DeliveryNoteInType)
SetPropertyValue("DeliveryNoteInType", _DeliveryNoteInType, value)
End Set
End Property
<Association("DeliveryNoteInFromOffersInRowsHeader-DeliveryNoteInFromOffersInRowsRows", GetType(DeliveryNoteInFromOffersInRowsRows)), VisibleInListView(False)> _
ReadOnly Property DeliveryNoteInFromOffersInRowsRows As XPCollection(Of DeliveryNoteInFromOffersInRowsRows)
Get
Return GetCollection(Of DeliveryNoteInFromOffersInRowsRows)("DeliveryNoteInFromOffersInRowsRows")
End Get
End Property
End Class
@@ -0,0 +1,69 @@
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.Linq
<DefaultClassOptions(), CreatableItem(False), NavigationItem(False)> _
Public Class DeliveryNoteInFromOffersInRowsRows
Inherits BaseObject
Private _DeliveryNoteInFromOffersInRowsHeader As DeliveryNoteInFromOffersInRowsHeader
Private _OfferInRows As OfferInRows
Private _QTT_Process As Double
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
End Sub
<Association("DeliveryNoteInFromOffersInRowsHeader-DeliveryNoteInFromOffersInRowsRows", GetType(DeliveryNoteInFromOffersInRowsHeader))> _
Property DeliveryNoteInFromOrderOutRowsHeader As DeliveryNoteInFromOffersInRowsHeader
Get
Return _DeliveryNoteInFromOffersInRowsHeader
End Get
Set(value As DeliveryNoteInFromOffersInRowsHeader)
SetPropertyValue("DeliveryNoteInFromOffersInRowsHeader", _DeliveryNoteInFromOffersInRowsHeader, value)
End Set
End Property
Property OfferInRows As OfferInRows
Get
Return _OfferInRows
End Get
Set(value As OfferInRows)
SetPropertyValue("OfferInRows", _OfferInRows, value)
End Set
End Property
Property QTT_Process As Double
Get
Return _QTT_Process
End Get
Set(value As Double)
SetPropertyValue("QTT_Process", _QTT_Process, value)
End Set
End Property
ReadOnly Property QTT_DeliveryNoteIn As Double
Get
Dim _DeliveryNoteInRows As New XPQuery(Of DeliveryNoteInRows)(Session)
Dim _QTT_Sum As Double = 0
Dim query = From _DNIR In _DeliveryNoteInRows
Where _DNIR.OfferInRows Is OfferInRows
Group _DNIR By _DNIR.OfferInRows Into g = Group _
Select New With {Key .QTT_Sum = g.Sum(Function(inv) inv.QTT)}
For Each item In query
_QTT_Sum = item.QTT_Sum
Next
Return _QTT_Sum
End Get
End Property
End Class
@@ -0,0 +1,50 @@
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 OrderOutHeader", AppearanceItemType.ViewItem, "1=1", TargetItems:="OrderOutHeader", Enabled:=False)> _
Public Class DeliveryNoteInFromOrderOutRowsHeader
Inherits BaseObject
Private _OrderOutHeader As OrderOutHeader ' Kimenő megrendelés fejléc
Private _DeliveryNoteInType As DeliveryNoteInType
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
End Sub
<Association("DeliveryNoteInFromOrderOutRowsHeader-DeliveryNoteInFromOrderOutRowsRows", GetType(DeliveryNoteInFromOrderOutRowsRows)), VisibleInListView(False)> _
ReadOnly Property DeliveryNoteInFromOrderOutRowsRows As XPCollection(Of DeliveryNoteInFromOrderOutRowsRows)
Get
Return GetCollection(Of DeliveryNoteInFromOrderOutRowsRows)("DeliveryNoteInFromOrderOutRowsRows")
End Get
End Property
Property OrderOutHeader As OrderOutHeader
Get
Return _OrderOutHeader
End Get
Set(value As OrderOutHeader)
SetPropertyValue("OrderOutHeader", _OrderOutHeader, value)
End Set
End Property
<RuleRequiredField("DeliveryNoteInFromOrderOutRowsHeader.DeliveryNoteInType", DefaultContexts.Save)> _
Property DeliveryNoteInType As DeliveryNoteInType
Get
Return _DeliveryNoteInType
End Get
Set(value As DeliveryNoteInType)
SetPropertyValue("DeliveryNoteInType", _DeliveryNoteInType, value)
End Set
End Property
End Class
@@ -0,0 +1,68 @@
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.Linq
<DefaultClassOptions()> _
<NavigationItem(False), CreatableItem(False)> _
Public Class DeliveryNoteInFromOrderOutRowsRows
Inherits BaseObject
Private _DeliveryNoteInFromOrderOutRowsHeader As DeliveryNoteInFromOrderOutRowsHeader
Private _OrderOutRows As OrderOutRows
Private _QTT_Process As Double
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
End Sub
<Association("DeliveryNoteInFromOrderOutRowsHeader-DeliveryNoteInFromOrderOutRowsRows", GetType(DeliveryNoteInFromOrderOutRowsHeader))> _
Property DeliveryNoteInFromOrderOutRowsHeader As DeliveryNoteInFromOrderOutRowsHeader
Get
Return _DeliveryNoteInFromOrderOutRowsHeader
End Get
Set(value As DeliveryNoteInFromOrderOutRowsHeader)
SetPropertyValue("DeliveryNoteInFromOrderOutRowsHeader", _DeliveryNoteInFromOrderOutRowsHeader, value)
End Set
End Property
Property OrderOutRows As OrderOutRows
Get
Return _OrderOutRows
End Get
Set(value As OrderOutRows)
SetPropertyValue("OrderOutRows", _OrderOutRows, value)
End Set
End Property
Property QTT_Process As Double
Get
Return _QTT_Process
End Get
Set(value As Double)
SetPropertyValue("QTT_Process", _QTT_Process, value)
End Set
End Property
ReadOnly Property QTT_DeliveryNoteIn As Double
Get
Dim _DeliveryNoteInRows As New XPQuery(Of DeliveryNoteInRows)(Session)
Dim _QTT_Sum As Double = 0
Dim query = From _DNIR In _DeliveryNoteInRows
Where _DNIR.OrderOutRows Is OrderOutRows
Group _DNIR By _DNIR.OrderOutRows Into g = Group _
Select New With {Key .QTT_Sum = g.Sum(Function(inv) inv.QTT)}
For Each item In query
_QTT_Sum = item.QTT_Sum
Next
Return _QTT_Sum
End Get
End Property
End Class
@@ -0,0 +1,30 @@
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 DeliveryNoteInRRFC_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 BonusHUF As Double
End Class
@@ -0,0 +1,57 @@
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 DeliveryNoteInToRegistry
Inherits BaseObject
Private _RegistryType As RegistryType 'Iktatás típusa
Private _F_CustomerBankAccounts As CustomerBankAccounts
Private _RegistryNumber 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 RegistryType As RegistryType
Get
Return _RegistryType
End Get
Set(value As RegistryType)
SetPropertyValue("RegistryType", _RegistryType, value)
End Set
End Property
Property F_CustomerBankAccounts As CustomerBankAccounts
Get
Return _F_CustomerBankAccounts
End Get
Set(value As CustomerBankAccounts)
SetPropertyValue("F_CustomerBankAccounts", _F_CustomerBankAccounts, value)
End Set
End Property
Property RegistryNumber As String
Get
Return _RegistryNumber
End Get
Set(value As String)
SetPropertyValue("RegistryNumber", _RegistryNumber, value)
End Set
End Property
End Class
@@ -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(False), CreatableItem(False)> _
<NonPersistent()> _
Public Class DeliveryNoteInToStorageInHeader
Inherits BaseObject
Private _Storage As Storage
Private _StorageMoveType As StorageMoveType
Private _IsRegistry As Boolean
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
IsRegistry = False
End Sub
Property Storage As Storage
Get
Return _Storage
End Get
Set(value As Storage)
SetPropertyValue("Storage", _Storage, value)
End Set
End Property
<ImmediatePostData(True), DataSourceCriteria("Storage='@This.Storage' and MoveDirection=0 and MoveType=7")>
Property StorageMoveType As StorageMoveType
Get
Return _StorageMoveType
End Get
Set(value As StorageMoveType)
SetPropertyValue("StorageMoveType", _StorageMoveType, value)
End Set
End Property
Property IsRegistry As Boolean
Get
Return _IsRegistry
End Get
Set(value As Boolean)
SetPropertyValue("IsRegistry", _IsRegistry, value)
End Set
End Property
End Class
@@ -0,0 +1,8 @@
Public Enum eImportMode
eInternalwithVAT = 0 'Belföldi ÁFÁ-s
eExternalEUwithVAT = 1 'EU-ból ÁFÁ-s
eExternalEUNoVAT = 2 'EU-ból nem ÁFÁs
eExternalOther = 3 ' EU-n kívüli nem ÁFÁS
End Enum