Reconfigure for GIT

This commit is contained in:
2017-03-26 20:00:03 +02:00
commit 00637826ab
8056 changed files with 535977 additions and 0 deletions
@@ -0,0 +1,44 @@
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("HRStocks")> _
Public Class HRGroups
Inherits BaseObject
Private _ShortName As String
Private _Description As String
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
<VisibleInListView(False)> _
<Association("HRPerson-HRGroups", GetType(HRPerson))> _
ReadOnly Property HRPerson() As XPCollection(Of HRPerson)
Get
Return GetCollection(Of HRPerson)("HRPerson")
End Get
End Property
Property ShortName() As String
Get
Return _ShortName
End Get
Set(ByVal value As String)
SetPropertyValue("ShortName", _ShortName, value)
End Set
End Property
Property Description() As String
Get
Return _Description
End Get
Set(ByVal value As String)
SetPropertyValue("Description", _Description, value)
End Set
End Property
End Class
@@ -0,0 +1,382 @@
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
Imports DevExpress.Persistent.Base.General
Imports System.Drawing
Public Enum eEMailMode
eOutlook = 0
eExchange = 1
ePOP3 = 2
End Enum
<DefaultClassOptions()> _
<NavigationItem("HRStocks")> _
<Appearance("Disable HRPerson - UniqueObjects", AppearanceItemType.ViewItem, "1=1", TargetItems:="UniqueObjects", Enabled:=False)> _
Public Class HRPerson
Inherits Person
Implements IResource
Private _Contact As Contacts 'Kapcsolat
Private _User As User 'Program felhasználó
Private _ShortName As String 'Rövid megnevezés
Private _Barcode As String 'Vonalkód
Private _Job As String 'Munkakör
Private _Post As String 'Beosztás
Private _UniqueObjects As UniqueObjects
Private _EMailMode As eEMailMode
'//Outlook settings
Private _DefaultOutlookFolder As String
Private _DefaultOutlookFolderEntryID As String
Private _HRPerson_OutlookFolder As HRPerson_OutlookFolder
'//Exchange
Private _ExchangeHost As String
'//POP3 SMTP
Private _SMTPHost As String
Private _SMTPPort As Long = 25
Private _SMTPUserName As String
Private _SMTPPassword As String
Private _POP3Host As String
Private _POP3Port As Long = 110
Private _POP3UserName As String
Private _POP3Password As String
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
#If MediumTrust Then
<Persistent("Color"), Browsable(False)> _
Public color_Renamed As Int32
#Else
<Persistent("Color")> _
Private color_Renamed As Int32
#End If
Protected Overrides Sub OnSaving()
MyBase.OnSaving()
Dim _HRPerson_OutlookFolderCollection As New XPCollection(Of HRPerson_OutlookFolder)(Session, CriteriaOperator.Parse("1=1"))
Session.Delete(_HRPerson_OutlookFolderCollection)
If Session.IsNewObject(Me) Then
UniqueObjects = New UniqueObjects(Session)
UniqueObjects.Name = FullName
UniqueObjects.HRPerson = Me
UniqueObjects.Save()
End If
End Sub
Protected Overrides Sub OnSaved()
MyBase.OnSaved()
Me.HRPerson_OutlookFolder = Nothing
Dim _HRPerson_OutlookFolderCollection As New XPCollection(Of HRPerson_OutlookFolder)(Session, CriteriaOperator.Parse("1=1"))
Session.Delete(_HRPerson_OutlookFolderCollection)
End Sub
'// IResources
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
color_Renamed = Color.White.ToArgb()
End Sub
<NonPersistent(), Browsable(False)> _
Public ReadOnly Property Id() As Object Implements IResource.Id
Get
Return Oid
End Get
End Property
Public Property Caption() As String Implements IResource.Caption
Get
Return Me.FullName
End Get
Set(ByVal value As String)
'UserName = value
OnChanged("Caption")
End Set
End Property
<NonPersistent(), Browsable(False)> _
Public ReadOnly Property OleColor() As Int32 Implements IResource.OleColor
Get
Return ColorTranslator.ToOle(Color.FromArgb(color_Renamed))
End Get
End Property
<Association("HRPersonEvent-HRPerson", GetType(HRPersonEvent)), VisibleInListView(False), VisibleInLookupListView(False)> _
Public ReadOnly Property Events() As XPCollection(Of HRPersonEvent)
Get
Return GetCollection(Of HRPersonEvent)("Events")
End Get
End Property
<NonPersistent()> _
Public Property Color() As Color
Get
Return Color.FromArgb(color_Renamed)
End Get
Set(ByVal value As Color)
color_Renamed = value.ToArgb()
OnChanged("Color")
End Set
End Property
'// Base property
Property Contact() As Contacts
Get
Return _Contact
End Get
Set(ByVal value As Contacts)
SetPropertyValue("Contatcts", _Contact, value)
End Set
End Property
Property User() As User
Get
Return _User
End Get
Set(ByVal value As User)
SetPropertyValue("User", _User, value)
If Not Session.IsObjectsLoading And Not Session.IsObjectsSaving Then
If _User IsNot Nothing Then
Me.Address1 = _User.Address1
Me.Address2 = _User.Address2
Me.Birthday = _User.Birthday
Me.Email = _User.Email
Me.FirstName = _User.FirstName
Me.LastName = _User.LastName
Me.MiddleName = _User.MiddleName
End If
End If
End Set
End Property
Property ShortName As String
Get
Return _ShortName
End Get
Set(ByVal value As String)
SetPropertyValue("ShortName", _ShortName, value)
End Set
End Property
Property Barcode As String
Get
Return _Barcode
End Get
Set(value As String)
SetPropertyValue("Barcode", _Barcode, value)
End Set
End Property
Property Job As String
Get
Return _Job
End Get
Set(value As String)
SetPropertyValue("Job", _Job, value)
End Set
End Property
Property Post As String
Get
Return _Post
End Get
Set(value As String)
SetPropertyValue("Post", _Post, value)
End Set
End Property
Property UniqueObjects As UniqueObjects
Get
Return _UniqueObjects
End Get
Set(value As UniqueObjects)
SetPropertyValue("UniqueObjects", _UniqueObjects, value)
End Set
End Property
Property EMailMode As eEMailMode
Get
Return _EMailMode
End Get
Set(value As eEMailMode)
SetPropertyValue("EMailMode", _EMailMode, value)
End Set
End Property
'// Outlook settings
Property DefaultOutlookFolder As String
Get
Return _DefaultOutlookFolder
End Get
Set(value As String)
SetPropertyValue("DefaultOutlookFolder", _DefaultOutlookFolder, value)
End Set
End Property
<Size(255)> _
Property DefaultOutlookFolderEntryID As String
Get
Return _DefaultOutlookFolderEntryID
End Get
Set(value As String)
SetPropertyValue("DefaultOutlookFolderEntryID", _DefaultOutlookFolderEntryID, value)
End Set
End Property
<NonPersistent()> _
<DataSourceProperty("HRPerson_OutlookFolderCollection")> _
Property HRPerson_OutlookFolder As HRPerson_OutlookFolder
Get
Return _HRPerson_OutlookFolder
End Get
Set(value As HRPerson_OutlookFolder)
SetPropertyValue("HRPerson_OutlookFolder", _HRPerson_OutlookFolder, value)
If Session.IsObjectsSaving = False And Session.IsObjectsLoading = False Then
If Me.HRPerson_OutlookFolder IsNot Nothing Then
Me.DefaultOutlookFolder = Me.HRPerson_OutlookFolder.FolderPath
Me.DefaultOutlookFolderEntryID = Me.HRPerson_OutlookFolder.EntryID
End If
End If
End Set
End Property
'//Exchange settings
'//POP3 SMTP settings
Property SMTPHost As String
Get
Return _SMTPHost
End Get
Set(value As String)
SetPropertyValue("SMTPHost", _SMTPHost, value)
End Set
End Property
Property SMTPPort As Long
Get
Return _SMTPPort
End Get
Set(value As Long)
SetPropertyValue("SMTPPort", _SMTPPort, value)
End Set
End Property
Property SMTPUserName As String
Get
Return _SMTPUserName
End Get
Set(value As String)
SetPropertyValue("SMTPUserName", _SMTPUserName, value)
End Set
End Property
<PasswordPropertyText()> _
<ValueConverter(GetType(Encryption))> _
Property SMTPPassword As String
Get
Return _SMTPPassword
End Get
Set(value As String)
SetPropertyValue("SMTPPassword", _SMTPPassword, value)
End Set
End Property
Property POP3Host As String
Get
Return _POP3Host
End Get
Set(value As String)
SetPropertyValue("POP3Host", _POP3Host, value)
End Set
End Property
Property POP3Port As Long
Get
Return _POP3Port
End Get
Set(value As Long)
SetPropertyValue("POP3Port", _POP3Port, value)
End Set
End Property
Property POP3UserName As String
Get
Return _POP3UserName
End Get
Set(value As String)
SetPropertyValue("POP3UserName", _POP3UserName, value)
End Set
End Property
<PasswordPropertyText()> _
<ValueConverter(GetType(Encryption))> _
Property POP3Password As String
Get
Return _POP3Password
End Get
Set(value As String)
SetPropertyValue("POP3Password", _POP3Password, value)
End Set
End Property
'---------------ReadOnly--------------
<VisibleInListView(False)> _
<Association("HRPerson-HRGroups", GetType(HRGroups))> _
ReadOnly Property HRGroups() As XPCollection(Of HRGroups)
Get
Return GetCollection(Of HRGroups)("HRGroups")
End Get
End Property
<VisibleInListView(False), VisibleInLookupListView(False)> _
ReadOnly Property FixedAssets_Collection As XPCollection(Of FixedAssets)
Get
'// Kiadott tárgyieszközök kollekciója
Return New XPCollection(Of FixedAssets)(Session, CriteriaOperator.Parse("HRPerson_Using=?", Me))
End Get
End Property
<Association("HRPerson-HRPersonCostHolder", GetType(HRPersonCostHolder)), VisibleInListView(False), VisibleInLookupListView(False)> _
ReadOnly Property HRPersonCostHolder As XPCollection(Of HRPersonCostHolder)
Get
Return GetCollection(Of HRPersonCostHolder)("HRPersonCostHolder")
End Get
End Property
<Association("HRPerson-HRPersonCustomers", GetType(HRPersonCustomers)), VisibleInListView(False), VisibleInLookupListView(False)> _
ReadOnly Property HRPersonCustomers As XPCollection(Of HRPersonCustomers)
Get
Return GetCollection(Of HRPersonCustomers)("HRPersonCustomers")
End Get
End Property
<VisibleInListView(False), VisibleInLookupListView(False)> _
ReadOnly Property HRPersonTask As XPCollection(Of HRPersonTasks)
Get
Return New XPCollection(Of HRPersonTasks)(Session, CriteriaOperator.Parse("HRPerson=?", Me))
End Get
End Property
<VisibleInListView(False), VisibleInLookupListView(False)> _
ReadOnly Property CustomersThemesHRPerson As XPCollection(Of CustomersThemesHRPerson)
Get
Return New XPCollection(Of CustomersThemesHRPerson)(Session, CriteriaOperator.Parse("HRPerson=?", Me))
End Get
End Property
Private ReadOnly Property HRPerson_OutlookFolderCollection As XPCollection(Of HRPerson_OutlookFolder)
Get
Dim _HRPerson_OutlookFolderCollection As New XPCollection(Of HRPerson_OutlookFolder)(Session, CriteriaOperator.Parse("HRPerson=?", Me))
Session.Delete(_HRPerson_OutlookFolderCollection)
Dim _OutlookApp As New Microsoft.Office.Interop.Outlook.Application()
Dim _OutlookNameSpace As Microsoft.Office.Interop.Outlook.NameSpace
_OutlookNameSpace = _OutlookApp.GetNamespace("MAPI")
_OutlookNameSpace.Logon(, , False, True)
For Each _BaseFolder As Microsoft.Office.Interop.Outlook.Folder In _OutlookNameSpace.Folders
OutlookFolderList(_BaseFolder, _HRPerson_OutlookFolderCollection)
Next
'_HRPerson_OutlookFolderCollection.Criteria = CriteriaOperator.Parse("HRPerson=?", Me)
Return _HRPerson_OutlookFolderCollection
End Get
End Property
Private Sub OutlookFolderList(_OutlookFolder As Microsoft.Office.Interop.Outlook.Folder, HRPerson_OutlookFolderCollection As XPCollection(Of [Module].HRPerson_OutlookFolder))
If _OutlookFolder.Folders.Count > 0 Then
For _ik = 1 To _OutlookFolder.Folders.Count
OutlookFolderList(_OutlookFolder.Folders(_ik), HRPerson_OutlookFolderCollection)
Next
Else
Dim _HRPerson_OutlookFolder As New HRPerson_OutlookFolder(Session)
_HRPerson_OutlookFolder.EntryID = _OutlookFolder.EntryID.ToString
_HRPerson_OutlookFolder.FolderPath = _OutlookFolder.FolderPath
_HRPerson_OutlookFolder.HRPerson = Me
HRPerson_OutlookFolderCollection.Add(_HRPerson_OutlookFolder)
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 HRPersonCostHolder
Inherits BaseObject
Private _HRPerson As HRPerson
Private _CostHolder As CostHolder
Private _DateFrom As Date
Private _DateTo As Date
Private _WorkPercent As Double
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
End Sub
<Association("HRPerson-HRPersonCostHolder", GetType(HRPerson))> _
Property HRPerson As HRPerson
Get
Return _HRPerson
End Get
Set(value As HRPerson)
SetPropertyValue("HRPerson", _HRPerson, value)
End Set
End Property
Property CostHolder As CostHolder
Get
Return _CostHolder
End Get
Set(value As CostHolder)
SetPropertyValue("CostHolder", _CostHolder, value)
End Set
End Property
Property DateFrom As Date
Get
Return _DateFrom
End Get
Set(value As Date)
SetPropertyValue("DateFrom", _DateFrom, value.Date)
End Set
End Property
Property DateTo As Date
Get
Return _DateTo
End Get
Set(value As Date)
SetPropertyValue("DateTo", _DateTo, value.Date)
End Set
End Property
Property WorkPercent As Double
Get
Return _WorkPercent
End Get
Set(value As Double)
SetPropertyValue("WorkPercent", _WorkPercent, value)
End Set
End Property
End Class
@@ -0,0 +1,75 @@
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 HRPersonCustomers
Inherits BaseObject
Private _HRPerson As HRPerson
Private _Customers As Customers
Private _DateFrom As Date
Private _DateTo As Date
Private _WorkPercent As Double
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
<Association("HRPerson-HRPersonCustomers", GetType(HRPerson))> _
Property HRPerson As HRPerson
Get
Return _HRPerson
End Get
Set(value As HRPerson)
SetPropertyValue("HRPerson", _HRPerson, 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
Property DateFrom As Date
Get
Return _DateFrom
End Get
Set(value As Date)
SetPropertyValue("DateFrom", _DateFrom, value.Date)
End Set
End Property
Property DateTo As Date
Get
Return _DateTo
End Get
Set(value As Date)
SetPropertyValue("DateTo", _DateTo, value.Date)
End Set
End Property
Property WorkPercent As Double
Get
Return _WorkPercent
End Get
Set(value As Double)
SetPropertyValue("WorkPercent", _WorkPercent, value)
End Set
End Property
End Class
@@ -0,0 +1,220 @@
Imports Microsoft.VisualBasic
Imports System
Imports DevExpress.Xpo
Imports DevExpress.ExpressApp
Imports DevExpress.Persistent.Base
Imports DevExpress.Persistent.Validation
Imports DevExpress.Persistent.Base.General
Imports DevExpress.Xpo.Metadata
Imports System.ComponentModel
Imports System.Xml
<DefaultClassOptions(), NavigationItem(False), CreatableItem(False)> _
Public Class HRPersonEvent
Inherits DevExpress.Persistent.BaseImpl.BaseObject
Implements IEvent, IRecurrentEvent
#If MediumTrust Then
<Persistent("ResourceIds"), Size(SizeAttribute.Unlimited), ObjectValidatorIgnoreIssue(GetType(ObjectValidatorLargeNonDelayedMember))> _
Public resourceIds As String
#Else
<Persistent("ResourceIds"), Size(SizeAttribute.Unlimited), ObjectValidatorIgnoreIssue(GetType(ObjectValidatorLargeNonDelayedMember))> _
Private resourceIds As String
#End If
Private _appointmentImpl As New EventImpl
<Persistent("RecurrencePattern")> _
Private recurrencePattern_Renamed As DevExpress.Persistent.BaseImpl.Event
Private recurrenceInfoXml_Renamed As String
Private Sub UpdateResources()
Resources.SuspendChangedEvents()
Try
Do While Resources.Count > 0
Resources.Remove(Resources(0))
Loop
If (Not String.IsNullOrEmpty(resourceIds)) Then
Dim xmlDocument As New XmlDocument()
xmlDocument.LoadXml(resourceIds)
For Each xmlNode As XmlNode In xmlDocument.DocumentElement.ChildNodes
Dim resource As HRPerson = Session.GetObjectByKey(Of HRPerson)(New Guid(xmlNode.Attributes("Value").Value))
If resource IsNot Nothing Then
Resources.Add(resource)
End If
Next xmlNode
End If
Finally
Resources.ResumeChangedEvents()
End Try
End Sub
Private Sub Resources_CollectionChanged(ByVal sender As Object, ByVal e As XPCollectionChangedEventArgs)
If (e.CollectionChangedType = XPCollectionChangedType.AfterAdd) OrElse (e.CollectionChangedType = XPCollectionChangedType.AfterRemove) Then
UpdateResourceIds()
OnChanged("ResourceId")
End If
End Sub
Private Sub session_ObjectSaving(ByVal sender As Object, ByVal e As ObjectManipulationEventArgs)
End Sub
Protected Overloads Overrides Function CreateCollection(ByVal [property] As XPMemberInfo) As XPCollection
Dim result As XPCollection = MyBase.CreateCollection([property])
If [property].Name = "Resources" Then
AddHandler result.CollectionChanged, AddressOf Resources_CollectionChanged
End If
Return result
End Function
Public Sub New(ByVal session As Session)
MyBase.New(session)
AddHandler session.ObjectSaving, AddressOf session_ObjectSaving
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
_appointmentImpl = New EventImpl
_appointmentImpl.AfterConstruction()
End Sub
Public Sub UpdateResourceIds()
resourceIds = "<ResourceIds>" & Constants.vbCrLf
For Each resource As HRPerson In Resources
resourceIds &= String.Format("<ResourceId Type=""{0}"" Value=""{1}"" />" & Constants.vbCrLf, resource.Id.GetType().FullName, resource.Id)
Next resource
resourceIds &= "</ResourceIds>"
End Sub
<NonPersistent(), Browsable(False)> _
Public ReadOnly Property AppointmentId() As Object Implements IEvent.AppointmentId
Get
Return Oid
End Get
End Property
<Size(250)> _
Public Property Subject() As String Implements IEvent.Subject
Get
Return _appointmentImpl.Subject
End Get
Set(ByVal value As String)
_appointmentImpl.Subject = value
OnChanged("Subject", Nothing, value)
End Set
End Property
<Size(SizeAttribute.Unlimited), ObjectValidatorIgnoreIssue(GetType(ObjectValidatorLargeNonDelayedMember))> _
Public Property Description() As String Implements IEvent.Description
Get
Return _appointmentImpl.Description
End Get
Set(ByVal value As String)
_appointmentImpl.Description = value
OnChanged("Description")
End Set
End Property
<Indexed()> _
Public Property StartOn() As DateTime Implements IEvent.StartOn
Get
Return _appointmentImpl.StartOn
End Get
Set(ByVal value As DateTime)
_appointmentImpl.StartOn = value
OnChanged("StartOn")
End Set
End Property
<Indexed()> _
Public Property EndOn() As DateTime Implements IEvent.EndOn
Get
Return _appointmentImpl.EndOn
End Get
Set(ByVal value As DateTime)
_appointmentImpl.EndOn = value
OnChanged("EndOn")
End Set
End Property
Public Property AllDay() As Boolean Implements IEvent.AllDay
Get
Return _appointmentImpl.AllDay
End Get
Set(ByVal value As Boolean)
_appointmentImpl.AllDay = value
OnChanged("AllDay")
End Set
End Property
Public Property Location() As String Implements IEvent.Location
Get
Return _appointmentImpl.Location
End Get
Set(ByVal value As String)
_appointmentImpl.Location = value
OnChanged("Location")
End Set
End Property
Public Property Label() As Integer Implements IEvent.Label
Get
Return _appointmentImpl.Label
End Get
Set(ByVal value As Integer)
_appointmentImpl.Label = value
OnChanged("Label")
End Set
End Property
Public Property Status() As Integer Implements IEvent.Status
Get
Return _appointmentImpl.Status
End Get
Set(ByVal value As Integer)
_appointmentImpl.Status = value
OnChanged("Status")
End Set
End Property
Public Property Type() As Integer Implements IEvent.Type
Get
Return _appointmentImpl.Type
End Get
Set(ByVal value As Integer)
_appointmentImpl.Type = value
OnChanged("Type")
End Set
End Property
<Association("HRPersonEvent-HRPerson", GetType(HRPerson))> _
Public ReadOnly Property Resources() As XPCollection(Of HRPerson)
Get
Return GetCollection(Of HRPerson)("Resources")
End Get
End Property
<NonPersistent(), Browsable(False)> _
Public Property ResourceId() As String Implements IEvent.ResourceId
Get
If resourceIds Is Nothing Then
UpdateResourceIds()
End If
Return resourceIds
End Get
Set(ByVal value As String)
If resourceIds <> value Then
resourceIds = value
UpdateResources()
End If
End Set
End Property
<DevExpress.Xpo.DisplayName("Recurrence"), Size(SizeAttribute.Unlimited), ObjectValidatorIgnoreIssue(GetType(ObjectValidatorLargeNonDelayedMember))> _
Public Property RecurrenceInfoXml() As String Implements IRecurrentEvent.RecurrenceInfoXml
Get
Return recurrenceInfoXml_Renamed
End Get
Set(ByVal value As String)
recurrenceInfoXml_Renamed = value
OnChanged("RecurrenceInfoXml")
End Set
End Property
Public Property RecurrencePattern() As IRecurrentEvent Implements IRecurrentEvent.RecurrencePattern
Get
Return recurrencePattern_Renamed
End Get
Set(ByVal value As IRecurrentEvent)
recurrencePattern_Renamed = CType(value, DevExpress.Persistent.BaseImpl.Event)
OnChanged("RecurrencePattern")
End Set
End Property
<NonPersistent(), Browsable(False), RuleFromBoolProperty("MyEventIntervalValid", DefaultContexts.Save, "The start date must be less than the end date", UsedProperties:="StartOn, EndOn")> _
Public ReadOnly Property IsIntervalValid() As Boolean
Get
Return StartOn < EndOn
End Get
End Property
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), DeferredDeletion(False)> _
Public Class HRPersonEventCriteria
Inherits BaseObject
Private _ViewID As String
Private _Criteria As String
Private _ActiveViewType As Long = 3
Private _User As User
Public Sub New(ByVal session As Session)
MyBase.New(session)
' This constructor is used when an object is loaded from a persistent storage.
' Do not place any code here or place it only when the IsLoading property is false:
' if (!IsLoading){
' It is now OK to place your initialization code here.
' }
' or as an alternative, move your initialization code into the AfterConstruction method.
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
' Place here your initialization code.
End Sub
<Size(255)> _
Property ViewID As String
Get
Return _ViewID
End Get
Set(value As String)
SetPropertyValue("ViewID", _ViewID, value)
End Set
End Property
<Size(-1)> _
Property Criteria As String
Get
Return _Criteria
End Get
Set(value As String)
SetPropertyValue("Criteria", _Criteria, 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
Property ActiveViewType As Long
Get
Return _ActiveViewType
End Get
Set(value As Long)
SetPropertyValue("ActiveViewType", _ActiveViewType, value)
End Set
End Property
End Class
@@ -0,0 +1,180 @@
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
Imports DevExpress.ExpressApp.Editors
<DefaultClassOptions(), NavigationItem(False), CreatableItem(False)> _
<Appearance("Hide HRPersonTasks View info", AppearanceItemType:="ViewItem", criteria:="IsView=False", targetitems:="ViewID", visibility:=Editors.ViewItemVisibility.Hide)> _
<Appearance("Hide HRPersonTasks View action", AppearanceItemType:="Action", criteria:="IsView=False", targetitems:="aHRPersonTask_SetViewID", visibility:=Editors.ViewItemVisibility.Hide)> _
Public Class HRPersonTasks
Inherits Task
Private _HRPerson As HRPerson
Private _HRPersonAlias As HRPerson
Private _ObjectCreated As Date
Private _UserCreated As User
Private _AlertPeriod As AlertPeriod 'A feladat ütemezése
Private _AlertPeriodAlias As AlertPeriod 'A feladatot kiadta
Private _HRPersonEvent As HRPersonEvent
Private _HRPersonEventAlias As HRPersonEvent
Private _IsView As Boolean = False 'Van-e valamilyen view, amit az alertbõl lehet meghívni
Private _ViewID As String 'View ID
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
Dim _User As User = Session.GetObjectByKey(Of User)(Session.GetKeyValue(SecuritySystem.CurrentUser))
If _User IsNot Nothing Then
Me.HRPersonAlias = Session.FindObject(Of HRPerson)(CriteriaOperator.Parse("User=?", _User))
End If
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
'//Esemény lejárt határidõvel a felelõsnek !
If Me.HRPersonEvent Is Nothing Then
Me.HRPersonEvent = New HRPersonEvent(Session)
Me.HRPersonEvent.Resources.Add(HRPerson)
End If
Me.HRPersonEvent.StartOn = New Date(Me.DueDate.Year, Me.DueDate.Month, Me.DueDate.Day, 8, 0, 0)
Me.HRPersonEvent.EndOn = New Date(Me.DueDate.Year, Me.DueDate.Month, Me.DueDate.Day, 10, 0, 0)
Me.HRPersonEvent.Subject = Me.Subject
Me.HRPersonEvent.Description = Me.Description
'//Esemény lejárt határidõvel a feladatot kiadónak
If Me.HRPersonEventAlias Is Nothing Then
Me.HRPersonEventAlias = New HRPersonEvent(Session)
Me.HRPersonEventAlias.Resources.Add(HRPersonAlias)
End If
Me.HRPersonEventAlias.StartOn = New Date(Me.DueDate.Year, Me.DueDate.Month, Me.DueDate.Day, 8, 0, 0)
Me.HRPersonEventAlias.EndOn = New Date(Me.DueDate.Year, Me.DueDate.Month, Me.DueDate.Day, 10, 0, 0)
Me.HRPersonEventAlias.Subject = Me.Subject
Me.HRPersonEventAlias.Description = Me.Description
End Sub
Protected Overrides Sub OnDeleting()
MyBase.OnDeleting()
If Me.HRPersonEvent IsNot Nothing Then
Session.Delete(Me.HRPersonEvent)
End If
If Me.HRPersonEventAlias IsNot Nothing Then
Session.Delete(Me.HRPersonEventAlias)
End If
End Sub
<RuleRequiredField("HRPersonTasks-HRPerson", DefaultContexts.Save)> _
Property HRPerson As HRPerson
Get
Return _HRPerson
End Get
Set(value As HRPerson)
SetPropertyValue("HRPerson", _HRPerson, value)
End Set
End Property
<RuleRequiredField("HRPersonTasks-HRPersonAlias", DefaultContexts.Save)> _
Property HRPersonAlias As HRPerson
Get
Return _HRPersonAlias
End Get
Set(value As HRPerson)
SetPropertyValue("HRPersonAlias", _HRPersonAlias, value)
End Set
End Property
<Browsable(False)> _
Overloads Property AssignedTo As Party
Get
Return MyBase.AssignedTo
End Get
Set(value As Party)
MyBase.AssignedTo = 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 AlertPeriod As AlertPeriod
Get
Return _AlertPeriod
End Get
Set(value As AlertPeriod)
SetPropertyValue("AlertPeriod", _AlertPeriod, value)
End Set
End Property
Property AlertPeriodAlias As AlertPeriod
Get
Return _AlertPeriodAlias
End Get
Set(value As AlertPeriod)
SetPropertyValue("AlertPeriodAlias", _AlertPeriodAlias, value)
End Set
End Property
<Browsable(False)> _
Property HRPersonEvent As HRPersonEvent
Get
Return _HRPersonEvent
End Get
Set(value As HRPersonEvent)
SetPropertyValue("HRPersonEvent", _HRPersonEvent, value)
End Set
End Property
<Browsable(False)> _
Property HRPersonEventAlias As HRPersonEvent
Get
Return _HRPersonEventAlias
End Get
Set(value As HRPersonEvent)
SetPropertyValue("HRPersonEventAlias", _HRPersonEventAlias, value)
End Set
End Property
<ImmediatePostData()> _
Property IsView As Boolean
Get
Return _IsView
End Get
Set(value As Boolean)
SetPropertyValue("IsView", _IsView, value)
End Set
End Property
<Size(255)> _
<ImmediatePostData()> _
Property ViewID As String
Get
Return _ViewID
End Get
Set(value As String)
SetPropertyValue("ViewID", _ViewID, value)
End Set
End Property
End Class
@@ -0,0 +1,52 @@
Partial Class HRPersonTasks_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.aHRPersonTask_SetViewID = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
'
'aHRPersonTask_SetViewID
'
Me.aHRPersonTask_SetViewID.AcceptButtonCaption = Nothing
Me.aHRPersonTask_SetViewID.CancelButtonCaption = Nothing
Me.aHRPersonTask_SetViewID.Caption = "aHRPersonTask_SetViewID"
Me.aHRPersonTask_SetViewID.Category = "aHRPersonTask_SetViewID"
Me.aHRPersonTask_SetViewID.ConfirmationMessage = Nothing
Me.aHRPersonTask_SetViewID.Id = "aHRPersonTask_SetViewID"
Me.aHRPersonTask_SetViewID.ImageName = Nothing
Me.aHRPersonTask_SetViewID.Shortcut = Nothing
Me.aHRPersonTask_SetViewID.Tag = Nothing
Me.aHRPersonTask_SetViewID.TargetObjectsCriteria = Nothing
Me.aHRPersonTask_SetViewID.TargetObjectType = GetType(SISBusiness.[Module].HRPersonTasks)
Me.aHRPersonTask_SetViewID.TargetViewId = Nothing
Me.aHRPersonTask_SetViewID.ToolTip = Nothing
Me.aHRPersonTask_SetViewID.TypeOfView = Nothing
End Sub
Friend WithEvents aHRPersonTask_SetViewID As DevExpress.ExpressApp.Actions.PopupWindowShowAction
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="aHRPersonTask_SetViewID.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>860, 178</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,74 @@
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.Model
Imports DevExpress.ExpressApp.Utils
Public Class HRPersonTasks_VC
Inherits DevExpress.ExpressApp.ViewController
Public Sub New()
MyBase.New()
InitializeComponent()
RegisterActions(components)
End Sub
Protected Overrides Sub OnActivated()
MyBase.OnActivated()
If View.Id = "HRPersonTasks_ListView_CurrentUser" Then
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _ListView As ListView = TryCast(View, ListView)
If _ListView IsNot Nothing Then
Dim _User As DevExpress.Persistent.BaseImpl.User = TryCast(SecuritySystem.CurrentUser, DevExpress.Persistent.BaseImpl.User)
_ListView.CollectionSource.BeginUpdateCriteria()
_ListView.CollectionSource.Criteria.Add("CurrentUser", DevExpress.Data.Filtering.CriteriaOperator.Parse("HRPersonAlias.User=? OR HRPerson.User=?", _ocur.GetObject(_User), _ocur.GetObject(_User)))
_ListView.CollectionSource.EndUpdateCriteria()
End If
End If
End Sub
Protected Overrides Sub OnDeactivated()
MyBase.OnDeactivated()
End Sub
Private Sub aHRPersonTask_SetViewID_CustomizePopupWindowParams(sender As Object, e As DevExpress.ExpressApp.Actions.CustomizePopupWindowParamsEventArgs) Handles aHRPersonTask_SetViewID.CustomizePopupWindowParams
Try
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
Dim _CS As New CollectionSource(_onew, GetType(HRPErsonTask_ViewList_PopUp))
For Each _Node As IModelView In View.Model.Application.Views
If _Node.Id Like "@@*" Then
Dim _HRPErsonTask_ViewList_PopUp As HRPErsonTask_ViewList_PopUp = _onew.CreateObject(Of HRPErsonTask_ViewList_PopUp)()
_HRPErsonTask_ViewList_PopUp.IDName = _Node.Id
_HRPErsonTask_ViewList_PopUp.IDCaption = _Node.Caption
_CS.Add(_HRPErsonTask_ViewList_PopUp)
End If
Next _Node
e.View = Application.CreateListView("HRPErsonTask_ViewList_PopUp_ListView", _CS, False)
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, String.Format(CaptionHelper.GetLocalizedText("Exceptions\SISBusinessExceptions", "MsgBoxCheckItAgain")))
End Try
End Sub
Private Sub aHRPersonTask_SetViewID_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.PopupWindowShowActionExecuteEventArgs) Handles aHRPersonTask_SetViewID.Execute
Try
Dim _ocur As Xpo.XPObjectSpace = View.ObjectSpace
Dim _HRPErsonTask_ViewList_PopUp As HRPErsonTask_ViewList_PopUp = TryCast(e.PopupWindow.View.SelectedObjects(0), HRPErsonTask_ViewList_PopUp)
If _HRPErsonTask_ViewList_PopUp Is Nothing Then Throw New Exception("*Nem lett kiválasztva egyetlen sor sem!")
Dim _HRPersonTasks As HRPersonTasks = TryCast(View.SelectedObjects(0), HRPersonTasks)
If _HRPersonTasks Is Nothing Then Throw New Exception("*Váratlan hiba történt, a folyamat megszakadt!")
_HRPersonTasks.ViewID = _HRPErsonTask_ViewList_PopUp.IDName
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, String.Format(CaptionHelper.GetLocalizedText("Exceptions\SISBusinessExceptions", "MsgBoxCheckItAgain")))
End Try
End Sub
End Class
@@ -0,0 +1,26 @@
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(), DeferredDeletion(False), NavigationItem(False), CreatableItem(False)> _
Public Class HRPerson_OutlookFolder
Inherits BaseObject
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
End Sub
<Size(255)> Property FolderPath As String
<Size(255)> Property EntryID As String
Property HRPerson As HRPerson
End Class
@@ -0,0 +1,107 @@
Partial Class HRPerson_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.aMergeUsers = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aCreateUniqeObjects = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aCloneHRPersonTasks = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
Me.aMergeHRPerson = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
'
'aMergeUsers
'
Me.aMergeUsers.Caption = "aMergeUsers"
Me.aMergeUsers.Category = "ObjectsCreation"
Me.aMergeUsers.ConfirmationMessage = "Do you want to execute?"
Me.aMergeUsers.Id = "aMergeUsers"
Me.aMergeUsers.ImageName = Nothing
Me.aMergeUsers.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireMultipleObjects
Me.aMergeUsers.Shortcut = Nothing
Me.aMergeUsers.Tag = Nothing
Me.aMergeUsers.TargetObjectsCriteria = Nothing
Me.aMergeUsers.TargetViewId = "User_ListView_Deleted"
Me.aMergeUsers.TargetViewType = DevExpress.ExpressApp.ViewType.ListView
Me.aMergeUsers.ToolTip = Nothing
Me.aMergeUsers.TypeOfView = GetType(DevExpress.ExpressApp.ListView)
'
'aCreateUniqeObjects
'
Me.aCreateUniqeObjects.Caption = "aCreateUniqeObjects"
Me.aCreateUniqeObjects.Category = "ObjectsCreation"
Me.aCreateUniqeObjects.ConfirmationMessage = "Do you want to execute?"
Me.aCreateUniqeObjects.Id = "aCreateUniqeObjects"
Me.aCreateUniqeObjects.ImageName = Nothing
Me.aCreateUniqeObjects.Shortcut = Nothing
Me.aCreateUniqeObjects.Tag = Nothing
Me.aCreateUniqeObjects.TargetObjectsCriteria = Nothing
Me.aCreateUniqeObjects.TargetObjectType = GetType(SISBusiness.[Module].HRPerson)
Me.aCreateUniqeObjects.TargetViewId = ""
Me.aCreateUniqeObjects.TargetViewType = DevExpress.ExpressApp.ViewType.ListView
Me.aCreateUniqeObjects.ToolTip = Nothing
Me.aCreateUniqeObjects.TypeOfView = GetType(DevExpress.ExpressApp.ListView)
'
'aCloneHRPersonTasks
'
Me.aCloneHRPersonTasks.AcceptButtonCaption = Nothing
Me.aCloneHRPersonTasks.CancelButtonCaption = Nothing
Me.aCloneHRPersonTasks.Caption = "aClone HRPerson Tasks"
Me.aCloneHRPersonTasks.Category = "ObjectsCreation"
Me.aCloneHRPersonTasks.ConfirmationMessage = Nothing
Me.aCloneHRPersonTasks.Id = "aCloneHRPersonTasks"
Me.aCloneHRPersonTasks.ImageName = Nothing
Me.aCloneHRPersonTasks.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
Me.aCloneHRPersonTasks.Shortcut = Nothing
Me.aCloneHRPersonTasks.Tag = Nothing
Me.aCloneHRPersonTasks.TargetObjectsCriteria = Nothing
Me.aCloneHRPersonTasks.TargetObjectType = GetType(SISBusiness.[Module].HRPersonTasks)
Me.aCloneHRPersonTasks.TargetViewId = Nothing
Me.aCloneHRPersonTasks.ToolTip = Nothing
Me.aCloneHRPersonTasks.TypeOfView = Nothing
'
'aMergeHRPerson
'
Me.aMergeHRPerson.Caption = "aMergeHRPerson"
Me.aMergeHRPerson.Category = "ObjectsCreation"
Me.aMergeHRPerson.ConfirmationMessage = "Do you want to execute?"
Me.aMergeHRPerson.Id = "aMergeHRPerson"
Me.aMergeHRPerson.ImageName = Nothing
Me.aMergeHRPerson.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireMultipleObjects
Me.aMergeHRPerson.Shortcut = Nothing
Me.aMergeHRPerson.Tag = Nothing
Me.aMergeHRPerson.TargetObjectsCriteria = Nothing
Me.aMergeHRPerson.TargetViewId = "HRPerson_ListView_Deleted"
Me.aMergeHRPerson.TargetViewType = DevExpress.ExpressApp.ViewType.ListView
Me.aMergeHRPerson.ToolTip = Nothing
Me.aMergeHRPerson.TypeOfView = GetType(DevExpress.ExpressApp.ListView)
End Sub
Friend WithEvents aCreateUniqeObjects As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aCloneHRPersonTasks As DevExpress.ExpressApp.Actions.PopupWindowShowAction
Friend WithEvents aMergeUsers As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aMergeHRPerson As DevExpress.ExpressApp.Actions.SimpleAction
End Class
@@ -0,0 +1,135 @@
<?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="aMergeUsers.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>236, 56</value>
</metadata>
<metadata name="aCreateUniqeObjects.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 95</value>
</metadata>
<metadata name="aCloneHRPersonTasks.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 56</value>
</metadata>
<metadata name="aMergeHRPerson.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>184, 95</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,230 @@
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.Persistent.BaseImpl
Imports DevExpress.Xpo
Imports DevExpress.ExpressApp.Utils
Imports System.Reflection
Imports DevExpress.Data.Filtering
Public Class HRPerson_VC
Inherits DevExpress.ExpressApp.ViewController
Public Event InitWork(ByVal _Minimum As Long, ByVal _Step As Long, ByVal _Maximum As Long)
Public Event DoWork()
Public Event FinalWork
Public Sub New()
MyBase.New()
InitializeComponent()
RegisterActions(components)
End Sub
Protected Overrides Sub OnActivated()
MyBase.OnActivated()
If SecuritySystem.CurrentUserName <> "SysAdmin" Then Frame.GetController(Of HRPerson_VC).aCreateUniqeObjects.Active.SetItemValue("", False)
If View.Id = "User_ListView_Deleted" Then
If TryCast(View, ListView) IsNot Nothing Then
If TryCast(View, ListView).CollectionSource IsNot Nothing Then
If TryCast(View, ListView).CollectionSource.Collection IsNot Nothing Then
If TryCast(TryCast(View, ListView).CollectionSource.Collection, ProxyCollection) IsNot Nothing Then
If TryCast(TryCast(View, ListView).CollectionSource.Collection, ProxyCollection).OriginalCollection IsNot Nothing Then
If TryCast(TryCast(TryCast(View, ListView).CollectionSource.Collection, ProxyCollection).OriginalCollection, XPCollection) IsNot Nothing Then
TryCast(TryCast(TryCast(View, ListView).CollectionSource.Collection, ProxyCollection).OriginalCollection, XPCollection).SelectDeleted = True
End If
End If
End If
End If
End If
End If
End If
If View.Id = "HRPerson_ListView_Deleted" Then
If TryCast(View, ListView) IsNot Nothing Then
If TryCast(View, ListView).CollectionSource IsNot Nothing Then
If TryCast(View, ListView).CollectionSource.Collection IsNot Nothing Then
If TryCast(TryCast(View, ListView).CollectionSource.Collection, ProxyCollection) IsNot Nothing Then
If TryCast(TryCast(View, ListView).CollectionSource.Collection, ProxyCollection).OriginalCollection IsNot Nothing Then
If TryCast(TryCast(TryCast(View, ListView).CollectionSource.Collection, ProxyCollection).OriginalCollection, XPCollection) IsNot Nothing Then
TryCast(TryCast(TryCast(View, ListView).CollectionSource.Collection, ProxyCollection).OriginalCollection, XPCollection).SelectDeleted = True
End If
End If
End If
End If
End If
End If
End If
End Sub
Private Sub aCreateUniqeObjects_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aCreateUniqeObjects.Execute
Dim _ocur As Xpo.XPObjectSpace = View.ObjectSpace
Dim _uow As UnitOfWork = New UnitOfWork(_ocur.Session.DataLayer)
For Each _HRPerson As HRPerson In View.SelectedObjects
If _HRPerson.UniqueObjects Is Nothing Then
Dim _UniqueObjects As UniqueObjects = New UniqueObjects(_uow)
_UniqueObjects.Name = _HRPerson.FullName
_UniqueObjects.HRPerson = _uow.GetObjectByKey(Of HRPerson)(_HRPerson.Oid)
_UniqueObjects.HRPerson.UniqueObjects = _UniqueObjects
End If
Next
_uow.CommitChanges()
End Sub
Private Sub aCloneHRPersonTasks_CustomizePopupWindowParams(sender As Object, e As DevExpress.ExpressApp.Actions.CustomizePopupWindowParamsEventArgs) Handles aCloneHRPersonTasks.CustomizePopupWindowParams
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
Dim _ContractRowsCloneView As ContractRowsCloneView = _onew.CreateObject(Of ContractRowsCloneView)()
_ContractRowsCloneView.DayOfExecution = eDayOfMonth.e1
_ContractRowsCloneView.ActionFrequency = eActionFrequency.eMonthly
_ContractRowsCloneView.DayOfExecutionInWeek = eDayOfWeek.eMonday
_ContractRowsCloneView.ActionCount = 1
e.View = Application.CreateDetailView(_onew, "ContractRowsCloneView_DetailView_HRPerson", False, _ContractRowsCloneView)
End Sub
Private Sub aCloneHRPersonTasks_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.PopupWindowShowActionExecuteEventArgs) Handles aCloneHRPersonTasks.Execute
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Try
Dim _HRPersonTasks As HRPersonTasks = TryCast(View.SelectedObjects(0), HRPersonTasks)
If _HRPersonTasks Is Nothing Then Throw New Exception("*Nincs kiválasztott feladat!")
Dim _ContractRowsCloneView As ContractRowsCloneView = TryCast(e.PopupWindow.View.SelectedObjects(0), ContractRowsCloneView)
If _ContractRowsCloneView Is Nothing Then Throw New Exception("*Váratlan hiba történt, a folyamat megszakadt!")
Dim _DateStart As Date
Dim _DateCur As Date
Dim _DiffDay As Long
RaiseEvent InitWork(1, 1, _ContractRowsCloneView.ActionCount)
For i = 1 To _ContractRowsCloneView.ActionCount
Dim _HRPersonTasks_New As HRPersonTasks = _ocur.CreateObject(Of HRPersonTasks)()
_HRPersonTasks_New.AlertPeriod = _HRPersonTasks.AlertPeriod
_HRPersonTasks_New.AlertPeriodAlias = _HRPersonTasks.AlertPeriodAlias
_HRPersonTasks_New.AssignedTo = _HRPersonTasks.AssignedTo
_HRPersonTasks_New.Description = _HRPersonTasks.Description
_HRPersonTasks_New.HRPerson = _HRPersonTasks.HRPerson
_HRPersonTasks_New.HRPersonAlias = _HRPersonTasks.HRPersonAlias
_HRPersonTasks_New.Subject = _HRPersonTasks.Subject
_DateStart = _HRPersonTasks.DueDate
If _ContractRowsCloneView.ActionFrequency = eActionFrequency.eDaily Then
_DateCur = DateAdd(DateInterval.Day, i, _DateStart)
End If
If _ContractRowsCloneView.ActionFrequency = eActionFrequency.eMonthly Then
If _ContractRowsCloneView.DayOfExecution = eDayOfMonth.eLastDay Then
_DateCur = DateAdd(DateInterval.Month, i + 1, _DateStart)
_DateCur = DateAdd(DateInterval.Day, -1, CDate(Year(_DateCur) & "/" & Month(_DateCur) & "/01"))
Else
_DateCur = DateAdd(DateInterval.Month, i, _DateStart)
_DateCur = CDate(Year(_DateCur) & "/" & Month(_DateCur) & "/" & _ContractRowsCloneView.DayOfExecution)
End If
End If
If _ContractRowsCloneView.ActionFrequency = eActionFrequency.eWeekly Then
_DiffDay = _ContractRowsCloneView.DayOfExecutionInWeek - DatePart(DateInterval.Weekday, _DateStart)
_DiffDay += 1
_DateCur = DateAdd(DateInterval.WeekOfYear, i, _DateStart)
_DateCur = DateAdd(DateInterval.Day, _DiffDay, _DateCur)
End If
If _ContractRowsCloneView.ActionFrequency = eActionFrequency.eTwoWeekly Then
_DiffDay = _ContractRowsCloneView.DayOfExecutionInWeek - DatePart(DateInterval.Weekday, _DateStart)
_DiffDay += 1
_DateCur = DateAdd(DateInterval.WeekOfYear, i * 2, _DateStart)
_DateCur = DateAdd(DateInterval.Day, _DiffDay, _DateCur)
End If
If _ContractRowsCloneView.ActionFrequency = eActionFrequency.eQuarter Then
_DateCur = DateAdd(DateInterval.Quarter, i, _DateStart)
_DateCur = CDate(Year(_DateCur) & "/" & Month(_DateCur) & "/" & _ContractRowsCloneView.DayOfExecution)
End If
If _ContractRowsCloneView.ActionFrequency = eActionFrequency.eYear Then
_DateCur = DateAdd(DateInterval.Year, i, _DateStart)
_DateCur = CDate(Year(_DateCur) & "/" & Month(_DateCur) & "/" & _ContractRowsCloneView.DayOfExecution)
End If
_HRPersonTasks_New.DueDate = _DateCur
RaiseEvent DoWork()
Next
_ocur.CommitChanges()
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, String.Format(CaptionHelper.GetLocalizedText("Exceptions\SISBusinessExceptions", "MsgBoxCheckItAgain")))
Finally
RaiseEvent FinalWork
End Try
End Sub
Private Sub aMergeUsers_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aMergeUsers.Execute
Try
Frame.GetController(Of Validation.PersistenceValidationController).Active.SetItemValue("", False)
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
Dim _Object As Object
Dim _User As User
Dim _UserActive As User
For Each _User In View.SelectedObjects
_UserActive = _onew.FindObject(Of User)(CriteriaOperator.Parse("UserName=?", _User.UserName))
If _UserActive IsNot Nothing Then
RaiseEvent InitWork(1, 1, _onew.Session.CollectReferencingObjects(_onew.GetObjectByKey(Of User)(_User.Oid)).Count)
For Each _Object In _onew.Session.CollectReferencingObjects(_onew.GetObjectByKey(Of User)(_User.Oid))
RaiseEvent DoWork()
Try
For Each _PropertyInfo As PropertyInfo In _Object.GetType.GetProperties
If _PropertyInfo.PropertyType.Name = "User" Then
_PropertyInfo.SetValue(_Object, _onew.GetObjectByKey(Of User)(_UserActive.Oid), Nothing)
End If
Next
Catch ex As Exception
Throw New Exception(ex.Message)
End Try
Next
RaiseEvent FinalWork
End If
Next
_onew.CommitChanges()
Catch ex As Exception
MsgBox(ex.Message)
Finally
Frame.GetController(Of Validation.PersistenceValidationController).Active.SetItemValue("", True)
End Try
End Sub
Private Sub aMergeHRPerson_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aMergeHRPerson.Execute
Try
Frame.GetController(Of Validation.PersistenceValidationController).Active.SetItemValue("", False)
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
Dim _Object As Object
Dim _HRPerson As HRPerson
Dim _HRPersonActive As HRPerson
For Each _HRPerson In View.SelectedObjects
_HRPersonActive = _onew.FindObject(Of HRPerson)(CriteriaOperator.Parse("User.UserName=?", _HRPerson.User.UserName))
If _HRPersonActive IsNot Nothing Then
RaiseEvent InitWork(1, 1, _onew.Session.CollectReferencingObjects(_onew.GetObjectByKey(Of HRPerson)(_HRPerson.Oid)).Count)
For Each _Object In _onew.Session.CollectReferencingObjects(_onew.GetObjectByKey(Of HRPerson)(_HRPerson.Oid))
RaiseEvent DoWork()
Try
For Each _PropertyInfo As PropertyInfo In _Object.GetType.GetProperties
If _PropertyInfo.PropertyType.Name = "HRPerson" Then
_PropertyInfo.SetValue(_Object, _onew.GetObjectByKey(Of HRPerson)(_HRPersonActive.Oid), Nothing)
End If
Next
Catch ex As Exception
Throw New Exception(ex.Message)
End Try
Next
RaiseEvent FinalWork
End If
Next
_onew.CommitChanges()
Catch ex As Exception
MsgBox(ex.Message)
Finally
Frame.GetController(Of Validation.PersistenceValidationController).Active.SetItemValue("", True)
End Try
End Sub
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()> _
<NavigationItem(False)> _
<CreatableItem(False)> _
<NonPersistent()> _
Public Class HRPErsonTask_ViewList_PopUp
Inherits BaseObject
Private _IDName As String
Private _IDCaption As String
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
End Sub
Property IDName As String
Get
Return _IDName
End Get
Set(value As String)
SetPropertyValue("IDName", _IDName, value)
End Set
End Property
Property IDCaption As String
Get
Return _IDCaption
End Get
Set(value As String)
SetPropertyValue("IDCaption", _IDCaption, value)
End Set
End Property
End Class