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,73 @@
Imports System
Imports System.ComponentModel
Imports DevExpress.Xpo
Imports DevExpress.Data.Filtering
Imports DevExpress.ExpressApp
Imports DevExpress.Persistent.Base
Imports DevExpress.Persistent.BaseImpl
Imports DevExpress.Persistent.Validation
<DefaultClassOptions()> _
<NonPersistent()>
<CreatableItem(False)> _
<NavigationItem(False)> _
Public Class ServiceFinder
Inherits BaseObject
Private _MasterKey As Guid
Private _Services As Services
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
<Browsable(False)> _
Property MasterKey As Guid
Get
Return _MasterKey
End Get
Set(value As Guid)
SetPropertyValue("MasterKey", _MasterKey, value)
End Set
End Property
<ImmediatePostData(), Browsable(False)>
Property Services As Services
Get
Return _Services
End Get
Set(value As Services)
SetPropertyValue("Services", _Services, value)
If Session.IsObjectsSaving = False And Session.IsObjectsLoading = False Then
Dim c As XPCollection(Of ServiceFinderInfo)
c = Me.ServiceFinderInfo
End If
End Set
End Property
<VisibleInListView(False), VisibleInLookupListView(False)> _
ReadOnly Property ServiceSelect As XPCollection(Of Services)
Get
Return New XPCollection(Of Services)(Session)
End Get
End Property
<VisibleInListView(False), VisibleInLookupListView(False)> _
ReadOnly Property ServiceSelected As XPCollection(Of ServiceSelected)
Get
Return New XPCollection(Of ServiceSelected)(Session, CriteriaOperator.Parse("MasterKey=?", Me.MasterKey))
End Get
End Property
<VisibleInListView(False), VisibleInLookupListView(False)> _
ReadOnly Property ServiceFinderInfo As XPCollection(Of ServiceFinderInfo)
Get
Return New XPCollection(Of ServiceFinderInfo)(Session, CriteriaOperator.Parse("1=2"))
End Get
End Property
End Class
@@ -0,0 +1,41 @@
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()> _
<CreatableItem(False)> _
<NavigationItem(False)> _
Public Class ServiceFinderInfo
Inherits BaseObject
Private _InfoString 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 InfoString As String
Get
Return _InfoString
End Get
Set(value As String)
SetPropertyValue("InfoString", _InfoString, value)
End Set
End Property
End Class
@@ -0,0 +1,32 @@
Partial Class ServiceFinderVC
<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()
components = New System.ComponentModel.Container()
End Sub
End Class
@@ -0,0 +1,56 @@
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.SystemModule
Imports DevExpress.ExpressApp.CloneObject
Public Class ServiceFinderVC
Inherits DevExpress.ExpressApp.ViewController
Public Sub New()
MyBase.New()
'This call is required by the Component Designer.
InitializeComponent()
RegisterActions(components)
End Sub
Protected Overrides Sub OnActivated()
MyBase.OnActivated()
If View.Id = "ServiceFinder_DetailView" Then
Frame.GetController(Of NewObjectViewController).Active.SetItemValue("", False)
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", False)
Frame.GetController(Of ListViewProcessCurrentObjectController).Active.SetItemValue("", False)
Frame.GetController(Of LinkUnlinkController).Active.SetItemValue("", False)
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", False)
Frame.GetController(Of ModificationsController).Active.SetItemValue("", False)
End If
If View.Id = "ServiceFinder_ServiceSelect_ListView" Then
Frame.GetController(Of ListViewProcessCurrentObjectController).Active.SetItemValue("", False)
Frame.GetController(Of LinkUnlinkController).Active.SetItemValue("", False)
End If
If View.Id = "ServiceFinder_ServiceSelected_ListView" Then
Frame.GetController(Of ListViewProcessCurrentObjectController).Active.SetItemValue("", False)
Frame.GetController(Of LinkUnlinkController).Active.SetItemValue("", False)
End If
If View.Id = "ServiceFinder_ServiceFinderInfo_ListView" Then
Frame.GetController(Of NewObjectViewController).Active.SetItemValue("", False)
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", False)
Frame.GetController(Of ListViewProcessCurrentObjectController).Active.SetItemValue("", False)
Frame.GetController(Of LinkUnlinkController).Active.SetItemValue("", False)
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", False)
End If
End Sub
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
<DefaultClassOptions()> _
<NavigationItem(False)> _
<CreatableItem(False)> _
Public Class ServiceSelected
Inherits BaseObject
Private _MasterKey As Guid 'PopUP master key
Private _Services As Services
Private _QTT As Double
Private _Description 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
<Browsable(False)> _
Property MasterKey As Guid
Get
Return _MasterKey
End Get
Set(value As Guid)
SetPropertyValue("MasterKey", _MasterKey, value)
End Set
End Property
Property Services As Services
Get
Return _Services
End Get
Set(value As Services)
SetPropertyValue("Services", _Services, value)
End Set
End Property
Property QTT As Double
Get
Return _QTT
End Get
Set(value As Double)
SetPropertyValue("QTT", _QTT, 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
End Class
@@ -0,0 +1,217 @@
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
'-- Szolgáltatások
<DefaultClassOptions()> _
<NavigationItem("BusinessStocks")> _
<Appearance("Disable ObjectCreated and UserCreated", AppearanceItemType.ViewItem, "1=1", TargetItems:="ObjectCreated;UserCreated", Enabled:=False)> _
Public Class Services 'Szolgáltatások törzse
Inherits BaseObject
Private _RowGroup1 As String 'Szöveges csoportosítás (nem kötelező)
Private _RowGroup2 As String 'Szöveges másodlagos csoportosítás (nem kötelező)
Private _ShortName As String 'Megnevezés
Private _Description As String 'Leírás
Private _CustomsTariffs As CustomsTariffs 'Vámtarifaszám, vagy szj szám vagy még ami lesz
Private _ListPriceHUF As Double = 0 'Listaár HUF
Private _ListPriceDEV As Double = 0 ' Listaár DEV
Private _CostPriceHUF As Double = 0 'Költségár HUF
Private _CostPriceDEV As Double = 0 ' Költségár DEV
Private _Units As Units 'Mennyiségi egység
Private _VAT As VAT 'ÁFA kód
Private _Recipe As Recipe 'A szolgáltatáshoz milyen recept tartozik
Private _ObjectCreated As Date 'Létrehozás dátuma
Private _UserCreated As User 'Létrehozó
Private _MasterBusinessDirectory As BusinessDirectory
Private _QTT_Will 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.VAT = Session.FindObject(Of VAT)(CriteriaOperator.Parse("DefaultForBusinnes='True'"))
End Sub
Property RowGroup1 As String
Get
Return _RowGroup1
End Get
Set(value As String)
SetPropertyValue("RowGroup1", _RowGroup1, value)
End Set
End Property
Property RowGroup2 As String
Get
Return _RowGroup2
End Get
Set(value As String)
SetPropertyValue("RowGroup2", _RowGroup2, value)
End Set
End Property
<RuleRequiredField("Services-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
Property CustomsTariffs As CustomsTariffs
Get
Return _CustomsTariffs
End Get
Set(value As CustomsTariffs)
SetPropertyValue("CustomsTariffs", _CustomsTariffs, value)
End Set
End Property
<RuleRequiredField("", DefaultContexts.Save)> _
<RuleValueComparison("Services-ListPriceHUF 0<", DefaultContexts.Save, ValueComparisonType.GreaterThan, 0)> _
Property ListPriceHUF As Double
Get
Return _ListPriceHUF
End Get
Set(value As Double)
SetPropertyValue("ListPriceHUF", _ListPriceHUF, value)
End Set
End Property
Property ListPriceDEV As Double
Get
Return _ListPriceDEV
End Get
Set(value As Double)
SetPropertyValue("ListPriceDEV", _ListPriceDEV, value)
End Set
End Property
Property CostPriceHUF As Double
Get
Return _CostPriceHUF
End Get
Set(value As Double)
SetPropertyValue("CostPriceHUF", _CostPriceHUF, value)
End Set
End Property
Property CostPriceDEV As Double
Get
Return _CostPriceDEV
End Get
Set(value As Double)
SetPropertyValue("CostPriceDEV", _CostPriceDEV, value)
End Set
End Property
<RuleRequiredField("Services-Units", DefaultContexts.Save)> _
Property Units As Units
Get
Return _Units
End Get
Set(value As Units)
SetPropertyValue("Units", _Units, value)
End Set
End Property
<RuleRequiredField("Services-VAT", DefaultContexts.Save)> _
Property VAT As VAT
Get
Return _VAT
End Get
Set(value As VAT)
SetPropertyValue("VAT", _VAT, value)
End Set
End Property
Property Recipe As Recipe
Get
Return _Recipe
End Get
Set(value As Recipe)
SetPropertyValue("Recipe", _Recipe, 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 MasterBusinessDirectory As BusinessDirectory
Get
Return _MasterBusinessDirectory
End Get
Set(value As BusinessDirectory)
SetPropertyValue("MasterBusinessDirectory", _MasterBusinessDirectory, value)
End Set
End Property
<NonPersistent()> _
Property QTT_Will As Double
Get
Return _QTT_Will
End Get
Set(value As Double)
SetPropertyValue("QTT_Will", _QTT_Will, value)
End Set
End Property
ReadOnly Property Services_BusinessDirectory As XPCollection(Of BusinessDirectory)
Get
Dim _BusinessDirectory_Collection As New XPCollection(Of BusinessDirectory)(Session, CriteriaOperator.Parse("1=2"))
If MasterBusinessDirectory IsNot Nothing Then
If MasterBusinessDirectory.Children.Count > 0 Then
_BusinessDirectory_Collection.Add(MasterBusinessDirectory)
RecursiveBusinessDirectory(_BusinessDirectory_Collection, MasterBusinessDirectory.NestedBusinessDirectory)
Else
_BusinessDirectory_Collection.Add(MasterBusinessDirectory)
End If
End If
Return _BusinessDirectory_Collection
End Get
End Property
#Region "Other subs"
Private Sub RecursiveBusinessDirectory(_BusinessDirectoryList As XPCollection(Of BusinessDirectory), _NestedBusinessDirectory As XPCollection(Of BusinessDirectory))
For Each _BusinessDirectory As BusinessDirectory In _NestedBusinessDirectory
If _BusinessDirectory.Children.Count > 0 Then
_BusinessDirectoryList.Add(_BusinessDirectory)
RecursiveBusinessDirectory(_BusinessDirectoryList, _BusinessDirectory.NestedBusinessDirectory)
Else
_BusinessDirectoryList.Add(_BusinessDirectory)
End If
Next
End Sub
#End Region
End Class
@@ -0,0 +1,50 @@
Partial Class Services_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.aServices_CreateBusinessDirectory = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
'
'aServices_CreateBusinessDirectory
'
Me.aServices_CreateBusinessDirectory.Caption = "aServices_CreateBusinessDirectory"
Me.aServices_CreateBusinessDirectory.Category = "ObjectsCreation"
Me.aServices_CreateBusinessDirectory.ConfirmationMessage = Nothing
Me.aServices_CreateBusinessDirectory.Id = "aServices_CreateBusinessDirectory"
Me.aServices_CreateBusinessDirectory.ImageName = Nothing
Me.aServices_CreateBusinessDirectory.Shortcut = Nothing
Me.aServices_CreateBusinessDirectory.Tag = Nothing
Me.aServices_CreateBusinessDirectory.TargetObjectsCriteria = Nothing
Me.aServices_CreateBusinessDirectory.TargetObjectType = GetType(Nuvolar.[Module].Services)
Me.aServices_CreateBusinessDirectory.TargetViewId = "Services_DetailView"
Me.aServices_CreateBusinessDirectory.ToolTip = Nothing
Me.aServices_CreateBusinessDirectory.TypeOfView = Nothing
End Sub
Friend WithEvents aServices_CreateBusinessDirectory As DevExpress.ExpressApp.Actions.SimpleAction
End Class
@@ -0,0 +1,126 @@
<?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="aServices_CreateBusinessDirectory.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 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,64 @@
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.SystemModule
Imports DevExpress.ExpressApp.CloneObject
Public Class Services_VC
Inherits DevExpress.ExpressApp.ViewController
Public Sub New()
MyBase.New()
InitializeComponent()
RegisterActions(components)
End Sub
#Region "Overrides"
Protected Overrides Sub OnActivated()
MyBase.OnActivated()
If View.Id = "Services_Services_BusinessDirectory_ListView" Then
Frame.GetController(Of LinkUnlinkController)().Active.SetItemValue("", False)
Frame.GetController(Of CloneObjectViewController)().Active.SetItemValue("", False)
End If
End Sub
Protected Overrides Sub OnDeactivated()
MyBase.OnDeactivated()
If View.Id = "Services_Services_BusinessDirectory_ListView" Then
Frame.GetController(Of LinkUnlinkController)().Active.SetItemValue("", True)
Frame.GetController(Of CloneObjectViewController)().Active.SetItemValue("", True)
End If
End Sub
#End Region
Private Sub aServices_CreateBusinessDirectory_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aServices_CreateBusinessDirectory.Execute
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _Services As Services = TryCast(View.SelectedObjects(0), Services)
If _Services.MasterBusinessDirectory Is Nothing Then
Dim _ServicesBaseBusinessDirectory As BusinessDirectory = _ocur.FindObject(Of BusinessDirectory)(DevExpress.Data.Filtering.CriteriaOperator.Parse("ShortName='Szolgáltatások' AND IsNull(BusinessDirectory_Parent)=True"))
If _ServicesBaseBusinessDirectory Is Nothing Then
_ServicesBaseBusinessDirectory = New BusinessDirectory(_ocur.Session)
With _ServicesBaseBusinessDirectory
.ShortName = "Szolgáltatások"
.BusinessDirectory_Parent = Nothing
End With
End If
Dim _ServicesBusinessDirectory As New BusinessDirectory(_ocur.Session)
With _ServicesBusinessDirectory
.ShortName = _Services.ShortName
.BusinessDirectory_Parent = _ServicesBaseBusinessDirectory
End With
_Services.MasterBusinessDirectory = _ServicesBusinessDirectory
_ocur.CommitChanges()
End If
End Sub
End Class