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 Class DeliveryNoteOutHeader 'Kimenő szállítólevél fejléc Inherits BaseObject Private _DeliveryNoteOutType As DeliveryNoteOutType Private _DocumentNumber As String ' Sorszám Private _CustomersFrom As CustomersFrom ' Sajátcég Private _Customers As Customers ' Ügyfél Private _DateCreated As Date ' Létrehozás dátuma Private _DateExecution As Date ' Végrehajtás dátuma Private _ShipmentOption As ShipmentOption ' Szállítási opció Private _QualityOption As QualityOption ' Minőségi opció Private _CurrencyName As CurrencyName ' Deviza Private _Note As String ' Megjegyzés Private _TransportAddress As Address ' -- Szállítási cím 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 _ConnectInfo As String '--Nonpersistent propertyk Private _row_StorageOutRowsInRows As StorageOutRowsInRows Private _row_QTT As Double Private _row_NoteRows As String 'Sor megjegyzés Public Sub New(ByVal session As Session) MyBase.New(session) End Sub Protected Overrides Sub OnSaving() MyBase.OnSaving() If String.IsNullOrEmpty(DocumentNumber) Then _ _DocumentNumber = DeliveryNoteOutType.NumberGenerator.GetNewNumber(DeliveryNoteOutType.NumberGenerator) If String.IsNullOrEmpty(ConnectInfo) Then ConnectInfo = DocumentNumber If Session.IsNewObject(Me) Then ObjectCreated = GetSQLTime(Session) UserCreated = Session.GetObjectByKey(Of User)(Session.GetKeyValue(SecuritySystem.CurrentUser)) End If End Sub _ Property DeliveryNoteOutType As DeliveryNoteOutType Get Return _DeliveryNoteOutType End Get Set(value As DeliveryNoteOutType) SetPropertyValue("DeliveryNoteOutType", _DeliveryNoteOutType, value) End Set End Property _ Property DocumentNumber() As String Get Return _DocumentNumber End Get Set(ByVal value As String) SetPropertyValue("DocumentNumber", _DocumentNumber, value) End Set End Property _ Property Customers() As Customers Get Return _Customers End Get Set(ByVal value As Customers) SetPropertyValue("Customers", _Customers, value) End Set End Property _ 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 Property DateExecution() As Date Get Return _DateExecution End Get Set(ByVal value As Date) SetPropertyValue("DateExecution", _DateExecution, value) 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 Property CurrencyName() As CurrencyName Get Return _CurrencyName End Get Set(ByVal value As CurrencyName) SetPropertyValue("CurrencyName", _CurrencyName, value) End Set End Property _ Property Note() As String Get Return _Note End Get Set(ByVal value As String) SetPropertyValue("Note", _Note, value) End Set End Property _ Property TransportAddress As Address Get Return _TransportAddress End Get Set(value As Address) SetPropertyValue("TransportAddress", _TransportAddress, value) End Set End Property Property IsEditable() As Boolean Get Return _IsEditable End Get Set(ByVal value As Boolean) SetPropertyValue("IsEditable", _IsEditable, value) End Set End Property Property IsStorno() As Boolean Get Return _IsStorno End Get Set(ByVal value As Boolean) SetPropertyValue("IsStorno", _IsStorno, value) End Set End Property _ Property ObjectCreated As Date Get Return _ObjectCreated End Get Set(value As Date) SetPropertyValue("ObjectCreated", _ObjectCreated, value) End Set End Property _ Property UserCreated As User Get Return _UserCreated End Get Set(value As User) SetPropertyValue("UserCreated", _UserCreated, value) End Set End Property Property ConnectInfo As String Get Return _ConnectInfo End Get Set(value As String) SetPropertyValue("ConnectInfo", _ConnectInfo, value) End Set End Property '------ReadOnly-------- _ ReadOnly Property DeliveryNoteOutRows() As XPCollection(Of DeliveryNoteOutRows) Get Return GetCollection(Of DeliveryNoteOutRows)("DeliveryNoteOutRows") End Get End Property '--Nonpersistent propertyk _ _ Property row_StorageOutRowsInRows As StorageOutRowsInRows Get Return _row_StorageOutRowsInRows End Get Set(value As StorageOutRowsInRows) SetPropertyValue("row_StorageOutRowsInRows", _row_StorageOutRowsInRows, value) End Set End Property _ Property row_QTT As Double Get Return _row_QTT End Get Set(value As Double) SetPropertyValue("row_QTT", _row_QTT, value) End Set End Property _ 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 _ _ Private ReadOnly Property StorageOutRowsInRows As XPCollection(Of StorageOutRowsInRows) Get Dim _StorageOutRowsInRows_Collection As XPCollection(Of StorageOutRowsInRows) Dim _Criteria As String _Criteria = "(QTT_To_DeliveryOut + QTT_Will) < QTT" _StorageOutRowsInRows_Collection = New XPCollection(Of StorageOutRowsInRows)(Session, CriteriaOperator.Parse(_Criteria)) Return _StorageOutRowsInRows_Collection End Get End Property End Class