First create solution
This commit is contained in:
+156
@@ -0,0 +1,156 @@
|
||||
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("PDA")> _
|
||||
<DeferredDeletion(False)> _
|
||||
<DefaultProperty("DocumentNumber")> _
|
||||
<Appearance("StoragePDACollectionHeader - Disable ObjectCreated, UserCreated, DocumentNumber", AppearanceItemType.ViewItem, "1=1", TargetItems:="ObjectCreated;UserCreated;DocumentNumber", Enabled:=False)> _
|
||||
<Appearance("StoragePDACollectionHeader - Disable all properties, when StoragePDACollectionHeaderStatus=1", AppearanceItemType.ViewItem, "StoragePDACollectionHeaderStatus=1", TargetItems:="*", Enabled:=False)> _
|
||||
<Appearance("StoragePDACollectionHeader - Disable aInsertStoragePDARows, when StoragePDACollectionHeaderStatus=1", AppearanceItemType.Action, "StoragePDACollectionHeaderStatus=1", TargetItems:="aInsertStoragePDARows", Visibility:=Editors.ViewItemVisibility.Hide)> _
|
||||
<Appearance("StoragePDACollectionHeader - Disable aDeleteStoragePDARows, when StoragePDACollectionHeaderStatus=1", AppearanceItemType.Action, "StoragePDACollectionHeaderStatus=1", TargetItems:="aDeleteStoragePDARows", Visibility:=Editors.ViewItemVisibility.Hide)> _
|
||||
Public Class StoragePDACollectionHeader
|
||||
Inherits BaseObject
|
||||
Private _CustomersFrom As CustomersFrom
|
||||
Private _DocumentNumber As String
|
||||
Private _StoragePDACollectionHeaderStatus As eStoragePDACollectionHeaderStatus
|
||||
Private _StoragePDACollectionType As eStoragePDACollectionType
|
||||
Private _StoragePDAParameters As StoragePDAParameters
|
||||
Private _ObjectCreated As Date
|
||||
Private _UserCreated As User
|
||||
Private _StorageInHeader As StorageInHeader
|
||||
Private _StorageOutHeader As StorageOutHeader
|
||||
|
||||
|
||||
Private _row_Products As Products
|
||||
Private _row_QTT As Double
|
||||
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
Me.ObjectCreated = GetSQLTime(Session)
|
||||
Me.UserCreated = Session.GetObjectByKey(Of User)(Session.GetKeyValue(SecuritySystem.CurrentUser))
|
||||
Me.StoragePDACollectionHeaderStatus = eStoragePDACollectionHeaderStatus.eOpen
|
||||
End Sub
|
||||
Protected Overrides Sub OnSaving()
|
||||
MyBase.OnSaving()
|
||||
If Session.IsNewObject(Me) Then
|
||||
Me.DocumentNumber = Me.StoragePDAParameters.NumberGenerator.GetNewNumber(Me.StoragePDAParameters.NumberGenerator)
|
||||
End If
|
||||
End Sub
|
||||
Property CustomersFrom As CustomersFrom
|
||||
Get
|
||||
Return _CustomersFrom
|
||||
End Get
|
||||
Set(value As CustomersFrom)
|
||||
SetPropertyValue("CustomersFrom", _CustomersFrom, 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 StoragePDACollectionHeaderStatus As eStoragePDACollectionHeaderStatus
|
||||
Get
|
||||
Return _StoragePDACollectionHeaderStatus
|
||||
End Get
|
||||
Set(value As eStoragePDACollectionHeaderStatus)
|
||||
SetPropertyValue("StoragePDACollectionHeaderStatus", _StoragePDACollectionHeaderStatus, value)
|
||||
End Set
|
||||
End Property
|
||||
Property StorageCollectionType As eStoragePDACollectionType
|
||||
Get
|
||||
Return _StoragePDACollectionType
|
||||
End Get
|
||||
Set(value As eStoragePDACollectionType)
|
||||
SetPropertyValue("StoragePDACollectionType", _StoragePDACollectionType, value)
|
||||
End Set
|
||||
End Property
|
||||
<RuleRequiredField("StoragePDACollectionHeader-StoragePDAParameters", DefaultContexts.Save)>
|
||||
<ImmediatePostData(True), DataSourceCriteria("CustomersFrom = '@This.CustomersFrom'")>
|
||||
Property StoragePDAParameters As StoragePDAParameters
|
||||
Get
|
||||
Return _StoragePDAParameters
|
||||
End Get
|
||||
Set(value As StoragePDAParameters)
|
||||
SetPropertyValue("StoragePDAParameters", _StoragePDAParameters, 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 StorageInHeader As StorageInHeader
|
||||
Get
|
||||
Return _StorageInHeader
|
||||
End Get
|
||||
Set(value As StorageInHeader)
|
||||
SetPropertyValue("StorageInHeader", _StorageInHeader, value)
|
||||
End Set
|
||||
End Property
|
||||
Property StorageOutHeader As StorageOutHeader
|
||||
Get
|
||||
Return _StorageOutHeader
|
||||
End Get
|
||||
Set(value As StorageOutHeader)
|
||||
SetPropertyValue("StorageOutHeader", _StorageOutHeader, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'Nonpersistent
|
||||
<NonPersistent> _
|
||||
Property row_Products As Products
|
||||
Get
|
||||
Return _row_Products
|
||||
End Get
|
||||
Set(value As Products)
|
||||
SetPropertyValue("row_Products", _row_Products, value)
|
||||
End Set
|
||||
End Property
|
||||
<NonPersistent> _
|
||||
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
|
||||
'--------------------ReadOnly--------------------------
|
||||
<VisibleInListView(False), VisibleInLookupListView(False)> _
|
||||
<Association("StoragePDACollectionHeader-StoragePDACollectionRows", GetType(StoragePDACollectionRows)), Aggregated()> _
|
||||
Public ReadOnly Property StoragePDACollectionRows() As XPCollection(Of StoragePDACollectionRows)
|
||||
Get
|
||||
Return GetCollection(Of StoragePDACollectionRows)("StoragePDACollectionRows")
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user