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,63 @@
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 CarMarks
Inherits BaseObject
Private _ShortName As String
Private _ObjectCreated As Date
Private _UserCreated As User
Public Sub New(ByVal session As Session)
MyBase.New(session)
' This constructor is used when an object is loaded from a persistent storage.
' Do not place any code here or place it only when the IsLoading property is false:
' if (!IsLoading){
' It is now OK to place your initialization code here.
' }
' or as an alternative, move your initialization code into the AfterConstruction method.
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
' Place here your initialization code.
End Sub
<Size(255)> _
Property ShortName As String
Get
Return _ShortName
End Get
Set(value As String)
SetPropertyValue("ShortName", _ShortName, 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
End Class
@@ -0,0 +1,80 @@
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 CarTypes - ObjectCreated", AppearanceItemType.ViewItem, "1=1", TargetItems:="ObjectCreated", Enabled:=False)> _
<Appearance("Disable CarTypes - UserCreated", AppearanceItemType.ViewItem, "1=1", TargetItems:="UserCreated", Enabled:=False)> _
Public Class CarTypes
Inherits BaseObject
Private _CarMarks As CarMarks
Private _ShortName As String
Private _ObjectCreated As Date
Private _UserCreated As User
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 OnSaving()
MyBase.OnSaving()
If Session.IsNewObject(Me) Then
ObjectCreated = GetSQLTime(Session)
UserCreated = Session.GetObjectByKey(Of User)(Session.GetKeyValue(SecuritySystem.CurrentUser))
End If
End Sub
Property CarMarks As CarMarks
Get
Return _CarMarks
End Get
Set(value As CarMarks)
SetPropertyValue("CarMarks", _CarMarks, value)
End Set
End Property
<Size(255)> _
Property ShortName As String
Get
Return _ShortName
End Get
Set(value As String)
SetPropertyValue("ShortName", _ShortName, 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
End Class
@@ -0,0 +1,157 @@
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 Cars - UniqueObjects", AppearanceItemType.ViewItem, "1=1", TargetItems:="UniqueObjects", Enabled:=False)> _
<Appearance("Disable Cars - ObjectCreated", AppearanceItemType.ViewItem, "1=1", TargetItems:="ObjectCreated", Enabled:=False)> _
<Appearance("Disable Cars - UserCreated", AppearanceItemType.ViewItem, "1=1", TargetItems:="UserCreated", Enabled:=False)> _
Public Class Cars
Inherits BaseObject
Private _VIN As String 'Alvázszám
Private _MotorNumber As String 'Motorszám
Private _CarMarks As CarMarks 'Autó márka
Private _CarTypes As CarTypes 'Autó tipusa
Private _LicensePlateNumber As String 'Forgalmi rendszám
Private _DateFirstOnRoad As Date 'Elsõ forgalombahelyezés
Private _ObjectCreated As Date
Private _UserCreated As User
Private _UniqueObjects As UniqueObjects
Private _GLReport As GLReport
Public Sub New(ByVal session As Session)
MyBase.New(session)
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))
UniqueObjects = New UniqueObjects(Session)
UniqueObjects.Name = LicensePlateNumber
UniqueObjects.Cars = Me
UniqueObjects.Save()
End If
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
End Sub
<Size(255)> _
Property VIN As String
Get
Return _VIN
End Get
Set(value As String)
SetPropertyValue("VIN", _VIN, value)
End Set
End Property
<Size(255)> _
Property MotorNumber As String
Get
Return _MotorNumber
End Get
Set(value As String)
SetPropertyValue("MotorNumber", _MotorNumber, value)
End Set
End Property
Property CarMarks As CarMarks
Get
Return _CarMarks
End Get
Set(value As CarMarks)
SetPropertyValue("CarMarks", _CarMarks, value)
End Set
End Property
<ImmediatePostData(True), DataSourceCriteria("CarMarks='@This.CarMarks'")>
Property CarTypes As CarTypes
Get
Return _CarTypes
End Get
Set(value As CarTypes)
SetPropertyValue("CarTypes", _CarTypes, value)
End Set
End Property
<RuleRequiredField("Car - LicensePlateNumber", DefaultContexts.Save)> _
<RuleUniqueValue("Car.LicensePlateNumber.RuleUniqueValue", DefaultContexts.Save, CriteriaEvaluationBehavior:=PersistentCriteriaEvaluationBehavior.BeforeTransaction)> _
Property LicensePlateNumber As String
Get
Return _LicensePlateNumber
End Get
Set(value As String)
SetPropertyValue("LicensePlateNumber", _LicensePlateNumber, value)
End Set
End Property
Property DateFirstOnRoad As Date
Get
Return _DateFirstOnRoad
End Get
Set(value As Date)
SetPropertyValue("DateFirstOnRoad", _DateFirstOnRoad, value.Date)
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 UniqueObjects As UniqueObjects
Get
Return _UniqueObjects
End Get
Set(value As UniqueObjects)
SetPropertyValue("UniqueObjects", _UniqueObjects, value)
End Set
End Property
<ImmediatePostData(True)> _
Property GLReport As GLReport
Get
Return _GLReport
End Get
Set(value As GLReport)
SetPropertyValue("GLReport", _GLReport, value)
End Set
End Property
<VisibleInListView(False), VisibleInLookupListView(False)> _
ReadOnly Property GLReportRows As XPCollection(Of GLReportRows)
Get
Dim _GLReportRows_Collection As XPCollection(Of GLReportRows)
If Me.GLReport IsNot Nothing Then
_GLReportRows_Collection = New XPCollection(Of GLReportRows)(Session, CriteriaOperator.Parse("GLReport.Oid=? and UniqueObjects.Oid=?", Me.GLReport.Oid, Me.UniqueObjects.Oid))
Return _GLReportRows_Collection
Else
Return Nothing
End If
End Get
End Property
End Class