First create solution
This commit is contained in:
@@ -0,0 +1,117 @@
|
||||
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("Customers")> _
|
||||
<Appearance("Disable Subcontractor-ObjectCreated", AppearanceItemType.ViewItem, "1=1", TargetItems:="ObjectCreated", Enabled:=False)> _
|
||||
<Appearance("Disable Subcontractor-UserCreated", AppearanceItemType.ViewItem, "1=1", TargetItems:="UserCreated", Enabled:=False)> _
|
||||
<Appearance("Disable Subcontractor-Customers, when is not nothing", AppearanceItemType.ViewItem, "IsNull(Customers)=False", TargetItems:="Customers", Enabled:=False)> _
|
||||
Public Class Subcontractor
|
||||
Inherits BaseObject
|
||||
|
||||
Private _Customers As Customers 'Alvállalkozó
|
||||
Private _ObjectCreated As Date ' Objektum mikor készült
|
||||
Private _UserCreated As User 'Ki készítette
|
||||
|
||||
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 Customers As Customers
|
||||
Get
|
||||
Return _Customers
|
||||
End Get
|
||||
Set(value As Customers)
|
||||
SetPropertyValue("Customers", _Customers, value)
|
||||
End Set
|
||||
End Property
|
||||
<NonCloneable> _
|
||||
Property ObjectCreated As Date
|
||||
Get
|
||||
Return _ObjectCreated
|
||||
End Get
|
||||
Set(ByVal 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
|
||||
|
||||
'----------------ReadOnly properties---------------------
|
||||
<VisibleInListView(False)> _
|
||||
<Aggregated()> _
|
||||
<Association("Subcontractor-SubcontractorCustomers", GetType(SubcontractorCustomers))> _
|
||||
Public ReadOnly Property SubcontractorCustomers As XPCollection(Of SubcontractorCustomers)
|
||||
Get
|
||||
Return GetCollection(Of SubcontractorCustomers)("SubcontractorCustomers")
|
||||
End Get
|
||||
End Property
|
||||
<VisibleInListView(False)> _
|
||||
<Aggregated()> _
|
||||
<Association("Subcontractor-SubcontractorWorksheetType", GetType(SubcontractorWorksheetType))> _
|
||||
Public ReadOnly Property SubcontractorWorksheetType As XPCollection(Of SubcontractorWorksheetType)
|
||||
Get
|
||||
Return GetCollection(Of SubcontractorWorksheetType)("SubcontractorWorksheetType")
|
||||
End Get
|
||||
End Property
|
||||
<VisibleInListView(False)> _
|
||||
<Aggregated()> _
|
||||
<Association("Subcontractor-SubcontractorDocuments", GetType(SubcontractorDocuments))> _
|
||||
Public ReadOnly Property SubcontractorDocuments As XPCollection(Of SubcontractorDocuments)
|
||||
Get
|
||||
Return GetCollection(Of SubcontractorDocuments)("SubcontractorDocuments")
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property SubcontractorUser As XPCollection(Of User)
|
||||
Get
|
||||
Dim _User_Collection As New XPCollection(Of User)(Session, CriteriaOperator.Parse("1=2"))
|
||||
If Me.Customers IsNot Nothing Then
|
||||
Dim _Contacts_Collection As New XPCollection(Of Contacts)(Session, CriteriaOperator.Parse("Customers=?", Me.Customers))
|
||||
|
||||
For Each _Contacts As Contacts In _Contacts_Collection
|
||||
If _Contacts.User IsNot Nothing Then
|
||||
_User_Collection.Add(Session.GetObjectByKey(Of User)(_Contacts.User.Oid))
|
||||
End If
|
||||
Next
|
||||
|
||||
Return _User_Collection
|
||||
Else
|
||||
Return Nothing
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property SubcontractorUserRoles As XPCollection(Of SubcontractorUserRoles)
|
||||
Get
|
||||
If Session.IsObjectsLoading = False And Session.IsObjectsSaving = False Then
|
||||
Return New XPCollection(Of SubcontractorUserRoles)(Session, CriteriaOperator.Parse("Subcontractor.Oid=?", Me.Oid))
|
||||
Else
|
||||
Return Nothing
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
@@ -0,0 +1,55 @@
|
||||
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 SubcontractorCustomers
|
||||
Inherits BaseObject
|
||||
Private _Subcontractor As Subcontractor
|
||||
Private _Customers As Customers
|
||||
Private _Workplace As WorkPlace
|
||||
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
End Sub
|
||||
|
||||
<Association("Subcontractor-SubcontractorCustomers", GetType(Subcontractor))> _
|
||||
Property Subcontractor As Subcontractor
|
||||
Get
|
||||
Return _Subcontractor
|
||||
End Get
|
||||
Set(value As Subcontractor)
|
||||
SetPropertyValue("Subcontractor", _Subcontractor, value)
|
||||
End Set
|
||||
End Property
|
||||
Property Customers As Customers
|
||||
Get
|
||||
Return _Customers
|
||||
End Get
|
||||
Set(value As Customers)
|
||||
SetPropertyValue("Customers", _Customers, value)
|
||||
End Set
|
||||
End Property
|
||||
<NonCloneable()>
|
||||
<ImmediatePostData(True), DataSourceCriteria("Customers='@This.Customers'")>
|
||||
Property Workplace As WorkPlace
|
||||
Get
|
||||
Return _Workplace
|
||||
End Get
|
||||
Set(value As WorkPlace)
|
||||
SetPropertyValue("Workplace", _Workplace, value)
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
@@ -0,0 +1,151 @@
|
||||
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("SubcontractorDocuments - Hide XML properties, when IsDashboard = False", _
|
||||
AppearanceItemType.ViewItem, "IsDashboard = False", _
|
||||
TargetItems:="XML_ServerName;XML_UserName;XML_DatabaseName;XML_Password;XML_SqlType", _
|
||||
visibility:=Editors.ViewItemVisibility.Hide)> _
|
||||
<Appearance("SubcontractorDocuments - ObjectCreated Disable all time", AppearanceItemType.ViewItem, "1=1", TargetItems:="ObjectCreated", Enabled:=False)> _
|
||||
<Appearance("SubcontractorDocuments - UserCreated Disable all time", AppearanceItemType.ViewItem, "1=1", TargetItems:="UserCreated", Enabled:=False)> _
|
||||
Public Class SubcontractorDocuments
|
||||
Inherits FileAttachmentBase
|
||||
Private _Subcontractor As Subcontractor
|
||||
Private _Group1 As String '1. csoportosítás
|
||||
Private _Group2 As String '2. csoportosítás
|
||||
Private _ObjectCreated As Date ' Objektum mikor készült
|
||||
Private _UserCreated As User 'Ki készítette
|
||||
Private _IsDashboard As Boolean 'Mûszerfal-e
|
||||
Private _XML_ServerName As String
|
||||
Private _XML_UserName As String
|
||||
Private _XML_DatabaseName As String
|
||||
Private _XML_Password As String
|
||||
Private _XML_SqlType As eSQLType
|
||||
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
IsDashboard = False
|
||||
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
|
||||
<Association("Subcontractor-SubcontractorDocuments", GetType(Subcontractor))> _
|
||||
Property Subcontractor As Subcontractor
|
||||
Get
|
||||
Return _Subcontractor
|
||||
End Get
|
||||
Set(value As Subcontractor)
|
||||
SetPropertyValue("Subcontractor", _Subcontractor, value)
|
||||
End Set
|
||||
End Property
|
||||
<NonCloneable> _
|
||||
Property ObjectCreated As Date
|
||||
Get
|
||||
Return _ObjectCreated
|
||||
End Get
|
||||
Set(ByVal 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 Group1 As String
|
||||
Get
|
||||
Return _Group1
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("Group1", _Group1, value)
|
||||
End Set
|
||||
End Property
|
||||
Property Group2 As String
|
||||
Get
|
||||
Return _Group2
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("Group2", _Group2, value)
|
||||
End Set
|
||||
End Property
|
||||
<ImmediatePostData()> _
|
||||
Property IsDashboard As Boolean
|
||||
Get
|
||||
Return _IsDashboard
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
SetPropertyValue("IsDashboard", _IsDashboard, value)
|
||||
End Set
|
||||
End Property
|
||||
<RuleRequiredField("SubcontractorDocuments - XML_ServerName", DefaultContexts.Save, TargetCriteria:="IsDashboard=True")> _
|
||||
Property XML_ServerName As String
|
||||
Get
|
||||
Return _XML_ServerName
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("XML_ServerName", _XML_ServerName, value)
|
||||
End Set
|
||||
End Property
|
||||
<RuleRequiredField("SubcontractorDocuments - XML_UserName", DefaultContexts.Save, TargetCriteria:="IsDashboard=True")> _
|
||||
Property XML_UserName As String
|
||||
Get
|
||||
Return _XML_UserName
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("XML_UserName", _XML_UserName, value)
|
||||
End Set
|
||||
End Property
|
||||
<RuleRequiredField("SubcontractorDocuments - XML_DatabaseName", DefaultContexts.Save, TargetCriteria:="IsDashboard=True")> _
|
||||
Property XML_DatabaseName As String
|
||||
Get
|
||||
Return _XML_DatabaseName
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("XML_DatabaseName", _XML_DatabaseName, value)
|
||||
End Set
|
||||
End Property
|
||||
<PasswordPropertyText(True)> _
|
||||
<ValueConverter(GetType(Encryption))> _
|
||||
<RuleRequiredField("SubcontractorDocuments - XML_Password", DefaultContexts.Save, TargetCriteria:="IsDashboard=True")> _
|
||||
Property XML_Password As String
|
||||
Get
|
||||
Return _XML_Password
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("XML_Password", _XML_Password, value)
|
||||
End Set
|
||||
End Property
|
||||
<RuleRequiredField("SubcontractorDocuments - XML_SqlType", DefaultContexts.Save, TargetCriteria:="IsDashboard=True")> _
|
||||
Property XML_SqlType As eSQLType
|
||||
Get
|
||||
Return _XML_SqlType
|
||||
End Get
|
||||
Set(value As eSQLType)
|
||||
SetPropertyValue("XML_SqlType", _XML_SqlType, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,35 @@
|
||||
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 SubcontractorRoles
|
||||
Inherits BaseObject
|
||||
|
||||
Private _ShortName As String
|
||||
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
End Sub
|
||||
|
||||
Property ShortName As String
|
||||
Get
|
||||
Return _ShortName
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("ShortName", _ShortName, value)
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
@@ -0,0 +1,53 @@
|
||||
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 SubcontractorUserRoles
|
||||
Inherits BaseObject
|
||||
|
||||
Private _Subcontractor As Subcontractor
|
||||
Private _SubcontractorRoles As SubcontractorRoles
|
||||
Private _User As User
|
||||
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
End Sub
|
||||
|
||||
Property Subcontractor As Subcontractor
|
||||
Get
|
||||
Return _Subcontractor
|
||||
End Get
|
||||
Set(value As Subcontractor)
|
||||
SetPropertyValue("Subcontractor", _Subcontractor, value)
|
||||
End Set
|
||||
End Property
|
||||
Property SubcontractorRoles As SubcontractorRoles
|
||||
Get
|
||||
Return _SubcontractorRoles
|
||||
End Get
|
||||
Set(value As SubcontractorRoles)
|
||||
SetPropertyValue("SubcontractorRoles", _SubcontractorRoles, value)
|
||||
End Set
|
||||
End Property
|
||||
Property User As User
|
||||
Get
|
||||
Return _User
|
||||
End Get
|
||||
Set(value As User)
|
||||
SetPropertyValue("User", _User, value)
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
@@ -0,0 +1,45 @@
|
||||
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 SubcontractorWorksheetType
|
||||
Inherits BaseObject
|
||||
|
||||
Private _Subcontractor As Subcontractor
|
||||
Private _WorkSheetType As WorkSheetType
|
||||
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
End Sub
|
||||
|
||||
<Association("Subcontractor-SubcontractorWorksheetType", GetType(Subcontractor))> _
|
||||
Property Subcontractor As Subcontractor
|
||||
Get
|
||||
Return _Subcontractor
|
||||
End Get
|
||||
Set(value As Subcontractor)
|
||||
SetPropertyValue("Subcontractor", _Subcontractor, value)
|
||||
End Set
|
||||
End Property
|
||||
Property WorkSheetType As WorkSheetType
|
||||
Get
|
||||
Return _WorkSheetType
|
||||
End Get
|
||||
Set(value As WorkSheetType)
|
||||
SetPropertyValue("WorkSheetType", _WorkSheetType, value)
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
Partial Class Subcontractor_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.aSelectCustomersSubcontractor = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
|
||||
Me.aCreateSubcontractorUserRoles = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
|
||||
'
|
||||
'aSelectCustomersSubcontractor
|
||||
'
|
||||
Me.aSelectCustomersSubcontractor.AcceptButtonCaption = Nothing
|
||||
Me.aSelectCustomersSubcontractor.CancelButtonCaption = Nothing
|
||||
Me.aSelectCustomersSubcontractor.Caption = "aSelect Customers Subcontractor"
|
||||
Me.aSelectCustomersSubcontractor.ConfirmationMessage = Nothing
|
||||
Me.aSelectCustomersSubcontractor.Id = "aSelectCustomersSubcontractor"
|
||||
Me.aSelectCustomersSubcontractor.ImageName = Nothing
|
||||
Me.aSelectCustomersSubcontractor.Shortcut = Nothing
|
||||
Me.aSelectCustomersSubcontractor.Tag = Nothing
|
||||
Me.aSelectCustomersSubcontractor.TargetObjectsCriteria = Nothing
|
||||
Me.aSelectCustomersSubcontractor.TargetViewId = Nothing
|
||||
Me.aSelectCustomersSubcontractor.ToolTip = Nothing
|
||||
Me.aSelectCustomersSubcontractor.TypeOfView = Nothing
|
||||
'
|
||||
'aCreateSubcontractorUserRoles
|
||||
'
|
||||
Me.aCreateSubcontractorUserRoles.AcceptButtonCaption = Nothing
|
||||
Me.aCreateSubcontractorUserRoles.CancelButtonCaption = Nothing
|
||||
Me.aCreateSubcontractorUserRoles.Caption = "aCreate Subcontractor User Roles"
|
||||
Me.aCreateSubcontractorUserRoles.ConfirmationMessage = Nothing
|
||||
Me.aCreateSubcontractorUserRoles.Id = "aCreateSubcontractorUserRoles"
|
||||
Me.aCreateSubcontractorUserRoles.ImageName = Nothing
|
||||
Me.aCreateSubcontractorUserRoles.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireMultipleObjects
|
||||
Me.aCreateSubcontractorUserRoles.Shortcut = Nothing
|
||||
Me.aCreateSubcontractorUserRoles.Tag = Nothing
|
||||
Me.aCreateSubcontractorUserRoles.TargetObjectsCriteria = Nothing
|
||||
Me.aCreateSubcontractorUserRoles.TargetObjectType = GetType(DevExpress.Persistent.BaseImpl.User)
|
||||
Me.aCreateSubcontractorUserRoles.TargetViewId = "Subcontractor_SubcontractorUser_ListView"
|
||||
Me.aCreateSubcontractorUserRoles.ToolTip = Nothing
|
||||
Me.aCreateSubcontractorUserRoles.TypeOfView = Nothing
|
||||
|
||||
End Sub
|
||||
Friend WithEvents aSelectCustomersSubcontractor As DevExpress.ExpressApp.Actions.PopupWindowShowAction
|
||||
Friend WithEvents aCreateSubcontractorUserRoles As DevExpress.ExpressApp.Actions.PopupWindowShowAction
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,129 @@
|
||||
<?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="aSelectCustomersSubcontractor.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="aCreateSubcontractorUserRoles.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>242, 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,179 @@
|
||||
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.Xpo
|
||||
Imports DevExpress.Data.Filtering
|
||||
|
||||
Public Class Subcontractor_VC
|
||||
Inherits DevExpress.ExpressApp.ViewController
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
End Sub
|
||||
|
||||
Protected Overrides Sub OnActivated()
|
||||
MyBase.OnActivated()
|
||||
|
||||
Frame.GetController(Of Subcontractor_VC).aSelectCustomersSubcontractor.Active.SetItemValue("", False)
|
||||
|
||||
Dim _ocur As Xpo.XPObjectSpace = View.ObjectSpace
|
||||
|
||||
If View.Id = "Subcontractor_ListView" Then
|
||||
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", False)
|
||||
End If
|
||||
If View.Id = "Subcontractor_SubcontractorCustomers_ListView" Then
|
||||
Frame.GetController(Of NewObjectViewController)().Active.SetItemValue("", False)
|
||||
Frame.GetController(Of LinkUnlinkController)().Active.SetItemValue("", False)
|
||||
Frame.GetController(Of ListViewProcessCurrentObjectController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of AuditTrailVC).aGetAuditTrail.Active.SetItemValue("", False)
|
||||
|
||||
Frame.GetController(Of Subcontractor_VC).aSelectCustomersSubcontractor.Active.SetItemValue("", True)
|
||||
End If
|
||||
If View.Id = "Subcontractor_SubcontractorWorksheetType_ListView" Then
|
||||
Frame.GetController(Of LinkUnlinkController)().Active.SetItemValue("", False)
|
||||
Frame.GetController(Of ListViewProcessCurrentObjectController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of AuditTrailVC).aGetAuditTrail.Active.SetItemValue("", False)
|
||||
End If
|
||||
If View.Id = "PCIGroup_ListView_Subcontractor" Then
|
||||
|
||||
Frame.GetController(Of NewObjectViewController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of LinkUnlinkController)().Active.SetItemValue("", False)
|
||||
Frame.GetController(Of ListViewProcessCurrentObjectController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", False)
|
||||
|
||||
Dim _Contacts As Contacts = _ocur.FindObject(Of Contacts)(CriteriaOperator.Parse("User.Oid = ?", SecuritySystem.CurrentUserId))
|
||||
|
||||
If _Contacts IsNot Nothing Then
|
||||
If _Contacts.Customers IsNot Nothing Then
|
||||
TryCast(View, ListView).CollectionSource.Criteria("BySubcontractorPCI") = CriteriaOperator.Parse("Customers.Oid = ?", _Contacts.Customers.Oid)
|
||||
Else
|
||||
TryCast(View, ListView).CollectionSource.Criteria("BySubcontractorPCI") = CriteriaOperator.Parse("1=2")
|
||||
End If
|
||||
Else
|
||||
TryCast(View, ListView).CollectionSource.Criteria("BySubcontractorPCI") = CriteriaOperator.Parse("1=2")
|
||||
End If
|
||||
End If
|
||||
'------------------DeatailViews----------------------
|
||||
If View.Id = "Subcontractor_DetailView" Then
|
||||
Frame.GetController(Of NewObjectViewController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", False)
|
||||
End If
|
||||
End Sub
|
||||
Protected Overrides Sub OnDeactivated()
|
||||
MyBase.OnDeactivated()
|
||||
If View.Id = "Subcontractor_ListView" Then
|
||||
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", True)
|
||||
End If
|
||||
If View.Id = "Subcontractor_SubcontractorCustomers_ListView" Then
|
||||
Frame.GetController(Of NewObjectViewController)().Active.SetItemValue("", True)
|
||||
Frame.GetController(Of LinkUnlinkController)().Active.SetItemValue("", True)
|
||||
Frame.GetController(Of ListViewProcessCurrentObjectController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of AuditTrailVC).aGetAuditTrail.Active.SetItemValue("", True)
|
||||
End If
|
||||
If View.Id = "Subcontractor_SubcontractorWorksheetType_ListView" Then
|
||||
Frame.GetController(Of LinkUnlinkController)().Active.SetItemValue("", True)
|
||||
Frame.GetController(Of ListViewProcessCurrentObjectController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of AuditTrailVC).aGetAuditTrail.Active.SetItemValue("", True)
|
||||
End If
|
||||
If View.Id = "PCIGroup_ListView_Subcontractor" Then
|
||||
|
||||
Frame.GetController(Of NewObjectViewController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of LinkUnlinkController)().Active.SetItemValue("", True)
|
||||
Frame.GetController(Of ListViewProcessCurrentObjectController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", True)
|
||||
End If
|
||||
'------------------DeatailViews----------------------
|
||||
If View.Id = "Subcontractor_DetailView" Then
|
||||
Frame.GetController(Of NewObjectViewController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", True)
|
||||
End If
|
||||
End Sub
|
||||
Private Sub aSelectCustomersSubcontractor_CustomizePopupWindowParams(sender As Object, e As DevExpress.ExpressApp.Actions.CustomizePopupWindowParamsEventArgs) Handles aSelectCustomersSubcontractor.CustomizePopupWindowParams
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
|
||||
|
||||
Dim _CS As New CollectionSource(_onew, GetType(Customers))
|
||||
|
||||
'_CS.BeginUpdateCriteria()
|
||||
'_CS.Criteria.Clear()
|
||||
'_CS.Criteria("First") = ""
|
||||
'_CS.EndUpdateCriteria()
|
||||
|
||||
e.View = Application.CreateListView("Customers_ListView_Select", _CS, False)
|
||||
End Sub
|
||||
Private Sub aSelectCustomersSubcontractor_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.PopupWindowShowActionExecuteEventArgs) Handles aSelectCustomersSubcontractor.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _Customers As Customers
|
||||
Dim _Subcontractor As Subcontractor = TryCast(TryCast(View, ListView).CollectionSource, PropertyCollectionSource).MasterObject
|
||||
Dim _SubcontractorCustomers As SubcontractorCustomers
|
||||
Dim _Exists As Boolean = False
|
||||
If _Subcontractor Is Nothing Then Exit Sub
|
||||
|
||||
If e.PopupWindow.View.SelectedObjects.Count > 0 Then
|
||||
|
||||
For Each _Customers In e.PopupWindow.View.SelectedObjects
|
||||
_Exists = False
|
||||
For Each _SubcontractorCustomers In _Subcontractor.SubcontractorCustomers
|
||||
If _SubcontractorCustomers.Oid = _Customers.Oid Then
|
||||
_Exists = True
|
||||
End If
|
||||
Next
|
||||
If _Exists = False Then
|
||||
_SubcontractorCustomers = _ocur.CreateObject(Of SubcontractorCustomers)()
|
||||
_SubcontractorCustomers.Customers = _ocur.GetObject(_Customers)
|
||||
_SubcontractorCustomers.Subcontractor = _Subcontractor
|
||||
End If
|
||||
Next
|
||||
_ocur.CommitChanges()
|
||||
End If
|
||||
|
||||
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 aCreateSubcontractorUserRoles_CustomizePopupWindowParams(sender As Object, e As DevExpress.ExpressApp.Actions.CustomizePopupWindowParamsEventArgs) Handles aCreateSubcontractorUserRoles.CustomizePopupWindowParams
|
||||
Try
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _CS As New CollectionSource(_onew, GetType(SubcontractorRoles))
|
||||
|
||||
e.View = Application.CreateListView("SubcontractorRoles_ListView", _CS, False)
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly)
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub aCreateSubcontractorUserRoles_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.PopupWindowShowActionExecuteEventArgs) Handles aCreateSubcontractorUserRoles.Execute
|
||||
Try
|
||||
Dim _ocur As Xpo.XPObjectSpace = View.ObjectSpace
|
||||
Dim _SubcontractorRoles As SubcontractorRoles = TryCast(e.PopupWindow.View.SelectedObjects(0), SubcontractorRoles)
|
||||
Dim _Subcontractor As Subcontractor = TryCast(TryCast(TryCast(View, ListView).CollectionSource, PropertyCollectionSource).MasterObject, Subcontractor)
|
||||
For Each _User As DevExpress.Persistent.BaseImpl.User In View.SelectedObjects
|
||||
Dim _SubcontractorUserRoles As SubcontractorUserRoles = _ocur.CreateObject(Of SubcontractorUserRoles)()
|
||||
_SubcontractorUserRoles.User = _User
|
||||
_SubcontractorUserRoles.SubcontractorRoles = _ocur.GetObjectByKey(Of SubcontractorRoles)(_SubcontractorRoles.Oid)
|
||||
_SubcontractorUserRoles.Subcontractor = _ocur.GetObjectByKey(Of Subcontractor)(_Subcontractor.Oid)
|
||||
Next
|
||||
_ocur.CommitChanges()
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly)
|
||||
End Try
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user