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,220 @@
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 Technologies
Inherits BaseObject
Private _MasterBusinessDirectory As BusinessDirectory
Private _DocumentNumber As String
Private _ShortName As String
Private _Description As String
Private _UserCreated As User
Private _ObjectCreated As Date
Private _TechnologiesParameters As TechnologiesParameters
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 = TechnologiesParameters.NumberGenerator.GetNewNumber(TechnologiesParameters.NumberGenerator)
End If
End Sub
Property MasterBusinessDirectory As BusinessDirectory
Get
Return _MasterBusinessDirectory
End Get
Set(value As BusinessDirectory)
SetPropertyValue("MasterBusinessDirectory", _MasterBusinessDirectory, 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
<RuleRequiredField("Technologies - 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
<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
<RuleRequiredField("Technologies - TechnologiesParameters", DefaultContexts.Save)> _
Property TechnologiesParameters As TechnologiesParameters
Get
Return _TechnologiesParameters
End Get
Set(value As TechnologiesParameters)
SetPropertyValue("TechnologiesParameters", _TechnologiesParameters, value)
End Set
End Property
'---ReadOlny properties
<VisibleInListView(False)> _
ReadOnly Property Products As XPCollection(Of Products)
Get
Dim _Products_Collection As New XPCollection(Of Products)(Session, CriteriaOperator.Parse("1=2"))
Dim _TechnologiesProducts_Collection As New XPCollection(Of TechnologiesProducts)(Session, CriteriaOperator.Parse("Technologies=?", Me))
For Each _TechnologiesProducts As TechnologiesProducts In _TechnologiesProducts_Collection
_Products_Collection.Add(_TechnologiesProducts.Products)
Next
Return _Products_Collection
End Get
End Property
<VisibleInListView(False)> _
ReadOnly Property Services As XPCollection(Of Services)
Get
Dim _Services_Collection As New XPCollection(Of Services)(Session, CriteriaOperator.Parse("1=2"))
Dim _TechnologiesServices_Collection As New XPCollection(Of TechnologiesServices)(Session, CriteriaOperator.Parse("Technologies=?", Me))
For Each _TechnologiesServices As TechnologiesServices In _TechnologiesServices_Collection
_Services_Collection.Add(_TechnologiesServices.Services)
Next
Return _Services_Collection
End Get
End Property
<VisibleInListView(False)> _
ReadOnly Property Customers As XPCollection(Of Customers)
Get
Dim _Customers_Collection As New XPCollection(Of Customers)(Session, CriteriaOperator.Parse("1=2"))
Dim _TechnologiesCustomers_Collection As New XPCollection(Of TechnologiesCustomers)(Session, CriteriaOperator.Parse("Technologies=?", Me))
For Each _TechnologiesCustomers As TechnologiesCustomers In _TechnologiesCustomers_Collection
_Customers_Collection.Add(_TechnologiesCustomers.Customers)
Next
Return _Customers_Collection
End Get
End Property
<VisibleInListView(False)> _
ReadOnly Property Contacts As XPCollection(Of Contacts)
Get
Dim _Contacts_Collection As New XPCollection(Of Contacts)(Session, CriteriaOperator.Parse("1=2"))
Dim _TechnologiesContacts_Collection As New XPCollection(Of TechnologiesContacts)(Session, CriteriaOperator.Parse("Technologies=?", Me))
For Each _TechnologiesContacts As TechnologiesContacts In _TechnologiesContacts_Collection
_Contacts_Collection.Add(_TechnologiesContacts.Contacts)
Next
Return _Contacts_Collection
End Get
End Property
<VisibleInListView(False)> _
ReadOnly Property Technologies_BusinessDirectory As XPCollection(Of BusinessDirectory)
Get
Dim _BusinessDirectory_Collection As New XPCollection(Of BusinessDirectory)(Session, CriteriaOperator.Parse("1=2"))
For Each _ProductsElem As Products In Products
If _ProductsElem.MasterBusinessDirectory IsNot Nothing Then
If _ProductsElem.MasterBusinessDirectory.Children.Count > 0 Then
_BusinessDirectory_Collection.Add(_ProductsElem.MasterBusinessDirectory)
RecursiveBusinessDirectory(_BusinessDirectory_Collection, _ProductsElem.MasterBusinessDirectory.NestedBusinessDirectory)
Else
_BusinessDirectory_Collection.Add(_ProductsElem.MasterBusinessDirectory)
End If
End If
If _ProductsElem.ProductGroups IsNot Nothing Then
If _ProductsElem.ProductGroups.MasterBusinessDirectory IsNot Nothing Then
If _ProductsElem.ProductGroups.MasterBusinessDirectory.Children.Count > 0 Then
_BusinessDirectory_Collection.Add(_ProductsElem.ProductGroups.MasterBusinessDirectory)
RecursiveBusinessDirectory(_BusinessDirectory_Collection, _ProductsElem.ProductGroups.MasterBusinessDirectory.NestedBusinessDirectory)
Else
_BusinessDirectory_Collection.Add(_ProductsElem.ProductGroups.MasterBusinessDirectory)
End If
End If
End If
Next
For Each _ServicesElem As Services In Services
If _ServicesElem.MasterBusinessDirectory IsNot Nothing Then
If _ServicesElem.MasterBusinessDirectory.Children.Count > 0 Then
_BusinessDirectory_Collection.Add(_ServicesElem.MasterBusinessDirectory)
RecursiveBusinessDirectory(_BusinessDirectory_Collection, _ServicesElem.MasterBusinessDirectory.NestedBusinessDirectory)
Else
_BusinessDirectory_Collection.Add(_ServicesElem.MasterBusinessDirectory)
End If
End If
Next
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,46 @@
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 TechnologiesContacts
Inherits BaseObject
Private _Technologies As Technologies
Private _Contacts As Contacts
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
End Sub
<RuleRequiredField("TechnologiesContacts - Technologies", DefaultContexts.Save)> _
Property Technologies As Technologies
Get
Return _Technologies
End Get
Set(value As Technologies)
SetPropertyValue("Technologies", _Technologies, value)
End Set
End Property
<RuleRequiredField("TechnologiesContacts - Contacts", DefaultContexts.Save)> _
Property Contacts As Contacts
Get
Return _Contacts
End Get
Set(value As Contacts)
SetPropertyValue("Contacts", _Contacts, value)
End Set
End Property
End Class
@@ -0,0 +1,46 @@
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 TechnologiesCustomers
Inherits BaseObject
Private _Technologies As Technologies
Private _Customers As Customers
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
End Sub
<RuleRequiredField("TechnologiesCustomers - Technologies", DefaultContexts.Save)> _
Property Technologies As Technologies
Get
Return _Technologies
End Get
Set(value As Technologies)
SetPropertyValue("Technologies", _Technologies, value)
End Set
End Property
<RuleRequiredField("TechnologiesCustomers - Customers", DefaultContexts.Save)> _
Property Customers As Customers
Get
Return _Customers
End Get
Set(value As Customers)
SetPropertyValue("Customers", _Customers, value)
End Set
End Property
End Class
@@ -0,0 +1,71 @@
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 TechnologiesParameters
Inherits BaseObject
Private _ShortName As String
Private _NumberGenerator As NumberGenerator
Private _UserCreated As User
Private _ObjectCreated As Date
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
End Sub
Property ShortName As String
Get
Return _ShortName
End Get
Set(value As String)
SetPropertyValue("ShortName", _ShortName, value)
End Set
End Property
Property NumberGenerator As NumberGenerator
Get
Return _NumberGenerator
End Get
Set(value As NumberGenerator)
SetPropertyValue("NumberGenerator", _NumberGenerator, 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
End Class
@@ -0,0 +1,46 @@
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 TechnologiesProducts
Inherits BaseObject
Private _Technologies As Technologies
Private _Products As Products
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
End Sub
<RuleRequiredField("TechnologiesProducts - Technologies", DefaultContexts.Save)> _
Property Technologies As Technologies
Get
Return _Technologies
End Get
Set(value As Technologies)
SetPropertyValue("Technologies", _Technologies, value)
End Set
End Property
<RuleRequiredField("TechnologiesProducts - Products", DefaultContexts.Save)> _
Property Products As Products
Get
Return _Products
End Get
Set(value As Products)
SetPropertyValue("Products", _Products, value)
End Set
End Property
End Class
@@ -0,0 +1,46 @@
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 TechnologiesServices
Inherits BaseObject
Private _Technologies As Technologies
Private _Services As Services
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
End Sub
<RuleRequiredField("TechnologiesServices - Technologies", DefaultContexts.Save)> _
Property Technologies As Technologies
Get
Return _Technologies
End Get
Set(value As Technologies)
SetPropertyValue("Technologies", _Technologies, value)
End Set
End Property
<RuleRequiredField("TechnologiesServices - Services", DefaultContexts.Save)> _
Property Services As Services
Get
Return _Services
End Get
Set(value As Services)
SetPropertyValue("Services", _Services, value)
End Set
End Property
End Class
@@ -0,0 +1,156 @@
Partial Class Technologies_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.aTechnologies_AddCustomers = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
Me.aTechnologies_AddProducts = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
Me.aTechnologies_AddServices = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
Me.aTechnologies_RemoveServices = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aTechnologies_RemoveCustomers = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aTechnologies_RemoveProducts = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aTechnologies_AddContacts = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
'
'aTechnologies_AddCustomers
'
Me.aTechnologies_AddCustomers.AcceptButtonCaption = Nothing
Me.aTechnologies_AddCustomers.CancelButtonCaption = Nothing
Me.aTechnologies_AddCustomers.Caption = "aTechnologies_AddCustomers"
Me.aTechnologies_AddCustomers.Category = "ObjectsCreation"
Me.aTechnologies_AddCustomers.ConfirmationMessage = Nothing
Me.aTechnologies_AddCustomers.Id = "aTechnologies_AddCustomers"
Me.aTechnologies_AddCustomers.ImageName = Nothing
Me.aTechnologies_AddCustomers.Shortcut = Nothing
Me.aTechnologies_AddCustomers.Tag = Nothing
Me.aTechnologies_AddCustomers.TargetObjectsCriteria = Nothing
Me.aTechnologies_AddCustomers.TargetViewId = "Technologies_Customers_ListView"
Me.aTechnologies_AddCustomers.ToolTip = Nothing
Me.aTechnologies_AddCustomers.TypeOfView = Nothing
'
'aTechnologies_AddProducts
'
Me.aTechnologies_AddProducts.AcceptButtonCaption = Nothing
Me.aTechnologies_AddProducts.CancelButtonCaption = Nothing
Me.aTechnologies_AddProducts.Caption = "aTechnologies_AddProducts"
Me.aTechnologies_AddProducts.Category = "ObjectsCreation"
Me.aTechnologies_AddProducts.ConfirmationMessage = Nothing
Me.aTechnologies_AddProducts.Id = "aTechnologies_AddProducts"
Me.aTechnologies_AddProducts.ImageName = Nothing
Me.aTechnologies_AddProducts.Shortcut = Nothing
Me.aTechnologies_AddProducts.Tag = Nothing
Me.aTechnologies_AddProducts.TargetObjectsCriteria = Nothing
Me.aTechnologies_AddProducts.TargetViewId = "Technologies_Products_ListView"
Me.aTechnologies_AddProducts.ToolTip = Nothing
Me.aTechnologies_AddProducts.TypeOfView = Nothing
'
'aTechnologies_AddServices
'
Me.aTechnologies_AddServices.AcceptButtonCaption = Nothing
Me.aTechnologies_AddServices.CancelButtonCaption = Nothing
Me.aTechnologies_AddServices.Caption = "aTechnologies_AddServices"
Me.aTechnologies_AddServices.Category = "ObjectsCreation"
Me.aTechnologies_AddServices.ConfirmationMessage = Nothing
Me.aTechnologies_AddServices.Id = "aTechnologies_AddServices"
Me.aTechnologies_AddServices.ImageName = Nothing
Me.aTechnologies_AddServices.Shortcut = Nothing
Me.aTechnologies_AddServices.Tag = Nothing
Me.aTechnologies_AddServices.TargetObjectsCriteria = Nothing
Me.aTechnologies_AddServices.TargetViewId = "Technologies_Services_ListView"
Me.aTechnologies_AddServices.ToolTip = Nothing
Me.aTechnologies_AddServices.TypeOfView = Nothing
'
'aTechnologies_RemoveServices
'
Me.aTechnologies_RemoveServices.Caption = "aTechnologies_RemoveServices"
Me.aTechnologies_RemoveServices.Category = "RecordEdit"
Me.aTechnologies_RemoveServices.ConfirmationMessage = Nothing
Me.aTechnologies_RemoveServices.Id = "aTechnologies_RemoveServices"
Me.aTechnologies_RemoveServices.ImageName = Nothing
Me.aTechnologies_RemoveServices.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireMultipleObjects
Me.aTechnologies_RemoveServices.Shortcut = Nothing
Me.aTechnologies_RemoveServices.Tag = Nothing
Me.aTechnologies_RemoveServices.TargetObjectsCriteria = Nothing
Me.aTechnologies_RemoveServices.TargetViewId = "Technologies_Services_ListView"
Me.aTechnologies_RemoveServices.ToolTip = Nothing
Me.aTechnologies_RemoveServices.TypeOfView = Nothing
'
'aTechnologies_RemoveCustomers
'
Me.aTechnologies_RemoveCustomers.Caption = "aTechnologies_RemoveCustomers"
Me.aTechnologies_RemoveCustomers.Category = "RecordEdit"
Me.aTechnologies_RemoveCustomers.ConfirmationMessage = Nothing
Me.aTechnologies_RemoveCustomers.Id = "aTechnologies_RemoveCustomers"
Me.aTechnologies_RemoveCustomers.ImageName = Nothing
Me.aTechnologies_RemoveCustomers.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireMultipleObjects
Me.aTechnologies_RemoveCustomers.Shortcut = Nothing
Me.aTechnologies_RemoveCustomers.Tag = Nothing
Me.aTechnologies_RemoveCustomers.TargetObjectsCriteria = Nothing
Me.aTechnologies_RemoveCustomers.TargetViewId = "Technologies_Customers_ListView"
Me.aTechnologies_RemoveCustomers.ToolTip = Nothing
Me.aTechnologies_RemoveCustomers.TypeOfView = Nothing
'
'aTechnologies_RemoveProducts
'
Me.aTechnologies_RemoveProducts.Caption = "aTechnologies_RemoveProducts"
Me.aTechnologies_RemoveProducts.Category = "RecordEdit"
Me.aTechnologies_RemoveProducts.ConfirmationMessage = Nothing
Me.aTechnologies_RemoveProducts.Id = "aTechnologies_RemoveProducts"
Me.aTechnologies_RemoveProducts.ImageName = Nothing
Me.aTechnologies_RemoveProducts.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireMultipleObjects
Me.aTechnologies_RemoveProducts.Shortcut = Nothing
Me.aTechnologies_RemoveProducts.Tag = Nothing
Me.aTechnologies_RemoveProducts.TargetObjectsCriteria = Nothing
Me.aTechnologies_RemoveProducts.TargetViewId = "Technologies_Products_ListView"
Me.aTechnologies_RemoveProducts.ToolTip = Nothing
Me.aTechnologies_RemoveProducts.TypeOfView = Nothing
'
'aTechnologies_AddContacts
'
Me.aTechnologies_AddContacts.AcceptButtonCaption = Nothing
Me.aTechnologies_AddContacts.CancelButtonCaption = Nothing
Me.aTechnologies_AddContacts.Caption = "aTechnologies_AddContacts"
Me.aTechnologies_AddContacts.Category = "ObjectsCreation"
Me.aTechnologies_AddContacts.ConfirmationMessage = Nothing
Me.aTechnologies_AddContacts.Id = "aTechnologies_AddContacts"
Me.aTechnologies_AddContacts.ImageName = Nothing
Me.aTechnologies_AddContacts.Shortcut = Nothing
Me.aTechnologies_AddContacts.Tag = Nothing
Me.aTechnologies_AddContacts.TargetObjectsCriteria = Nothing
Me.aTechnologies_AddContacts.TargetViewId = "Technologies_Contacts_ListView"
Me.aTechnologies_AddContacts.ToolTip = Nothing
Me.aTechnologies_AddContacts.TypeOfView = Nothing
End Sub
Friend WithEvents aTechnologies_AddCustomers As DevExpress.ExpressApp.Actions.PopupWindowShowAction
Friend WithEvents aTechnologies_AddProducts As DevExpress.ExpressApp.Actions.PopupWindowShowAction
Friend WithEvents aTechnologies_AddServices As DevExpress.ExpressApp.Actions.PopupWindowShowAction
Friend WithEvents aTechnologies_RemoveServices As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aTechnologies_RemoveCustomers As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aTechnologies_RemoveProducts As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aTechnologies_AddContacts As DevExpress.ExpressApp.Actions.PopupWindowShowAction
End Class
@@ -0,0 +1,144 @@
<?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="aTechnologies_AddCustomers.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 173</value>
</metadata>
<metadata name="aTechnologies_AddProducts.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 212</value>
</metadata>
<metadata name="aTechnologies_AddServices.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 134</value>
</metadata>
<metadata name="aTechnologies_RemoveServices.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 56</value>
</metadata>
<metadata name="aTechnologies_RemoveCustomers.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 95</value>
</metadata>
<metadata name="aTechnologies_RemoveProducts.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>301, 102</value>
</metadata>
<metadata name="aTechnologies_AddContacts.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>222, 212</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,274 @@
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
Imports DevExpress.Data.Filtering
Public Class Technologies_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 = "Technologies_Products_ListView" Then
Frame.GetController(Of LinkUnlinkController)().Active.SetItemValue("", False)
Frame.GetController(Of CloneObjectViewController)().Active.SetItemValue("", False)
Frame.GetController(Of NewObjectViewController)().Active.SetItemValue("", False)
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", False)
End If
If View.Id = "Technologies_Services_ListView" Then
Frame.GetController(Of LinkUnlinkController)().Active.SetItemValue("", False)
Frame.GetController(Of CloneObjectViewController)().Active.SetItemValue("", False)
Frame.GetController(Of NewObjectViewController)().Active.SetItemValue("", False)
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", False)
End If
If View.Id = "Technologies_Customers_ListView" Then
Frame.GetController(Of LinkUnlinkController)().Active.SetItemValue("", False)
Frame.GetController(Of CloneObjectViewController)().Active.SetItemValue("", False)
Frame.GetController(Of NewObjectViewController)().Active.SetItemValue("", False)
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", False)
End If
If View.Id = "Technologies_Contacts_ListView" Then
Frame.GetController(Of LinkUnlinkController)().Active.SetItemValue("", False)
Frame.GetController(Of CloneObjectViewController)().Active.SetItemValue("", False)
Frame.GetController(Of NewObjectViewController)().Active.SetItemValue("", False)
End If
If View.Id = "Technologies_Technologies_BusinessDirectory_ListView" Then
Frame.GetController(Of LinkUnlinkController)().Active.SetItemValue("", False)
Frame.GetController(Of CloneObjectViewController)().Active.SetItemValue("", False)
' Frame.GetController(Of NewObjectViewController)().Active.SetItemValue("", False)
'Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", False)
End If
End Sub
Protected Overrides Sub OnDeactivated()
MyBase.OnDeactivated()
If View.Id = "Technologies_Products_ListView" Then
Frame.GetController(Of LinkUnlinkController)().Active.SetItemValue("", True)
Frame.GetController(Of CloneObjectViewController)().Active.SetItemValue("", True)
Frame.GetController(Of NewObjectViewController)().Active.SetItemValue("", True)
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", True)
End If
If View.Id = "Technologies_Services_ListView" Then
Frame.GetController(Of LinkUnlinkController)().Active.SetItemValue("", True)
Frame.GetController(Of CloneObjectViewController)().Active.SetItemValue("", True)
Frame.GetController(Of NewObjectViewController)().Active.SetItemValue("", True)
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", True)
End If
If View.Id = "Technologies_Customers_ListView" Then
Frame.GetController(Of LinkUnlinkController)().Active.SetItemValue("", True)
Frame.GetController(Of CloneObjectViewController)().Active.SetItemValue("", True)
Frame.GetController(Of NewObjectViewController)().Active.SetItemValue("", True)
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", True)
End If
If View.Id = "Technologies_Contacts_ListView" Then
Frame.GetController(Of LinkUnlinkController)().Active.SetItemValue("", True)
Frame.GetController(Of CloneObjectViewController)().Active.SetItemValue("", True)
Frame.GetController(Of NewObjectViewController)().Active.SetItemValue("", True)
End If
If View.Id = "Technologies_Technologies_BusinessDirectory_ListView" Then
Frame.GetController(Of LinkUnlinkController)().Active.SetItemValue("", True)
Frame.GetController(Of CloneObjectViewController)().Active.SetItemValue("", True)
'Frame.GetController(Of NewObjectViewController)().Active.SetItemValue("", True)
'Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", True)
End If
End Sub
#End Region
Private Sub aTechnologies_AddCustomers_CustomizePopupWindowParams(sender As Object, e As CustomizePopupWindowParamsEventArgs) Handles aTechnologies_AddCustomers.CustomizePopupWindowParams
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
Dim _Customers_CollectionSource As New CollectionSource(_onew, GetType(Customers))
e.View = Application.CreateListView("Customers_ListView", _Customers_CollectionSource, True)
End Sub
Private Sub aTechnologies_AddCustomers_Execute(sender As Object, e As PopupWindowShowActionExecuteEventArgs) Handles aTechnologies_AddCustomers.Execute
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _Technologies As Technologies = TryCast(TryCast(TryCast(View, ListView).CollectionSource, PropertyCollectionSource).MasterObject, Technologies)
For Each _Customers As Customers In e.PopupWindow.View.SelectedObjects
Dim _TechnologiesCustomers As New TechnologiesCustomers(_ocur.Session)
With _TechnologiesCustomers
.Customers = _ocur.GetObject(_Customers)
.Technologies = _Technologies
End With
Next
_ocur.CommitChanges()
Dim nestedFrame As NestedFrame = TryCast(Frame, NestedFrame)
If nestedFrame IsNot Nothing Then
Dim parentView As View = nestedFrame.View
parentView.ObjectSpace.Refresh()
End If
End Sub
Private Sub aTechnologies_AddProducts_CustomizePopupWindowParams(sender As Object, e As CustomizePopupWindowParamsEventArgs) Handles aTechnologies_AddProducts.CustomizePopupWindowParams
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
Dim _Products_CollectionSource As New CollectionSource(_onew, GetType(Products))
e.View = Application.CreateListView("Products_ListView_Find", _Products_CollectionSource, True)
End Sub
Private Sub aTechnologies_AddProducts_Execute(sender As Object, e As PopupWindowShowActionExecuteEventArgs) Handles aTechnologies_AddProducts.Execute
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _Technologies As Technologies = TryCast(TryCast(TryCast(View, ListView).CollectionSource, PropertyCollectionSource).MasterObject, Technologies)
For Each _Products As Products In e.PopupWindow.View.SelectedObjects
Dim _TechnologiesProducts As New TechnologiesProducts(_ocur.Session)
With _TechnologiesProducts
.Products = _ocur.GetObject(_Products)
.Technologies = _Technologies
End With
Next
_ocur.CommitChanges()
Dim nestedFrame As NestedFrame = TryCast(Frame, NestedFrame)
If nestedFrame IsNot Nothing Then
Dim parentView As View = nestedFrame.View
parentView.ObjectSpace.Refresh()
End If
End Sub
Private Sub aTechnologies_AddServices_CustomizePopupWindowParams(sender As Object, e As CustomizePopupWindowParamsEventArgs) Handles aTechnologies_AddServices.CustomizePopupWindowParams
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
Dim _Services_CollectionSource As New CollectionSource(_onew, GetType(Services))
e.View = Application.CreateListView("Services_ListView", _Services_CollectionSource, True)
End Sub
Private Sub aTechnologies_AddServices_Execute(sender As Object, e As PopupWindowShowActionExecuteEventArgs) Handles aTechnologies_AddServices.Execute
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _Technologies As Technologies = TryCast(TryCast(TryCast(View, ListView).CollectionSource, PropertyCollectionSource).MasterObject, Technologies)
For Each _Services As Services In e.PopupWindow.View.SelectedObjects
Dim _TechnologiesServices As New TechnologiesServices(_ocur.Session)
With _TechnologiesServices
.Services = _ocur.GetObject(_Services)
.Technologies = _Technologies
End With
Next
_ocur.CommitChanges()
Dim nestedFrame As NestedFrame = TryCast(Frame, NestedFrame)
If nestedFrame IsNot Nothing Then
Dim parentView As View = nestedFrame.View
parentView.ObjectSpace.Refresh()
End If
End Sub
Private Sub aTechnologies_RemoveServices_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aTechnologies_RemoveServices.Execute
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _Technologies As Technologies = TryCast(TryCast(TryCast(View, ListView).CollectionSource, PropertyCollectionSource).MasterObject, Technologies)
Dim _Del_Collection As New ArrayList
For Each _Services As Services In View.SelectedObjects
Dim _TechnologiesServices As TechnologiesServices = _ocur.FindObject(Of TechnologiesServices)(CriteriaOperator.Parse("Technologies=? AND Services=?", _Technologies, _Services))
If _TechnologiesServices IsNot Nothing Then _Del_Collection.Add(_TechnologiesServices)
Next
_ocur.Delete(_Del_Collection)
_ocur.CommitChanges()
Dim nestedFrame As NestedFrame = TryCast(Frame, NestedFrame)
If nestedFrame IsNot Nothing Then
Dim parentView As View = nestedFrame.View
parentView.ObjectSpace.Refresh()
End If
End Sub
Private Sub aTechnologies_RemoveCustomers_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aTechnologies_RemoveCustomers.Execute
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _Technologies As Technologies = TryCast(TryCast(TryCast(View, ListView).CollectionSource, PropertyCollectionSource).MasterObject, Technologies)
Dim _Del_Collection As New ArrayList
For Each _Customers As Customers In View.SelectedObjects
Dim _TechnologiesCustomers As TechnologiesCustomers = _ocur.FindObject(Of TechnologiesCustomers)(CriteriaOperator.Parse("Technologies=? AND Customers=?", _Technologies, _Customers))
If _TechnologiesCustomers IsNot Nothing Then _Del_Collection.Add(_TechnologiesCustomers)
Dim _TechnologiesContacts_Collection As New DevExpress.Xpo.XPCollection(Of TechnologiesContacts)(_ocur.Session, CriteriaOperator.Parse("Technologies=? AND Contacts.Customers=?", _Technologies, _Customers))
If _TechnologiesContacts_Collection.Count > 0 Then _Del_Collection.AddRange(_TechnologiesContacts_Collection)
Next
_ocur.Delete(_Del_Collection)
_ocur.CommitChanges()
Dim nestedFrame As NestedFrame = TryCast(Frame, NestedFrame)
If nestedFrame IsNot Nothing Then
Dim parentView As View = nestedFrame.View
parentView.ObjectSpace.Refresh()
End If
End Sub
Private Sub aTechnologies_RemoveProducts_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aTechnologies_RemoveProducts.Execute
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _Technologies As Technologies = TryCast(TryCast(TryCast(View, ListView).CollectionSource, PropertyCollectionSource).MasterObject, Technologies)
Dim _Del_Collection As New ArrayList
For Each _Products As Products In View.SelectedObjects
Dim _TechnologiesProducts As TechnologiesProducts = _ocur.FindObject(Of TechnologiesProducts)(CriteriaOperator.Parse("Technologies=? AND Products=?", _Technologies, _Products))
If _TechnologiesProducts IsNot Nothing Then _Del_Collection.Add(_TechnologiesProducts)
Next
_ocur.Delete(_Del_Collection)
_ocur.CommitChanges()
Dim nestedFrame As NestedFrame = TryCast(Frame, NestedFrame)
If nestedFrame IsNot Nothing Then
Dim parentView As View = nestedFrame.View
parentView.ObjectSpace.Refresh()
End If
End Sub
Private Sub aTechnologies_AddContacts_CustomizePopupWindowParams(sender As Object, e As CustomizePopupWindowParamsEventArgs) Handles aTechnologies_AddContacts.CustomizePopupWindowParams
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
Dim _Technologies As Technologies = TryCast(TryCast(TryCast(View, ListView).CollectionSource, PropertyCollectionSource).MasterObject, Technologies)
If _Technologies IsNot Nothing Then
Dim _Contacts_CollectionSource As New CollectionSource(_onew, GetType(Contacts))
Dim _Criteria As String = "Customers.Oid in('"
For Each _Customers As Customers In _Technologies.Customers
_Criteria += _Customers.Oid.ToString + "','"
Next
If _Criteria.Length < 20 Then
_Criteria = "1=2"
Else
_Criteria = _Criteria.Remove(_Criteria.Length - 2, 2)
_Criteria += ")"
End If
_Contacts_CollectionSource.BeginUpdateCriteria()
_Contacts_CollectionSource.Criteria.Add("First", CriteriaOperator.Parse(_Criteria))
_Contacts_CollectionSource.EndUpdateCriteria()
e.View = Application.CreateListView("Contacts_ListView", _Contacts_CollectionSource, True)
End If
End Sub
Private Sub aTechnologies_AddContacts_Execute(sender As Object, e As PopupWindowShowActionExecuteEventArgs) Handles aTechnologies_AddContacts.Execute
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _Technologies As Technologies = TryCast(TryCast(TryCast(View, ListView).CollectionSource, PropertyCollectionSource).MasterObject, Technologies)
For Each _Contacts As Contacts In e.PopupWindow.View.SelectedObjects
Dim _TechnologiesContacts As New TechnologiesContacts(_ocur.Session)
With _TechnologiesContacts
.Contacts = _ocur.GetObject(_Contacts)
.Technologies = _Technologies
End With
Next
_ocur.CommitChanges()
Dim nestedFrame As NestedFrame = TryCast(Frame, NestedFrame)
If nestedFrame IsNot Nothing Then
Dim parentView As View = nestedFrame.View
parentView.ObjectSpace.Refresh()
End If
End Sub
End Class