First create solution
This commit is contained in:
@@ -0,0 +1,112 @@
|
||||
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
|
||||
Public Enum eAlertType
|
||||
eNormal = 0 'Normál
|
||||
eDaily = 1 'Naponta
|
||||
eWeekly = 2 'Hetente
|
||||
eMonthly = 3 'Havonta
|
||||
eOnLoggedOn = 4 'Bejelentkezéskor
|
||||
eOnLoggingOff = 5 'Kijelentkezéskor
|
||||
End Enum
|
||||
<DefaultClassOptions(), NavigationItem(False), CreatableItem(False), DefaultProperty("DisplayName")> _
|
||||
<Appearance("AlertPeriod - Hide properties without DisplayName, when AlartType=0 ", AppearanceItemType:="ViewItem", criteria:="AlertType=0", targetitems:="AlertPeriodDaily;AlertPeriodWeekly;AlertPeriodMonthly", visibility:=Editors.ViewItemVisibility.Hide)> _
|
||||
<Appearance("AlertPeriod - Hide AlertPeriodWeekly;AlertPeriodMonthly;DateDayBefore;PeriodHour;PeriodMinute, when AlartType=1 ", AppearanceItemType:="ViewItem", criteria:="AlertType=1", targetitems:="AlertPeriodWeekly;AlertPeriodMonthly;DateDayBefore;PeriodHour;PeriodMinute", visibility:=Editors.ViewItemVisibility.Hide)> _
|
||||
<Appearance("AlertPeriod - Hide AlertPeriodDaily;AlertPeriodMonthly;DateDayBefore;PeriodHour;PeriodMinute, when AlartType=2 ", AppearanceItemType:="ViewItem", criteria:="AlertType=2", targetitems:="AlertPeriodDaily;AlertPeriodMonthly;DateDayBefore;PeriodHour;PeriodMinute", visibility:=Editors.ViewItemVisibility.Hide)> _
|
||||
<Appearance("AlertPeriod - Hide AlertPeriodDaily;AlertPeriodWeekly;DateDayBefore;PeriodHour;PeriodMinute, when AlartType=3 ", AppearanceItemType:="ViewItem", criteria:="AlertType=3", targetitems:="AlertPeriodDaily;AlertPeriodWeekly;DateDayBefore;PeriodHour;PeriodMinute", visibility:=Editors.ViewItemVisibility.Hide)> _
|
||||
<Appearance("AlertPeriod - Hide XPCollections and properties, when AlartType in(4,5)", AppearanceItemType:="ViewItem", criteria:="AlertType in (4,5)", targetitems:="AlertPeriodDaily;AlertPeriodWeekly;AlertPeriodMonthly,DateDayBefore;PeriodHour;PeriodMinute", visibility:=Editors.ViewItemVisibility.Hide)> _
|
||||
Public Class AlertPeriod
|
||||
Inherits BaseObject
|
||||
Private _AlertType As eAlertType = eAlertType.eNormal
|
||||
Private _DateDayBefore As Long = 1 '? nappal elõtte (a Task DueDate - DateDayBefore !)
|
||||
Private _PeriodHour As Long = 1 '? óránként
|
||||
Private _PeriodMinute As Long = 0 '? percenként
|
||||
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
End Sub
|
||||
|
||||
<ImmediatePostData()> _
|
||||
Property AlertType As eAlertType
|
||||
Get
|
||||
Return _AlertType
|
||||
End Get
|
||||
Set(value As eAlertType)
|
||||
SetPropertyValue("AlertType", _AlertType, value)
|
||||
End Set
|
||||
End Property
|
||||
Property DateDayBefore As Long
|
||||
Get
|
||||
Return _DateDayBefore
|
||||
End Get
|
||||
Set(value As Long)
|
||||
SetPropertyValue("DateDayBefore", _DateDayBefore, value)
|
||||
End Set
|
||||
End Property
|
||||
Property PeriodHour As Long
|
||||
Get
|
||||
Return _PeriodHour
|
||||
End Get
|
||||
Set(value As Long)
|
||||
SetPropertyValue("PeriodHour", _PeriodHour, value)
|
||||
End Set
|
||||
End Property
|
||||
Property PeriodMinute As Long
|
||||
Get
|
||||
Return _PeriodMinute
|
||||
End Get
|
||||
Set(value As Long)
|
||||
SetPropertyValue("PeriodMinute", _PeriodMinute, value)
|
||||
End Set
|
||||
End Property
|
||||
ReadOnly Property DisplayName As String
|
||||
Get
|
||||
Dim _Message As String = ""
|
||||
Select Case AlertType
|
||||
Case eAlertType.eNormal
|
||||
_Message = String.Format("Határidõ elõtt {0} nappal, {1} óra és {2} percenként", _DateDayBefore, PeriodHour, PeriodMinute)
|
||||
Case eAlertType.eDaily
|
||||
_Message = String.Format("Naponta")
|
||||
Case eAlertType.eWeekly
|
||||
_Message = String.Format("Hetente")
|
||||
Case eAlertType.eMonthly
|
||||
_Message = String.Format("Havonta")
|
||||
Case eAlertType.eOnLoggedOn
|
||||
_Message = String.Format("Bejelentkezéskor")
|
||||
Case eAlertType.eOnLoggingOff
|
||||
_Message = String.Format("Kijelentkezéskor")
|
||||
End Select
|
||||
|
||||
Return _Message
|
||||
End Get
|
||||
End Property
|
||||
<Association("AlertPeriod-AlertPeriodDaily", GetType(AlertPeriodDaily)), VisibleInListView(False), VisibleInLookupListView(False)> _
|
||||
ReadOnly Property AlertPeriodDaily As XPCollection(Of AlertPeriodDaily)
|
||||
Get
|
||||
Return GetCollection(Of AlertPeriodDaily)("AlertPeriodDaily")
|
||||
End Get
|
||||
End Property
|
||||
<Association("AlertPeriod-AlertPeriodWeekly", GetType(AlertPeriodWeekly)), VisibleInListView(False), VisibleInLookupListView(False)> _
|
||||
ReadOnly Property AlertPeriodWeekly As XPCollection(Of AlertPeriodWeekly)
|
||||
Get
|
||||
Return GetCollection(Of AlertPeriodWeekly)("AlertPeriodWeekly")
|
||||
End Get
|
||||
End Property
|
||||
<Association("AlertPeriod-AlertPeriodMonthly", GetType(AlertPeriodMonthly)), VisibleInListView(False), VisibleInLookupListView(False)> _
|
||||
ReadOnly Property AlertPeriodMonthly As XPCollection(Of AlertPeriodMonthly)
|
||||
Get
|
||||
Return GetCollection(Of AlertPeriodMonthly)("AlertPeriodMonthly")
|
||||
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)> _
|
||||
Public Class AlertPeriodDaily
|
||||
Inherits BaseObject
|
||||
|
||||
Private _AlertPeriod As AlertPeriod
|
||||
Private _AlertTime As DateTime
|
||||
Private _AlertHoure As Long
|
||||
Private _AlertMinute As Long
|
||||
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
End Sub
|
||||
|
||||
<Association("AlertPeriod-AlertPeriodDaily", GetType(AlertPeriod))> _
|
||||
Property AlertPeriod As AlertPeriod
|
||||
Get
|
||||
Return _AlertPeriod
|
||||
End Get
|
||||
Set(value As AlertPeriod)
|
||||
SetPropertyValue("AlertPeriod", _AlertPeriod, value)
|
||||
End Set
|
||||
End Property
|
||||
Property AlertTime As DateTime
|
||||
Get
|
||||
Return _AlertTime
|
||||
End Get
|
||||
Set(value As DateTime)
|
||||
SetPropertyValue("AlertTime", _AlertTime, value)
|
||||
End Set
|
||||
End Property
|
||||
<RuleRange("AlertPeriodDaily.AlertHoure", DefaultContexts.Save, 0, 23)> _
|
||||
Property AlertHoure As Long
|
||||
Get
|
||||
Return _AlertHoure
|
||||
End Get
|
||||
Set(value As Long)
|
||||
SetPropertyValue("AlertHoure", _AlertHoure, value)
|
||||
End Set
|
||||
End Property
|
||||
<RuleRange("AlertPeriodDaily.AlertMinute", DefaultContexts.Save, 0, 59)> _
|
||||
Property AlertMinute As Long
|
||||
Get
|
||||
Return _AlertMinute
|
||||
End Get
|
||||
Set(value As Long)
|
||||
SetPropertyValue("AlertMinute", _AlertMinute, value)
|
||||
End Set
|
||||
End Property
|
||||
ReadOnly Property DisplayName As String
|
||||
Get
|
||||
Return String.Format("{0} óra {1} perckor", AlertHoure, AlertMinute)
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
@@ -0,0 +1,77 @@
|
||||
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 AlertPeriodMonthly
|
||||
Inherits BaseObject
|
||||
|
||||
Private _AlertPeriod As AlertPeriod
|
||||
Private _DayOfMonth As eDayOfMonth
|
||||
Private _AlertTime As DateTime
|
||||
Private _AlertHoure As Long
|
||||
Private _AlertMinute As Long
|
||||
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
End Sub
|
||||
|
||||
<Association("AlertPeriod-AlertPeriodMonthly", GetType(AlertPeriod))> _
|
||||
Property AlertPeriod As AlertPeriod
|
||||
Get
|
||||
Return _AlertPeriod
|
||||
End Get
|
||||
Set(value As AlertPeriod)
|
||||
SetPropertyValue("AlertPeriod", _AlertPeriod, value)
|
||||
End Set
|
||||
End Property
|
||||
Property DayOfMonth As eDayOfMonth
|
||||
Get
|
||||
Return _DayOfMonth
|
||||
End Get
|
||||
Set(value As eDayOfMonth)
|
||||
SetPropertyValue("DayOfMonth", _DayOfMonth, value)
|
||||
End Set
|
||||
End Property
|
||||
Property AlertTime As DateTime
|
||||
Get
|
||||
Return _AlertTime
|
||||
End Get
|
||||
Set(value As DateTime)
|
||||
SetPropertyValue("AlertTime", _AlertTime, value)
|
||||
End Set
|
||||
End Property
|
||||
<RuleRange("AlertPeriodMonthly.AlertHoure", DefaultContexts.Save, 0, 23)> _
|
||||
Property AlertHoure As Long
|
||||
Get
|
||||
Return _AlertHoure
|
||||
End Get
|
||||
Set(value As Long)
|
||||
SetPropertyValue("AlertHoure", _AlertHoure, value)
|
||||
End Set
|
||||
End Property
|
||||
<RuleRange("AlertPeriodMonthly.AlertMinute", DefaultContexts.Save, 0, 59)> _
|
||||
Property AlertMinute As Long
|
||||
Get
|
||||
Return _AlertMinute
|
||||
End Get
|
||||
Set(value As Long)
|
||||
SetPropertyValue("AlertMinute", _AlertMinute, value)
|
||||
End Set
|
||||
End Property
|
||||
ReadOnly Property DisplayName As String
|
||||
Get
|
||||
Return String.Format("Minden hónap {0} napján, {1} óra {2} perckor", DayOfMonth, AlertHoure, AlertMinute)
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
@@ -0,0 +1,78 @@
|
||||
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 AlertPeriodWeekly
|
||||
Inherits BaseObject
|
||||
|
||||
Private _AlertPeriod As AlertPeriod
|
||||
Private _DayOfWeek As eDayOfWeek
|
||||
Private _AlertTime As DateTime
|
||||
Private _AlertHoure As Long
|
||||
Private _AlertMinute As Long
|
||||
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
End Sub
|
||||
|
||||
<Association("AlertPeriod-AlertPeriodWeekly", GetType(AlertPeriod))> _
|
||||
Property AlertPeriod As AlertPeriod
|
||||
Get
|
||||
Return _AlertPeriod
|
||||
End Get
|
||||
Set(value As AlertPeriod)
|
||||
SetPropertyValue("AlertPeriod", _AlertPeriod, value)
|
||||
End Set
|
||||
End Property
|
||||
Property DayOfWeek As eDayOfWeek
|
||||
Get
|
||||
Return _DayOfWeek
|
||||
End Get
|
||||
Set(value As eDayOfWeek)
|
||||
SetPropertyValue("DayOfWeek", _DayOfWeek, value)
|
||||
End Set
|
||||
End Property
|
||||
Property AlertTime As DateTime
|
||||
Get
|
||||
Return _AlertTime
|
||||
End Get
|
||||
Set(value As DateTime)
|
||||
SetPropertyValue("AlertTime", _AlertTime, value)
|
||||
End Set
|
||||
End Property
|
||||
<RuleRange("AlertPeriodWeekly.AlertHoure", DefaultContexts.Save, 0, 23)> _
|
||||
Property AlertHoure As Long
|
||||
Get
|
||||
Return _AlertHoure
|
||||
End Get
|
||||
Set(value As Long)
|
||||
SetPropertyValue("AlertHoure", _AlertHoure, value)
|
||||
End Set
|
||||
End Property
|
||||
<RuleRange("AlertPeriodWeekly.AlertMinute", DefaultContexts.Save, 0, 59)> _
|
||||
Property AlertMinute As Long
|
||||
Get
|
||||
Return _AlertMinute
|
||||
End Get
|
||||
Set(value As Long)
|
||||
SetPropertyValue("AlertMinute", _AlertMinute, value)
|
||||
End Set
|
||||
End Property
|
||||
ReadOnly Property DisplayName As String
|
||||
Get
|
||||
Return String.Format("{0} napon, {1} óra {2} perckor", DayOfWeek, AlertHoure, AlertMinute)
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
Imports System
|
||||
Imports System.ComponentModel
|
||||
|
||||
Imports DevExpress.Xpo
|
||||
Imports DevExpress.Data.Filtering
|
||||
|
||||
Imports DevExpress.ExpressApp
|
||||
Imports DevExpress.Persistent.Base
|
||||
Imports DevExpress.Persistent.BaseImpl
|
||||
Imports DevExpress.Persistent.Validation
|
||||
|
||||
<DefaultClassOptions()> _
|
||||
<NavigationItem(False)> _
|
||||
<CreatableItem(False)> _
|
||||
Public Class CarMarks
|
||||
Inherits BaseObject
|
||||
Private _ShortName As String
|
||||
Private _ObjectCreated As Date
|
||||
Private _UserCreated As User
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
' This constructor is used when an object is loaded from a persistent storage.
|
||||
' Do not place any code here or place it only when the IsLoading property is false:
|
||||
' if (!IsLoading){
|
||||
' It is now OK to place your initialization code here.
|
||||
' }
|
||||
' or as an alternative, move your initialization code into the AfterConstruction method.
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
' Place here your initialization code.
|
||||
End Sub
|
||||
|
||||
<Size(255)> _
|
||||
Property ShortName As String
|
||||
Get
|
||||
Return _ShortName
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("ShortName", _ShortName, value)
|
||||
End Set
|
||||
End Property
|
||||
<NonCloneable> _
|
||||
Property ObjectCreated As Date
|
||||
Get
|
||||
Return _ObjectCreated
|
||||
End Get
|
||||
Set(value As Date)
|
||||
SetPropertyValue("ObjectCreated", _ObjectCreated, value)
|
||||
End Set
|
||||
End Property
|
||||
<NonCloneable> _
|
||||
Property UserCreated As User
|
||||
Get
|
||||
Return _UserCreated
|
||||
End Get
|
||||
Set(value As User)
|
||||
SetPropertyValue("UserCreated", _UserCreated, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,80 @@
|
||||
Imports System
|
||||
Imports System.ComponentModel
|
||||
|
||||
Imports DevExpress.Xpo
|
||||
Imports DevExpress.Data.Filtering
|
||||
|
||||
Imports DevExpress.ExpressApp
|
||||
Imports DevExpress.Persistent.Base
|
||||
Imports DevExpress.Persistent.BaseImpl
|
||||
Imports DevExpress.Persistent.Validation
|
||||
Imports DevExpress.ExpressApp.ConditionalAppearance
|
||||
|
||||
<DefaultClassOptions()> _
|
||||
<NavigationItem(False)> _
|
||||
<CreatableItem(False)> _
|
||||
<Appearance("Disable CarTypes - ObjectCreated", AppearanceItemType.ViewItem, "1=1", TargetItems:="ObjectCreated", Enabled:=False)> _
|
||||
<Appearance("Disable CarTypes - UserCreated", AppearanceItemType.ViewItem, "1=1", TargetItems:="UserCreated", Enabled:=False)> _
|
||||
Public Class CarTypes
|
||||
Inherits BaseObject
|
||||
Private _CarMarks As CarMarks
|
||||
Private _ShortName As String
|
||||
Private _ObjectCreated As Date
|
||||
Private _UserCreated As User
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
' This constructor is used when an object is loaded from a persistent storage.
|
||||
' Do not place any code here or place it only when the IsLoading property is false:
|
||||
' if (!IsLoading){
|
||||
' It is now OK to place your initialization code here.
|
||||
' }
|
||||
' or as an alternative, move your initialization code into the AfterConstruction method.
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
' Place here your initialization code.
|
||||
End Sub
|
||||
Protected Overrides Sub OnSaving()
|
||||
MyBase.OnSaving()
|
||||
If Session.IsNewObject(Me) Then
|
||||
ObjectCreated = GetSQLTime(Session)
|
||||
UserCreated = Session.GetObjectByKey(Of User)(Session.GetKeyValue(SecuritySystem.CurrentUser))
|
||||
End If
|
||||
End Sub
|
||||
Property CarMarks As CarMarks
|
||||
Get
|
||||
Return _CarMarks
|
||||
End Get
|
||||
Set(value As CarMarks)
|
||||
SetPropertyValue("CarMarks", _CarMarks, value)
|
||||
End Set
|
||||
End Property
|
||||
<Size(255)> _
|
||||
Property ShortName As String
|
||||
Get
|
||||
Return _ShortName
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("ShortName", _ShortName, value)
|
||||
End Set
|
||||
End Property
|
||||
<NonCloneable> _
|
||||
Property ObjectCreated As Date
|
||||
Get
|
||||
Return _ObjectCreated
|
||||
End Get
|
||||
Set(value As Date)
|
||||
SetPropertyValue("ObjectCreated", _ObjectCreated, value)
|
||||
End Set
|
||||
End Property
|
||||
<NonCloneable> _
|
||||
Property UserCreated As User
|
||||
Get
|
||||
Return _UserCreated
|
||||
End Get
|
||||
Set(value As User)
|
||||
SetPropertyValue("UserCreated", _UserCreated, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,157 @@
|
||||
Imports System
|
||||
Imports System.ComponentModel
|
||||
|
||||
Imports DevExpress.Xpo
|
||||
Imports DevExpress.Data.Filtering
|
||||
|
||||
Imports DevExpress.ExpressApp
|
||||
Imports DevExpress.Persistent.Base
|
||||
Imports DevExpress.Persistent.BaseImpl
|
||||
Imports DevExpress.Persistent.Validation
|
||||
Imports DevExpress.ExpressApp.ConditionalAppearance
|
||||
|
||||
<DefaultClassOptions()> _
|
||||
<NavigationItem(False)> _
|
||||
<CreatableItem(False)> _
|
||||
<Appearance("Disable Cars - UniqueObjects", AppearanceItemType.ViewItem, "1=1", TargetItems:="UniqueObjects", Enabled:=False)> _
|
||||
<Appearance("Disable Cars - ObjectCreated", AppearanceItemType.ViewItem, "1=1", TargetItems:="ObjectCreated", Enabled:=False)> _
|
||||
<Appearance("Disable Cars - UserCreated", AppearanceItemType.ViewItem, "1=1", TargetItems:="UserCreated", Enabled:=False)> _
|
||||
Public Class Cars
|
||||
Inherits BaseObject
|
||||
|
||||
Private _VIN As String 'Alvázszám
|
||||
Private _MotorNumber As String 'Motorszám
|
||||
Private _CarMarks As CarMarks 'Autó márka
|
||||
Private _CarTypes As CarTypes 'Autó tipusa
|
||||
Private _LicensePlateNumber As String 'Forgalmi rendszám
|
||||
Private _DateFirstOnRoad As Date 'Elsõ forgalombahelyezés
|
||||
|
||||
Private _ObjectCreated As Date
|
||||
Private _UserCreated As User
|
||||
|
||||
Private _UniqueObjects As UniqueObjects
|
||||
Private _GLReport As GLReport
|
||||
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Protected Overrides Sub OnSaving()
|
||||
MyBase.OnSaving()
|
||||
If Session.IsNewObject(Me) Then
|
||||
ObjectCreated = GetSQLTime(Session)
|
||||
UserCreated = Session.GetObjectByKey(Of User)(Session.GetKeyValue(SecuritySystem.CurrentUser))
|
||||
UniqueObjects = New UniqueObjects(Session)
|
||||
UniqueObjects.Name = LicensePlateNumber
|
||||
UniqueObjects.Cars = Me
|
||||
UniqueObjects.Save()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
End Sub
|
||||
|
||||
<Size(255)> _
|
||||
Property VIN As String
|
||||
Get
|
||||
Return _VIN
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("VIN", _VIN, value)
|
||||
End Set
|
||||
End Property
|
||||
<Size(255)> _
|
||||
Property MotorNumber As String
|
||||
Get
|
||||
Return _MotorNumber
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("MotorNumber", _MotorNumber, value)
|
||||
End Set
|
||||
End Property
|
||||
Property CarMarks As CarMarks
|
||||
Get
|
||||
Return _CarMarks
|
||||
End Get
|
||||
Set(value As CarMarks)
|
||||
SetPropertyValue("CarMarks", _CarMarks, value)
|
||||
End Set
|
||||
End Property
|
||||
<ImmediatePostData(True), DataSourceCriteria("CarMarks='@This.CarMarks'")>
|
||||
Property CarTypes As CarTypes
|
||||
Get
|
||||
Return _CarTypes
|
||||
End Get
|
||||
Set(value As CarTypes)
|
||||
SetPropertyValue("CarTypes", _CarTypes, value)
|
||||
End Set
|
||||
End Property
|
||||
<RuleRequiredField("Car - LicensePlateNumber", DefaultContexts.Save)> _
|
||||
<RuleUniqueValue("Car.LicensePlateNumber.RuleUniqueValue", DefaultContexts.Save, CriteriaEvaluationBehavior:=PersistentCriteriaEvaluationBehavior.BeforeTransaction)> _
|
||||
Property LicensePlateNumber As String
|
||||
Get
|
||||
Return _LicensePlateNumber
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("LicensePlateNumber", _LicensePlateNumber, value)
|
||||
End Set
|
||||
End Property
|
||||
Property DateFirstOnRoad As Date
|
||||
Get
|
||||
Return _DateFirstOnRoad
|
||||
End Get
|
||||
Set(value As Date)
|
||||
SetPropertyValue("DateFirstOnRoad", _DateFirstOnRoad, value.Date)
|
||||
End Set
|
||||
End Property
|
||||
<NonCloneable> _
|
||||
Property ObjectCreated As Date
|
||||
Get
|
||||
Return _ObjectCreated
|
||||
End Get
|
||||
Set(value As Date)
|
||||
SetPropertyValue("ObjectCreated", _ObjectCreated, value)
|
||||
End Set
|
||||
End Property
|
||||
<NonCloneable> _
|
||||
Property UserCreated As User
|
||||
Get
|
||||
Return _UserCreated
|
||||
End Get
|
||||
Set(value As User)
|
||||
SetPropertyValue("UserCreated", _UserCreated, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property UniqueObjects As UniqueObjects
|
||||
Get
|
||||
Return _UniqueObjects
|
||||
End Get
|
||||
Set(value As UniqueObjects)
|
||||
SetPropertyValue("UniqueObjects", _UniqueObjects, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
<ImmediatePostData(True)> _
|
||||
Property GLReport As GLReport
|
||||
Get
|
||||
Return _GLReport
|
||||
End Get
|
||||
Set(value As GLReport)
|
||||
SetPropertyValue("GLReport", _GLReport, value)
|
||||
End Set
|
||||
End Property
|
||||
<VisibleInListView(False), VisibleInLookupListView(False)> _
|
||||
ReadOnly Property GLReportRows As XPCollection(Of GLReportRows)
|
||||
Get
|
||||
Dim _GLReportRows_Collection As XPCollection(Of GLReportRows)
|
||||
If Me.GLReport IsNot Nothing Then
|
||||
_GLReportRows_Collection = New XPCollection(Of GLReportRows)(Session, CriteriaOperator.Parse("GLReport.Oid=? and UniqueObjects.Oid=?", Me.GLReport.Oid, Me.UniqueObjects.Oid))
|
||||
Return _GLReportRows_Collection
|
||||
Else
|
||||
Return Nothing
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,514 @@
|
||||
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 System.Drawing
|
||||
Imports DevExpress.ExpressApp.Utils
|
||||
Public Enum eFullNameOrder
|
||||
eFirstNameLastName = 0
|
||||
eLastNameFirstName = 1
|
||||
End Enum
|
||||
<DefaultClassOptions()> _
|
||||
<NavigationItem("Customers"), DefaultProperty("DisplayName")> _
|
||||
Public Class Contacts
|
||||
Inherits Person
|
||||
Private _ContactNumber As String = ""
|
||||
Private _Customers As Customers
|
||||
Private _User As User
|
||||
Private _ContactsNG As ContactsNG
|
||||
Private _CRM_Leads As CRM_Leads
|
||||
Private _AccountName As String
|
||||
Private _ImportedID As Long
|
||||
Private _Position As String
|
||||
Private _IsOutlookSync As Boolean ' Van-e Outlook szinkronizáció
|
||||
Private _IsExchangeSync As Boolean 'Van-e Excahnge szinkronizáció
|
||||
Private _EntryID_Outlook As String
|
||||
Private _ContactItemFolderEntryID_Outlook As String
|
||||
Private _EntryID_Exchange As String
|
||||
|
||||
Private _BusinessTelephoneNumber As String
|
||||
Private _BusinessFaxNumber As String
|
||||
Private _HomeFaxNumber As String
|
||||
Private _HomeTelephoneNumber As String
|
||||
Private _MobileTelephoneNumber As String
|
||||
|
||||
Private _IsChristmasCard As Boolean = False
|
||||
Private _Title As String 'Titulus
|
||||
Private _FullNameOrder As eFullNameOrder = eFullNameOrder.eLastNameFirstName
|
||||
Private _Description As String
|
||||
Private _EMailPrivate As String 'Privát e-mail címe
|
||||
Private _EMail2 As String
|
||||
Private _EMail3 As String
|
||||
|
||||
Private _Checked As Boolean = False
|
||||
Private _CheckedDate As DateTime
|
||||
Private _CheckStatus As String
|
||||
|
||||
Private _CropProtectionRegistrationNumber As String 'Növényvédelmi regisztrációs szám (kamarai szám, igazolvány adat)
|
||||
Private _ChambersRegistrationNumber As String 'Kamarai nyilvántartási szám
|
||||
Private _ChamberNumber As String 'Kamarai tagsági szám
|
||||
Private _IsAssetsHandlingResponsible As Boolean
|
||||
Private _IsInvoiceResponsible As Boolean
|
||||
Private _PrivateVATNumber As String 'Adóazonosító jele
|
||||
Private _MotherName As String 'Anyja neve
|
||||
Private _BirthPlace As String 'Születési város
|
||||
Private _TAJNumber As String 'Társadalom biztosítási szám
|
||||
|
||||
Private _IdentityCardNumber As String 'Személyi igazolvány száma
|
||||
Private _IdentityNumber As String 'Személyi igazolvány száma
|
||||
|
||||
|
||||
'<RuleUniqueValue("Contact-Email", DefaultContexts.Save)> _
|
||||
Overloads Property Email As String
|
||||
Get
|
||||
Return MyBase.Email
|
||||
End Get
|
||||
Set(value As String)
|
||||
MyBase.Email = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
ContactsNG = Session.FindObject(Of ContactsNG)(1, CriteriaOperator.Parse("Oid=Oid"))
|
||||
IsOutlookSync = False
|
||||
IsExchangeSync = False
|
||||
IsAssetsHandlingResponsible = True
|
||||
IsInvoiceResponsible = False
|
||||
End Sub
|
||||
Protected Overrides Sub OnSaving()
|
||||
MyBase.OnSaving()
|
||||
If _ContactsNG Is Nothing Then
|
||||
Else
|
||||
If _ContactNumber = "" Then
|
||||
If Session.IsNewObject(Me) = True Then
|
||||
_ContactNumber = _ContactsNG.NumberGenerator.GetNewNumber(_ContactsNG.NumberGenerator)
|
||||
End If
|
||||
Else
|
||||
End If
|
||||
End If
|
||||
If Checked = True Then
|
||||
CheckedDate = GetSQLTime(Session)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
<NonCloneable()> _
|
||||
Property ContactNumber As String
|
||||
Get
|
||||
Return _ContactNumber
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
SetPropertyValue("ContactNumber", _ContactNumber, value)
|
||||
End Set
|
||||
End Property
|
||||
<Association("Contacts", GetType(Customers))> _
|
||||
Property Customers As Customers
|
||||
Get
|
||||
Return _Customers
|
||||
End Get
|
||||
Set(ByVal value As Customers)
|
||||
SetPropertyValue("Customers", _Customers, value)
|
||||
End Set
|
||||
End Property
|
||||
<NonCloneable()> _
|
||||
Property User() As User
|
||||
Get
|
||||
Return _User
|
||||
End Get
|
||||
Set(ByVal value As User)
|
||||
SetPropertyValue("User", _User, value)
|
||||
End Set
|
||||
End Property
|
||||
<RuleRequiredField("Contacts-ContactsNG", DefaultContexts.Save)> _
|
||||
<VisibleInDetailView(False)> _
|
||||
<VisibleInListView(False)> _
|
||||
<VisibleInLookupListView(False)> _
|
||||
Property ContactsNG As ContactsNG
|
||||
Get
|
||||
If _ContactsNG Is Nothing Then
|
||||
If (Not IsSaving) AndAlso (Not IsLoading) Then
|
||||
_ContactsNG = Session.FindObject(Of ContactsNG)(1, CriteriaOperator.Parse("Oid=Oid"))
|
||||
End If
|
||||
End If
|
||||
Return _ContactsNG
|
||||
End Get
|
||||
Set(ByVal value As ContactsNG)
|
||||
SetPropertyValue("ContactsNG", _ContactsNG, value)
|
||||
End Set
|
||||
End Property
|
||||
<Browsable(False)> _
|
||||
<NonCloneable()> _
|
||||
Property CRM_Leads As CRM_Leads
|
||||
Get
|
||||
Return _CRM_Leads
|
||||
End Get
|
||||
Set(value As CRM_Leads)
|
||||
SetPropertyValue("CRM_Leads", _CRM_Leads, value)
|
||||
End Set
|
||||
End Property
|
||||
<Browsable(False)> _
|
||||
<Size(255)> _
|
||||
Property AccountName As String
|
||||
Get
|
||||
Return _AccountName
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("AccountName", _AccountName, value)
|
||||
End Set
|
||||
End Property
|
||||
<Browsable(False)>
|
||||
Property ImportedID As Long
|
||||
Get
|
||||
Return _ImportedID
|
||||
End Get
|
||||
Set(value As Long)
|
||||
SetPropertyValue("ImportedID", _ImportedID, value)
|
||||
End Set
|
||||
End Property
|
||||
Property Position As String
|
||||
Get
|
||||
Return _Position
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("Position", _Position, value)
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsOutlookSync() As Boolean
|
||||
Get
|
||||
Return _IsOutlookSync
|
||||
End Get
|
||||
Set(ByVal value As Boolean)
|
||||
SetPropertyValue("IsOutlookSync", _IsOutlookSync, value)
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsExchangeSync() As Boolean
|
||||
Get
|
||||
Return _IsExchangeSync
|
||||
End Get
|
||||
Set(ByVal value As Boolean)
|
||||
SetPropertyValue("IsExchangeSync", _IsExchangeSync, value)
|
||||
End Set
|
||||
End Property
|
||||
<Size(-1)> _
|
||||
Public Property EntryIDOutlook() As String
|
||||
Get
|
||||
Return _EntryID_Outlook
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
SetPropertyValue("EntryIDOutlook", _EntryID_Outlook, value)
|
||||
End Set
|
||||
End Property
|
||||
<Size(-1)> _
|
||||
Property ContactItemFolderEntryID_Outlook As String
|
||||
Get
|
||||
Return _ContactItemFolderEntryID_Outlook
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("ContactItemFolderEntryID_Outlook", _ContactItemFolderEntryID_Outlook, value)
|
||||
End Set
|
||||
End Property
|
||||
<Size(-1)> _
|
||||
Public Property EntryIDExchange() As String
|
||||
Get
|
||||
Return _EntryID_Exchange
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
SetPropertyValue("EntryIDExchange", _EntryID_Exchange, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
<Size(255)> _
|
||||
Property BusinessTelephoneNumber As String
|
||||
Get
|
||||
Return _BusinessTelephoneNumber
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("BusinessTelephoneNumber", _BusinessTelephoneNumber, value)
|
||||
End Set
|
||||
End Property
|
||||
<Size(255)> _
|
||||
Property BusinessFaxNumber As String
|
||||
Get
|
||||
Return _BusinessFaxNumber
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("BusinessFaxNumber", _BusinessFaxNumber, value)
|
||||
End Set
|
||||
End Property
|
||||
<Size(255)> _
|
||||
Property HomeFaxNumber As String
|
||||
Get
|
||||
Return _HomeFaxNumber
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("HomeFaxNumber", _HomeFaxNumber, value)
|
||||
End Set
|
||||
End Property
|
||||
<Size(255)> _
|
||||
Property HomeTelephoneNumber As String
|
||||
Get
|
||||
Return _HomeTelephoneNumber
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("HomeTelephoneNumber", _HomeTelephoneNumber, value)
|
||||
End Set
|
||||
End Property
|
||||
<Size(255)> _
|
||||
Property MobileTelephoneNumber As String
|
||||
Get
|
||||
Return _MobileTelephoneNumber
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("MobileTelephoneNumber", _MobileTelephoneNumber, value)
|
||||
End Set
|
||||
End Property
|
||||
<Size(-1)> _
|
||||
Property Description As String
|
||||
Get
|
||||
Return _Description
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("Description", _Description, value)
|
||||
End Set
|
||||
End Property
|
||||
Property IsChristmasCard As Boolean
|
||||
Get
|
||||
Return _IsChristmasCard
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
SetPropertyValue("IsChristmasCard", _IsChristmasCard, value)
|
||||
End Set
|
||||
End Property
|
||||
Property Title As String
|
||||
Get
|
||||
Return _Title
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("Title", _Title, value)
|
||||
End Set
|
||||
End Property
|
||||
Property FullNameOrder As eFullNameOrder
|
||||
Get
|
||||
Return _FullNameOrder
|
||||
End Get
|
||||
Set(value As eFullNameOrder)
|
||||
SetPropertyValue("FullNameOrder", _FullNameOrder, value)
|
||||
End Set
|
||||
End Property
|
||||
<Size(255)> _
|
||||
Property EMailPrivate As String
|
||||
Get
|
||||
Return _EMailPrivate
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("EMailPrivate", _EMailPrivate, value)
|
||||
End Set
|
||||
End Property
|
||||
<Size(255)> _
|
||||
Property EMail2 As String
|
||||
Get
|
||||
Return _EMail2
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("EMail2", _EMail2, value)
|
||||
End Set
|
||||
End Property
|
||||
<Size(255)> _
|
||||
Property EMail3 As String
|
||||
Get
|
||||
Return _EMail3
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("EMail3", _EMail3, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
<ImmediatePostData> _
|
||||
Property Checked As Boolean
|
||||
Get
|
||||
Return _Checked
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
SetPropertyValue("Checked", _Checked, value)
|
||||
End Set
|
||||
End Property
|
||||
Property CheckStatus As String
|
||||
Get
|
||||
Return _CheckStatus
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("CheckStatus", _CheckStatus, value)
|
||||
End Set
|
||||
End Property
|
||||
Property CheckedDate As Date
|
||||
Get
|
||||
Return _CheckedDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
SetPropertyValue("CheckedDate", _CheckedDate, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property CropProtectionRegistrationNumber As String
|
||||
Get
|
||||
Return _CropProtectionRegistrationNumber
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("CropProtectionRegistrationNumber", _CropProtectionRegistrationNumber, value)
|
||||
End Set
|
||||
End Property
|
||||
Property ChambersRegistrationNumber As String
|
||||
Get
|
||||
Return _ChambersRegistrationNumber
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("ChambersRegistrationNumber", _ChambersRegistrationNumber, value)
|
||||
End Set
|
||||
End Property
|
||||
Property ChamberNumber As String
|
||||
Get
|
||||
Return _ChamberNumber
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("ChamberNumber", _ChamberNumber, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
<Size(255)> _
|
||||
Property IsAssetsHandlingResponsible As Boolean
|
||||
Get
|
||||
Return _IsAssetsHandlingResponsible
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
SetPropertyValue("IsAssetsHandlingResponsible", _IsAssetsHandlingResponsible, value)
|
||||
End Set
|
||||
End Property
|
||||
Property IsInvoiceResponsible As Boolean
|
||||
Get
|
||||
Return _IsInvoiceResponsible
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
SetPropertyValue("IsInvoiceResponsible", _IsInvoiceResponsible, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property PrivateVATNumber() As String
|
||||
Get
|
||||
Return _PrivateVATNumber
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
SetPropertyValue("PrivateVATNumber", _PrivateVATNumber, value)
|
||||
End Set
|
||||
End Property
|
||||
Property MotherName As String
|
||||
Get
|
||||
Return _MotherName
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("MotherName", _MotherName, value)
|
||||
End Set
|
||||
End Property
|
||||
Property BirthPlace As String
|
||||
Get
|
||||
Return _BirthPlace
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("BirthPlace", _BirthPlace, value)
|
||||
End Set
|
||||
End Property
|
||||
Property TAJNumber As String
|
||||
Get
|
||||
Return _TAJNumber
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("TAJNumber", _TAJNumber, value)
|
||||
End Set
|
||||
End Property
|
||||
Property IdentityCardNumber As String
|
||||
Get
|
||||
Return _IdentityCardNumber
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("IdentityCardNumber", _IdentityCardNumber, value)
|
||||
End Set
|
||||
End Property
|
||||
Property IdentityNumber As String
|
||||
Get
|
||||
Return _IdentityNumber
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("IdentityNumber", _IdentityNumber, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'-----------ReadOnly---------------------
|
||||
Overloads ReadOnly Property DisplayName As String
|
||||
Get
|
||||
If Me.FullNameOrder = eFullNameOrder.eFirstNameLastName Then
|
||||
Return String.Format("{0} {1} {2} {3} {4}", Me.Title, Me.FirstName, Me.LastName, Me.MobileTelephoneNumber, Me.Email)
|
||||
Else
|
||||
Return String.Format("{0} {1} {2} {3} {4}", Me.LastName, Me.FirstName, Me.Title, Me.MobileTelephoneNumber, Me.Email)
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property DisplayNamePostal As String
|
||||
Get
|
||||
If Me.FullNameOrder = eFullNameOrder.eFirstNameLastName Then
|
||||
Return String.Format("{0} {1} {2}", Me.Title, Me.FirstName, Me.LastName)
|
||||
Else
|
||||
Return String.Format("{0} {1} {2}", Me.LastName, Me.FirstName, Me.Title)
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property SysncTypeImage As Image
|
||||
Get
|
||||
Dim _ReturnImage As Image = Nothing
|
||||
If IsOutlookSync And Not IsExchangeSync Then _ReturnImage = ImageLoader.Instance.GetImageInfo("Outlook2010").Image
|
||||
If IsExchangeSync And Not IsOutlookSync Then _ReturnImage = ImageLoader.Instance.GetImageInfo("mail_exchange").Image
|
||||
If Not IsOutlookSync And Not IsExchangeSync Then _ReturnImage = ImageLoader.Instance.GetImageInfo("NoImage").Image
|
||||
If IsExchangeSync And IsExchangeSync Then _ReturnImage = ImageLoader.Instance.GetImageInfo("selection_recycle").Image
|
||||
|
||||
Return _ReturnImage
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'--------------------XPCollections-----------------
|
||||
<VisibleInListView(False)> _
|
||||
ReadOnly Property CRM_Opportunities As XPCollection(Of CRM_Opportunities)
|
||||
Get
|
||||
If Session.IsObjectsLoading = False And Session.IsObjectsSaving = False Then
|
||||
Return New XPCollection(Of CRM_Opportunities)(Session, CriteriaOperator.Parse("Contacts.Oid=?", Me.Oid))
|
||||
Else
|
||||
Return Nothing
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
<VisibleInListView(False)> _
|
||||
ReadOnly Property CRM_Leads_Activity As XPCollection(Of CRM_Leads_Activity)
|
||||
Get
|
||||
If Session.IsObjectsLoading = False And Session.IsObjectsSaving = False Then
|
||||
If Me.CRM_Leads IsNot Nothing Then
|
||||
Return New XPCollection(Of CRM_Leads_Activity)(Session, CriteriaOperator.Parse("CRM_Leads.Oid=?", Me.CRM_Leads.Oid))
|
||||
Else
|
||||
Return Nothing
|
||||
End If
|
||||
Else
|
||||
Return Nothing
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
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("Customers")> _
|
||||
Public Class ContactsNG
|
||||
Inherits BaseObject
|
||||
Private _ShortName As String
|
||||
Private _NumberGenerator As NumberGenerator
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Property ShortName As String
|
||||
Get
|
||||
Return _ShortName
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
SetPropertyValue("ShortName", _ShortName, value)
|
||||
End Set
|
||||
End Property
|
||||
Property NumberGenerator As NumberGenerator
|
||||
Get
|
||||
Return _NumberGenerator
|
||||
End Get
|
||||
Set(ByVal value As NumberGenerator)
|
||||
SetPropertyValue("NumberGenerator", _NumberGenerator, value)
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
+105
@@ -0,0 +1,105 @@
|
||||
Partial Class ContactsVC
|
||||
|
||||
<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.aCreateActivityContacts = New DevExpress.ExpressApp.Actions.SimpleAction()
|
||||
Me.aContacts_ChangeGroup = New DevExpress.ExpressApp.Actions.PopupWindowShowAction()
|
||||
Me.aCreateEmailSendQueue = New DevExpress.ExpressApp.Actions.PopupWindowShowAction()
|
||||
Me.aContactEmailToClipboard = New DevExpress.ExpressApp.Actions.SimpleAction()
|
||||
Me.aClearClipboard = New DevExpress.ExpressApp.Actions.SimpleAction()
|
||||
'
|
||||
'aCreateActivityContacts
|
||||
'
|
||||
Me.aCreateActivityContacts.Caption = "Create Activity Contacts"
|
||||
Me.aCreateActivityContacts.ConfirmationMessage = Nothing
|
||||
Me.aCreateActivityContacts.Id = "aCreateActivityContacts"
|
||||
Me.aCreateActivityContacts.TargetViewId = "Contacts_CRM_Leads_Activity_ListView"
|
||||
Me.aCreateActivityContacts.ToolTip = Nothing
|
||||
'
|
||||
'aContacts_ChangeGroup
|
||||
'
|
||||
Me.aContacts_ChangeGroup.AcceptButtonCaption = Nothing
|
||||
Me.aContacts_ChangeGroup.CancelButtonCaption = Nothing
|
||||
Me.aContacts_ChangeGroup.Caption = "aContacts_ChangeGroup"
|
||||
Me.aContacts_ChangeGroup.Category = ""
|
||||
Me.aContacts_ChangeGroup.ConfirmationMessage = Nothing
|
||||
Me.aContacts_ChangeGroup.Id = "aContacts_ChangeGroup"
|
||||
Me.aContacts_ChangeGroup.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireMultipleObjects
|
||||
Me.aContacts_ChangeGroup.TargetObjectType = GetType(Nuvolar.[Module].Contacts)
|
||||
Me.aContacts_ChangeGroup.ToolTip = Nothing
|
||||
'
|
||||
'aCreateEmailSendQueue
|
||||
'
|
||||
Me.aCreateEmailSendQueue.AcceptButtonCaption = Nothing
|
||||
Me.aCreateEmailSendQueue.CancelButtonCaption = Nothing
|
||||
Me.aCreateEmailSendQueue.Caption = "aCreateEmailSendQueue"
|
||||
Me.aCreateEmailSendQueue.ConfirmationMessage = Nothing
|
||||
Me.aCreateEmailSendQueue.Id = "aCreateEmailSendQueue"
|
||||
Me.aCreateEmailSendQueue.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireMultipleObjects
|
||||
Me.aCreateEmailSendQueue.TargetObjectType = GetType(Nuvolar.[Module].Contacts)
|
||||
Me.aCreateEmailSendQueue.TargetViewType = DevExpress.ExpressApp.ViewType.ListView
|
||||
Me.aCreateEmailSendQueue.ToolTip = Nothing
|
||||
Me.aCreateEmailSendQueue.TypeOfView = GetType(DevExpress.ExpressApp.ListView)
|
||||
'
|
||||
'aContactEmailToClipboard
|
||||
'
|
||||
Me.aContactEmailToClipboard.Caption = "aContact Email To Clipboard"
|
||||
Me.aContactEmailToClipboard.ConfirmationMessage = Nothing
|
||||
Me.aContactEmailToClipboard.Id = "aContactEmailToClipboard"
|
||||
Me.aContactEmailToClipboard.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireMultipleObjects
|
||||
Me.aContactEmailToClipboard.TargetObjectType = GetType(Nuvolar.[Module].Contacts)
|
||||
Me.aContactEmailToClipboard.TargetViewType = DevExpress.ExpressApp.ViewType.ListView
|
||||
Me.aContactEmailToClipboard.ToolTip = Nothing
|
||||
Me.aContactEmailToClipboard.TypeOfView = GetType(DevExpress.ExpressApp.ListView)
|
||||
'
|
||||
'aClearClipboard
|
||||
'
|
||||
Me.aClearClipboard.Caption = "aClear Clipboard"
|
||||
Me.aClearClipboard.ConfirmationMessage = Nothing
|
||||
Me.aClearClipboard.Id = "aClearClipboard"
|
||||
Me.aClearClipboard.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireMultipleObjects
|
||||
Me.aClearClipboard.TargetObjectType = GetType(Nuvolar.[Module].Contacts)
|
||||
Me.aClearClipboard.TargetViewType = DevExpress.ExpressApp.ViewType.ListView
|
||||
Me.aClearClipboard.ToolTip = Nothing
|
||||
Me.aClearClipboard.TypeOfView = GetType(DevExpress.ExpressApp.ListView)
|
||||
'
|
||||
'ContactsVC
|
||||
'
|
||||
Me.Actions.Add(Me.aCreateActivityContacts)
|
||||
Me.Actions.Add(Me.aContacts_ChangeGroup)
|
||||
Me.Actions.Add(Me.aCreateEmailSendQueue)
|
||||
Me.Actions.Add(Me.aContactEmailToClipboard)
|
||||
Me.Actions.Add(Me.aClearClipboard)
|
||||
|
||||
End Sub
|
||||
Friend WithEvents aCreateActivityContacts As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aContacts_ChangeGroup As DevExpress.ExpressApp.Actions.PopupWindowShowAction
|
||||
Friend WithEvents aCreateEmailSendQueue As DevExpress.ExpressApp.Actions.PopupWindowShowAction
|
||||
Friend WithEvents aContactEmailToClipboard As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aClearClipboard As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,138 @@
|
||||
<?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="aCreateActivityContacts.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 56</value>
|
||||
</metadata>
|
||||
<metadata name="aContacts_ChangeGroup.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 134</value>
|
||||
</metadata>
|
||||
<metadata name="aCreateEmailSendQueue.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 95</value>
|
||||
</metadata>
|
||||
<metadata name="aContactEmailToClipboard.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>384, 56</value>
|
||||
</metadata>
|
||||
<metadata name="aClearClipboard.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>203, 134</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,284 @@
|
||||
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.Data.Filtering
|
||||
Imports DevExpress.Persistent.BaseImpl
|
||||
|
||||
Imports System.Linq
|
||||
Imports System.Reflection
|
||||
Imports DevExpress.ExpressApp.Utils
|
||||
|
||||
Public Class ContactsVC
|
||||
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()
|
||||
|
||||
Protected Overrides Sub OnActivated()
|
||||
MyBase.OnActivated()
|
||||
If View.Id = "Contact_EmailSendQueue_PopUp_HTMLMailTemplate_ListView" Then
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.NewObjectViewController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.DeleteObjectsViewController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.LinkUnlinkController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of DevExpress.ExpressApp.CloneObject.CloneObjectViewController).Active.SetItemValue("", False)
|
||||
End If
|
||||
End Sub
|
||||
Protected Overrides Sub OnDeactivated()
|
||||
MyBase.OnDeactivated()
|
||||
If View.Id = "Contact_EmailSendQueue_PopUp_HTMLMailTemplate_ListView" Then
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.NewObjectViewController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.DeleteObjectsViewController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.LinkUnlinkController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of DevExpress.ExpressApp.CloneObject.CloneObjectViewController).Active.SetItemValue("", True)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
|
||||
'This call is required by the Component Designer.
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub aCreateActivityContacts_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aCreateActivityContacts.Execute
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _ListView As ListView = TryCast(View, ListView)
|
||||
Dim _PropertyCollectionSource As PropertyCollectionSource = TryCast(_ListView.CollectionSource, PropertyCollectionSource)
|
||||
Dim _Contacts As Contacts = TryCast(_PropertyCollectionSource.MasterObject, Contacts)
|
||||
Dim _CRM_Leads As CRM_Leads = _Contacts.CRM_Leads
|
||||
Dim _CRM_Leads_Activity As CRM_Leads_Activity = _onew.CreateObject(Of CRM_Leads_Activity)()
|
||||
|
||||
Dim currentUser As User = _ocur.GetObjectByKey(Of User)(_ocur.GetKeyValue(SecuritySystem.CurrentUser))
|
||||
Frame.GetController(Of DevExpress.ExpressApp.Validation.PersistenceValidationController)().Active.SetItemValue("", False)
|
||||
|
||||
If _CRM_Leads Is Nothing Then
|
||||
_CRM_Leads = _ocur.CreateObject(Of CRM_Leads)()
|
||||
_CRM_Leads.Contacts = _Contacts
|
||||
_CRM_Leads.FirstName = _Contacts.FirstName
|
||||
_CRM_Leads.LastName = _Contacts.LastName
|
||||
_CRM_Leads.HRPerson = _ocur.FindObject(Of HRPerson)(CriteriaOperator.Parse("User=?", currentUser))
|
||||
_CRM_Leads.CRM_FirstMeet = _ocur.FindObject(Of CRM_FirstMeet)(CriteriaOperator.Parse("DefaultforBusiness=True"))
|
||||
_CRM_Leads.LeadStatus = eLeadStatus.Qualified
|
||||
End If
|
||||
_Contacts.CRM_Leads = _CRM_Leads
|
||||
_ocur.CommitChanges()
|
||||
|
||||
If _CRM_Leads IsNot Nothing Then
|
||||
_CRM_Leads_Activity.CRM_Leads = _onew.GetObject(_CRM_Leads)
|
||||
_CRM_Leads_Activity.HRPerson = _onew.GetObject(_CRM_Leads.HRPerson)
|
||||
End If
|
||||
|
||||
Frame.GetController(Of DevExpress.ExpressApp.Validation.PersistenceValidationController)().Active.SetItemValue("", True)
|
||||
|
||||
e.ShowViewParameters.CreatedView = Application.CreateDetailView(_onew, "CRM_Leads_Activity_DetailView", True, _CRM_Leads_Activity)
|
||||
End Sub
|
||||
Private Sub aContacts_ChangeGroup_CustomizePopupWindowParams(sender As Object, e As DevExpress.ExpressApp.Actions.CustomizePopupWindowParamsEventArgs) Handles aContacts_ChangeGroup.CustomizePopupWindowParams
|
||||
Try
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _Contacts_ChangeGroup_PopUp As Contacts_ChangeGroup_PopUp = _onew.CreateObject(Of Contacts_ChangeGroup_PopUp)()
|
||||
e.View = Application.CreateDetailView(_onew, "Contacts_ChangeGroup_PopUp_DetailView", True, _Contacts_ChangeGroup_PopUp)
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, String.Format(CaptionHelper.GetLocalizedText("Exceptions\NuvolarExceptions", "MsgBoxCheckItAgain")))
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub aContacts_ChangeGroup_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.PopupWindowShowActionExecuteEventArgs) Handles aContacts_ChangeGroup.Execute
|
||||
Try
|
||||
Dim _ocur As Xpo.XPObjectSpace = View.ObjectSpace
|
||||
Dim _Contacts_ChangeGroup_PopUp As Contacts_ChangeGroup_PopUp = TryCast(e.PopupWindow.View.SelectedObjects(0), Contacts_ChangeGroup_PopUp)
|
||||
|
||||
RaiseEvent InitWork(1, 1, View.SelectedObjects.Count)
|
||||
|
||||
For Each _Contacts As Contacts In View.SelectedObjects
|
||||
RaiseEvent DoWork()
|
||||
If _Contacts_ChangeGroup_PopUp.ChangeIsOutlookSync Then
|
||||
_Contacts.IsOutlookSync = _Contacts_ChangeGroup_PopUp.IsOutlookSync
|
||||
End If
|
||||
If _Contacts_ChangeGroup_PopUp.ChangeIsExchangeSync Then
|
||||
_Contacts.IsExchangeSync = _Contacts_ChangeGroup_PopUp.IsExchangeSync
|
||||
End If
|
||||
If _Contacts_ChangeGroup_PopUp.ReOrderFirstNameLastName Then
|
||||
Dim _FirstName As String = _Contacts.LastName
|
||||
Dim _LastName As String = _Contacts.FirstName
|
||||
_Contacts.FirstName = _FirstName
|
||||
_Contacts.LastName = _LastName
|
||||
End If
|
||||
If _Contacts_ChangeGroup_PopUp.Change_FullNameOrder Then
|
||||
_Contacts.FullNameOrder = _Contacts_ChangeGroup_PopUp.FullNameOrder
|
||||
End If
|
||||
If _Contacts_ChangeGroup_PopUp.Change_Title Then
|
||||
_Contacts.Title = _Contacts_ChangeGroup_PopUp.Title
|
||||
End If
|
||||
Next
|
||||
_ocur.CommitChanges()
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, String.Format(CaptionHelper.GetLocalizedText("Exceptions\NuvolarExceptions", "MsgBoxCheckItAgain")))
|
||||
Finally
|
||||
RaiseEvent FinalWork()
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub aCreateEmailSendQueue_CustomizePopupWindowParams(sender As Object, e As CustomizePopupWindowParamsEventArgs) Handles aCreateEmailSendQueue.CustomizePopupWindowParams
|
||||
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _Contact_EmailSendQueue_PopUp As Contact_EmailSendQueue_PopUp = _onew.CreateObject(Of Contact_EmailSendQueue_PopUp)()
|
||||
e.View = Application.CreateDetailView(_onew, "Contact_EmailSendQueue_PopUp_DetailView", True, _Contact_EmailSendQueue_PopUp)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub aCreateEmailSendQueue_Execute(sender As Object, e As PopupWindowShowActionExecuteEventArgs) Handles aCreateEmailSendQueue.Execute
|
||||
|
||||
Try
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _Contact_EmailSendQueue_PopUp As Contact_EmailSendQueue_PopUp = _onew.GetObject(TryCast(e.PopupWindow.View.SelectedObjects(0), Contact_EmailSendQueue_PopUp))
|
||||
Dim _ListPropertyEditor As Editors.ListPropertyEditor = TryCast(e.PopupWindow.View, DetailView).FindItem("HTMLMailTemplate")
|
||||
Dim _HTMLMailTemplate As HTMLMailTemplate = _ListPropertyEditor.ListView.SelectedObjects(0)
|
||||
If _HTMLMailTemplate Is Nothing Then Throw New Exception("*Nincs kiválasztva a sablon!")
|
||||
|
||||
Dim _EMailSendQueueHeader As New EMailSendQueueHeader(_onew.Session)
|
||||
With _EMailSendQueueHeader
|
||||
.ShortName = _HTMLMailTemplate.ShortName
|
||||
.EmailSendQueueParameters = _onew.GetObject(Of EMailSendQueueParameters)(_Contact_EmailSendQueue_PopUp.EMailSendQueueParameters)
|
||||
End With
|
||||
|
||||
|
||||
Dim _ArrayList_Char As New ArrayList
|
||||
If _HTMLMailTemplate.HTMLBody Is Nothing Then Throw New Exception("*A HTML törzs üres!")
|
||||
Dim _StringBuilder As New StringBuilder
|
||||
Dim _TagBuilding As Boolean = False
|
||||
For Each _char As Char In _HTMLMailTemplate.HTMLBody
|
||||
Select Case _char
|
||||
Case "{"c
|
||||
_TagBuilding = True
|
||||
_StringBuilder.Append(_char)
|
||||
Case "}"c
|
||||
_TagBuilding = False
|
||||
_StringBuilder.Append(_char)
|
||||
_ArrayList_Char.Add(_StringBuilder.ToString)
|
||||
_StringBuilder.Clear()
|
||||
Case Else
|
||||
If _TagBuilding Then
|
||||
_StringBuilder.Append(_char)
|
||||
End If
|
||||
End Select
|
||||
Next
|
||||
_StringBuilder.Clear()
|
||||
|
||||
For Each _Contacts As Contacts In View.SelectedObjects
|
||||
Dim _EMailSendQueueRows As New EMailSendQueueRows(_onew.Session)
|
||||
With _EMailSendQueueRows
|
||||
.EMailSendQueueHeader = _EMailSendQueueHeader
|
||||
.EMailTo = _Contacts.Email
|
||||
.EMailFrom = TryCast(_onew.FindObject(Of WebParameters)(CriteriaOperator.Parse("1=1")), WebParameters).Email_SupportAdmin
|
||||
_EMailSendQueueRows.HTMLBody = _HTMLMailTemplate.HTMLBody
|
||||
|
||||
For Each _PropertyInfo As PropertyInfo In _Contacts.GetType.GetProperties
|
||||
If _ArrayList_Char.Contains("{" + _PropertyInfo.Name + "}") Then
|
||||
If _PropertyInfo.GetValue(_Contacts, Nothing) IsNot Nothing Then
|
||||
.HTMLBody = .HTMLBody.Replace("{" + _PropertyInfo.Name + "}", (_PropertyInfo.GetValue(_Contacts, Nothing)).ToString)
|
||||
Else
|
||||
.HTMLBody = .HTMLBody.Replace("{" + _PropertyInfo.Name + "}", " ")
|
||||
End If
|
||||
|
||||
End If
|
||||
Next
|
||||
.Subject = _HTMLMailTemplate.ShortName
|
||||
|
||||
If _Contact_EmailSendQueue_PopUp.FileAttachments1 IsNot Nothing Then
|
||||
Dim FileData As FileData = TryCast(_Contact_EmailSendQueue_PopUp.FileAttachments1, FileData)
|
||||
Dim _FileLocation1 As String = String.Empty
|
||||
_FileLocation1 = SaveOtherFile(FileData)
|
||||
.FileAttachments1 = LoadOtherFile(_FileLocation1, New FileData(_onew.Session))
|
||||
End If
|
||||
|
||||
If _Contact_EmailSendQueue_PopUp.FileAttachments2 IsNot Nothing Then
|
||||
Dim FileData As FileData = TryCast(_Contact_EmailSendQueue_PopUp.FileAttachments2, FileData)
|
||||
Dim _FileLocation2 As String = String.Empty
|
||||
_FileLocation2 = SaveOtherFile(FileData)
|
||||
.FileAttachments2 = LoadOtherFile(_FileLocation2, New FileData(_onew.Session))
|
||||
End If
|
||||
If _Contact_EmailSendQueue_PopUp.FileAttachments3 IsNot Nothing Then
|
||||
Dim FileData As FileData = TryCast(_Contact_EmailSendQueue_PopUp.FileAttachments3, FileData)
|
||||
Dim _FileLocation3 As String = String.Empty
|
||||
_FileLocation3 = SaveOtherFile(FileData)
|
||||
.FileAttachments3 = LoadOtherFile(_FileLocation3, New FileData(_onew.Session))
|
||||
End If
|
||||
|
||||
End With
|
||||
Next
|
||||
_onew.CommitChanges()
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, String.Format(CaptionHelper.GetLocalizedText("Exceptions\NuvolarExceptions", "MsgBoxCheckItAgain")))
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
Private Function SaveOtherFile(ByRef _FileData As FileData) As String
|
||||
Dim _FileName As String = System.IO.Path.Combine(System.IO.Path.GetTempPath(), System.IO.Path.GetTempPath, _FileData.FileName)
|
||||
Dim _StreamFile As System.IO.Stream = New System.IO.FileStream(_FileName, System.IO.FileMode.Create, System.IO.FileAccess.Write)
|
||||
_FileData.SaveToStream(_StreamFile)
|
||||
_StreamFile.Close()
|
||||
|
||||
Return _FileName
|
||||
|
||||
End Function
|
||||
Private Function LoadOtherFile(ByVal _ActFile As String, _FileData As FileData) As FileData
|
||||
Dim _StreamFile = New System.IO.FileStream(_ActFile, System.IO.FileMode.Open, System.IO.FileAccess.Read)
|
||||
Dim _StreamReader As New System.IO.StreamReader(_StreamFile)
|
||||
_StreamFile.Seek(0, System.IO.SeekOrigin.Begin)
|
||||
|
||||
_FileData.LoadFromStream(_ActFile, _StreamFile)
|
||||
_FileData.FileName = System.IO.Path.GetFileName(_ActFile)
|
||||
_StreamReader.Close()
|
||||
_StreamFile.Close()
|
||||
|
||||
Return _FileData
|
||||
|
||||
End Function
|
||||
|
||||
'Dim _HTMLMailTemplate_CollectionSource As New CollectionSource(_onew, GetType(HTMLMailTemplate))
|
||||
'_HTMLMailTemplate_CollectionSource.BeginUpdateCriteria()
|
||||
'_HTMLMailTemplate_CollectionSource.Criteria.Clear()
|
||||
'_HTMLMailTemplate_CollectionSource.Criteria.Add("HTMLMailTemplateState", CriteriaOperator.Parse("HTMLMailTemplateState=1"))
|
||||
'_HTMLMailTemplate_CollectionSource.EndUpdateCriteria()
|
||||
'e.View = Application.CreateListView("HTMLMailTemplate_ListView", _HTMLMailTemplate_CollectionSource, True)
|
||||
|
||||
|
||||
'Private Function SaveOtherFile(ByRef _IntoFile As String, _fileData As FileData) As FileData
|
||||
' Dim _FileName As String = System.IO.Path.Combine(System.IO.Path.GetTempPath(), System.IO.Path.GetTempPath, _IntoFile)
|
||||
' Dim _StreamFile As System.IO.Stream = New System.IO.FileStream(_FileName, System.IO.FileMode.Create, System.IO.FileAccess.Write)
|
||||
' _fileData.SaveToStream(_StreamFile)
|
||||
' _StreamFile.Close()
|
||||
|
||||
' Return _fileData
|
||||
'End Function
|
||||
|
||||
Private Sub aContactEmailToClipboard_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aContactEmailToClipboard.Execute
|
||||
Dim _ClipboardText As String = ""
|
||||
If Windows.Forms.Clipboard.ContainsText(System.Windows.Forms.TextDataFormat.Text) Then
|
||||
_ClipboardText = Windows.Forms.Clipboard.GetText(Windows.Forms.TextDataFormat.Text)
|
||||
End If
|
||||
For Each _Contacts As Contacts In View.SelectedObjects
|
||||
If _ClipboardText = "" Then
|
||||
_ClipboardText += _Contacts.Email
|
||||
Else
|
||||
_ClipboardText += ";" + _Contacts.Email
|
||||
End If
|
||||
Next
|
||||
Windows.Forms.Clipboard.SetText(_ClipboardText, Windows.Forms.TextDataFormat.UnicodeText)
|
||||
End Sub
|
||||
|
||||
Private Sub aClearClipboard_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aClearClipboard.Execute
|
||||
Windows.Forms.Clipboard.Clear()
|
||||
End Sub
|
||||
End Class
|
||||
+74
@@ -0,0 +1,74 @@
|
||||
Imports System
|
||||
Imports System.ComponentModel
|
||||
|
||||
Imports DevExpress.Xpo
|
||||
Imports DevExpress.Data.Filtering
|
||||
|
||||
Imports DevExpress.ExpressApp
|
||||
Imports DevExpress.Persistent.Base
|
||||
Imports DevExpress.Persistent.BaseImpl
|
||||
Imports DevExpress.Persistent.Validation
|
||||
|
||||
<DefaultClassOptions()> _
|
||||
<NonPersistent()> _
|
||||
<CreatableItem(False)> _
|
||||
<NavigationItem(False)> _
|
||||
Public Class Contact_EmailSendQueue_PopUp
|
||||
Inherits BaseObject
|
||||
|
||||
Private _EMailSendQueueParameters As EMailSendQueueParameters
|
||||
Private _FileAttachments1 As FileData
|
||||
Private _FileAttachments2 As FileData
|
||||
Private _FileAttachments3 As FileData
|
||||
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
|
||||
End Sub
|
||||
|
||||
Property EMailSendQueueParameters As EMailSendQueueParameters
|
||||
Get
|
||||
Return _EMailSendQueueParameters
|
||||
End Get
|
||||
Set(value As EMailSendQueueParameters)
|
||||
SetPropertyValue("EMailSendQueueParameters", _EMailSendQueueParameters, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property FileAttachments1 As FileData
|
||||
Get
|
||||
Return _FileAttachments1
|
||||
End Get
|
||||
Set(value As FileData)
|
||||
SetPropertyValue("FileAttachments1", _FileAttachments1, value)
|
||||
End Set
|
||||
End Property
|
||||
Property FileAttachments2 As FileData
|
||||
Get
|
||||
Return _FileAttachments2
|
||||
End Get
|
||||
Set(value As FileData)
|
||||
SetPropertyValue("FileAttachments2", _FileAttachments2, value)
|
||||
End Set
|
||||
End Property
|
||||
Property FileAttachments3 As FileData
|
||||
Get
|
||||
Return _FileAttachments3
|
||||
End Get
|
||||
Set(value As FileData)
|
||||
SetPropertyValue("FileAttachments3", _FileAttachments3, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
ReadOnly Property HTMLMailTemplate As XPCollection(Of HTMLMailTemplate)
|
||||
Get
|
||||
|
||||
Dim _HTMLMailTemplate_Collection As New XPCollection(Of HTMLMailTemplate)(Session, CriteriaOperator.Parse("HTMLMailTemplateState=1"))
|
||||
Return _HTMLMailTemplate_Collection
|
||||
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
+108
@@ -0,0 +1,108 @@
|
||||
Imports System
|
||||
Imports System.ComponentModel
|
||||
|
||||
Imports DevExpress.Xpo
|
||||
Imports DevExpress.Data.Filtering
|
||||
|
||||
Imports DevExpress.ExpressApp
|
||||
Imports DevExpress.Persistent.Base
|
||||
Imports DevExpress.Persistent.BaseImpl
|
||||
Imports DevExpress.Persistent.Validation
|
||||
|
||||
<DefaultClassOptions()> _
|
||||
<NonPersistent()> _
|
||||
<CreatableItem(False)> _
|
||||
<NavigationItem(False)> _
|
||||
Public Class Contacts_ChangeGroup_PopUp
|
||||
Inherits BaseObject
|
||||
|
||||
Private _Change_IsOutlookSync As Boolean
|
||||
Private _IsOutlookSync As Boolean
|
||||
Private _Change_IsExchangeSync As Boolean
|
||||
Private _IsExchangeSync As Boolean
|
||||
Private _ReOrderFirstNameLastName As Boolean
|
||||
Private _Change_FullNameOrder As Boolean
|
||||
Private _FullNameOrder As eFullNameOrder
|
||||
Private _Change_Title As Boolean
|
||||
Private _Title As String
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
End Sub
|
||||
|
||||
|
||||
Public Property ChangeIsOutlookSync() As Boolean
|
||||
Get
|
||||
Return _Change_IsOutlookSync
|
||||
End Get
|
||||
Set(ByVal value As Boolean)
|
||||
SetPropertyValue("ChangeIsOutlookSync", _Change_IsOutlookSync, value)
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsOutlookSync() As Boolean
|
||||
Get
|
||||
Return _IsOutlookSync
|
||||
End Get
|
||||
Set(ByVal value As Boolean)
|
||||
SetPropertyValue("IsOutlookSync", _IsOutlookSync, value)
|
||||
End Set
|
||||
End Property
|
||||
Public Property ChangeIsExchangeSync() As Boolean
|
||||
Get
|
||||
Return _Change_IsExchangeSync
|
||||
End Get
|
||||
Set(ByVal value As Boolean)
|
||||
SetPropertyValue("ChangeIsExchangeSync", _Change_IsExchangeSync, value)
|
||||
End Set
|
||||
End Property
|
||||
Public Property IsExchangeSync() As Boolean
|
||||
Get
|
||||
Return _IsExchangeSync
|
||||
End Get
|
||||
Set(ByVal value As Boolean)
|
||||
SetPropertyValue("IsExchangeSync", _IsExchangeSync, value)
|
||||
End Set
|
||||
End Property
|
||||
Public Property ReOrderFirstNameLastName As Boolean
|
||||
Get
|
||||
Return _ReOrderFirstNameLastName
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
SetPropertyValue("ReOrderFirstNameLastName", _ReOrderFirstNameLastName, value)
|
||||
End Set
|
||||
End Property
|
||||
Public Property Change_FullNameOrder As Boolean
|
||||
Get
|
||||
Return _Change_FullNameOrder
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
SetPropertyValue("Change_FullNameOrder", _Change_FullNameOrder, value)
|
||||
End Set
|
||||
End Property
|
||||
Public Property FullNameOrder As eFullNameOrder
|
||||
Get
|
||||
Return _FullNameOrder
|
||||
End Get
|
||||
Set(value As eFullNameOrder)
|
||||
SetPropertyValue("FullNameOrder", _FullNameOrder, value)
|
||||
End Set
|
||||
End Property
|
||||
Public Property Change_Title As Boolean
|
||||
Get
|
||||
Return _Change_Title
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
SetPropertyValue("Change_Title", _Change_Title, value)
|
||||
End Set
|
||||
End Property
|
||||
Public Property Title As String
|
||||
Get
|
||||
Return _Title
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("Title", _Title, value)
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
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)> _
|
||||
<DeferredDeletion(False)> _
|
||||
Public Class Contacts_OutlookFolderContact
|
||||
Inherits BaseObject
|
||||
|
||||
Private _EntryID As String
|
||||
Private _FolderName As String
|
||||
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
End Sub
|
||||
|
||||
<ImmediatePostData()> _
|
||||
Public Property EntryID() As String
|
||||
Get
|
||||
Return _EntryID
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
SetPropertyValue("EntryID", _EntryID, value)
|
||||
End Set
|
||||
End Property
|
||||
<ImmediatePostData()> _
|
||||
Public Property FolderName() As String
|
||||
Get
|
||||
Return _FolderName
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
SetPropertyValue("FolderName", _FolderName, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
End Class
|
||||
+160
@@ -0,0 +1,160 @@
|
||||
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 Microsoft.Office.Interop.Outlook
|
||||
Imports Microsoft.Office.Interop
|
||||
|
||||
Public Enum eOverWriteDataType
|
||||
OverWriteOutlookData = 1
|
||||
OverWriteNuvolarData = 2
|
||||
End Enum
|
||||
Public Enum eSyscType
|
||||
eNormalSysnc = 1
|
||||
eFirstSync = 2
|
||||
End Enum
|
||||
'
|
||||
<DefaultClassOptions()> _
|
||||
<NonPersistent()> _
|
||||
<CreatableItem(False)> _
|
||||
<NavigationItem(False)> _
|
||||
<Appearance("Contacts_SysncOutlook - Hide OverWriteDataType, when SyscType=2 AND IsFromOutlook=False", AppearanceItemType:="ViewItem", criteria:="SyscType=2 AND IsFromOutlook=False", targetitems:="OverWriteDataType", visibility:=Editors.ViewItemVisibility.Hide)> _
|
||||
<Appearance("Contacts_SysncOutlook - Hide Contacts_OutlookFolderContact, when SyscType=1", AppearanceItemType:="ViewItem", criteria:="SyscType=1", targetitems:="Contacts_OutlookFolderContact", visibility:=Editors.ViewItemVisibility.Hide)> _
|
||||
<Appearance("Contacts_SysncOutlook - Hide IsFromOutlook all time", AppearanceItemType:="ViewItem", criteria:="1=1", targetitems:="IsFromOutlook", visibility:=Editors.ViewItemVisibility.Hide)> _
|
||||
<Appearance("Contacts_SysncOutlook - Hide SyscType, when IsFromOutlook=True", AppearanceItemType:="ViewItem", criteria:="IsFromOutlook=True", targetitems:="SyscType", visibility:=Editors.ViewItemVisibility.Hide)> _
|
||||
Public Class Contacts_SysncOutlook
|
||||
Inherits BaseObject
|
||||
|
||||
Private _OverWriteDataType As eOverWriteDataType
|
||||
Private _SyscType As eSyscType
|
||||
Private _Contacts_OutlookFolderContact As Contacts_OutlookFolderContact
|
||||
Private _IsFromOutlook As Boolean
|
||||
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
OverWriteDataType = eOverWriteDataType.OverWriteOutlookData
|
||||
SyscType = eSyscType.eNormalSysnc
|
||||
IsFromOutlook = False
|
||||
End Sub
|
||||
|
||||
Property OverWriteDataType As eOverWriteDataType
|
||||
Get
|
||||
Return _OverWriteDataType
|
||||
End Get
|
||||
Set(value As eOverWriteDataType)
|
||||
SetPropertyValue("OverWriteDataType", _OverWriteDataType, value)
|
||||
|
||||
End Set
|
||||
End Property
|
||||
<ImmediatePostData()> _
|
||||
Property SyscType As eSyscType
|
||||
Get
|
||||
Return _SyscType
|
||||
End Get
|
||||
Set(value As eSyscType)
|
||||
SetPropertyValue("SyscType", _SyscType, value)
|
||||
End Set
|
||||
End Property
|
||||
<ImmediatePostData(True), DataSourceProperty("Contacts_OutlookFolderContactCollection")>
|
||||
Property Contacts_OutlookFolderContact As Contacts_OutlookFolderContact
|
||||
Get
|
||||
Return _Contacts_OutlookFolderContact
|
||||
End Get
|
||||
Set(ByVal value As Contacts_OutlookFolderContact)
|
||||
SetPropertyValue("OutlookContactsFolder", _Contacts_OutlookFolderContact, value)
|
||||
End Set
|
||||
End Property
|
||||
Property IsFromOutlook As Boolean
|
||||
Get
|
||||
Return _IsFromOutlook
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
SetPropertyValue("IsFromOutlook", _IsFromOutlook, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'------------ReadOnly---------------------
|
||||
Private ReadOnly Property Contacts_OutlookFolderContactCollection As XPCollection(Of Contacts_OutlookFolderContact)
|
||||
Get
|
||||
Dim _Contacts_DeleteFolderContacts As New XPCollection(Of Contacts_OutlookFolderContact)(Session)
|
||||
Session.Delete(_Contacts_DeleteFolderContacts)
|
||||
|
||||
|
||||
Dim _Contacts_OutlookFolderContact As New XPCollection(Of Contacts_OutlookFolderContact)(Session)
|
||||
|
||||
Dim _OutlookApp As New Outlook.Application()
|
||||
Dim _OutlookNameSpace As Outlook.NameSpace = _OutlookApp.GetNamespace("MAPI")
|
||||
_OutlookNameSpace.Logon(, , False, True)
|
||||
Dim _ContactFolder As MAPIFolder = _OutlookApp.ActiveExplorer.Session.GetDefaultFolder(OlDefaultFolders.olFolderContacts)
|
||||
'Dim _FolderSuggestedContacts As MAPIFolder = _OutlookApp.ActiveExplorer.Session.GetDefaultFolder(OlDefaultFolders.olFolderSuggestedContacts)
|
||||
|
||||
If _ContactFolder IsNot Nothing Then
|
||||
Dim _DefMap As New Contacts_OutlookFolderContact(Session)
|
||||
_DefMap.EntryID = _ContactFolder.EntryID
|
||||
_DefMap.FolderName = _ContactFolder.Name
|
||||
_Contacts_OutlookFolderContact.Add(_DefMap)
|
||||
|
||||
For Each _FoldersName As MAPIFolder In _ContactFolder.Folders
|
||||
OutlookFolderNames(_FoldersName, _Contacts_OutlookFolderContact)
|
||||
Next
|
||||
End If
|
||||
|
||||
|
||||
'If _FolderSuggestedContacts IsNot Nothing Then
|
||||
' Dim _DefMapSuggested As New Contacts_OutlookFolderContact(Session)
|
||||
' _DefMapSuggested.EntryID = _FolderSuggestedContacts.EntryID
|
||||
' _DefMapSuggested.FolderName = _FolderSuggestedContacts.Name
|
||||
' _Contacts_OutlookFolderContact.Add(_DefMapSuggested)
|
||||
|
||||
' For Each _FolderSuggested As MAPIFolder In _FolderSuggestedContacts.Folders
|
||||
' OutlookFolderSuggestedNames(_FolderSuggested, _Contacts_OutlookFolderContact)
|
||||
' Next
|
||||
'End If
|
||||
Return _Contacts_OutlookFolderContact
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'--------------Sub-----------------------
|
||||
Private Sub OutlookFolderNames(_FoldersName As MAPIFolder, Contacts_OutlookFolderContact As DevExpress.Xpo.XPCollection(Of [Module].Contacts_OutlookFolderContact))
|
||||
If _FoldersName.Folders.Count > 0 Then
|
||||
Dim _Contacts_OutlookFolderContact As New Contacts_OutlookFolderContact(Session)
|
||||
_Contacts_OutlookFolderContact.EntryID = _FoldersName.EntryID
|
||||
_Contacts_OutlookFolderContact.FolderName = _FoldersName.Name
|
||||
Contacts_OutlookFolderContact.Add(_Contacts_OutlookFolderContact)
|
||||
For Each _FoldersNameAct As MAPIFolder In _FoldersName.Folders
|
||||
OutlookFolderNames(_FoldersNameAct, Contacts_OutlookFolderContact)
|
||||
Next
|
||||
Else
|
||||
Dim _Contacts_OutlookFolderContact As New Contacts_OutlookFolderContact(Session)
|
||||
_Contacts_OutlookFolderContact.EntryID = _FoldersName.EntryID
|
||||
_Contacts_OutlookFolderContact.FolderName = _FoldersName.Name
|
||||
Contacts_OutlookFolderContact.Add(_Contacts_OutlookFolderContact)
|
||||
End If
|
||||
End Sub
|
||||
Private Sub OutlookFolderSuggestedNames(_FolderSuggested As MAPIFolder, Contacts_OutlookFolderContact As DevExpress.Xpo.XPCollection(Of [Module].Contacts_OutlookFolderContact))
|
||||
If _FolderSuggested.Folders.Count > 0 Then
|
||||
Dim _Contacts_OutlookFolderContact As New Contacts_OutlookFolderContact(Session)
|
||||
_Contacts_OutlookFolderContact.EntryID = _FolderSuggested.EntryID
|
||||
_Contacts_OutlookFolderContact.FolderName = _FolderSuggested.Name
|
||||
Contacts_OutlookFolderContact.Add(_Contacts_OutlookFolderContact)
|
||||
For Each _FoldersSuggestedNameAct As MAPIFolder In _FolderSuggested.Folders
|
||||
OutlookFolderSuggestedNames(_FoldersSuggestedNameAct, Contacts_OutlookFolderContact)
|
||||
Next
|
||||
Else
|
||||
Dim _Contacts_OutlookFolderContact As New Contacts_OutlookFolderContact(Session)
|
||||
_Contacts_OutlookFolderContact.EntryID = _FolderSuggested.EntryID
|
||||
_Contacts_OutlookFolderContact.FolderName = _FolderSuggested.Name
|
||||
Contacts_OutlookFolderContact.Add(_Contacts_OutlookFolderContact)
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
@@ -0,0 +1,66 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ClassDiagram MajorVersion="1" MinorVersion="1">
|
||||
<Class Name="Nuvolar.Module.Customers">
|
||||
<Position X="0.5" Y="0.5" Width="3" />
|
||||
<Members>
|
||||
<Field Name="_AssetsHandling_Note" Hidden="true" />
|
||||
<Field Name="_BirthAddress" Hidden="true" />
|
||||
<Field Name="_BirthDate" Hidden="true" />
|
||||
<Field Name="_BusinessCardNumber" Hidden="true" />
|
||||
<Field Name="_CanUseMarketingInfo" Hidden="true" />
|
||||
<Field Name="_CanUseMarketingInfoThirdParts" Hidden="true" />
|
||||
<Field Name="_Checked" Hidden="true" />
|
||||
<Field Name="_CheckedDate" Hidden="true" />
|
||||
<Field Name="_CheckStatus" Hidden="true" />
|
||||
<Field Name="_Citizen" Hidden="true" />
|
||||
<Field Name="_ClassificationByMoney" Hidden="true" />
|
||||
<Field Name="_ClassificationByPersonal" Hidden="true" />
|
||||
<Field Name="_ClassificationByProduct" Hidden="true" />
|
||||
<Field Name="_CompanyRegistrationNumber" Hidden="true" />
|
||||
<Field Name="_CreditlineAmountDEV" Hidden="true" />
|
||||
<Field Name="_CreditlineAmountHUF" Hidden="true" />
|
||||
<Field Name="_CreditlineDay" Hidden="true" />
|
||||
<Field Name="_CRM_Leads" Hidden="true" />
|
||||
<Field Name="_CustomerNumber" Hidden="true" />
|
||||
<Field Name="_CustomersGLParameters" Hidden="true" />
|
||||
<Field Name="_CustomersNG" Hidden="true" />
|
||||
<Field Name="_FamilyFarmNumber" Hidden="true" />
|
||||
<Field Name="_FarmerCardNumber" Hidden="true" />
|
||||
<Field Name="_HRPerson_SalesPerson" Hidden="true" />
|
||||
<Field Name="_ImportedID" Hidden="true" />
|
||||
<Field Name="_IsAssetsHandling" Hidden="true" />
|
||||
<Field Name="_LateChargesCountMode" Hidden="true" />
|
||||
<Field Name="_LyonessCardID" Hidden="true" />
|
||||
<Field Name="_LyonessID" Hidden="true" />
|
||||
<Field Name="_MasterBusinessDirectory" Hidden="true" />
|
||||
<Field Name="_MotherName" Hidden="true" />
|
||||
<Field Name="_MVHRegistrationNumber" Hidden="true" />
|
||||
<Field Name="_ObjectChanged" Hidden="true" />
|
||||
<Field Name="_ObjectCreated" Hidden="true" />
|
||||
<Field Name="_Oid_DH" Hidden="true" />
|
||||
<Field Name="_PaymentOption" Hidden="true" />
|
||||
<Field Name="_Pricing" Hidden="true" />
|
||||
<Field Name="_PricingIn" Hidden="true" />
|
||||
<Field Name="_QualityOption" Hidden="true" />
|
||||
<Field Name="_QueueUpdated" Hidden="true" />
|
||||
<Field Name="_ShipmentOption" Hidden="true" />
|
||||
<Field Name="_SupplierMark" Hidden="true" />
|
||||
<Field Name="_SupplierMarkInfo" Hidden="true" />
|
||||
<Field Name="_TAJNumber" Hidden="true" />
|
||||
<Field Name="_UserChanged" Hidden="true" />
|
||||
<Field Name="_UserCreated" Hidden="true" />
|
||||
<Field Name="_VATAvowalType" Hidden="true" />
|
||||
<Field Name="_VATNumber" Hidden="true" />
|
||||
<Field Name="_VATNumberEU" Hidden="true" />
|
||||
<Method Name="AfterConstruction" Hidden="true" />
|
||||
<Method Name="New" Hidden="true" />
|
||||
<Method Name="OnSaving" Hidden="true" />
|
||||
<Method Name="RecursiveBusinessDirectory" Hidden="true" />
|
||||
</Members>
|
||||
<TypeIdentifier>
|
||||
<HashCode>rAGCBAwXAhACIeaRqDSd15chBBCGBkGgCDk2hTgWLuA=</HashCode>
|
||||
<FileName>BusinessObjects\GeneralObjects\Customers\Customers.vb</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Font Name="Segoe UI" Size="9" />
|
||||
</ClassDiagram>
|
||||
@@ -0,0 +1,39 @@
|
||||
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)> _
|
||||
<DefaultProperty("ShortName")> _
|
||||
Public Class ClassificationByMoney
|
||||
Inherits BaseObject
|
||||
Private _ShortName As String
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
' This constructor is used when an object is loaded from a persistent storage.
|
||||
' Do not place any code here or place it only when the IsLoading property is false:
|
||||
' if (!IsLoading){
|
||||
' It is now OK to place your initialization code here.
|
||||
' }
|
||||
' or as an alternative, move your initialization code into the AfterConstruction method.
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
' Place here your initialization code.
|
||||
End Sub
|
||||
Property 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,39 @@
|
||||
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)> _
|
||||
<DefaultProperty("ShortName")> _
|
||||
Public Class ClassificationByPersonal
|
||||
Inherits BaseObject
|
||||
Private _ShortName As String
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
' This constructor is used when an object is loaded from a persistent storage.
|
||||
' Do not place any code here or place it only when the IsLoading property is false:
|
||||
' if (!IsLoading){
|
||||
' It is now OK to place your initialization code here.
|
||||
' }
|
||||
' or as an alternative, move your initialization code into the AfterConstruction method.
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
' Place here your initialization code.
|
||||
End Sub
|
||||
Property 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,39 @@
|
||||
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)> _
|
||||
<DefaultProperty("ShortName")> _
|
||||
Public Class ClassificationByProduct
|
||||
Inherits BaseObject
|
||||
Private _ShortName As String
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
' This constructor is used when an object is loaded from a persistent storage.
|
||||
' Do not place any code here or place it only when the IsLoading property is false:
|
||||
' if (!IsLoading){
|
||||
' It is now OK to place your initialization code here.
|
||||
' }
|
||||
' or as an alternative, move your initialization code into the AfterConstruction method.
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
' Place here your initialization code.
|
||||
End Sub
|
||||
|
||||
Property 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,33 @@
|
||||
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("Customers")> _
|
||||
Public Class CountryExtend
|
||||
Inherits Country
|
||||
Private _ShortName As String
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Property ShortName As String
|
||||
Get
|
||||
Return _ShortName
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
SetPropertyValue("ShortName", _ShortName, value)
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
<DefaultClassOptions()> _
|
||||
<NavigationItem("Customers")> _
|
||||
<DefaultProperty("DisplayName")> _
|
||||
<CreatableItem(False)> _
|
||||
Public Class CustomerBankAccounts 'A partnerekhez tartozó bankszámlaszámok
|
||||
Inherits BaseObject
|
||||
Private _Customers As Customers
|
||||
Private _ShortName As String
|
||||
Private _IBAN As String
|
||||
Private _SWIFT As String
|
||||
Private _AccountNumber As String
|
||||
Private _IsDefault As Boolean
|
||||
Private _GIROInfo As GIROInfo
|
||||
Private _AutomaticProcessing As Boolean
|
||||
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
|
||||
End Sub
|
||||
<Association("CustomerBankAccounts", GetType(Customers)), NonCloneable()> _
|
||||
Property Customers() As Customers
|
||||
Get
|
||||
Return _Customers
|
||||
End Get
|
||||
Set(ByVal value As Customers)
|
||||
SetPropertyValue("Customers", _Customers, value)
|
||||
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 IBAN As String
|
||||
Get
|
||||
Return _IBAN
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
SetPropertyValue("IBAN", _IBAN, value)
|
||||
End Set
|
||||
End Property
|
||||
Property SWIFT As String
|
||||
Get
|
||||
Return _SWIFT
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
SetPropertyValue("SWIFT", _SWIFT, value)
|
||||
End Set
|
||||
End Property
|
||||
Property AccountNumber As String
|
||||
Get
|
||||
Return _AccountNumber
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
SetPropertyValue("AccountNumber", _AccountNumber, value)
|
||||
If Session.IsObjectsLoading = False And Session.IsObjectsSaving = False Then
|
||||
|
||||
GIROInfo = Session.FindObject(Of GIROInfo)(CriteriaOperator.Parse("GIROID=?", Mid(AccountNumber, 1, 8)))
|
||||
If GIROInfo IsNot Nothing Then
|
||||
ShortName = GIROInfo.ShortName
|
||||
End If
|
||||
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
ReadOnly Property DisplayName As String
|
||||
Get
|
||||
Return _AccountNumber & " (" & _ShortName & ")"
|
||||
End Get
|
||||
End Property
|
||||
Property IsDefault As Boolean
|
||||
Get
|
||||
Return _IsDefault
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
SetPropertyValue("IsDefault", _IsDefault, value)
|
||||
End Set
|
||||
End Property
|
||||
Property GIROInfo As GIROInfo
|
||||
Get
|
||||
Return _GIROInfo
|
||||
End Get
|
||||
Set(value As GIROInfo)
|
||||
SetPropertyValue("GIROInfo", _GIROInfo, value)
|
||||
End Set
|
||||
End Property
|
||||
Property AutomaticProcessing As Boolean
|
||||
Get
|
||||
Return _AutomaticProcessing
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
SetPropertyValue("AutomaticProcessing", _AutomaticProcessing, value)
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,789 @@
|
||||
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 System.Reflection
|
||||
Imports DevExpress.ExpressApp.ConditionalAppearance
|
||||
|
||||
Public Enum eVATAvowalType 'ÁFA bevallási mód
|
||||
eGeneral = 0 'Általános
|
||||
eFinancial = 1 'Pénzügyi
|
||||
End Enum
|
||||
<DefaultClassOptions()>
|
||||
<NavigationItem("Customers")>
|
||||
<DefaultProperty("FullName")>
|
||||
<Indices("VATNumber")>
|
||||
<Appearance("APCSheetHeader - Disable all properties, when IsNull(Url_DH)=False AND Url_DH=''", AppearanceItemType.ViewItem, "IsNull(Url_DH)=False AND Url_DH<>''", TargetItems:="*", Enabled:=False)>
|
||||
Public Class Customers
|
||||
|
||||
Inherits Organization
|
||||
|
||||
Private _CustomerNumber As String = "" 'Ügyfél azonosítója
|
||||
Private _VATNumber As String 'Adószám (belföldi)
|
||||
Private _VATNumberEU As String 'EU adószám
|
||||
Private _CustomersGLParameters As CustomersGLParameters 'Ügyfél főkönyvi kategária
|
||||
Private _CustomersNG As CustomersNG 'Ügyfél sorszám generátor
|
||||
Private _Pricing As Pricing 'Árképzés ha vevő az ügyfél
|
||||
Private _PricingIn As Pricing 'Árképzés ha vásárolunk tőle
|
||||
Private _CreditlineAmountHUF As Double 'Hitelkeret forintos összege
|
||||
Private _CreditlineAmountDEV As Double 'Hitelkeret devizás összege
|
||||
Private _CreditlineDay As Long 'Hitelkeret max késés nap.
|
||||
Private _IsAssetsHandling As Boolean 'Lesz e kinnlévőség kezelése
|
||||
Private _CRM_Leads As CRM_Leads
|
||||
Private _ImportedID As Long
|
||||
Private _LateChargesCountMode As LateChargesCountMode 'A késedelmes kamatszámítás módja
|
||||
Private _Citizen As String 'Állampolgársága
|
||||
Private _AssetsHandling_Note As String 'Kinnlévőség megjegyzés
|
||||
|
||||
Private _PaymentOption As PaymentOption
|
||||
Private _ShipmentOption As ShipmentOption
|
||||
Private _QualityOption As QualityOption
|
||||
|
||||
Private _FarmerCardNumber As String 'Őstermelői igazolvány száma
|
||||
Private _BusinessCardNumber As String 'Vállalkozói igazolvány száma
|
||||
Private _MVHRegistrationNumber As String 'MVH regisztrációs szám
|
||||
Private _CompanyRegistrationNumber As String 'Cégjegyzékszám
|
||||
Private _CompanyStatisticsNumber As String 'Cég statisztikai számjele
|
||||
Private _FamilyFarmNumber As String 'Családi gazdaság azonosító szám
|
||||
Private _MotherName As String 'Anyja neve
|
||||
Private _BirthAddress As Address 'Születési helye
|
||||
Private _BirthDate As Date 'Születési ideje
|
||||
Private _TAJNumber As String
|
||||
|
||||
Private _LyonessID As String 'Lyoness ID azonosító
|
||||
Private _LyonessCardID As String 'Lyoness kártyaszám azonosító
|
||||
|
||||
Private _ClassificationByProduct As ClassificationByProduct
|
||||
Private _ClassificationByMoney As ClassificationByMoney
|
||||
Private _ClassificationByPersonal As ClassificationByPersonal
|
||||
|
||||
Private _SupplierMark As String 'Ha a partner beszállító, akkor egy rövid karaktersorozat
|
||||
Private _SupplierMarkInfo As String 'Beszállítói azonosító string
|
||||
|
||||
Private _Checked As Boolean
|
||||
Private _CheckedDate As DateTime
|
||||
Private _CheckStatus As String
|
||||
|
||||
Private _Contact_Decision As Contacts 'Döntéshozó, ügyvezető
|
||||
Private _Contact_Finance As Contacts 'Pénzüggyel kapcsolatos kapcsolattartó
|
||||
Private _EMail_Invoice As String 'e-mail cím, ahova PDF-ben elmegy a kiállított számla
|
||||
|
||||
Private _HRPerson_SalesPerson As HRPerson 'A céghez tartozó HRPerson mint üzletkötő
|
||||
Private _MasterBusinessDirectory As BusinessDirectory
|
||||
Private _VATAvowalType As eVATAvowalType 'ÁFA bevallás módja
|
||||
Private _Oid_DH As String
|
||||
Private _Url_DH As String
|
||||
Private _CanUseMarketingInfo As Boolean 'Marketininfó
|
||||
Private _CanUseMarketingInfoThirdParts As Boolean 'Marketing info 3. félnek
|
||||
|
||||
Private _ObjectCreated As Date
|
||||
Private _UserCreated As User
|
||||
Private _ObjectChanged As Date
|
||||
Private _UserChanged As User
|
||||
Private _QueueUpdated As Date
|
||||
|
||||
Private _MarketPosition As Long 'Piaci besorolás
|
||||
Private _PriceColumn As Integer 'Ároszlop, melyik PriceColumnBruttoHUFXX ára van
|
||||
Private _GreenCardNumber As String 'Mezőgazdasági zöldkönyv száma
|
||||
Private _BiologicalControlContractNumber As String 'Növényvédelmi szerződés száma
|
||||
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Protected Overrides Sub OnSaving()
|
||||
MyBase.OnSaving()
|
||||
If Session.IsNewObject(Me) Then
|
||||
If SecuritySystem.CurrentUser IsNot Nothing Then
|
||||
UserCreated = Session.GetObjectByKey(Of User)(Session.GetKeyValue(SecuritySystem.CurrentUser))
|
||||
End If
|
||||
UserChanged = UserCreated
|
||||
ObjectCreated = GetSQLTime(Session)
|
||||
ObjectChanged = ObjectCreated
|
||||
QueueUpdated = Date.MinValue
|
||||
Else
|
||||
If SecuritySystem.CurrentUser IsNot Nothing Then
|
||||
UserChanged = Session.GetObjectByKey(Of User)(Session.GetKeyValue(SecuritySystem.CurrentUser))
|
||||
ObjectChanged = GetSQLTime(Session)
|
||||
End If
|
||||
End If
|
||||
' Az partner duplázódás elkerülése miatt megkeressük, hogy létezik-e ilyen partner a megadott adószámmal
|
||||
|
||||
'If Me.VATNumber <> "" Then
|
||||
' Dim _Customers As Customers = Session.FindObject(Of Customers)(CriteriaOperator.Parse("VATNumber=?", Me.VATNumber))
|
||||
' If _Customers IsNot Nothing Then
|
||||
' If _Customers.Oid <> Me.Oid Then
|
||||
' '----TESZT MIATT-----------------------------------------------
|
||||
' Throw New Exception("*A megadott adószámmal már létezik ügyfél!")
|
||||
' End If
|
||||
' End If
|
||||
'End If
|
||||
'Sorszám kiosztása
|
||||
If LTrim(RTrim(Me.CustomerNumber)) = "" Then
|
||||
If Me.CustomersNG IsNot Nothing Then
|
||||
If Session.IsNewObject(Me) = True Then
|
||||
Me.CustomerNumber = Me.CustomersNG.NumberGenerator.GetNewNumber(Me.CustomersNG.NumberGenerator)
|
||||
End If
|
||||
Else
|
||||
'--------- TESZT MIATT!! --------------------------------------
|
||||
Throw New Exception("*Nincs beállítva a sorszámgenerátor paraméter!")
|
||||
End If
|
||||
End If
|
||||
If IsDeleted = False Then
|
||||
If Name = "" And FullName <> "" Then
|
||||
Name = FullName
|
||||
End If
|
||||
If FullName = "" And Name <> "" Then
|
||||
FullName = Name
|
||||
End If
|
||||
End If
|
||||
If Checked = True Then
|
||||
CheckedDate = GetSQLTime(Session)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
CustomersNG = Session.FindObject(Of CustomersNG)(CriteriaOperator.Parse("Oid=Oid"))
|
||||
Citizen = "Magyar"
|
||||
IsAssetsHandling = True
|
||||
Checked = False
|
||||
CanUseMarketingInfo = False
|
||||
CanUseMarketingInfoThirdParts = False
|
||||
Url_DH = Nothing
|
||||
CustomersGLParameters = Session.FindObject(Of CustomersGLParameters)(CriteriaOperator.Parse("DefaultforBusiness=True"))
|
||||
End Sub
|
||||
|
||||
<RuleUniqueValue("Customers-CustomerNumber", DefaultContexts.Save, CriteriaEvaluationBehavior:=PersistentCriteriaEvaluationBehavior.InTransaction)>
|
||||
<NonCloneable()>
|
||||
Property CustomerNumber As String
|
||||
Get
|
||||
Return _CustomerNumber
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
SetPropertyValue("CustomerNumber", _CustomerNumber, value)
|
||||
End Set
|
||||
End Property
|
||||
<RuleUniqueValue("Customers-VATNumber", DefaultContexts.Save, SkipNullOrEmptyValues:=True)>
|
||||
Property VATNumber As String
|
||||
Get
|
||||
Return _VATNumber
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
SetPropertyValue("VATNumber", _VATNumber, value)
|
||||
End Set
|
||||
End Property
|
||||
<RuleUniqueValue("Customers-VATNumberEU", DefaultContexts.Save, SkipNullOrEmptyValues:=True)>
|
||||
Property VATNumberEU As String
|
||||
Get
|
||||
Return _VATNumberEU
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
SetPropertyValue("VATNumberEU", _VATNumberEU, value)
|
||||
End Set
|
||||
End Property
|
||||
<RuleRequiredField("Customers-CustomersGLParameters", DefaultContexts.Save)>
|
||||
<VisibleInDetailView(False)>
|
||||
<VisibleInListView(False)>
|
||||
<VisibleInLookupListView(False)>
|
||||
Property CustomersGLParameters() As CustomersGLParameters
|
||||
Get
|
||||
Return _CustomersGLParameters
|
||||
End Get
|
||||
Set(ByVal value As CustomersGLParameters)
|
||||
SetPropertyValue("CustomersGLParameters", _CustomersGLParameters, value)
|
||||
End Set
|
||||
End Property
|
||||
<RuleRequiredField("Customers-CustomersNG", DefaultContexts.Save)>
|
||||
Property CustomersNG As CustomersNG
|
||||
Get
|
||||
If _CustomersNG Is Nothing Then
|
||||
If (Not IsSaving) AndAlso (Not IsLoading) Then
|
||||
_CustomersNG = Session.FindObject(Of CustomersNG)(1, CriteriaOperator.Parse("Oid=Oid"))
|
||||
End If
|
||||
End If
|
||||
Return _CustomersNG
|
||||
End Get
|
||||
Set(ByVal value As CustomersNG)
|
||||
SetPropertyValue("CustomersNG", _CustomersNG, value)
|
||||
End Set
|
||||
End Property
|
||||
Property Pricing As Pricing
|
||||
Get
|
||||
Return _Pricing
|
||||
End Get
|
||||
Set(ByVal value As Pricing)
|
||||
SetPropertyValue("Pricing", _Pricing, value)
|
||||
End Set
|
||||
End Property
|
||||
Property PricingIn As Pricing
|
||||
Get
|
||||
Return _PricingIn
|
||||
End Get
|
||||
Set(ByVal value As Pricing)
|
||||
SetPropertyValue("PricingIn", _PricingIn, value)
|
||||
End Set
|
||||
End Property
|
||||
Property IsAssetsHandling As Boolean
|
||||
Get
|
||||
Return _IsAssetsHandling
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
SetPropertyValue("IsAssetsHandling", _IsAssetsHandling, value)
|
||||
End Set
|
||||
End Property
|
||||
<Browsable(False)>
|
||||
Property CRM_Leads As CRM_Leads
|
||||
Get
|
||||
Return _CRM_Leads
|
||||
End Get
|
||||
Set(value As CRM_Leads)
|
||||
SetPropertyValue("CRM_Leads", _CRM_Leads, value)
|
||||
End Set
|
||||
End Property
|
||||
<Browsable(False)>
|
||||
Property ImportedID As Long
|
||||
Get
|
||||
Return _ImportedID
|
||||
End Get
|
||||
Set(value As Long)
|
||||
SetPropertyValue("ImportedID", _ImportedID, value)
|
||||
End Set
|
||||
End Property
|
||||
Property CreditlineAmountHUF As Double
|
||||
Get
|
||||
Return _CreditlineAmountHUF
|
||||
End Get
|
||||
Set(value As Double)
|
||||
SetPropertyValue("CreditlineAmountHUF", _CreditlineAmountHUF, value)
|
||||
End Set
|
||||
End Property
|
||||
Property CreditlineAmountDEV As Double
|
||||
Get
|
||||
Return _CreditlineAmountDEV
|
||||
End Get
|
||||
Set(value As Double)
|
||||
SetPropertyValue("CreditlineAmountDEV", _CreditlineAmountDEV, value)
|
||||
End Set
|
||||
End Property
|
||||
Property CreditlineDay As Long
|
||||
Get
|
||||
Return _CreditlineDay
|
||||
End Get
|
||||
Set(value As Long)
|
||||
SetPropertyValue("CreditlineDay", _CreditlineDay, value)
|
||||
End Set
|
||||
End Property
|
||||
Property LateChargesCountMode As LateChargesCountMode
|
||||
Get
|
||||
Return _LateChargesCountMode
|
||||
End Get
|
||||
Set(value As LateChargesCountMode)
|
||||
SetPropertyValue("LateChargesCountMode", _LateChargesCountMode, value)
|
||||
End Set
|
||||
End Property
|
||||
Property Citizen As String
|
||||
Get
|
||||
Return _Citizen
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("Citizen", _Citizen, value)
|
||||
End Set
|
||||
End Property
|
||||
<Size(-1)>
|
||||
Property AssetsHandling_Note As String
|
||||
Get
|
||||
Return _AssetsHandling_Note
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("AssetsHandling_Note", _AssetsHandling_Note, value)
|
||||
End Set
|
||||
End Property
|
||||
Public Property PaymentOption() As PaymentOption
|
||||
Get
|
||||
Return _PaymentOption
|
||||
End Get
|
||||
Set(ByVal value As PaymentOption)
|
||||
SetPropertyValue("PaymentOption", _PaymentOption, value)
|
||||
End Set
|
||||
End Property
|
||||
Public Property ShipmentOption() As ShipmentOption
|
||||
Get
|
||||
Return _ShipmentOption
|
||||
End Get
|
||||
Set(ByVal value As ShipmentOption)
|
||||
SetPropertyValue("ShipmentOption", _ShipmentOption, value)
|
||||
End Set
|
||||
End Property
|
||||
Public Property QualityOption() As QualityOption
|
||||
Get
|
||||
Return _QualityOption
|
||||
End Get
|
||||
Set(ByVal value As QualityOption)
|
||||
SetPropertyValue("QualityOption", _QualityOption, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property ClassificationByProduct As ClassificationByProduct
|
||||
Get
|
||||
Return _ClassificationByProduct
|
||||
End Get
|
||||
Set(value As ClassificationByProduct)
|
||||
SetPropertyValue("ClassificationByProduct", _ClassificationByProduct, value)
|
||||
End Set
|
||||
End Property
|
||||
Property ClassificationByMoney As ClassificationByMoney
|
||||
Get
|
||||
Return _ClassificationByMoney
|
||||
End Get
|
||||
Set(value As ClassificationByMoney)
|
||||
SetPropertyValue("ClassificationByMoney", _ClassificationByMoney, value)
|
||||
End Set
|
||||
End Property
|
||||
Property ClassificationByPersonal As ClassificationByPersonal
|
||||
Get
|
||||
Return _ClassificationByPersonal
|
||||
End Get
|
||||
Set(value As ClassificationByPersonal)
|
||||
SetPropertyValue("ClassificationByPersonal", _ClassificationByPersonal, value)
|
||||
End Set
|
||||
End Property
|
||||
'// Őstermelőhöz
|
||||
Property FarmerCardNumber As String
|
||||
Get
|
||||
Return _FarmerCardNumber
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("FarmerCardNumber", _FarmerCardNumber, value)
|
||||
End Set
|
||||
End Property
|
||||
Property BusinessCardNumber As String
|
||||
Get
|
||||
Return _BusinessCardNumber
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("BusinessCardNumber", _BusinessCardNumber, value)
|
||||
End Set
|
||||
End Property
|
||||
Property MVHRegistrationNumber As String
|
||||
Get
|
||||
Return _MVHRegistrationNumber
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("MVHRegistrationNumber", _MVHRegistrationNumber, value)
|
||||
End Set
|
||||
End Property
|
||||
Property CompanyRegistrationNumber As String
|
||||
Get
|
||||
Return _CompanyRegistrationNumber
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("CompanyRegistrationNumber", _CompanyRegistrationNumber, value)
|
||||
End Set
|
||||
End Property
|
||||
Property CompanyStatisticsNumber As String
|
||||
Get
|
||||
Return _CompanyStatisticsNumber
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("CompanyStatisticsNumber", _CompanyStatisticsNumber, value)
|
||||
End Set
|
||||
End Property
|
||||
Property FamilyFarmNumber As String
|
||||
Get
|
||||
Return _FamilyFarmNumber
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("FamilyFarmNumber", _FamilyFarmNumber, value)
|
||||
End Set
|
||||
End Property
|
||||
Property MotherName As String
|
||||
Get
|
||||
Return _MotherName
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("MotherName", _MotherName, value)
|
||||
End Set
|
||||
End Property
|
||||
Property BirthAddress As Address
|
||||
Get
|
||||
Return _BirthAddress
|
||||
End Get
|
||||
Set(value As Address)
|
||||
SetPropertyValue("BirthAddress", _BirthAddress, value)
|
||||
End Set
|
||||
End Property
|
||||
Property BirthDate As Date
|
||||
Get
|
||||
Return _BirthDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
SetPropertyValue("BirthDate", _BirthDate, value)
|
||||
End Set
|
||||
End Property
|
||||
Property TAJNumber As String
|
||||
Get
|
||||
Return _TAJNumber
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("TAJNumber", _TAJNumber, value)
|
||||
End Set
|
||||
End Property
|
||||
'//--- Egyéb
|
||||
Property MarketPosition As Long
|
||||
Get
|
||||
Return _MarketPosition
|
||||
End Get
|
||||
Set(value As Long)
|
||||
SetPropertyValue("MarketPosition", _MarketPosition, value)
|
||||
End Set
|
||||
End Property
|
||||
Property SupplierMark As String
|
||||
Get
|
||||
Return _SupplierMark
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("SupplierMark", _SupplierMark, value)
|
||||
End Set
|
||||
End Property
|
||||
<Size(-1)>
|
||||
Property SupplierMarkInfo As String
|
||||
Get
|
||||
Return _SupplierMarkInfo
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("SupplierMarkInfo", _SupplierMarkInfo, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
<ImmediatePostData>
|
||||
Property Checked As Boolean
|
||||
Get
|
||||
Return _Checked
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
SetPropertyValue("Checked", _Checked, value)
|
||||
End Set
|
||||
End Property
|
||||
Property CheckStatus As String
|
||||
Get
|
||||
Return _CheckStatus
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("CheckStatus", _CheckStatus, value)
|
||||
End Set
|
||||
End Property
|
||||
Property CheckedDate As Date
|
||||
Get
|
||||
Return _CheckedDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
SetPropertyValue("CheckedDate", _CheckedDate, value)
|
||||
End Set
|
||||
End Property
|
||||
Property HRPerson_SalesPerson As HRPerson
|
||||
Get
|
||||
Return _HRPerson_SalesPerson
|
||||
End Get
|
||||
Set(value As HRPerson)
|
||||
SetPropertyValue("HRPerson_SalesPerson", _HRPerson_SalesPerson, value)
|
||||
End Set
|
||||
End Property
|
||||
Property MasterBusinessDirectory As BusinessDirectory
|
||||
Get
|
||||
Return _MasterBusinessDirectory
|
||||
End Get
|
||||
Set(value As BusinessDirectory)
|
||||
SetPropertyValue("MasterBusinessDirectory", _MasterBusinessDirectory, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property LyonessID As String
|
||||
Get
|
||||
Return _LyonessID
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("LyonessID", _LyonessID, value)
|
||||
End Set
|
||||
End Property
|
||||
Property LyonessCardID As String
|
||||
Get
|
||||
Return _LyonessCardID
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("LyonessCardID", _LyonessCardID, value)
|
||||
End Set
|
||||
End Property
|
||||
Property VATAvowalType As eVATAvowalType
|
||||
Get
|
||||
Return _VATAvowalType
|
||||
End Get
|
||||
Set(value As eVATAvowalType)
|
||||
SetPropertyValue("VATAvowalType", _VATAvowalType, value)
|
||||
End Set
|
||||
End Property
|
||||
<Browsable(False)>
|
||||
Property Oid_DH As String
|
||||
Get
|
||||
Return _Oid_DH
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("Oid_DH", _Oid_DH, value)
|
||||
End Set
|
||||
End Property
|
||||
Property Url_DH As String
|
||||
Get
|
||||
Return _Url_DH
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("Url_DH", _Url_DH, value)
|
||||
End Set
|
||||
End Property
|
||||
Property CanUseMarketingInfo As Boolean
|
||||
Get
|
||||
Return _CanUseMarketingInfo
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
SetPropertyValue("CanUseMarketingInfo", _CanUseMarketingInfo, value)
|
||||
End Set
|
||||
End Property
|
||||
Property CanUseMarketingInfoThirdParts As Boolean
|
||||
Get
|
||||
Return _CanUseMarketingInfoThirdParts
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
SetPropertyValue("CanUseMarketingInfoThirdParts", _CanUseMarketingInfoThirdParts, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property GreenCardNumber As String
|
||||
Get
|
||||
Return _GreenCardNumber
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("GreenCardNumber", _GreenCardNumber, value)
|
||||
End Set
|
||||
End Property
|
||||
Property BiologicalControlContractNumber As String
|
||||
Get
|
||||
Return _BiologicalControlContractNumber
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("BiologicalControlContractNumber", _BiologicalControlContractNumber, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
<VisibleInDetailView(False)>
|
||||
<VisibleInListView(False)>
|
||||
<VisibleInLookupListView(False)>
|
||||
Property ObjectCreated As Date
|
||||
Get
|
||||
Return _ObjectCreated
|
||||
End Get
|
||||
Set(value As Date)
|
||||
SetPropertyValue("ObjectCreated", _ObjectCreated, value)
|
||||
End Set
|
||||
End Property
|
||||
<VisibleInDetailView(False)>
|
||||
<VisibleInListView(False)>
|
||||
<VisibleInLookupListView(False)>
|
||||
Property UserCreated As User
|
||||
Get
|
||||
Return _UserCreated
|
||||
End Get
|
||||
Set(value As User)
|
||||
SetPropertyValue("UserCreated", _UserCreated, value)
|
||||
End Set
|
||||
End Property
|
||||
<VisibleInDetailView(False)>
|
||||
<VisibleInListView(False)>
|
||||
<VisibleInLookupListView(False)>
|
||||
Property ObjectChanged As Date
|
||||
Get
|
||||
Return _ObjectChanged
|
||||
End Get
|
||||
Set(value As Date)
|
||||
SetPropertyValue("ObjectChanged", _ObjectChanged, value)
|
||||
End Set
|
||||
End Property
|
||||
<VisibleInDetailView(False)>
|
||||
<VisibleInListView(False)>
|
||||
<VisibleInLookupListView(False)>
|
||||
Property UserChanged As User
|
||||
Get
|
||||
Return _UserChanged
|
||||
End Get
|
||||
Set(value As User)
|
||||
SetPropertyValue("UserChanged", _UserChanged, value)
|
||||
End Set
|
||||
End Property
|
||||
<VisibleInDetailView(False)>
|
||||
<VisibleInListView(False)>
|
||||
<VisibleInLookupListView(False)>
|
||||
Property QueueUpdated As Date
|
||||
Get
|
||||
Return _QueueUpdated
|
||||
End Get
|
||||
Set(value As Date)
|
||||
SetPropertyValue("QueueUpdated", _QueueUpdated, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property Contact_Decision As Contacts
|
||||
Get
|
||||
Return _Contact_Decision
|
||||
End Get
|
||||
Set(value As Contacts)
|
||||
SetPropertyValue("Contact_Decision", _Contact_Decision, value)
|
||||
End Set
|
||||
End Property
|
||||
Property Contact_Finance As Contacts
|
||||
Get
|
||||
Return _Contact_Finance
|
||||
End Get
|
||||
Set(value As Contacts)
|
||||
SetPropertyValue("Contact_Finance", _Contact_Finance, value)
|
||||
End Set
|
||||
End Property
|
||||
<Size(255)>
|
||||
Property EMail_Invoice As String
|
||||
Get
|
||||
Return _EMail_Invoice
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("EMail_Invoice", _EMail_Invoice, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'Ároszlop
|
||||
Property PriceColumn As Integer
|
||||
Get
|
||||
Return _PriceColumn
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
SetPropertyValue("PriceColumn", _PriceColumn, value)
|
||||
End Set
|
||||
End Property
|
||||
'-----ReadOnly---------------
|
||||
Overloads ReadOnly Property IsDeleted As Boolean
|
||||
Get
|
||||
'Dim _IsDeleted As Boolean = False
|
||||
'For Each _PropertyInfo As PropertyInfo In Me.GetType.GetProperties
|
||||
' If _PropertyInfo.PropertyType.Name = "GCRecord" Then
|
||||
' _IsDeleted = _PropertyInfo.GetValue(Me, Nothing)
|
||||
' End If
|
||||
'Next
|
||||
'Return _IsDeleted
|
||||
Return MyBase.IsDeleted
|
||||
End Get
|
||||
End Property
|
||||
<VisibleInListView(False)>
|
||||
<Association("Customers-CustomersFileAttachment", GetType(CustomersFileAttachment))>
|
||||
ReadOnly Property CustomersFileAttachment As XPCollection(Of CustomersFileAttachment)
|
||||
Get
|
||||
Return GetCollection(Of CustomersFileAttachment)("CustomersFileAttachment")
|
||||
End Get
|
||||
End Property
|
||||
<VisibleInListView(False)>
|
||||
ReadOnly Property CRM_Opportunities As XPCollection(Of CRM_Opportunities)
|
||||
Get
|
||||
If Session.IsObjectsLoading = False And Session.IsObjectsSaving = False Then
|
||||
Return New XPCollection(Of CRM_Opportunities)(Session, CriteriaOperator.Parse("Customers.Oid=?", Me.Oid))
|
||||
Else
|
||||
Return Nothing
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
<VisibleInListView(False)>
|
||||
<Association("CustomerBankAccounts", GetType(CustomerBankAccounts))>
|
||||
Public ReadOnly Property CustomerBankAccounts() As XPCollection(Of CustomerBankAccounts)
|
||||
Get
|
||||
Return GetCollection(Of CustomerBankAccounts)("CustomerBankAccounts")
|
||||
End Get
|
||||
End Property
|
||||
<VisibleInListView(False)>
|
||||
<Association("Contacts", GetType(Contacts))>
|
||||
Public ReadOnly Property Contacts() As XPCollection(Of Contacts)
|
||||
Get
|
||||
Return GetCollection(Of Contacts)("Contacts")
|
||||
End Get
|
||||
End Property
|
||||
<VisibleInListView(False)>
|
||||
<Association("Customers-CustomersNGCollection", GetType(CustomersNGCollection)), Aggregated(), ExpandObjectMembers(ExpandObjectMembers.Never)>
|
||||
Public ReadOnly Property CustomersNGCollection As XPCollection(Of CustomersNGCollection)
|
||||
Get
|
||||
Return GetCollection(Of CustomersNGCollection)("CustomersNGCollection")
|
||||
End Get
|
||||
End Property
|
||||
<VisibleInListView(False)>
|
||||
<Association("Customers-CustomersAddress", GetType(CustomersAddress))>
|
||||
Public ReadOnly Property CustomersAddress As XPCollection(Of CustomersAddress)
|
||||
Get
|
||||
Return GetCollection(Of CustomersAddress)("CustomersAddress")
|
||||
End Get
|
||||
End Property
|
||||
<VisibleInListView(False)>
|
||||
<Association("Customers-CustomersNGCollectionWorkSheetType", GetType(CustomersNGCollectionWorkSheetType))>
|
||||
Public ReadOnly Property CustomersNGCollectionWorkSheetType As XPCollection(Of CustomersNGCollectionWorkSheetType)
|
||||
Get
|
||||
Return GetCollection(Of CustomersNGCollectionWorkSheetType)("CustomersNGCollectionWorkSheetType")
|
||||
End Get
|
||||
End Property
|
||||
<VisibleInListView(False), VisibleInLookupListView(False)>
|
||||
ReadOnly Property ContractProductsCredit As XPCollection(Of ContractProductsCredit)
|
||||
Get
|
||||
Return New XPCollection(Of ContractProductsCredit)(Session, CriteriaOperator.Parse("Contract.Customers=?", Me))
|
||||
End Get
|
||||
End Property
|
||||
|
||||
ReadOnly Property CustomersCCustomers As XPCollection(Of CustomersCCustomers)
|
||||
Get
|
||||
Return New XPCollection(Of CustomersCCustomers)(Session, CriteriaOperator.Parse("Customers=?", Me))
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property Customers_BusinessDirectory As XPCollection(Of BusinessDirectory)
|
||||
Get
|
||||
Dim _BusinessDirectory_Collection As New XPCollection(Of BusinessDirectory)(Session, CriteriaOperator.Parse("1=2"))
|
||||
|
||||
If MasterBusinessDirectory IsNot Nothing Then
|
||||
If MasterBusinessDirectory.Children.Count > 0 Then
|
||||
_BusinessDirectory_Collection.Add(MasterBusinessDirectory)
|
||||
RecursiveBusinessDirectory(_BusinessDirectory_Collection, MasterBusinessDirectory.NestedBusinessDirectory)
|
||||
Else
|
||||
_BusinessDirectory_Collection.Add(MasterBusinessDirectory)
|
||||
End If
|
||||
End If
|
||||
|
||||
Return _BusinessDirectory_Collection
|
||||
End Get
|
||||
End Property
|
||||
|
||||
<VisibleInListView(False), VisibleInLookupListView(False)>
|
||||
ReadOnly Property OfferOutRows As XPCollection(Of OfferOutRows)
|
||||
Get
|
||||
Return New XPCollection(Of OfferOutRows)(Session, CriteriaOperator.Parse("OfferOutHeader.Customers=?", Me))
|
||||
End Get
|
||||
End Property
|
||||
#Region "Other subs"
|
||||
Private Sub RecursiveBusinessDirectory(_BusinessDirectoryList As XPCollection(Of BusinessDirectory), _NestedBusinessDirectory As XPCollection(Of BusinessDirectory))
|
||||
For Each _BusinessDirectory As BusinessDirectory In _NestedBusinessDirectory
|
||||
If _BusinessDirectory.Children.Count > 0 Then
|
||||
_BusinessDirectoryList.Add(_BusinessDirectory)
|
||||
RecursiveBusinessDirectory(_BusinessDirectoryList, _BusinessDirectory.NestedBusinessDirectory)
|
||||
Else
|
||||
_BusinessDirectoryList.Add(_BusinessDirectory)
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
#End Region
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
Imports System
|
||||
Imports System.ComponentModel
|
||||
|
||||
Imports DevExpress.Xpo
|
||||
Imports DevExpress.Data.Filtering
|
||||
|
||||
Imports DevExpress.ExpressApp
|
||||
Imports DevExpress.Persistent.Base
|
||||
Imports DevExpress.Persistent.BaseImpl
|
||||
Imports DevExpress.Persistent.Validation
|
||||
Public Enum eAddressType
|
||||
Main = 0
|
||||
Transport = 1
|
||||
Postal = 2
|
||||
Other = 3
|
||||
End Enum
|
||||
<DefaultClassOptions()> _
|
||||
<NavigationItem(False), CreatableItem(False)> _
|
||||
Public Class CustomersAddress
|
||||
Inherits BaseObject
|
||||
Private _Customers As Customers
|
||||
Private _AddressType As eAddressType
|
||||
Private _Address As Address
|
||||
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("Customers-CustomersAddress", GetType(Customers)), Aggregated(), ExpandObjectMembers(ExpandObjectMembers.Never)> _
|
||||
Property Customers As Customers
|
||||
Get
|
||||
Return _Customers
|
||||
End Get
|
||||
Set(value As Customers)
|
||||
SetPropertyValue("Customers", _Customers, value)
|
||||
End Set
|
||||
End Property
|
||||
Property AddressType As eAddressType
|
||||
Get
|
||||
Return _AddressType
|
||||
End Get
|
||||
Set(value As eAddressType)
|
||||
SetPropertyValue("AddressType", _AddressType, value)
|
||||
End Set
|
||||
End Property
|
||||
Property Address As Address
|
||||
Get
|
||||
Return _Address
|
||||
End Get
|
||||
Set(value As Address)
|
||||
SetPropertyValue("Address", _Address, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,47 @@
|
||||
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 CustomersCCustomers
|
||||
Inherits BaseObject
|
||||
Private _Customers As Customers
|
||||
Private _CustomersConnect As Customers
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
' This constructor is used when an object is loaded from a persistent storage.
|
||||
' Do not place any code here or place it only when the IsLoading property is false:
|
||||
' if (!IsLoading){
|
||||
' It is now OK to place your initialization code here.
|
||||
' }
|
||||
' or as an alternative, move your initialization code into the AfterConstruction method.
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
' Place here your initialization code.
|
||||
End Sub
|
||||
|
||||
Property Customers As Customers
|
||||
Get
|
||||
Return _Customers
|
||||
End Get
|
||||
Set(value As Customers)
|
||||
SetPropertyValue("Customers", _Customers, value)
|
||||
End Set
|
||||
End Property
|
||||
Property CustomersConnect As Customers
|
||||
Get
|
||||
Return _CustomersConnect
|
||||
End Get
|
||||
Set(value As Customers)
|
||||
SetPropertyValue("CustomersConnect", _CustomersConnect, value)
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
@@ -0,0 +1,159 @@
|
||||
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 System.Drawing
|
||||
Imports System.IO
|
||||
Imports DevExpress.ExpressApp.Utils
|
||||
|
||||
|
||||
<DefaultClassOptions()> _
|
||||
<NavigationItem(False), CreatableItem(False)> _
|
||||
Public Class CustomersFileAttachment
|
||||
Inherits FileAttachmentBase
|
||||
Private _FileType As String
|
||||
Private _Customers As Customers
|
||||
Private _Status As eProductsDocumentationStatus
|
||||
Private _RowGroup1 As String 'Szöveges csoportosítás (nem kötelezõ)
|
||||
Private _RowGroup2 As String 'Szöveges másodlagos csoportosítás (nem kötelezõ)
|
||||
Private _ShortName As String
|
||||
Private _Description As String
|
||||
Private _FileCreated As Date
|
||||
Private _FileModified As Date
|
||||
Private _ObjectCreated As Date
|
||||
Private _UserCreated As User
|
||||
|
||||
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
|
||||
<Association("Customers-CustomersFileAttachment", GetType(Customers))> _
|
||||
<Browsable(False)> _
|
||||
Property Customers As Customers
|
||||
Get
|
||||
Return _Customers
|
||||
End Get
|
||||
Set(value As Customers)
|
||||
SetPropertyValue("Customers", _Customers, value)
|
||||
End Set
|
||||
End Property
|
||||
Property FileType As String
|
||||
Get
|
||||
Return _FileType
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("FileType", _FileType, value)
|
||||
End Set
|
||||
End Property
|
||||
Public Property Status() As eProductsDocumentationStatus
|
||||
Get
|
||||
Return _Status
|
||||
End Get
|
||||
Set(ByVal value As eProductsDocumentationStatus)
|
||||
SetPropertyValue("Status", _Status, value)
|
||||
End Set
|
||||
End Property
|
||||
Public Property RowGroup1() As String
|
||||
Get
|
||||
Return _RowGroup1
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
SetPropertyValue("RowGroup1", _RowGroup1, value)
|
||||
End Set
|
||||
End Property
|
||||
Public Property RowGroup2() As String
|
||||
Get
|
||||
Return _RowGroup2
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
SetPropertyValue("RowGroup2", _RowGroup2, value)
|
||||
End Set
|
||||
End Property
|
||||
Property ShortName As String
|
||||
Get
|
||||
Return _ShortName
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("ShortName", _ShortName, value)
|
||||
End Set
|
||||
End Property
|
||||
Property Description As String
|
||||
Get
|
||||
Return _Description
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("Description", _Description, value)
|
||||
End Set
|
||||
End Property
|
||||
Property FileCreated As Date
|
||||
Get
|
||||
Return _FileCreated
|
||||
End Get
|
||||
Set(value As Date)
|
||||
SetPropertyValue("FileCreated", _FileCreated, value)
|
||||
End Set
|
||||
End Property
|
||||
Property FileModified As Date
|
||||
Get
|
||||
Return _FileModified
|
||||
End Get
|
||||
Set(value As Date)
|
||||
SetPropertyValue("FileModified", _FileModified, 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
|
||||
|
||||
'--------ReadOnly---------
|
||||
<VisibleInDetailView(False)> _
|
||||
ReadOnly Property ImageType As Image
|
||||
Get
|
||||
Select Case Path.GetExtension(File.FileName)
|
||||
Case ".xls", ".xlsx", ".XLS", ".XLSX"
|
||||
Return ImageLoader.Instance.GetImageInfo("XLS").Image
|
||||
Case ".doc", ".docx", ".DOC", ".DOCX"
|
||||
Return ImageLoader.Instance.GetImageInfo("DOC").Image
|
||||
Case ".pdf", ".PDF"
|
||||
Return ImageLoader.Instance.GetImageInfo("PDF").Image
|
||||
Case ".txt", ".TXT"
|
||||
Return ImageLoader.Instance.GetImageInfo("NoImage").Image
|
||||
Case Else
|
||||
Return ImageLoader.Instance.GetImageInfo("NoImage").Image
|
||||
Return Nothing
|
||||
End Select
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
Generated
+49
@@ -0,0 +1,49 @@
|
||||
Partial Class CustomersFileAttachment_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.aCustomersFileAttachment_OpenDefaultFolder = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
'
|
||||
'aCustomersFileAttachment_OpenDefaultFolder
|
||||
'
|
||||
Me.aCustomersFileAttachment_OpenDefaultFolder.Caption = "aCustomersFileAttachment_OpenDefaultFolder"
|
||||
Me.aCustomersFileAttachment_OpenDefaultFolder.ConfirmationMessage = Nothing
|
||||
Me.aCustomersFileAttachment_OpenDefaultFolder.Id = "aCustomersFileAttachment_OpenDefaultFolder"
|
||||
Me.aCustomersFileAttachment_OpenDefaultFolder.ImageName = Nothing
|
||||
Me.aCustomersFileAttachment_OpenDefaultFolder.Shortcut = Nothing
|
||||
Me.aCustomersFileAttachment_OpenDefaultFolder.Tag = Nothing
|
||||
Me.aCustomersFileAttachment_OpenDefaultFolder.TargetObjectsCriteria = Nothing
|
||||
Me.aCustomersFileAttachment_OpenDefaultFolder.TargetObjectType = GetType(Nuvolar.[Module].CustomersFileAttachment)
|
||||
Me.aCustomersFileAttachment_OpenDefaultFolder.TargetViewId = Nothing
|
||||
Me.aCustomersFileAttachment_OpenDefaultFolder.ToolTip = Nothing
|
||||
Me.aCustomersFileAttachment_OpenDefaultFolder.TypeOfView = Nothing
|
||||
|
||||
End Sub
|
||||
Friend WithEvents aCustomersFileAttachment_OpenDefaultFolder As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
|
||||
End Class
|
||||
+126
@@ -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="aCustomersFileAttachment_OpenDefaultFolder.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -0,0 +1,43 @@
|
||||
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
|
||||
|
||||
Public Class CustomersFileAttachment_VC
|
||||
Inherits DevExpress.ExpressApp.ViewController
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
End Sub
|
||||
|
||||
Private Sub aCustomersFileAttachment_OpenDefaultFolder_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aCustomersFileAttachment_OpenDefaultFolder.Execute
|
||||
Try
|
||||
Dim _DefaultFolder As String = TryCast(Application.Model.Options, IModelOptionsExtender).DefaultCustomersFileFolder
|
||||
Dim _Customers As Customers = TryCast(TryCast(TryCast(View, ListView).CollectionSource, PropertyCollectionSource).MasterObject, Customers)
|
||||
If _Customers Is Nothing Then Throw New Exception("*Váratlan hiba történt, a folyamat megszakadt!")
|
||||
Dim _CustomersFolderName As String = ""
|
||||
If _Customers.FullName.Length < 13 Then
|
||||
_CustomersFolderName = _Customers.FullName + " " + _Customers.Address1.City + " " + _Customers.CustomerNumber
|
||||
Else
|
||||
_CustomersFolderName = _Customers.FullName.Remove(12, _Customers.FullName.Length - 12) + _
|
||||
" " + _Customers.Address1.City + " " + _Customers.CustomerNumber
|
||||
End If
|
||||
|
||||
If System.IO.Directory.Exists(_DefaultFolder + _CustomersFolderName) Then
|
||||
Process.Start("explorer.exe", _DefaultFolder + _CustomersFolderName)
|
||||
Else
|
||||
System.IO.Directory.CreateDirectory(_DefaultFolder + _CustomersFolderName)
|
||||
Process.Start("explorer.exe", _DefaultFolder + _CustomersFolderName)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, "Hiba!")
|
||||
End Try
|
||||
End Sub
|
||||
End Class
|
||||
@@ -0,0 +1,137 @@
|
||||
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("Customers")> _
|
||||
<DefaultProperty("ShortName")> _
|
||||
Public Class CustomersFrom '-- Ezek azok a cégek akik használják a programot vagy project cégek, de mi kezeljük őket
|
||||
Inherits Customers
|
||||
Private _ShortName As String
|
||||
Private _Description As String
|
||||
Private _IsDefault As Boolean
|
||||
|
||||
'65A nyomtatványhoz
|
||||
Private _PublicLandAddress1 As String 'Székhelyhez tartozó közterület
|
||||
Private _PublicLandAddress2 As String 'Telephelyhez tartozó közterület
|
||||
Private _AdministratorName As String
|
||||
Private _AdministratorPhoneNumber As String
|
||||
|
||||
'// RabbitMQ felhasználók és jelszavak
|
||||
|
||||
Private _RabbitMQServerAddress As String
|
||||
Private _RabbitMQServerUser As String
|
||||
Private _RabbitMQServerPassword As String
|
||||
Private _RabbitMQBodyEncryptCode As String
|
||||
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
IsDefault = False
|
||||
End Sub
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
|
||||
Property IsDefault() As Boolean
|
||||
Get
|
||||
Return _IsDefault
|
||||
End Get
|
||||
Set(ByVal value As Boolean)
|
||||
SetPropertyValue("IsDefault", _IsDefault, value)
|
||||
End Set
|
||||
End Property
|
||||
Property PublicLandAddress1 As String
|
||||
Get
|
||||
Return _PublicLandAddress1
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("PublicLandAddress1", _PublicLandAddress1, value)
|
||||
End Set
|
||||
End Property
|
||||
Property PublicLandAddress2 As String
|
||||
Get
|
||||
Return _PublicLandAddress2
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("PublicLandAddress2", _PublicLandAddress2, value)
|
||||
End Set
|
||||
End Property
|
||||
Property AdministratorName As String
|
||||
Get
|
||||
Return _AdministratorName
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("AdministratorName", _AdministratorName, value)
|
||||
End Set
|
||||
End Property
|
||||
Property AdministratorPhoneNumber As String
|
||||
Get
|
||||
Return _AdministratorPhoneNumber
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("AdministratorPhoneNumber", _AdministratorPhoneNumber, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'// RabbitMQ
|
||||
Property RabbitMQServerAddress As String
|
||||
Get
|
||||
Return _RabbitMQServerAddress
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("RabbitMQServerAddress", _RabbitMQServerAddress, value)
|
||||
End Set
|
||||
End Property
|
||||
Property RabbitMQServerUser As String
|
||||
Get
|
||||
Return _RabbitMQServerUser
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("RabbitMQServerUser", _RabbitMQServerUser, value)
|
||||
End Set
|
||||
End Property
|
||||
<PasswordPropertyText()> _
|
||||
<ValueConverter(GetType(Encryption))> _
|
||||
Property RabbitMQServerPassword As String
|
||||
Get
|
||||
Return _RabbitMQServerPassword
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("RabbitMQServerPassword", _RabbitMQServerPassword, value)
|
||||
End Set
|
||||
End Property
|
||||
<ValueConverter(GetType(Encryption))> _
|
||||
Property RabbitMQBodyEncryptCode As String
|
||||
Get
|
||||
Return _RabbitMQBodyEncryptCode
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("RabbitMQBodyEncryptCode", _RabbitMQBodyEncryptCode, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
ReadOnly Property DefaultCustomerBankAccounts As CustomerBankAccounts
|
||||
Get
|
||||
Dim _CustomerBankAccounts As CustomerBankAccounts = Nothing
|
||||
Dim _DefaultCustomerBankAccounts As CustomerBankAccounts = Nothing
|
||||
For Each _CustomerBankAccounts In Me.CustomerBankAccounts
|
||||
If _CustomerBankAccounts.IsDefault Then
|
||||
_DefaultCustomerBankAccounts = _CustomerBankAccounts
|
||||
End If
|
||||
Next
|
||||
Return _DefaultCustomerBankAccounts
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
Partial Class CustomersFromVC
|
||||
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Public Sub New(ByVal Container As System.ComponentModel.IContainer)
|
||||
MyClass.New()
|
||||
|
||||
'Required for Windows.Forms Class Composition Designer support
|
||||
Container.Add(Me)
|
||||
|
||||
End Sub
|
||||
|
||||
'Component overrides dispose to clean up the component list.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
MyBase.Dispose(disposing)
|
||||
End Sub
|
||||
|
||||
'Required by the Component Designer
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'NOTE: The following procedure is required by the Component Designer
|
||||
'It can be modified using the Component Designer.
|
||||
'Do not modify it using the code editor.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
components = New System.ComponentModel.Container()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,69 @@
|
||||
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 Microsoft.VisualBasic
|
||||
|
||||
Imports DevExpress.ExpressApp.Editors
|
||||
Imports DevExpress.Xpo
|
||||
|
||||
Public Class CustomersFromVC
|
||||
Inherits DevExpress.ExpressApp.ViewController
|
||||
Private detailViewCore As DetailView = Nothing
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
|
||||
'This call is required by the Component Designer.
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
TargetViewType = ViewType.DetailView
|
||||
End Sub
|
||||
Protected Overrides Sub OnActivated()
|
||||
MyBase.OnActivated()
|
||||
AddHandler View.ControlsCreated, AddressOf View_ControlsCreated
|
||||
detailViewCore = CType(View, DetailView)
|
||||
|
||||
End Sub
|
||||
Protected Overrides Sub OnViewControlsCreated()
|
||||
MyBase.OnViewControlsCreated()
|
||||
|
||||
End Sub
|
||||
Private Sub View_ControlsCreated(ByVal sender As Object, ByVal e As EventArgs)
|
||||
On Error Resume Next
|
||||
|
||||
Dim _CustomersFrom As CustomersFrom
|
||||
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim item As ViewItem = detailViewCore.FindItem("CustomersFrom")
|
||||
|
||||
|
||||
If item IsNot Nothing Then
|
||||
Dim _CustomersFrom_Collection As New XPCollection(Of CustomersFrom)(_ocur.Session)
|
||||
If _CustomersFrom_Collection.Count > 1 Then
|
||||
Else
|
||||
For Each _CustomersFrom In _CustomersFrom_Collection
|
||||
|
||||
item.CurrentObject.CustomersFrom = _CustomersFrom
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
'Private Function FindLayoutItemByControlHash(ByVal hash As Integer) As BaseLayoutItem
|
||||
' For Each item As BaseLayoutItem In ((CType(detailViewCore.Control, LayoutControl))).Items
|
||||
' If TypeOf item Is LayoutControlItem Then
|
||||
' Dim lci As LayoutControlItem = CType(item, LayoutControlItem)
|
||||
' If lci.Control.GetHashCode() = hash Then
|
||||
' Return item
|
||||
' End If
|
||||
' End If
|
||||
' Next item
|
||||
' Return Nothing
|
||||
'End Function
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,183 @@
|
||||
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("Customers")> _
|
||||
Public Class CustomersGLParameters 'partner főkönyvi kategória
|
||||
Inherits BaseObject
|
||||
Private _ShortName As String
|
||||
Private _ChartOfAccountsIn As ChartOfAccounts '--- Vevői számla
|
||||
Private _ChartOfAccountsOut As ChartOfAccounts '--- Szállítói számla
|
||||
Private _ChartOfAccountsNo As ChartOfAccounts '--- Elszámolási számla
|
||||
Private _DefaultforBusiness As Boolean = False
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
<RuleRequiredField("CustomersGLParameters-ShortName", DefaultContexts.Save)> _
|
||||
Property ShortName() As String
|
||||
Get
|
||||
Return _ShortName
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
SetPropertyValue("ShortName", _ShortName, value)
|
||||
End Set
|
||||
End Property
|
||||
'<Browsable(False)>
|
||||
'Property ChartOfAccountsIn() As ChartOfAccounts
|
||||
' Get
|
||||
' Return _ChartofAccountsIn
|
||||
' End Get
|
||||
' Set(ByVal value As ChartOfAccounts)
|
||||
' SetPropertyValue("ChartOfAccountsIn", _ChartofAccountsIn, value)
|
||||
' End Set
|
||||
'End Property
|
||||
'<Browsable(False)>
|
||||
'Property ChartOfAccountsOut() As ChartOfAccounts
|
||||
' Get
|
||||
' Return _ChartofAccountsOut
|
||||
' End Get
|
||||
' Set(ByVal value As ChartOfAccounts)
|
||||
' SetPropertyValue("ChartOfAccountsOut", _ChartofAccountsOut, value)
|
||||
' End Set
|
||||
'End Property
|
||||
'<Browsable(False)>
|
||||
'Property ChartOfAccountsNo As ChartOfAccounts
|
||||
' Get
|
||||
' Return _ChartofAccountsNo
|
||||
' End Get
|
||||
' Set(ByVal value As ChartOfAccounts)
|
||||
' SetPropertyValue("ChartOfAccountsNo", _ChartofAccountsNo, value)
|
||||
' End Set
|
||||
'End Property
|
||||
Property DefaultforBusiness As Boolean
|
||||
Get
|
||||
Return _DefaultforBusiness
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
SetPropertyValue("DefaultforBusiness", _DefaultforBusiness, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
<Association("CustomersGLParameters-CustomersGLParametersYear", GetType(CustomersGLParametersYear)), VisibleInListView(False), VisibleInLookupListView(False)> _
|
||||
ReadOnly Property CustomersGLParametersYear As XPCollection(Of CustomersGLParametersYear)
|
||||
Get
|
||||
Return GetCollection(Of CustomersGLParametersYear)("CustomersGLParametersYear")
|
||||
End Get
|
||||
End Property
|
||||
Public Function GetChartOfAccounts(_AccountYear As Long, _CustomersGLParametersMode As eVATMode) As ChartOfAccounts
|
||||
Dim _ChartOfAccounts As ChartOfAccounts = Nothing
|
||||
Dim _CustomersGLParametersYear As CustomersGLParametersYear
|
||||
Select Case _CustomersGLParametersMode
|
||||
Case eVATMode.eIn
|
||||
For Each _CustomersGLParametersYear In Me.CustomersGLParametersYear
|
||||
If _CustomersGLParametersYear.AccountYear = _AccountYear Then
|
||||
_ChartOfAccounts = _CustomersGLParametersYear.ChartOfAccountsIn
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
Case eVATMode.eOut
|
||||
For Each _CustomersGLParametersYear In Me.CustomersGLParametersYear
|
||||
If _CustomersGLParametersYear.AccountYear = _AccountYear Then
|
||||
_ChartOfAccounts = _CustomersGLParametersYear.ChartOfAccountsOut
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End Select
|
||||
Return _ChartOfAccounts
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
<DefaultClassOptions(), NavigationItem(False), CreatableItem(False)> _
|
||||
<RuleCriteria("RuleCriteria CustomersGLParametersYear-ChartOfAccountsOut", DefaultContexts.Save, "ChartOfAccountsOut.Children.Count=0", "Csak gyermek objektum választható ki!", SkipNullOrEmptyValues:=False)> _
|
||||
<RuleCriteria("RuleCriteria CustomersGLParametersYear-ChartOfAccountsIn", DefaultContexts.Save, "ChartOfAccountsIn.Children.Count=0", "Csak gyermek objektum választható ki!", SkipNullOrEmptyValues:=False)> _
|
||||
Public Class CustomersGLParametersYear
|
||||
Inherits BaseObject
|
||||
|
||||
Private _CustomersGLParameters As CustomersGLParameters
|
||||
Private _AccountYear As Long
|
||||
Private _ChartOfAccountsOut As ChartOfAccounts
|
||||
Private _ChartOfAccountsIn As ChartOfAccounts
|
||||
Private _ChartOfAccountsNo As ChartOfAccounts
|
||||
Private _ChartOfAccountsAdvanceOut As ChartOfAccounts
|
||||
Private _ChartOfAccountsAdvanceIn As ChartOfAccounts
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
|
||||
End Sub
|
||||
|
||||
<Association("CustomersGLParameters-CustomersGLParametersYear", GetType(CustomersGLParameters))> _
|
||||
Property CustomersGLParameters As CustomersGLParameters
|
||||
Get
|
||||
Return _CustomersGLParameters
|
||||
End Get
|
||||
Set(value As CustomersGLParameters)
|
||||
SetPropertyValue("CustomersGLParameters", _CustomersGLParameters, value)
|
||||
End Set
|
||||
End Property
|
||||
Property AccountYear As Long
|
||||
Get
|
||||
Return _AccountYear
|
||||
End Get
|
||||
Set(value As Long)
|
||||
SetPropertyValue("AccountYear", _AccountYear, value)
|
||||
End Set
|
||||
End Property
|
||||
<ImmediatePostData(True), DataSourceCriteria("AccountYear='@This.AccountYear'")>
|
||||
Property ChartOfAccountsOut As ChartOfAccounts
|
||||
Get
|
||||
Return _ChartOfAccountsOut
|
||||
End Get
|
||||
Set(value As ChartOfAccounts)
|
||||
SetPropertyValue("ChartOfAccountsOut", _ChartOfAccountsOut, value)
|
||||
End Set
|
||||
End Property
|
||||
<ImmediatePostData(True), DataSourceCriteria("AccountYear='@This.AccountYear'")>
|
||||
Property ChartOfAccountsIn As ChartOfAccounts
|
||||
Get
|
||||
Return _ChartOfAccountsIn
|
||||
End Get
|
||||
Set(value As ChartOfAccounts)
|
||||
SetPropertyValue("ChartOfAccountsIn", _ChartOfAccountsIn, value)
|
||||
End Set
|
||||
End Property
|
||||
<ImmediatePostData(True), DataSourceCriteria("AccountYear='@This.AccountYear'")>
|
||||
Property ChartOfAccountsNo As ChartOfAccounts
|
||||
Get
|
||||
Return _ChartofAccountsNo
|
||||
End Get
|
||||
Set(ByVal value As ChartOfAccounts)
|
||||
SetPropertyValue("ChartOfAccountsNo", _ChartofAccountsNo, value)
|
||||
End Set
|
||||
End Property
|
||||
<ImmediatePostData(True), DataSourceCriteria("AccountYear='@This.AccountYear'")>
|
||||
Property ChartOfAccountsAdvanceOut As ChartOfAccounts
|
||||
Get
|
||||
Return _ChartOfAccountsAdvanceOut
|
||||
End Get
|
||||
Set(value As ChartOfAccounts)
|
||||
SetPropertyValue("ChartOfAccountsAdvanceOut", _ChartOfAccountsAdvanceOut, value)
|
||||
End Set
|
||||
End Property
|
||||
<ImmediatePostData(True), DataSourceCriteria("AccountYear='@This.AccountYear'")>
|
||||
Property ChartOfAccountsAdvanceIn As ChartOfAccounts
|
||||
Get
|
||||
Return _ChartOfAccountsAdvanceIn
|
||||
End Get
|
||||
Set(value As ChartOfAccounts)
|
||||
SetPropertyValue("ChartOfAccountsAdvanceIn", _ChartOfAccountsAdvanceIn, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
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("Customers")> _
|
||||
Public Class CustomersNG
|
||||
Inherits BaseObject
|
||||
Private _ShortName As String
|
||||
Private _NumberGenerator As NumberGenerator
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Property ShortName As String
|
||||
Get
|
||||
Return _ShortName
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
SetPropertyValue("ShortName", _ShortName, value)
|
||||
End Set
|
||||
End Property
|
||||
Property NumberGenerator As NumberGenerator
|
||||
Get
|
||||
Return _NumberGenerator
|
||||
End Get
|
||||
Set(ByVal value As NumberGenerator)
|
||||
SetPropertyValue("NumberGenerator", _NumberGenerator, value)
|
||||
End Set
|
||||
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()> _
|
||||
<NavigationItem(False), CreatableItem(False)> _
|
||||
Public Class CustomersNGCollection 'Partnerhez tartozó sorszám generálási kollekció
|
||||
Inherits BaseObject
|
||||
Private _Customers As Customers 'Partner
|
||||
Private _ContractTemplate As ContractTemplate
|
||||
Private _NumberGenerator As NumberGenerator
|
||||
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
End Sub
|
||||
|
||||
<Association("Customers-CustomersNGCollection", GetType(Customers))> _
|
||||
Property Customers As Customers
|
||||
Get
|
||||
Return _Customers
|
||||
End Get
|
||||
Set(value As Customers)
|
||||
SetPropertyValue("Customers", _Customers, value)
|
||||
End Set
|
||||
End Property
|
||||
<RuleRequiredField("CustomersNGCollection-ContractTemplate", DefaultContexts.Save)> _
|
||||
Property ContractTemplate As ContractTemplate
|
||||
Get
|
||||
Return _ContractTemplate
|
||||
End Get
|
||||
Set(value As ContractTemplate)
|
||||
SetPropertyValue("ContractTemplate", _ContractTemplate, value)
|
||||
End Set
|
||||
End Property
|
||||
<RuleRequiredField("CustomersNGCollection-NumberGenerator", DefaultContexts.Save)> _
|
||||
Property NumberGenerator As NumberGenerator
|
||||
Get
|
||||
Return _NumberGenerator
|
||||
End Get
|
||||
Set(value As NumberGenerator)
|
||||
SetPropertyValue("NumberGenerator", _NumberGenerator, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Class
|
||||
+55
@@ -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()> _
|
||||
<NavigationItem(False), CreatableItem(False)> _
|
||||
Public Class CustomersNGCollectionWorkSheetType 'Partnerhez -alvállalkozó- tarozó sorszám és munkalap
|
||||
Inherits BaseObject
|
||||
|
||||
Private _Customers As Customers
|
||||
Private _NumberGenerator As NumberGenerator
|
||||
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("Customers-CustomersNGCollectionWorkSheetType", GetType(Customers))> _
|
||||
Property Customers As Customers
|
||||
Get
|
||||
Return _Customers
|
||||
End Get
|
||||
Set(value As Customers)
|
||||
SetPropertyValue("Customers", _Customers, value)
|
||||
End Set
|
||||
End Property
|
||||
<RuleRequiredField("CustomersNGCollectionWorkSheetType-NumberGenerator", DefaultContexts.Save)> _
|
||||
Property NumberGenerator As NumberGenerator
|
||||
Get
|
||||
Return _NumberGenerator
|
||||
End Get
|
||||
Set(value As NumberGenerator)
|
||||
SetPropertyValue("NumberGenerator", _NumberGenerator, value)
|
||||
End Set
|
||||
End Property
|
||||
<RuleRequiredField("CustomersNGCollectionWorkSheetType-WorkSheetType", DefaultContexts.Save)> _
|
||||
Property WorkSheetType As WorkSheetType
|
||||
Get
|
||||
Return _WorkSheetType
|
||||
End Get
|
||||
Set(value As WorkSheetType)
|
||||
SetPropertyValue("WorkSheetType", _WorkSheetType, value)
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
@@ -0,0 +1,33 @@
|
||||
Imports DevExpress.Xpo
|
||||
Imports DevExpress.Persistent.Base
|
||||
|
||||
<DefaultClassOptions()> _
|
||||
<NavigationItem("Customers")> _
|
||||
Public Class CustomersOrder ' Ez azokat a partnereket tartalmazza, akik rendelkeznek elég infóval, hogy rendeljünk tőlük
|
||||
Inherits Customers
|
||||
Private _DocumentPath As String
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
<VisibleInListView(False)> _
|
||||
<Association("CustomersOrderDocuments", GetType(CustomersOrderDocuments))> _
|
||||
Public ReadOnly Property CustomersOrderDocuments() As XPCollection(Of CustomersOrderDocuments)
|
||||
Get
|
||||
Return GetCollection(Of CustomersOrderDocuments)("CustomersOrderDocuments")
|
||||
End Get
|
||||
End Property
|
||||
<Size(900)> _
|
||||
Property DocumentPath As String
|
||||
Get
|
||||
Return _DocumentPath
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("DocumentPath", _DocumentPath, value)
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
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("Customers")> _
|
||||
Public Class CustomersOrderDocuments 'Akiktől rendelhetünk, annak a devizához tartozó rendelési dokumentum kollekció
|
||||
Inherits BaseObject
|
||||
Private _OrderOutMainType As eOrderOutMainType 'Rendelés tipusa
|
||||
Private _CustomersOrder As CustomersOrder
|
||||
Private _ReportData As ReportData
|
||||
Private _CurrencyName As CurrencyName
|
||||
Private _NumberGenerator As NumberGenerator
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Property OrderOutMainType As eOrderOutMainType
|
||||
Get
|
||||
Return _OrderOutMainType
|
||||
End Get
|
||||
Set(value As eOrderOutMainType)
|
||||
SetPropertyValue("OrderOutMainType", _OrderOutMainType, value)
|
||||
End Set
|
||||
End Property
|
||||
<Association("CustomersOrderDocuments", GetType(CustomersOrder))> _
|
||||
Property CustomersOrder() As CustomersOrder
|
||||
Get
|
||||
Return _CustomersOrder
|
||||
End Get
|
||||
Set(ByVal value As CustomersOrder)
|
||||
SetPropertyValue("CustomersOrder", _CustomersOrder, value)
|
||||
End Set
|
||||
End Property
|
||||
Property ReportData As ReportData
|
||||
Get
|
||||
Return _ReportData
|
||||
End Get
|
||||
Set(ByVal value As ReportData)
|
||||
SetPropertyValue("ReportData", _ReportData, value)
|
||||
End Set
|
||||
End Property
|
||||
Property CurrencyName As CurrencyName
|
||||
Get
|
||||
Return _CurrencyName
|
||||
End Get
|
||||
Set(ByVal value As CurrencyName)
|
||||
SetPropertyValue("CurrencyName", _CurrencyName, value)
|
||||
End Set
|
||||
End Property
|
||||
Property NumberGenerator As NumberGenerator
|
||||
Get
|
||||
Return _NumberGenerator
|
||||
End Get
|
||||
Set(ByVal value As NumberGenerator)
|
||||
SetPropertyValue("NumberGenerator", _NumberGenerator, value)
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
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 CustomersQualification
|
||||
Inherits BaseObject
|
||||
|
||||
Dim _Customers As Customers
|
||||
Dim _Operations As Operations
|
||||
Dim _Price As Long
|
||||
Dim _Speed As Long
|
||||
Dim _Quality As Long
|
||||
Dim _Other1 As Long
|
||||
Dim _Other2 As Long
|
||||
Dim _Other3 As Long
|
||||
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
End Sub
|
||||
|
||||
Property Customers As Customers
|
||||
Get
|
||||
Return _Customers
|
||||
End Get
|
||||
Set(value As Customers)
|
||||
SetPropertyValue("Customers", _Customers, value)
|
||||
End Set
|
||||
End Property
|
||||
Property Operations As Operations
|
||||
Get
|
||||
Return _Operations
|
||||
End Get
|
||||
Set(value As Operations)
|
||||
SetPropertyValue("Operations", _Operations, value)
|
||||
End Set
|
||||
End Property
|
||||
Property Price As Long
|
||||
Get
|
||||
Return _Price
|
||||
End Get
|
||||
Set(value As Long)
|
||||
SetPropertyValue("Price", _Price, value)
|
||||
End Set
|
||||
End Property
|
||||
Property Speed As Long
|
||||
Get
|
||||
Return _Speed
|
||||
End Get
|
||||
Set(value As Long)
|
||||
SetPropertyValue("Speed", _Speed, value)
|
||||
End Set
|
||||
End Property
|
||||
Property Quality As Long
|
||||
Get
|
||||
Return _Quality
|
||||
End Get
|
||||
Set(value As Long)
|
||||
SetPropertyValue("Quality", _Quality, value)
|
||||
End Set
|
||||
End Property
|
||||
Property Other1 As Long
|
||||
Get
|
||||
Return _Other1
|
||||
End Get
|
||||
Set(value As Long)
|
||||
SetPropertyValue("Other1", _Other1, value)
|
||||
End Set
|
||||
End Property
|
||||
Property Other2 As Long
|
||||
Get
|
||||
Return _Other2
|
||||
End Get
|
||||
Set(value As Long)
|
||||
SetPropertyValue("Other2", _Other2, value)
|
||||
End Set
|
||||
End Property
|
||||
Property Other3 As Long
|
||||
Get
|
||||
Return _Other3
|
||||
End Get
|
||||
Set(value As Long)
|
||||
SetPropertyValue("Other3", _Other3, value)
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
@@ -0,0 +1,112 @@
|
||||
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 CustomersQuota 'Partnertõl mennyit kell megrendelnem
|
||||
Inherits BaseObject
|
||||
Private _Customers As Customers
|
||||
Private _PartnerType As ePartnerType
|
||||
Private _DateFrom As Date 'Dátumtól
|
||||
Private _DateTo As Date 'Dátumig
|
||||
Private _Products As Products
|
||||
Private _ProductsGroups As ProductsGroups
|
||||
Private _CurrencyName As CurrencyName 'Deviza
|
||||
Private _AmountPlan As Double 'Netto forgalom az adott idõszakra
|
||||
Private _AmountFact As Double 'Ezt kell számolni
|
||||
Private _Rabbat As Double '+ kedvezmény %
|
||||
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
' This constructor is used when an object is loaded from a persistent storage.
|
||||
' Do not place any code here or place it only when the IsLoading property is false:
|
||||
' if (!IsLoading){
|
||||
' It is now OK to place your initialization code here.
|
||||
' }
|
||||
' or as an alternative, move your initialization code into the AfterConstruction method.
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
' Place here your initialization code.
|
||||
End Sub
|
||||
|
||||
Property 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)
|
||||
End Set
|
||||
End Property
|
||||
Property DateTo As Date
|
||||
Get
|
||||
Return _DateTo
|
||||
End Get
|
||||
Set(value As Date)
|
||||
SetPropertyValue("DateTo", _DateTo, value)
|
||||
End Set
|
||||
End Property
|
||||
Property Products As Products
|
||||
Get
|
||||
Return _Products
|
||||
End Get
|
||||
Set(value As Products)
|
||||
SetPropertyValue("Products", _Products, value)
|
||||
End Set
|
||||
End Property
|
||||
Property ProductsGroups As ProductsGroups
|
||||
Get
|
||||
Return _ProductsGroups
|
||||
End Get
|
||||
Set(value As ProductsGroups)
|
||||
SetPropertyValue("ProductsGroups", _ProductsGroups, value)
|
||||
End Set
|
||||
End Property
|
||||
Property CurrencyName As CurrencyName
|
||||
Get
|
||||
Return _CurrencyName
|
||||
End Get
|
||||
Set(value As CurrencyName)
|
||||
SetPropertyValue("CurrencyName", _CurrencyName, value)
|
||||
End Set
|
||||
End Property
|
||||
Property AmountPlan As Double
|
||||
Get
|
||||
Return _AmountPlan
|
||||
End Get
|
||||
Set(value As Double)
|
||||
SetPropertyValue("AmountPlan", _AmountPlan, value)
|
||||
End Set
|
||||
End Property
|
||||
Property AmountFact As Double
|
||||
Get
|
||||
Return _AmountFact
|
||||
End Get
|
||||
Set(value As Double)
|
||||
SetPropertyValue("AmountFact", _AmountFact, value)
|
||||
End Set
|
||||
End Property
|
||||
Property Rabbat As Double
|
||||
Get
|
||||
Return _Rabbat
|
||||
End Get
|
||||
Set(value As Double)
|
||||
SetPropertyValue("Rabbat", _Rabbat, value)
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
@@ -0,0 +1,58 @@
|
||||
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 CustomersThemesHRPerson 'Addott partnernél melyik témában ki a HRperson
|
||||
Inherits BaseObject
|
||||
|
||||
Private _Customers As Customers
|
||||
Private _Themes As Themes
|
||||
Private _HRPerson As HRPerson
|
||||
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
' This constructor is used when an object is loaded from a persistent storage.
|
||||
' Do not place any code here or place it only when the IsLoading property is false:
|
||||
' if (!IsLoading){
|
||||
' It is now OK to place your initialization code here.
|
||||
' }
|
||||
' or as an alternative, move your initialization code into the AfterConstruction method.
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
' Place here your initialization code.
|
||||
End Sub
|
||||
|
||||
Property Customers As Customers
|
||||
Get
|
||||
Return _Customers
|
||||
End Get
|
||||
Set(value As Customers)
|
||||
SetPropertyValue("Customers", _Customers, value)
|
||||
End Set
|
||||
End Property
|
||||
Property Themes As Themes
|
||||
Get
|
||||
Return _Themes
|
||||
End Get
|
||||
Set(value As Themes)
|
||||
SetPropertyValue("Themes", _Themes, value)
|
||||
End Set
|
||||
End Property
|
||||
Property HRPerson As HRPerson
|
||||
Get
|
||||
Return _HRPerson
|
||||
End Get
|
||||
Set(value As HRPerson)
|
||||
SetPropertyValue("HRPerson", _HRPerson, value)
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
+245
@@ -0,0 +1,245 @@
|
||||
Partial Class CustomersVC
|
||||
|
||||
<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.aCustomers_Open = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aGetCustomersQuota = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aCreateOpportunityFromCustomers = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aCustomersFileAttachment_ChangeGroup = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
|
||||
Me.aRecreateCustomersOrderDocuments = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aMergeCustomers = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
|
||||
Me.aCustomersFileAttachmentRemove = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aPCICheck_Customers = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aCustomersSetToCustomers = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
|
||||
Me.aCustomersSetSupplierMarkInfo = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
|
||||
Me.aCustomersDeleteSupplierMarkInfo = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aCustomersToContacts = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aCustomersToCustomersOrder = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aCustomers_ChangeCustomers = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
|
||||
Me.aCustomers_CreateBusinessDirectory = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aViewPCIDetail_Customers = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aCustomers_OpenDHUrl = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
'
|
||||
'aCustomers_Open
|
||||
'
|
||||
Me.aCustomers_Open.Caption = "aCustomers_Open"
|
||||
Me.aCustomers_Open.ConfirmationMessage = Nothing
|
||||
Me.aCustomers_Open.Id = "aCustomers_Open"
|
||||
Me.aCustomers_Open.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
|
||||
Me.aCustomers_Open.TargetViewId = "Customers_ListView_CRM_Outlook"
|
||||
Me.aCustomers_Open.ToolTip = Nothing
|
||||
'
|
||||
'aGetCustomersQuota
|
||||
'
|
||||
Me.aGetCustomersQuota.Caption = "aGet Customers Quota"
|
||||
Me.aGetCustomersQuota.ConfirmationMessage = Nothing
|
||||
Me.aGetCustomersQuota.Id = "aGetCustomersQuota"
|
||||
Me.aGetCustomersQuota.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireMultipleObjects
|
||||
Me.aGetCustomersQuota.TargetObjectType = GetType(Nuvolar.[Module].CustomersQuota)
|
||||
Me.aGetCustomersQuota.ToolTip = Nothing
|
||||
'
|
||||
'aCreateOpportunityFromCustomers
|
||||
'
|
||||
Me.aCreateOpportunityFromCustomers.Caption = "Create opportunity"
|
||||
Me.aCreateOpportunityFromCustomers.ConfirmationMessage = "Do you want to execute command ?"
|
||||
Me.aCreateOpportunityFromCustomers.Id = "aCreateOpportunityFromCustomers"
|
||||
Me.aCreateOpportunityFromCustomers.ImageName = "BO_Opportunity"
|
||||
Me.aCreateOpportunityFromCustomers.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
|
||||
Me.aCreateOpportunityFromCustomers.TargetObjectType = GetType(Nuvolar.[Module].Customers)
|
||||
Me.aCreateOpportunityFromCustomers.TargetViewId = ""
|
||||
Me.aCreateOpportunityFromCustomers.TargetViewType = DevExpress.ExpressApp.ViewType.ListView
|
||||
Me.aCreateOpportunityFromCustomers.ToolTip = Nothing
|
||||
Me.aCreateOpportunityFromCustomers.TypeOfView = GetType(DevExpress.ExpressApp.ListView)
|
||||
'
|
||||
'aCustomersFileAttachment_ChangeGroup
|
||||
'
|
||||
Me.aCustomersFileAttachment_ChangeGroup.AcceptButtonCaption = Nothing
|
||||
Me.aCustomersFileAttachment_ChangeGroup.CancelButtonCaption = Nothing
|
||||
Me.aCustomersFileAttachment_ChangeGroup.Caption = "aCustomersFileAttachment_ChangeGroup"
|
||||
Me.aCustomersFileAttachment_ChangeGroup.ConfirmationMessage = Nothing
|
||||
Me.aCustomersFileAttachment_ChangeGroup.Id = "aCustomersFileAttachment_ChangeGroup"
|
||||
Me.aCustomersFileAttachment_ChangeGroup.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireMultipleObjects
|
||||
Me.aCustomersFileAttachment_ChangeGroup.TargetObjectType = GetType(Nuvolar.[Module].CustomersFileAttachment)
|
||||
Me.aCustomersFileAttachment_ChangeGroup.ToolTip = Nothing
|
||||
'
|
||||
'aRecreateCustomersOrderDocuments
|
||||
'
|
||||
Me.aRecreateCustomersOrderDocuments.Caption = "aRecreateCustomersOrderDocuments"
|
||||
Me.aRecreateCustomersOrderDocuments.ConfirmationMessage = "Do you want to execute command ?"
|
||||
Me.aRecreateCustomersOrderDocuments.Id = "aRecreateCustomersOrderDocuments"
|
||||
Me.aRecreateCustomersOrderDocuments.ImageName = "BO_Opportunity"
|
||||
Me.aRecreateCustomersOrderDocuments.TargetObjectType = GetType(Nuvolar.[Module].CustomersOrder)
|
||||
Me.aRecreateCustomersOrderDocuments.TargetViewId = ""
|
||||
Me.aRecreateCustomersOrderDocuments.ToolTip = Nothing
|
||||
'
|
||||
'aMergeCustomers
|
||||
'
|
||||
Me.aMergeCustomers.AcceptButtonCaption = Nothing
|
||||
Me.aMergeCustomers.CancelButtonCaption = Nothing
|
||||
Me.aMergeCustomers.Caption = "aMerge Customers"
|
||||
Me.aMergeCustomers.Category = "RecordEdit"
|
||||
Me.aMergeCustomers.ConfirmationMessage = Nothing
|
||||
Me.aMergeCustomers.Id = "aMergeCustomers"
|
||||
Me.aMergeCustomers.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireMultipleObjects
|
||||
Me.aMergeCustomers.TargetObjectType = GetType(Nuvolar.[Module].Customers)
|
||||
Me.aMergeCustomers.TargetViewType = DevExpress.ExpressApp.ViewType.ListView
|
||||
Me.aMergeCustomers.ToolTip = Nothing
|
||||
Me.aMergeCustomers.TypeOfView = GetType(DevExpress.ExpressApp.ListView)
|
||||
'
|
||||
'aCustomersFileAttachmentRemove
|
||||
'
|
||||
Me.aCustomersFileAttachmentRemove.Caption = "aCustomers File Attachment Remove"
|
||||
Me.aCustomersFileAttachmentRemove.Category = "Edit"
|
||||
Me.aCustomersFileAttachmentRemove.ConfirmationMessage = Nothing
|
||||
Me.aCustomersFileAttachmentRemove.Id = "aCustomersFileAttachmentRemove"
|
||||
Me.aCustomersFileAttachmentRemove.ImageName = "Action_Delete"
|
||||
Me.aCustomersFileAttachmentRemove.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireMultipleObjects
|
||||
Me.aCustomersFileAttachmentRemove.TargetObjectType = GetType(Nuvolar.[Module].CustomersFileAttachment)
|
||||
Me.aCustomersFileAttachmentRemove.ToolTip = Nothing
|
||||
'
|
||||
'aPCICheck_Customers
|
||||
'
|
||||
Me.aPCICheck_Customers.Caption = "aPCICheck_Customers"
|
||||
Me.aPCICheck_Customers.Category = "RecordEdit"
|
||||
Me.aPCICheck_Customers.ConfirmationMessage = Nothing
|
||||
Me.aPCICheck_Customers.Id = "aPCICheck_Customers"
|
||||
Me.aPCICheck_Customers.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireMultipleObjects
|
||||
Me.aPCICheck_Customers.TargetObjectType = GetType(Nuvolar.[Module].Customers)
|
||||
Me.aPCICheck_Customers.TargetViewType = DevExpress.ExpressApp.ViewType.ListView
|
||||
Me.aPCICheck_Customers.ToolTip = Nothing
|
||||
Me.aPCICheck_Customers.TypeOfView = GetType(DevExpress.ExpressApp.ListView)
|
||||
'
|
||||
'aCustomersSetToCustomers
|
||||
'
|
||||
Me.aCustomersSetToCustomers.AcceptButtonCaption = Nothing
|
||||
Me.aCustomersSetToCustomers.CancelButtonCaption = Nothing
|
||||
Me.aCustomersSetToCustomers.Caption = "aCustomers Set To Customers"
|
||||
Me.aCustomersSetToCustomers.ConfirmationMessage = Nothing
|
||||
Me.aCustomersSetToCustomers.Id = "aCustomersSetToCustomers"
|
||||
Me.aCustomersSetToCustomers.TargetObjectType = GetType(Nuvolar.[Module].Customers)
|
||||
Me.aCustomersSetToCustomers.TargetViewId = "Customers_ListView"
|
||||
Me.aCustomersSetToCustomers.ToolTip = Nothing
|
||||
'
|
||||
'aCustomersSetSupplierMarkInfo
|
||||
'
|
||||
Me.aCustomersSetSupplierMarkInfo.AcceptButtonCaption = Nothing
|
||||
Me.aCustomersSetSupplierMarkInfo.CancelButtonCaption = Nothing
|
||||
Me.aCustomersSetSupplierMarkInfo.Caption = "aCustomersSetSupplierMarkInfo"
|
||||
Me.aCustomersSetSupplierMarkInfo.ConfirmationMessage = Nothing
|
||||
Me.aCustomersSetSupplierMarkInfo.Id = "aCustomersSetSupplierMarkInfo"
|
||||
Me.aCustomersSetSupplierMarkInfo.TargetObjectType = GetType(Nuvolar.[Module].Customers)
|
||||
Me.aCustomersSetSupplierMarkInfo.TargetViewId = "Customers_ListView"
|
||||
Me.aCustomersSetSupplierMarkInfo.ToolTip = Nothing
|
||||
'
|
||||
'aCustomersDeleteSupplierMarkInfo
|
||||
'
|
||||
Me.aCustomersDeleteSupplierMarkInfo.Caption = "aCustomers Delete Supplier Mark Info"
|
||||
Me.aCustomersDeleteSupplierMarkInfo.ConfirmationMessage = Nothing
|
||||
Me.aCustomersDeleteSupplierMarkInfo.Id = "aCustomersDeleteSupplierMarkInfo"
|
||||
Me.aCustomersDeleteSupplierMarkInfo.TargetObjectType = GetType(Nuvolar.[Module].Customers)
|
||||
Me.aCustomersDeleteSupplierMarkInfo.TargetViewId = "Customers_ListView"
|
||||
Me.aCustomersDeleteSupplierMarkInfo.ToolTip = Nothing
|
||||
'
|
||||
'aCustomersToContacts
|
||||
'
|
||||
Me.aCustomersToContacts.Caption = "aCustomers To Contacts"
|
||||
Me.aCustomersToContacts.ConfirmationMessage = Nothing
|
||||
Me.aCustomersToContacts.Id = "aCustomersToContacts"
|
||||
Me.aCustomersToContacts.TargetObjectType = GetType(Nuvolar.[Module].Contacts)
|
||||
Me.aCustomersToContacts.TargetViewId = "Customers_Contacts_ListView"
|
||||
Me.aCustomersToContacts.ToolTip = Nothing
|
||||
'
|
||||
'aCustomersToCustomersOrder
|
||||
'
|
||||
Me.aCustomersToCustomersOrder.Caption = "aCustomers To Customers Order"
|
||||
Me.aCustomersToCustomersOrder.ConfirmationMessage = "Do you want to execute ?"
|
||||
Me.aCustomersToCustomersOrder.Id = "aCustomersToCustomersOrder"
|
||||
Me.aCustomersToCustomersOrder.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireMultipleObjects
|
||||
Me.aCustomersToCustomersOrder.TargetObjectType = GetType(Nuvolar.[Module].Customers)
|
||||
Me.aCustomersToCustomersOrder.ToolTip = Nothing
|
||||
'
|
||||
'aCustomers_ChangeCustomers
|
||||
'
|
||||
Me.aCustomers_ChangeCustomers.AcceptButtonCaption = Nothing
|
||||
Me.aCustomers_ChangeCustomers.CancelButtonCaption = Nothing
|
||||
Me.aCustomers_ChangeCustomers.Caption = "aCustomers_ChangeCustomers"
|
||||
Me.aCustomers_ChangeCustomers.ConfirmationMessage = Nothing
|
||||
Me.aCustomers_ChangeCustomers.Id = "aCustomers_ChangeCustomers"
|
||||
Me.aCustomers_ChangeCustomers.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireMultipleObjects
|
||||
Me.aCustomers_ChangeCustomers.TargetObjectType = GetType(Nuvolar.[Module].Customers)
|
||||
Me.aCustomers_ChangeCustomers.TargetViewId = "Customers_ListView"
|
||||
Me.aCustomers_ChangeCustomers.ToolTip = Nothing
|
||||
'
|
||||
'aCustomers_CreateBusinessDirectory
|
||||
'
|
||||
Me.aCustomers_CreateBusinessDirectory.Caption = "aCustomers_CreateBusinessDirectory"
|
||||
Me.aCustomers_CreateBusinessDirectory.Category = "ObjectsCreation"
|
||||
Me.aCustomers_CreateBusinessDirectory.ConfirmationMessage = Nothing
|
||||
Me.aCustomers_CreateBusinessDirectory.Id = "aCustomers_CreateBusinessDirectory"
|
||||
Me.aCustomers_CreateBusinessDirectory.TargetObjectType = GetType(Nuvolar.[Module].Customers)
|
||||
Me.aCustomers_CreateBusinessDirectory.TargetViewId = ""
|
||||
Me.aCustomers_CreateBusinessDirectory.ToolTip = Nothing
|
||||
'
|
||||
'aViewPCIDetail_Customers
|
||||
'
|
||||
Me.aViewPCIDetail_Customers.Caption = "aViewPCIDetail_Customers"
|
||||
Me.aViewPCIDetail_Customers.ConfirmationMessage = Nothing
|
||||
Me.aViewPCIDetail_Customers.Id = "aViewPCIDetail_Customers"
|
||||
Me.aViewPCIDetail_Customers.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
|
||||
Me.aViewPCIDetail_Customers.TargetObjectType = GetType(Nuvolar.[Module].Customers)
|
||||
Me.aViewPCIDetail_Customers.ToolTip = Nothing
|
||||
'
|
||||
'aCustomers_OpenDHUrl
|
||||
'
|
||||
Me.aCustomers_OpenDHUrl.Caption = "aCustomers_OpenDHUrl"
|
||||
Me.aCustomers_OpenDHUrl.ConfirmationMessage = Nothing
|
||||
Me.aCustomers_OpenDHUrl.Id = "aCustomers_OpenDHUrl"
|
||||
Me.aCustomers_OpenDHUrl.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
|
||||
Me.aCustomers_OpenDHUrl.TargetObjectType = GetType(Nuvolar.[Module].Customers)
|
||||
Me.aCustomers_OpenDHUrl.ToolTip = Nothing
|
||||
|
||||
End Sub
|
||||
Friend WithEvents aCreateOpportunityFromCustomers As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aRecreateCustomersOrderDocuments As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aCustomersFileAttachment_ChangeGroup As DevExpress.ExpressApp.Actions.PopupWindowShowAction
|
||||
Friend WithEvents aMergeCustomers As DevExpress.ExpressApp.Actions.PopupWindowShowAction
|
||||
Friend WithEvents aGetCustomersQuota As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aCustomersFileAttachmentRemove As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aCustomers_Open As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aPCICheck_Customers As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aCustomersSetToCustomers As DevExpress.ExpressApp.Actions.PopupWindowShowAction
|
||||
Friend WithEvents aCustomersSetSupplierMarkInfo As DevExpress.ExpressApp.Actions.PopupWindowShowAction
|
||||
Friend WithEvents aCustomersDeleteSupplierMarkInfo As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aCustomersToContacts As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aCustomersToCustomersOrder As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aCustomers_ChangeCustomers As DevExpress.ExpressApp.Actions.PopupWindowShowAction
|
||||
Friend WithEvents aCustomers_CreateBusinessDirectory As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aViewPCIDetail_Customers As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aCustomers_OpenDHUrl As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,174 @@
|
||||
<?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="aCustomers_Open.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>543, 173</value>
|
||||
</metadata>
|
||||
<metadata name="aGetCustomersQuota.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>244, 212</value>
|
||||
</metadata>
|
||||
<metadata name="aCreateOpportunityFromCustomers.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>689, 251</value>
|
||||
</metadata>
|
||||
<metadata name="aCustomersFileAttachment_ChangeGroup.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>410, 251</value>
|
||||
</metadata>
|
||||
<metadata name="aRecreateCustomersOrderDocuments.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>413, 212</value>
|
||||
</metadata>
|
||||
<metadata name="aMergeCustomers.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>259, 251</value>
|
||||
</metadata>
|
||||
<metadata name="aCustomersFileAttachmentRemove.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 251</value>
|
||||
</metadata>
|
||||
<metadata name="aPCICheck_Customers.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>670, 212</value>
|
||||
</metadata>
|
||||
<metadata name="aCustomersSetToCustomers.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 56</value>
|
||||
</metadata>
|
||||
<metadata name="aCustomersSetSupplierMarkInfo.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 212</value>
|
||||
</metadata>
|
||||
<metadata name="aCustomersDeleteSupplierMarkInfo.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>694, 173</value>
|
||||
</metadata>
|
||||
<metadata name="aCustomersToContacts.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>366, 173</value>
|
||||
</metadata>
|
||||
<metadata name="aCustomersToCustomersOrder.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 173</value>
|
||||
</metadata>
|
||||
<metadata name="aCustomers_ChangeCustomers.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 134</value>
|
||||
</metadata>
|
||||
<metadata name="aCustomers_CreateBusinessDirectory.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 95</value>
|
||||
</metadata>
|
||||
<metadata name="aViewPCIDetail_Customers.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>222, 56</value>
|
||||
</metadata>
|
||||
<metadata name="aCustomers_OpenDHUrl.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>562, 58</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,774 @@
|
||||
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.Data.Filtering
|
||||
Imports DevExpress.Persistent.BaseImpl
|
||||
Imports DevExpress.ExpressApp.SystemModule
|
||||
Imports DevExpress.ExpressApp.CloneObject
|
||||
Imports DevExpress.Xpo
|
||||
Imports DevExpress.Xpo.DB
|
||||
Imports DevExpress.ExpressApp.Utils
|
||||
Imports System.Reflection
|
||||
Imports System.IO
|
||||
|
||||
Public Class CustomersVC
|
||||
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()
|
||||
'This call is required by the Component Designer.
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
End Sub
|
||||
#Region "Overrides"
|
||||
Protected Overrides Sub OnActivated()
|
||||
MyBase.OnActivated()
|
||||
|
||||
Frame.GetController(Of CustomersVC).aCustomersSetToCustomers.Active.SetItemValue("", False)
|
||||
|
||||
If View.Id = "CustomersNG_ListView" Or View.Id = "CustomersNG_LookupListView" Then
|
||||
Dim _CustomersNG As CustomersNG
|
||||
|
||||
_CustomersNG = TryCast(View.ObjectSpace, Xpo.XPObjectSpace).Session.FindObject(Of CustomersNG)(1, CriteriaOperator.Parse("Oid=Oid"))
|
||||
|
||||
If _CustomersNG Is Nothing Then
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.NewObjectViewController)().Active.SetItemValue("", True)
|
||||
Else
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.NewObjectViewController)().Active.SetItemValue("", False)
|
||||
End If
|
||||
End If
|
||||
If View.Id = "Customers_CRM_Opportunities_ListView" Then
|
||||
Frame.GetController(Of NewObjectViewController)().Active.SetItemValue("", False)
|
||||
'Frame.GetController(Of LinkDialogController)().Active.SetItemValue("", False)
|
||||
Frame.GetController(Of LinkUnlinkController)().Active.SetItemValue("", False)
|
||||
Frame.GetController(Of CloneObjectViewController)().Active.SetItemValue("", False)
|
||||
End If
|
||||
If View.Id = "CustomersNGCollection_DetailView" Then
|
||||
Frame.GetController(Of NewObjectViewController)().Active.SetItemValue("", False)
|
||||
Frame.GetController(Of CloneObjectViewController)().Active.SetItemValue("", False)
|
||||
Frame.GetController(Of LinkUnlinkController)().Active.SetItemValue("", False)
|
||||
End If
|
||||
If View.Id = "Customers_CustomersBankAccounts_ListView" Then
|
||||
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of LinkDialogController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of LinkUnlinkController).Active.SetItemValue("", False)
|
||||
End If
|
||||
If View.Id = "CustomersFrom_CustomersBankAccounts_ListView" Then
|
||||
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of LinkDialogController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of LinkUnlinkController).Active.SetItemValue("", False)
|
||||
End If
|
||||
If View.Id = "Customers_DetailView" Then
|
||||
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", False)
|
||||
AddHandler Frame.GetController(Of DeleteObjectsViewController).DeleteAction.Executing, AddressOf Customers_DetailView_DeleteAction_Executing
|
||||
AddHandler Frame.GetController(Of ModificationsController).SaveAction.Executing, AddressOf Customers_DetailView_Save_Executing
|
||||
AddHandler Frame.GetController(Of ModificationsController).SaveAndCloseAction.Executing, AddressOf Customers_DetailView_Save_Executing
|
||||
AddHandler Frame.GetController(Of ModificationsController).SaveAndNewAction.Executing, AddressOf Customers_DetailView_Save_Executing
|
||||
End If
|
||||
If View.Id = "Customers_LookupListView" Then
|
||||
'Frame.GetController(Of NewObjectViewController)().Active.SetItemValue("", False)
|
||||
Frame.GetController(Of CloneObjectViewController)().Active.SetItemValue("", False)
|
||||
End If
|
||||
If View.Id = "CustomersFileAttachment_ListView" Then
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.DeleteObjectsViewController).Active.SetItemValue("", False)
|
||||
End If
|
||||
If View.Id = "Customers_CustomersFileAttachment_ListView" Then
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.DeleteObjectsViewController).Active.SetItemValue("", False)
|
||||
End If
|
||||
If View.Id = "Customers_Customers_BusinessDirectory_ListView" Then
|
||||
Frame.GetController(Of LinkUnlinkController)().Active.SetItemValue("", False)
|
||||
Frame.GetController(Of CloneObjectViewController)().Active.SetItemValue("", False)
|
||||
End If
|
||||
|
||||
If View.Id = "Customers_ListView_Deleted" Then
|
||||
Frame.GetController(Of CustomersVC).aCreateOpportunityFromCustomers.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of CustomersVC).aCustomersToCustomersOrder.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of CustomersVC).aPCICheck_Customers.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of CustomersVC).aCustomers_CreateBusinessDirectory.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of CustomersVC).aMergeCustomers.Active.SetItemValue("", False)
|
||||
|
||||
Frame.GetController(Of CloneObject.CloneObjectViewController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", False)
|
||||
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
|
||||
Protected Overrides Sub OnDeactivated()
|
||||
MyBase.OnDeactivated()
|
||||
If View.Id = "CustomersNG_ListView" Or View.Id = "CustomersNG_LookupListView" Then
|
||||
Dim _CustomersNG As CustomersNG
|
||||
|
||||
_CustomersNG = TryCast(View.ObjectSpace, Xpo.XPObjectSpace).Session.FindObject(Of CustomersNG)(1, CriteriaOperator.Parse("Oid=Oid"))
|
||||
|
||||
If _CustomersNG Is Nothing Then
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.NewObjectViewController)().Active.SetItemValue("", False)
|
||||
Else
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.NewObjectViewController)().Active.SetItemValue("", True)
|
||||
End If
|
||||
End If
|
||||
If View.Id = "Customers_CRM_Opportunities_ListView" Then
|
||||
Frame.GetController(Of NewObjectViewController)().Active.SetItemValue("", True)
|
||||
'Frame.GetController(Of LinkDialogController)().Active.SetItemValue("", False)
|
||||
Frame.GetController(Of LinkUnlinkController)().Active.SetItemValue("", True)
|
||||
Frame.GetController(Of CloneObjectViewController)().Active.SetItemValue("", True)
|
||||
End If
|
||||
If View.Id = "CustomersNGCollection_Deatilview" Then
|
||||
Frame.GetController(Of NewObjectViewController)().Active.SetItemValue("", True)
|
||||
Frame.GetController(Of CloneObjectViewController)().Active.SetItemValue("", True)
|
||||
Frame.GetController(Of LinkUnlinkController)().Active.SetItemValue("", True)
|
||||
End If
|
||||
If View.Id = "Customers_CustomersBankAccounts_ListView" Then
|
||||
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of LinkDialogController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of LinkUnlinkController).Active.SetItemValue("", True)
|
||||
End If
|
||||
If View.Id = "CustomersFrom_CustomersBankAccounts_ListView" Then
|
||||
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of LinkDialogController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of LinkUnlinkController).Active.SetItemValue("", True)
|
||||
End If
|
||||
If View.Id = "Customers_DetailView" Then
|
||||
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", True)
|
||||
End If
|
||||
If View.Id = "Customers_LookupListView" Then
|
||||
'Frame.GetController(Of NewObjectViewController)().Active.SetItemValue("", True)
|
||||
Frame.GetController(Of CloneObjectViewController)().Active.SetItemValue("", True)
|
||||
End If
|
||||
If View.Id = "CustomersFileAttachment_ListView" Then
|
||||
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", True)
|
||||
End If
|
||||
If View.Id = "Customers_CustomersFileAttachment_ListView" Then
|
||||
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", True)
|
||||
End If
|
||||
If View.Id = "Customers_Customers_BusinessDirectory_ListView" Then
|
||||
Frame.GetController(Of LinkUnlinkController)().Active.SetItemValue("", True)
|
||||
Frame.GetController(Of CloneObjectViewController)().Active.SetItemValue("", True)
|
||||
End If
|
||||
If View.Id = "Customers_ListView_Deleted" Then
|
||||
Frame.GetController(Of CustomersVC).aCreateOpportunityFromCustomers.Active.SetItemValue("", True)
|
||||
Frame.GetController(Of CustomersVC).aCustomersToCustomersOrder.Active.SetItemValue("", True)
|
||||
Frame.GetController(Of CustomersVC).aPCICheck_Customers.Active.SetItemValue("", True)
|
||||
Frame.GetController(Of CustomersVC).aCustomers_CreateBusinessDirectory.Active.SetItemValue("", True)
|
||||
|
||||
Frame.GetController(Of CloneObject.CloneObjectViewController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of CustomersVC).aMergeCustomers.Active.SetItemValue("", True)
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
Private Sub aCreateOpportunityFromCustomers_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aCreateOpportunityFromCustomers.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _Customers As Customers = TryCast(View.SelectedObjects(0), Customers)
|
||||
Dim _CRM_Leads As CRM_Leads
|
||||
Dim _CRM_Opportunities As CRM_Opportunities
|
||||
Dim _User As User = _ocur.GetObjectByKey(Of User)(_ocur.GetKeyValue(SecuritySystem.CurrentUser))
|
||||
Dim _HRPerson As HRPerson = _ocur.FindObject(Of HRPerson)(CriteriaOperator.Parse("User=?", _User))
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _CRM_FirstMeet As CRM_FirstMeet = _ocur.FindObject(Of CRM_FirstMeet)(CriteriaOperator.Parse("DefaultforBusiness=True"))
|
||||
Dim _CustomersGLParameters As CustomersGLParameters = _ocur.FindObject(Of CustomersGLParameters)(CriteriaOperator.Parse("DefaultforBusiness=True"))
|
||||
|
||||
If _Customers.CustomersGLParameters Is Nothing Then
|
||||
_Customers.CustomersGLParameters = _CustomersGLParameters
|
||||
End If
|
||||
|
||||
If _Customers.CRM_Leads Is Nothing Then
|
||||
_CRM_Leads = _ocur.CreateObject(Of CRM_Leads)()
|
||||
_CRM_Leads.LeadStatus = eLeadStatus.Qualified
|
||||
_CRM_Leads.Customers = _ocur.GetObject(_Customers)
|
||||
_CRM_Leads.CompanyName = _Customers.FullName
|
||||
_CRM_Leads.Topic = _Customers.FullName
|
||||
_CRM_Leads.EMail = "-"
|
||||
_CRM_Leads.MobilePhone = "-"
|
||||
_CRM_Leads.LastName = "-"
|
||||
_CRM_Leads.FirstName = "-"
|
||||
_CRM_Leads.CRM_FirstMeet = _CRM_FirstMeet
|
||||
|
||||
_Customers.CRM_Leads = _CRM_Leads
|
||||
End If
|
||||
|
||||
_CRM_Opportunities = _ocur.CreateObject(Of CRM_Opportunities)()
|
||||
_CRM_Opportunities.Customers = _Customers
|
||||
_CRM_Opportunities.CRM_Leads = _Customers.CRM_Leads
|
||||
_CRM_Opportunities.HRPerson = _HRPerson
|
||||
_CRM_Opportunities.CRM_Opportunities_Probability = _ocur.FindObject(Of CRM_Opportunities_Probability)(CriteriaOperator.Parse("Probability<=30 and Probability>0"))
|
||||
|
||||
_ocur.CommitChanges()
|
||||
|
||||
e.ShowViewParameters.CreatedView = Application.CreateDetailView(_onew, "CRM_Opportunities_DetailView", True, _onew.GetObject(_CRM_Opportunities))
|
||||
|
||||
|
||||
End Sub
|
||||
Private Sub Customers_DetailView_Save_Executing(sender As Object, e As CancelEventArgs)
|
||||
'// Ha elmentünk egy partnert, akkor a Name és a FullName legyen u.a.
|
||||
End Sub
|
||||
Private Sub Customers_DetailView_DeleteAction_Executing(sender As Object, e As CancelEventArgs)
|
||||
'//Csak olyan partnert lehessen törölni, amihez nincs semmi még !
|
||||
|
||||
End Sub
|
||||
Private Sub aRecreateCustomersOrderDocuments_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aRecreateCustomersOrderDocuments.Execute
|
||||
Frame.GetController(Of Validation.PersistenceValidationController).Active.SetItemValue("", False)
|
||||
|
||||
Try
|
||||
If View.SelectedObjects.Count = 0 Then Throw New Exception("*Nincs kiválasztva egyetlen sor sem!")
|
||||
Dim _ocur As Xpo.XPObjectSpace = View.ObjectSpace
|
||||
Dim _CustomersOrderDocuments_BASE = _ocur.FindObject(Of CustomersOrderDocuments)(CriteriaOperator.Parse("1=1"))
|
||||
|
||||
If _CustomersOrderDocuments_BASE Is Nothing Then Throw New Exception("*A csoportos beállítás előtt legalább egy rendelési dokumentumot létre kell hozni!")
|
||||
|
||||
Dim _NumberGenerator_BASE As NumberGenerator = _CustomersOrderDocuments_BASE.NumberGenerator
|
||||
|
||||
Dim _CurrencyName_Collection As xpcollection = _ocur.CreateCollection(GetType(CurrencyName), CriteriaOperator.Parse("1=1"))
|
||||
RaiseEvent InitWork(1, 1, View.SelectedObjects.Count)
|
||||
For Each _CustomersOrder As CustomersOrder In View.SelectedObjects
|
||||
RaiseEvent DoWork()
|
||||
If _CustomersOrder.CustomersOrderDocuments.Count <> _CurrencyName_Collection.Count Then
|
||||
For Each _CurrencyName As CurrencyName In _CurrencyName_Collection
|
||||
|
||||
Dim _CustomersOrderDocuments As CustomersOrderDocuments = _ocur.FindObject(Of CustomersOrderDocuments)(CriteriaOperator.Parse("CurrencyName.ShortName=? AND CustomersOrder=?", _
|
||||
_CurrencyName.ShortName, _CustomersOrder))
|
||||
If _CustomersOrderDocuments Is Nothing Then
|
||||
Dim _NumberGenerator_NEW As NumberGenerator = _ocur.CreateObject(Of NumberGenerator)()
|
||||
|
||||
_NumberGenerator_NEW.NumberGeneratorGroups = _NumberGenerator_BASE.NumberGeneratorGroups
|
||||
_NumberGenerator_NEW.PrefixString = _NumberGenerator_BASE.PrefixString
|
||||
_NumberGenerator_NEW.PrefixTag = "-"
|
||||
_NumberGenerator_NEW.SuffixString = _CurrencyName.ShortName
|
||||
_NumberGenerator_NEW.SuffixTag = "-"
|
||||
_NumberGenerator_NEW.SerialNumberPlace = _NumberGenerator_BASE.SerialNumberPlace
|
||||
_NumberGenerator_NEW.SerialNumberDigit = _NumberGenerator_BASE.SerialNumberDigit
|
||||
_NumberGenerator_NEW.YearFormat = eYearFormat.YearTwoDigit
|
||||
_NumberGenerator_NEW.NewNumberPerYear = _NumberGenerator_BASE.NewNumberPerYear
|
||||
_NumberGenerator_NEW.ShortName = "Szállítói rendelések sorszámai: " & _CustomersOrder.DisplayName & ", " & _CurrencyName.ShortName
|
||||
_NumberGenerator_NEW.MonthAfterYear = _NumberGenerator_BASE.MonthAfterYear
|
||||
|
||||
Dim _CustomersOrderDocuments_NEW As CustomersOrderDocuments = _ocur.CreateObject(Of CustomersOrderDocuments)()
|
||||
|
||||
_CustomersOrderDocuments_NEW.CurrencyName = _CurrencyName
|
||||
_CustomersOrderDocuments_NEW.CustomersOrder = _CustomersOrder
|
||||
_CustomersOrderDocuments_NEW.NumberGenerator = _NumberGenerator_NEW
|
||||
_CustomersOrderDocuments_NEW.OrderOutMainType = eOrderOutMainType.eFromProducts
|
||||
|
||||
_CustomersOrder.CustomersOrderDocuments.Add(_CustomersOrderDocuments_NEW)
|
||||
|
||||
|
||||
Dim _OrderOutHeader_Collection As xpcollection = _ocur.CreateCollection(GetType(OrderOutHeader), CriteriaOperator.Parse("CustomersOrder=? AND CurrencyName.ShortName=?", _
|
||||
_CustomersOrder, _CurrencyName.ShortName))
|
||||
If _OrderOutHeader_Collection.Count Then
|
||||
For Each _OrderOutHeader As OrderOutHeader In _OrderOutHeader_Collection
|
||||
_OrderOutHeader.CustomersOrderDocuments = _CustomersOrderDocuments_NEW
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
_ocur.CommitChanges()
|
||||
End If
|
||||
Next
|
||||
RaiseEvent FinalWork
|
||||
Frame.GetController(Of Validation.PersistenceValidationController).Active.SetItemValue("", True)
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message)
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub aCustomersFileAttachment_ChangeGroup_CustomizePopupWindowParams(sender As Object, e As DevExpress.ExpressApp.Actions.CustomizePopupWindowParamsEventArgs) Handles aCustomersFileAttachment_ChangeGroup.CustomizePopupWindowParams
|
||||
Try
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _ChangeFileAttachment_PopUp As ChangeFileAttachment_PopUp = _onew.CreateObject(Of ChangeFileAttachment_PopUp)()
|
||||
|
||||
e.View = Application.CreateDetailView(_onew, "ChangeFileAttachment_PopUp_DetailView", True, _ChangeFileAttachment_PopUp)
|
||||
e.View.Tag = e.Action.Id
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly, "Hiba")
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub aCustomersFileAttachment_ChangeGroup_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.PopupWindowShowActionExecuteEventArgs) Handles aCustomersFileAttachment_ChangeGroup.Execute
|
||||
Try
|
||||
Dim _ocur As Xpo.XPObjectSpace = View.ObjectSpace
|
||||
Dim _ChangeFileAttachment_PopUp As ChangeFileAttachment_PopUp = TryCast(e.PopupWindow.View.SelectedObjects(0), ChangeFileAttachment_PopUp)
|
||||
For Each _CustomersFileAttachment As CustomersFileAttachment In View.SelectedObjects
|
||||
If _ChangeFileAttachment_PopUp.ChangeStatus = True Then
|
||||
_CustomersFileAttachment.Status = _ChangeFileAttachment_PopUp.Status
|
||||
End If
|
||||
If _ChangeFileAttachment_PopUp.ChangeRowGroup1 = True Then
|
||||
_CustomersFileAttachment.RowGroup1 = _ChangeFileAttachment_PopUp.RowGroup1
|
||||
End If
|
||||
If _ChangeFileAttachment_PopUp.ChangeRowGroup2 = True Then
|
||||
_CustomersFileAttachment.RowGroup2 = _ChangeFileAttachment_PopUp.RowGroup2
|
||||
End If
|
||||
Next
|
||||
_ocur.CommitChanges()
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly, "Hiba")
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub aMergeCustomers_CustomizePopupWindowParams(sender As Object, e As CustomizePopupWindowParamsEventArgs) Handles aMergeCustomers.CustomizePopupWindowParams
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _CustomersMergePopup As CustomersMergePopup = _onew.CreateObject(Of CustomersMergePopup)()
|
||||
Dim _Customers As Customers
|
||||
_CustomersMergePopup.CustomersMain = _onew.GetObject(TryCast(View.SelectedObjects(0), Customers))
|
||||
_CustomersMergePopup.Customers = New XPCollection(Of Customers)(_onew.Session, CriteriaOperator.Parse("1=2"))
|
||||
For Each _Customers In View.SelectedObjects
|
||||
If _Customers Is View.SelectedObjects(0) Then
|
||||
Else
|
||||
_CustomersMergePopup.Customers.Add(_onew.GetObject(_Customers))
|
||||
End If
|
||||
Next
|
||||
e.View = Application.CreateDetailView(_onew, "CustomersMergePopup_DetailView", True, _CustomersMergePopup)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub aMergeCustomers_Execute(sender As Object, e As PopupWindowShowActionExecuteEventArgs) Handles aMergeCustomers.Execute
|
||||
Try
|
||||
Frame.GetController(Of Validation.PersistenceValidationController).Active.SetItemValue("", False)
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _CustomersMergePopup As CustomersMergePopup = e.PopupWindow.View.SelectedObjects(0)
|
||||
Dim _Object As Object
|
||||
|
||||
For Each _Customers As Customers In _CustomersMergePopup.Customers
|
||||
For Each _Object In _onew.Session.CollectReferencingObjects(_onew.GetObjectByKey(Of Customers)(_Customers.Oid))
|
||||
Try
|
||||
'Debug.Print(_Object)
|
||||
For Each _PropertyInfo As PropertyInfo In _Object.GetType.GetProperties
|
||||
If _PropertyInfo.PropertyType.Name = "Customers" Then
|
||||
'_Object.setvalue(_PropertyInfo.Name) = _onew.GetObjectByKey(Of Customers)(_CustomersMergePopup.CustomersMain.Oid)
|
||||
_PropertyInfo.SetValue(_Object, _onew.GetObjectByKey(Of Customers)(_CustomersMergePopup.CustomersMain.Oid), Nothing)
|
||||
End If
|
||||
Next
|
||||
|
||||
Catch ex As Exception
|
||||
Throw New Exception(ex.Message)
|
||||
End Try
|
||||
Next
|
||||
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 aGetCustomersQuota_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aGetCustomersQuota.Execute
|
||||
'// Forgalmak számolása a Quoták alapján
|
||||
End Sub
|
||||
|
||||
Private Sub aCustomersFileAttachmentRemove_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aCustomersFileAttachmentRemove.Execute
|
||||
Try
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _ListView As ListView = TryCast(View, ListView)
|
||||
Dim _PropertyCollectionSource As PropertyCollectionSource = TryCast(_ListView.CollectionSource, PropertyCollectionSource)
|
||||
|
||||
Dim _Customers As Customers = TryCast(_PropertyCollectionSource.MasterObject, Customers)
|
||||
Dim _CustomersOrderPriority As CustomersOrderPriority = TryCast(_PropertyCollectionSource.MasterObject, CustomersOrderPriority)
|
||||
|
||||
For Each _CustomersFileAttachment As CustomersFileAttachment In e.SelectedObjects
|
||||
If _Customers IsNot Nothing Then
|
||||
_Customers.CustomersFileAttachment.Remove(_CustomersFileAttachment)
|
||||
End If
|
||||
If _CustomersOrderPriority IsNot Nothing Then
|
||||
_CustomersOrderPriority.CustomersOrder.CustomersFileAttachment.Remove(_CustomersFileAttachment)
|
||||
End If
|
||||
Next
|
||||
_ocur.CommitChanges()
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, String.Format(CaptionHelper.GetLocalizedText("Exceptions\NuvolarExceptions", "MsgBoxCheckItAgain")))
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub aCustomers_Open_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aCustomers_Open.Execute
|
||||
Try
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _Customers As Customers = _onew.GetObject(TryCast(View.SelectedObjects(0), Customers))
|
||||
If _Customers Is Nothing Then Throw New Exception("*Nem lehet azonosítani a partnert!")
|
||||
|
||||
e.ShowViewParameters.CreatedView = Application.CreateDetailView(_onew, "Customers_DetailView", True, _Customers)
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, String.Format(CaptionHelper.GetLocalizedText("Exceptions\NuvolarExceptions", "MsgBoxCheckItAgain")))
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub aPCICheck_Customers_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aPCICheck_Customers.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _uow As New UnitOfWork(_ocur.Session.DataLayer)
|
||||
|
||||
Dim _Customers As Customers
|
||||
Dim _CustomersFrom As CustomersFrom
|
||||
Dim _CustomersFrom_Collection As New XPCollection(Of CustomersFrom)(_uow)
|
||||
|
||||
For Each _Customers In View.SelectedObjects
|
||||
_Customers = _uow.GetObjectByKey(Of Customers)(_Customers.Oid)
|
||||
|
||||
For Each _CustomersFrom In _CustomersFrom_Collection
|
||||
Select Case GLOBAL_SQLType
|
||||
Case eSQLType.PostgreSQL
|
||||
_uow.ExecuteNonQuery("delete from ""PCIDetail"" where ""Customers""='" & _
|
||||
_Customers.Oid.ToString & "' and ""CustomersFrom""='" & _
|
||||
_CustomersFrom.Oid.ToString & "'")
|
||||
_uow.CommitChanges()
|
||||
_uow.ExecuteNonQuery("update ""InvoiceHeader"" set ""PCIGroup""=NULL where ""PCIGroup"" not in (select ""PCIGroup"" from ""PCIDetail"")")
|
||||
_uow.ExecuteNonQuery("delete from ""PCIGroup"" where ""Oid"" not in (select ""PCIGroup"" from ""PCIDetail"")")
|
||||
_uow.CommitChanges()
|
||||
Case Else
|
||||
_uow.ExecuteNonQuery("delete from PCIDetail where Customers='" & _
|
||||
_Customers.Oid.ToString & "' and CustomersFrom='" & _
|
||||
_CustomersFrom.Oid.ToString & "'")
|
||||
_uow.CommitChanges()
|
||||
_uow.ExecuteNonQuery("update InvoiceHeader set PCIGroup=NULL where PCIGroup not in (select PCIGroup from PCIDetail)")
|
||||
_uow.ExecuteNonQuery("delete from PCIGroup where Oid not in (select PCIGroup from PCIDetail)")
|
||||
_uow.CommitChanges()
|
||||
End Select
|
||||
|
||||
Dim _GLAccounts_Collection As New XPCollection(Of GLAccounts)(PersistentCriteriaEvaluationBehavior.InTransaction, _
|
||||
_uow, CriteriaOperator.Parse("IsDeleted=False and CustomersFrom.Oid=? and Customers.Oid=? and IsEditable=False", _
|
||||
_CustomersFrom.Oid, _Customers.Oid))
|
||||
RaiseEvent InitWork(1, 1, _GLAccounts_Collection.Count)
|
||||
For Each _GLAccounts In _GLAccounts_Collection
|
||||
RaiseEvent DoWork()
|
||||
If _GLAccounts IsNot Nothing Then
|
||||
GLFunctions.ReconfigurePCI(_uow, _GLAccounts.CustomersFrom, _GLAccounts.Customers, _GLAccounts.PartnerType, _GLAccounts.ConnectInfo)
|
||||
End If
|
||||
Next
|
||||
RaiseEvent FinalWork
|
||||
Dim _InvoiceHeader_Collection As New XPCollection(Of InvoiceHeader)(PersistentCriteriaEvaluationBehavior.InTransaction, _
|
||||
_uow, CriteriaOperator.Parse("IsDeleted=False and isnull(DocumentNumber)=False and CustomersFrom.Oid=? and Customers.Oid=? and IsEditable=False and isnull(GLAccounts)=True", _
|
||||
_CustomersFrom.Oid, _Customers.Oid))
|
||||
RaiseEvent InitWork(1, 1, _InvoiceHeader_Collection.Count)
|
||||
For Each _InvoiceHeader In _InvoiceHeader_Collection
|
||||
RaiseEvent DoWork()
|
||||
If _InvoiceHeader IsNot Nothing Then
|
||||
GLFunctions.ReconfigurePCI(_uow, _InvoiceHeader.CustomersFrom, _InvoiceHeader.Customers, 0, _InvoiceHeader.ConnectInfo)
|
||||
End If
|
||||
Next
|
||||
RaiseEvent FinalWork
|
||||
Dim _RegistryHeader_Collection As New XPCollection(Of RegistryHeader)(PersistentCriteriaEvaluationBehavior.InTransaction, _
|
||||
_uow, CriteriaOperator.Parse("IsStorno=False and IsDeleted=False and RegistryAcceptState=0 and RegistryType.RegistryMainType =0 and CustomersFrom.Oid=? and Customers.Oid=? and IsEditable=False and isnull(F_GLAccounts)=True", _
|
||||
_CustomersFrom.Oid, _Customers.Oid))
|
||||
|
||||
RaiseEvent InitWork(1, 1, _RegistryHeader_Collection.Count)
|
||||
For Each _RegistryHeader In _RegistryHeader_Collection
|
||||
RaiseEvent DoWork()
|
||||
If _RegistryHeader IsNot Nothing Then
|
||||
GLFunctions.ReconfigurePCI(_uow, _RegistryHeader.CustomersFrom, _RegistryHeader.Customers, 1, _RegistryHeader.F_ConnectInfo)
|
||||
End If
|
||||
Next
|
||||
RaiseEvent FinalWork
|
||||
|
||||
Dim _GLRows_Collection As New XPCollection(Of GLRows)(PersistentCriteriaEvaluationBehavior.InTransaction, _
|
||||
_uow, CriteriaOperator.Parse("GLHeader.IsDeleted=False and GLHeader.CustomersFrom.Oid=? and Customer.Oid=? and PartnerType in (0,1) and GLHeader.GLDocumentType in (0,2,3,4,5)", _
|
||||
_CustomersFrom.Oid, _Customers.Oid))
|
||||
|
||||
RaiseEvent InitWork(1, 1, _GLRows_Collection.Count)
|
||||
For Each _GLRows In _GLRows_Collection
|
||||
RaiseEvent DoWork()
|
||||
If _GLRows IsNot Nothing Then
|
||||
GLFunctions.ReconfigurePCI(_uow, _GLRows.GLHeader.CustomersFrom, _GLRows.Customer, _GLRows.PartnerType, _GLRows.ConnectInfo)
|
||||
End If
|
||||
Next
|
||||
RaiseEvent FinalWork
|
||||
Next
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub aCustomersSetToCustomers_CustomizePopupWindowParams(sender As Object, e As CustomizePopupWindowParamsEventArgs) Handles aCustomersSetToCustomers.CustomizePopupWindowParams
|
||||
Try
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _CS As New CollectionSource(_onew, GetType(Customers))
|
||||
|
||||
e.View = Application.CreateListView("Customers_ListView_Select", _CS, False)
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, String.Format(CaptionHelper.GetLocalizedText("Exceptions\NuvolarExceptions", "MsgBoxCheckItAgain")))
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub aCustomersSetToCustomers_Execute(sender As Object, e As PopupWindowShowActionExecuteEventArgs) Handles aCustomersSetToCustomers.Execute
|
||||
Try
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, String.Format(CaptionHelper.GetLocalizedText("Exceptions\NuvolarExceptions", "MsgBoxCheckItAgain")))
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub aCustomersSetSupplierMarkInfo_CustomizePopupWindowParams(sender As Object, e As CustomizePopupWindowParamsEventArgs) Handles aCustomersSetSupplierMarkInfo.CustomizePopupWindowParams
|
||||
Try
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _CS As New CollectionSource(_onew, GetType(Customers))
|
||||
|
||||
_CS.BeginUpdateCriteria()
|
||||
_CS.Criteria.Add("Criteria", CriteriaOperator.Parse("IsNull(SupplierMark, '')<>''"))
|
||||
_CS.EndUpdateCriteria()
|
||||
|
||||
e.View = Application.CreateListView("Customers_ListView_Select", _CS, False)
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, String.Format(CaptionHelper.GetLocalizedText("Exceptions\NuvolarExceptions", "MsgBoxCheckItAgain")))
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub aCustomersSetSupplierMarkInfo_Execute(sender As Object, e As PopupWindowShowActionExecuteEventArgs) Handles aCustomersSetSupplierMarkInfo.Execute
|
||||
Try
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _MarkInfo As String = ""
|
||||
RaiseEvent InitWork(1, 1, View.SelectedObjects.Count)
|
||||
For Each _CustomersOnPopUp As Customers In e.PopupWindow.View.SelectedObjects
|
||||
_CustomersOnPopUp = _ocur.GetObject(_CustomersOnPopUp)
|
||||
_MarkInfo += _CustomersOnPopUp.SupplierMark + ", "
|
||||
Next
|
||||
|
||||
_MarkInfo = _MarkInfo.Remove(_MarkInfo.Length - 2, 2)
|
||||
|
||||
For Each _CustomersOnBaseView As Customers In View.SelectedObjects
|
||||
_CustomersOnBaseView.SupplierMarkInfo = _MarkInfo
|
||||
RaiseEvent DoWork()
|
||||
Next
|
||||
_ocur.CommitChanges()
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, String.Format(CaptionHelper.GetLocalizedText("Exceptions\NuvolarExceptions", "MsgBoxCheckItAgain")))
|
||||
Finally
|
||||
RaiseEvent FinalWork
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub aCustomersDeleteSupplierMarkInfo_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aCustomersDeleteSupplierMarkInfo.Execute
|
||||
Try
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
RaiseEvent InitWork(1, 1, View.SelectedObjects.Count)
|
||||
|
||||
For Each _Customers As Customers In View.SelectedObjects
|
||||
_Customers.SupplierMarkInfo = Nothing
|
||||
RaiseEvent DoWork()
|
||||
Next
|
||||
|
||||
_ocur.CommitChanges()
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, String.Format(CaptionHelper.GetLocalizedText("Exceptions\NuvolarExceptions", "MsgBoxCheckItAgain")))
|
||||
Finally
|
||||
RaiseEvent FinalWork
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub aCustomersToContacts_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aCustomersToContacts.Execute
|
||||
Try
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _Customers As Customers = TryCast(TryCast(TryCast(View, ListView).CollectionSource, PropertyCollectionSource).MasterObject, Customers)
|
||||
If _Customers Is Nothing Then Throw New Exception("*Váratlan hiba történt, a folyamat megszakadt!")
|
||||
|
||||
Dim _Contacts As New Contacts(_onew.Session)
|
||||
With _Contacts
|
||||
.Customers = _onew.GetObject(_Customers)
|
||||
.MotherName = _Customers.MotherName
|
||||
If _Customers.BirthAddress IsNot Nothing Then
|
||||
If _Customers.BirthAddress.City IsNot Nothing Then .BirthPlace = _Customers.BirthAddress.City
|
||||
End If
|
||||
|
||||
.TAJNumber = _Customers.TAJNumber
|
||||
.Birthday = _Customers.BirthDate
|
||||
.Address1 = _onew.GetObject(_Customers.Address1)
|
||||
.Address2 = _onew.GetObject(_Customers.Address2)
|
||||
|
||||
End With
|
||||
|
||||
e.ShowViewParameters.CreatedView = Application.CreateDetailView(_onew, "Contacts_DetailView", True, _Contacts)
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, String.Format(CaptionHelper.GetLocalizedText("Exceptions\NuvolarExceptions", "MsgBoxCheckItAgain")))
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub aCustomersToCustomersOrder_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aCustomersToCustomersOrder.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _SelectedData As DevExpress.Xpo.DB.SelectedData = Nothing
|
||||
Dim _SQL As String = ""
|
||||
Dim _Customers As Customers
|
||||
Dim _SelectStatementResultRow As SelectStatementResultRow
|
||||
Dim _Exists As Boolean = False
|
||||
Dim _ObjectType As Long = 0
|
||||
For Each _Customers In View.SelectedObjects
|
||||
Select Case GLOBAL_SQLType
|
||||
Case eSQLType.MSSQL, eSQLType.PostgreSQL
|
||||
_SQL = "select ""Oid"" from ""CustomersOrder"" where ""Oid""='" & _Customers.Oid.ToString & "'"
|
||||
Case eSQLType.MySQL
|
||||
_SQL = "select Oid from CustomersOrder where Oid='" & _Customers.Oid.ToString & "'"
|
||||
End Select
|
||||
|
||||
_SelectedData = _ocur.Session.ExecuteQuery(_SQL)
|
||||
If _SelectedData.ResultSet.Length > 0 Then
|
||||
For Each _SelectStatementResultRow In _SelectedData.ResultSet(0).Rows
|
||||
_Exists = True
|
||||
Next
|
||||
End If
|
||||
|
||||
If _Exists = False Then
|
||||
Select Case GLOBAL_SQLType
|
||||
Case eSQLType.MSSQL, eSQLType.PostgreSQL
|
||||
_SQL = "select ""Oid"" from ""XPObjectType"" where ""TypeName""='Nuvolar.Module.CustomersOrder'"
|
||||
Case eSQLType.MySQL
|
||||
_SQL = "select Oid from XPObjectType where TypeName='Nuvolar.Module.CustomersOrder'"
|
||||
End Select
|
||||
_SelectedData = _ocur.Session.ExecuteQuery(_SQL)
|
||||
If _SelectedData.ResultSet.Length > 0 Then
|
||||
For Each _SelectStatementResultRow In _SelectedData.ResultSet(0).Rows
|
||||
_ObjectType = _SelectStatementResultRow.Values(0)
|
||||
Next
|
||||
End If
|
||||
Select Case GLOBAL_SQLType
|
||||
Case eSQLType.MSSQL, eSQLType.PostgreSQL
|
||||
_SQL = "insert ""CustomersOrder"" (""Oid"") values ('" & _Customers.Oid.ToString & "')"
|
||||
Case eSQLType.MySQL
|
||||
_SQL = "insert CustomersOrder (Oid) values ('" & _Customers.Oid.ToString & "')"
|
||||
End Select
|
||||
_ocur.Session.ExecuteNonQuery(_SQL)
|
||||
Select Case GLOBAL_SQLType
|
||||
Case eSQLType.MSSQL, eSQLType.PostgreSQL
|
||||
_SQL = "Update ""Party"" set ""ObjectType""=" & _ObjectType & " where ""Oid""='" & _Customers.Oid.ToString & "'"
|
||||
Case eSQLType.MySQL
|
||||
_SQL = "Update Party set ObjectType=" & _ObjectType & " where Oid='" & _Customers.Oid.ToString & "'"
|
||||
End Select
|
||||
_ocur.Session.ExecuteNonQuery(_SQL)
|
||||
_ocur.CommitChanges()
|
||||
Frame.GetController(Of RefreshController).RefreshAction.DoExecute()
|
||||
End If
|
||||
Next
|
||||
|
||||
|
||||
End Sub
|
||||
Private Sub aCustomers_ChangeCustomers_CustomizePopupWindowParams(sender As Object, e As CustomizePopupWindowParamsEventArgs) Handles aCustomers_ChangeCustomers.CustomizePopupWindowParams
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _Customers_Change_PopUP As New Customers_Change_PopUP(_onew.Session)
|
||||
|
||||
e.View = Application.CreateDetailView(_onew, "Customers_Change_PopUP_DetailView", True, _Customers_Change_PopUP)
|
||||
End Sub
|
||||
Private Sub aCustomers_ChangeCustomers_Execute(sender As Object, e As PopupWindowShowActionExecuteEventArgs) Handles aCustomers_ChangeCustomers.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _Customers_Change_PopUP As Customers_Change_PopUP = _ocur.GetObject(e.PopupWindow.View.SelectedObjects(0))
|
||||
|
||||
RaiseEvent InitWork(1, 1, View.SelectedObjects.Count)
|
||||
For Each _Customers As Customers In View.SelectedObjects
|
||||
If _Customers_Change_PopUP.Change_Country1 Then
|
||||
If _Customers.Address1 IsNot Nothing Then
|
||||
_Customers.Address1.Country = _ocur.GetObject(_Customers_Change_PopUP.Country1)
|
||||
End If
|
||||
End If
|
||||
If _Customers_Change_PopUP.Change_Country2 Then
|
||||
If _Customers.Address2 IsNot Nothing Then
|
||||
_Customers.Address2.Country = _ocur.GetObject(_Customers_Change_PopUP.Country2)
|
||||
End If
|
||||
End If
|
||||
If _Customers_Change_PopUP.Change_CreditlineDay Then
|
||||
_Customers.CreditlineDay = _Customers_Change_PopUP.CreditlineDay
|
||||
End If
|
||||
If _Customers_Change_PopUP.Change_CustomersGLParameters Then
|
||||
_Customers.CustomersGLParameters = _ocur.GetObject(_Customers_Change_PopUP.CustomersGLParameters)
|
||||
End If
|
||||
If _Customers_Change_PopUP.Change_IsAssetsHandling Then
|
||||
_Customers.IsAssetsHandling = _ocur.GetObject(_Customers_Change_PopUP.IsAssetsHandling)
|
||||
End If
|
||||
If _Customers_Change_PopUP.Change_LateChargesCountMode Then
|
||||
_Customers.LateChargesCountMode = _ocur.GetObject(_Customers_Change_PopUP.LateChargesCountMode)
|
||||
End If
|
||||
If _Customers_Change_PopUP.Change_PaymentOption Then
|
||||
_Customers.PaymentOption = _ocur.GetObject(_Customers_Change_PopUP.PaymentOption)
|
||||
End If
|
||||
If _Customers_Change_PopUP.Change_Pricing Then
|
||||
_Customers.Pricing = _ocur.GetObject(_Customers_Change_PopUP.Pricing)
|
||||
End If
|
||||
If _Customers_Change_PopUP.Change_PricingIn Then
|
||||
_Customers.PricingIn = _ocur.GetObject(_Customers_Change_PopUP.PricingIn)
|
||||
End If
|
||||
If _Customers_Change_PopUP.Change_Profile Then
|
||||
_Customers.Profile = _Customers_Change_PopUP.Profile
|
||||
End If
|
||||
If _Customers_Change_PopUP.Change_QualityOption Then
|
||||
_Customers.QualityOption = _ocur.GetObject(_Customers_Change_PopUP.QualityOption)
|
||||
End If
|
||||
If _Customers_Change_PopUP.Change_ShipmentOption Then
|
||||
_Customers.ShipmentOption = _ocur.GetObject(_Customers_Change_PopUP.ShipmentOption)
|
||||
End If
|
||||
RaiseEvent DoWork()
|
||||
Next
|
||||
_ocur.CommitChanges()
|
||||
RaiseEvent FinalWork
|
||||
End Sub
|
||||
Private Sub aCustomers_CreateBusinessDirectory_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aCustomers_CreateBusinessDirectory.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _Customers As Customers = TryCast(View.SelectedObjects(0), Customers)
|
||||
|
||||
If _Customers.MasterBusinessDirectory Is Nothing Then
|
||||
Dim _CustomersBaseBusinessDirectory As BusinessDirectory = _ocur.FindObject(Of BusinessDirectory)(DevExpress.Data.Filtering.CriteriaOperator.Parse("ShortName='Ügyfelek' AND IsNull(BusinessDirectory_Parent)=True"))
|
||||
|
||||
If _CustomersBaseBusinessDirectory Is Nothing Then
|
||||
_CustomersBaseBusinessDirectory = New BusinessDirectory(_ocur.Session)
|
||||
With _CustomersBaseBusinessDirectory
|
||||
.ShortName = "Ügyfelek"
|
||||
.BusinessDirectory_Parent = Nothing
|
||||
End With
|
||||
End If
|
||||
|
||||
Dim _CustomersBusinessDirectory As New BusinessDirectory(_ocur.Session)
|
||||
With _CustomersBusinessDirectory
|
||||
.ShortName = String.Format("{0} {1} {2}", _Customers.FullName, _Customers.Address1.City, _Customers.CustomerNumber)
|
||||
.BusinessDirectory_Parent = _CustomersBaseBusinessDirectory
|
||||
End With
|
||||
_CustomersBusinessDirectory.Save()
|
||||
_Customers.MasterBusinessDirectory = _CustomersBusinessDirectory
|
||||
_ocur.CommitChanges()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub aViewPCIDetail_Customers_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aViewPCIDetail_Customers.Execute
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _Customers As Customers = _onew.GetObject(TryCast(View.SelectedObjects(0), Customers))
|
||||
|
||||
Dim _PCIDetail_CollectionSource As New CollectionSource(_onew, GetType(PCIDetail))
|
||||
|
||||
_PCIDetail_CollectionSource.BeginUpdateCriteria()
|
||||
_PCIDetail_CollectionSource.Criteria("Customers") = CriteriaOperator.Parse("Customers=?", _Customers)
|
||||
_PCIDetail_CollectionSource.EndUpdateCriteria()
|
||||
|
||||
e.ShowViewParameters.CreatedView = Application.CreateListView("PCIDetail_ListView_Customers", _PCIDetail_CollectionSource, False)
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub aCustomers_OpenDHUrl_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aCustomers_OpenDHUrl.Execute
|
||||
Dim _Customers As Customers = TryCast(View.SelectedObjects(0), Customers)
|
||||
If _Customers IsNot Nothing Then
|
||||
Dim _ExternalBrowserPath As String = Nothing
|
||||
If TryCast(Application.Model.Options, IModelOptionsExtender) IsNot Nothing Then
|
||||
If File.Exists(TryCast(Application.Model.Options, IModelOptionsExtender).ExternalBrowserPath) Then
|
||||
_ExternalBrowserPath = TryCast(Application.Model.Options, IModelOptionsExtender).ExternalBrowserPath
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim _Process As New System.Diagnostics.Process
|
||||
|
||||
With _Process.StartInfo
|
||||
.FileName = _ExternalBrowserPath
|
||||
.Arguments = String.Format(" url ""{0}""", _Customers.Url_DH)
|
||||
End With
|
||||
|
||||
_Process.Start()
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
+90
@@ -0,0 +1,90 @@
|
||||
Imports System
|
||||
Imports System.ComponentModel
|
||||
|
||||
Imports DevExpress.Xpo
|
||||
Imports DevExpress.Data.Filtering
|
||||
|
||||
Imports DevExpress.ExpressApp
|
||||
Imports DevExpress.Persistent.Base
|
||||
Imports DevExpress.Persistent.BaseImpl
|
||||
Imports DevExpress.Persistent.Validation
|
||||
|
||||
<DefaultClassOptions()> _
|
||||
<NonPersistent()> _
|
||||
<CreatableItem(False)> _
|
||||
<NavigationItem(False)> _
|
||||
Public Class ChangeFileAttachment_PopUp
|
||||
Inherits BaseObject
|
||||
|
||||
|
||||
Private _Status As eProductsDocumentationStatus
|
||||
Private _ChangeStatus As Boolean
|
||||
Private _RowGroup1 As String 'Szöveges csoportosítás (nem kötelezõ)
|
||||
Private _ChangeRowGroup1 As Boolean
|
||||
Private _RowGroup2 As String 'Szöveges másodlagos csoportosítás (nem kötelezõ)
|
||||
Private _ChangeRowGroup2 As Boolean
|
||||
|
||||
|
||||
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
' Place here your initialization code.
|
||||
End Sub
|
||||
|
||||
Public Property Status() As eProductsDocumentationStatus
|
||||
Get
|
||||
Return _Status
|
||||
End Get
|
||||
Set(ByVal value As eProductsDocumentationStatus)
|
||||
SetPropertyValue("Status", _Status, value)
|
||||
End Set
|
||||
End Property
|
||||
Public Property RowGroup1() As String
|
||||
Get
|
||||
Return _RowGroup1
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
SetPropertyValue("RowGroup1", _RowGroup1, value)
|
||||
End Set
|
||||
End Property
|
||||
Public Property RowGroup2() As String
|
||||
Get
|
||||
Return _RowGroup2
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
SetPropertyValue("RowGroup2", _RowGroup2, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property ChangeStatus() As Boolean
|
||||
Get
|
||||
Return _ChangeStatus
|
||||
End Get
|
||||
Set(ByVal value As Boolean)
|
||||
SetPropertyValue("Status", _ChangeStatus, value)
|
||||
End Set
|
||||
End Property
|
||||
Public Property ChangeRowGroup1() As Boolean
|
||||
Get
|
||||
Return _ChangeRowGroup1
|
||||
End Get
|
||||
Set(ByVal value As Boolean)
|
||||
SetPropertyValue("RowGroup1", _ChangeRowGroup1, value)
|
||||
End Set
|
||||
End Property
|
||||
Public Property ChangeRowGroup2() As Boolean
|
||||
Get
|
||||
Return _ChangeRowGroup2
|
||||
End Get
|
||||
Set(ByVal value As Boolean)
|
||||
SetPropertyValue("RowGroup2", _ChangeRowGroup2, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,32 @@
|
||||
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 CustomersMergePopup
|
||||
Inherits BaseObject
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
' This constructor is used when an object is loaded from a persistent storage.
|
||||
' Do not place any code here or place it only when the IsLoading property is false:
|
||||
' if (!IsLoading){
|
||||
' It is now OK to place your initialization code here.
|
||||
' }
|
||||
' or as an alternative, move your initialization code into the AfterConstruction method.
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
' Place here your initialization code.
|
||||
End Sub
|
||||
|
||||
Property CustomersMain As Customers
|
||||
Property Customers As XPCollection(Of Customers)
|
||||
|
||||
End Class
|
||||
+243
@@ -0,0 +1,243 @@
|
||||
Imports System
|
||||
Imports System.ComponentModel
|
||||
|
||||
Imports DevExpress.Xpo
|
||||
Imports DevExpress.Data.Filtering
|
||||
|
||||
Imports DevExpress.ExpressApp
|
||||
Imports DevExpress.Persistent.Base
|
||||
Imports DevExpress.Persistent.BaseImpl
|
||||
Imports DevExpress.Persistent.Validation
|
||||
|
||||
<DefaultClassOptions()> _
|
||||
<NonPersistent()> _
|
||||
<CreatableItem(False)> _
|
||||
<NavigationItem(False)> _
|
||||
Public Class Customers_Change_PopUP
|
||||
Inherits BaseObject
|
||||
|
||||
Private _Change_PaymentOption As Boolean
|
||||
Private _PaymentOption As PaymentOption
|
||||
Private _Change_ShipmentOption As Boolean
|
||||
Private _ShipmentOption As ShipmentOption
|
||||
Private _Change_QualityOption As Boolean
|
||||
Private _QualityOption As QualityOption
|
||||
Private _Change_IsAssetsHandling As Boolean
|
||||
Private _IsAssetsHandling As Boolean
|
||||
Private _Change_LateChargesCountMode As Boolean
|
||||
Private _LateChargesCountMode As LateChargesCountMode
|
||||
Private _Change_CreditlineDay As Boolean
|
||||
Private _CreditlineDay As Long
|
||||
Private _Change_Pricing As Boolean 'Árképzés ha vevõ az ügyfél
|
||||
Private _Pricing As Pricing
|
||||
Private _Change_PricingIn As Boolean 'Árképzés ha vásárolunk tõle
|
||||
Private _PricingIn As Pricing
|
||||
Private _Change_CustomersGLParameters As Boolean 'Ügyfél fõkönyvi kategária
|
||||
Private _CustomersGLParameters As CustomersGLParameters
|
||||
Private _Change_Profile As Boolean
|
||||
Private _Profile As String
|
||||
Private _Change_Country1 As Boolean
|
||||
Private _Country1 As Country
|
||||
Private _Change_Country2 As Boolean
|
||||
Private _Country2 As Country
|
||||
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
End Sub
|
||||
|
||||
Property Change_PaymentOption As Boolean
|
||||
Get
|
||||
Return _Change_PaymentOption
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
SetPropertyValue("Change_PaymentOption", _Change_PaymentOption, value)
|
||||
End Set
|
||||
End Property
|
||||
Public Property PaymentOption() As PaymentOption
|
||||
Get
|
||||
Return _PaymentOption
|
||||
End Get
|
||||
Set(ByVal value As PaymentOption)
|
||||
SetPropertyValue("PaymentOption", _PaymentOption, value)
|
||||
End Set
|
||||
End Property
|
||||
Property Change_ShipmentOption As Boolean
|
||||
Get
|
||||
Return _Change_ShipmentOption
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
SetPropertyValue("Change_ShipmentOption", _Change_ShipmentOption, value)
|
||||
End Set
|
||||
End Property
|
||||
Public Property ShipmentOption() As ShipmentOption
|
||||
Get
|
||||
Return _ShipmentOption
|
||||
End Get
|
||||
Set(ByVal value As ShipmentOption)
|
||||
SetPropertyValue("ShipmentOption", _ShipmentOption, value)
|
||||
End Set
|
||||
End Property
|
||||
Property Change_QualityOption As Boolean
|
||||
Get
|
||||
Return _Change_QualityOption
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
SetPropertyValue("Change_QualityOption", _Change_QualityOption, value)
|
||||
End Set
|
||||
End Property
|
||||
Public Property QualityOption() As QualityOption
|
||||
Get
|
||||
Return _QualityOption
|
||||
End Get
|
||||
Set(ByVal value As QualityOption)
|
||||
SetPropertyValue("QualityOption", _QualityOption, value)
|
||||
End Set
|
||||
End Property
|
||||
Property Change_IsAssetsHandling As Boolean
|
||||
Get
|
||||
Return _Change_IsAssetsHandling
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
SetPropertyValue("Change_IsAssetsHandling", _Change_IsAssetsHandling, value)
|
||||
End Set
|
||||
End Property
|
||||
Property IsAssetsHandling As Boolean
|
||||
Get
|
||||
Return _IsAssetsHandling
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
SetPropertyValue("IsAssetsHandling", _IsAssetsHandling, value)
|
||||
End Set
|
||||
End Property
|
||||
Property Change_LateChargesCountMode As Boolean
|
||||
Get
|
||||
Return _Change_LateChargesCountMode
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
SetPropertyValue("Change_LateChargesCountMode", _Change_LateChargesCountMode, value)
|
||||
End Set
|
||||
End Property
|
||||
Property LateChargesCountMode As LateChargesCountMode
|
||||
Get
|
||||
Return _LateChargesCountMode
|
||||
End Get
|
||||
Set(value As LateChargesCountMode)
|
||||
SetPropertyValue("LateChargesCountMode", _LateChargesCountMode, value)
|
||||
End Set
|
||||
End Property
|
||||
Property Change_CreditlineDay As Boolean
|
||||
Get
|
||||
Return _Change_CreditlineDay
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
SetPropertyValue("Change_CreditlineDay", _Change_CreditlineDay, value)
|
||||
End Set
|
||||
End Property
|
||||
Property CreditlineDay As Long
|
||||
Get
|
||||
Return _CreditlineDay
|
||||
End Get
|
||||
Set(value As Long)
|
||||
SetPropertyValue("CreditlineDay", _CreditlineDay, value)
|
||||
End Set
|
||||
End Property
|
||||
Property Change_Pricing As Boolean
|
||||
Get
|
||||
Return _Change_Pricing
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
SetPropertyValue("Change_Pricing", _Change_Pricing, value)
|
||||
End Set
|
||||
End Property
|
||||
Property Pricing As Pricing
|
||||
Get
|
||||
Return _Pricing
|
||||
End Get
|
||||
Set(ByVal value As Pricing)
|
||||
SetPropertyValue("Pricing", _Pricing, value)
|
||||
End Set
|
||||
End Property
|
||||
Property Change_PricingIn As Boolean
|
||||
Get
|
||||
Return _Change_PricingIn
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
SetPropertyValue("Change_PricingIn", _Change_PricingIn, value)
|
||||
End Set
|
||||
End Property
|
||||
Property PricingIn As Pricing
|
||||
Get
|
||||
Return _PricingIn
|
||||
End Get
|
||||
Set(ByVal value As Pricing)
|
||||
SetPropertyValue("PricingIn", _PricingIn, value)
|
||||
End Set
|
||||
End Property
|
||||
Property Change_CustomersGLParameters As Boolean
|
||||
Get
|
||||
Return _Change_CustomersGLParameters
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
SetPropertyValue("Change_CustomersGLParameters", _Change_CustomersGLParameters, value)
|
||||
End Set
|
||||
End Property
|
||||
Property CustomersGLParameters() As CustomersGLParameters
|
||||
Get
|
||||
Return _CustomersGLParameters
|
||||
End Get
|
||||
Set(ByVal value As CustomersGLParameters)
|
||||
SetPropertyValue("CustomersGLParameters", _CustomersGLParameters, value)
|
||||
End Set
|
||||
End Property
|
||||
Property Change_Profile As Boolean
|
||||
Get
|
||||
Return _Change_Profile
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
SetPropertyValue("Change_Profile", _Change_Profile, value)
|
||||
End Set
|
||||
End Property
|
||||
Property Profile As String
|
||||
Get
|
||||
Return _Profile
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("Profile", _Profile, value)
|
||||
End Set
|
||||
End Property
|
||||
Property Change_Country1 As Boolean
|
||||
Get
|
||||
Return _Change_Country1
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
SetPropertyValue("Change_Country1", _Change_Country1, value)
|
||||
End Set
|
||||
End Property
|
||||
Property Country1 As Country
|
||||
Get
|
||||
Return _Country1
|
||||
End Get
|
||||
Set(value As Country)
|
||||
SetPropertyValue("Country1", _Country1, value)
|
||||
End Set
|
||||
End Property
|
||||
Property Change_Country2 As Boolean
|
||||
Get
|
||||
Return _Change_Country2
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
SetPropertyValue("Change_Country2", _Change_Country2, value)
|
||||
End Set
|
||||
End Property
|
||||
Property Country2 As Country
|
||||
Get
|
||||
Return _Country2
|
||||
End Get
|
||||
Set(value As Country)
|
||||
SetPropertyValue("Country2", _Country2, value)
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
@@ -0,0 +1,48 @@
|
||||
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 Themes 'Témák törzse
|
||||
Inherits BaseObject
|
||||
Private _ShortName As String
|
||||
Private _Description As String
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
' This constructor is used when an object is loaded from a persistent storage.
|
||||
' Do not place any code here or place it only when the IsLoading property is false:
|
||||
' if (!IsLoading){
|
||||
' It is now OK to place your initialization code here.
|
||||
' }
|
||||
' or as an alternative, move your initialization code into the AfterConstruction method.
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
' Place here your initialization code.
|
||||
End Sub
|
||||
|
||||
Property ShortName As String
|
||||
Get
|
||||
Return _ShortName
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("ShortName", _ShortName, value)
|
||||
End Set
|
||||
End Property
|
||||
<Size(-1)> _
|
||||
Property Description As String
|
||||
Get
|
||||
Return _Description
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("Description", _Description, value)
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
@@ -0,0 +1,252 @@
|
||||
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 System.Net.Mail
|
||||
|
||||
Public Enum eMeetPlace
|
||||
eCustomersOffice = 0
|
||||
eOurOffice = 1
|
||||
eOtherPlace = 2
|
||||
End Enum
|
||||
<DefaultClassOptions()> _
|
||||
<NavigationItem(False)> _
|
||||
<CreatableItem(False)> _
|
||||
<Appearance("Disable CustomersMeeting - ObjectCreated all times", AppearanceItemType.ViewItem, "1=1", TargetItems:="ObjectCreated", Enabled:=False)> _
|
||||
<Appearance("Disable CustomersMeeting - UserCreated all times", AppearanceItemType.ViewItem, "1=1", TargetItems:="UserCreated", Enabled:=False)> _
|
||||
<Appearance("Disable CustomersMeeting - Months all times", AppearanceItemType.ViewItem, "1=1", TargetItems:="Months", Enabled:=False)> _
|
||||
<Appearance("Disable CustomersMeeting - DocumentNumber all times", AppearanceItemType.ViewItem, "1=1", TargetItems:="DocumentNumber", Enabled:=False)> _
|
||||
<Appearance("Disable CustomersMeeting - all properties, when IsEditable=False", AppearanceItemType.ViewItem, "IsEditable=False", TargetItems:="*", Enabled:=False)> _
|
||||
Public Class CustomersMeeting
|
||||
Inherits BaseObject
|
||||
Private _MeetPlace As eMeetPlace
|
||||
Private _CustomersMeetingType As CustomersMeetingType
|
||||
Private _Customers As Customers
|
||||
Private _DocumentNumber As String
|
||||
Private _DateExecution As Date
|
||||
Private _ShortName As String
|
||||
Private _Description As String
|
||||
Private _UserCreated As User
|
||||
Private _ObjectCreated As Date
|
||||
Private _IsEditable As Boolean
|
||||
Private _Months As eMonths
|
||||
Private _EmailHasBeenSent As Boolean
|
||||
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
DateExecution = Now
|
||||
IsEditable = True
|
||||
EmailHasBeenSent = False
|
||||
End Sub
|
||||
Protected Overrides Sub OnSaving()
|
||||
MyBase.OnSaving()
|
||||
If Session.IsNewObject(Me) Then
|
||||
UserCreated = Session.GetObjectByKey(Of User)(Session.GetKeyValue(SecuritySystem.CurrentUser))
|
||||
ObjectCreated = Now
|
||||
|
||||
If String.IsNullOrEmpty(DocumentNumber) And NumberGenerator IsNot Nothing Then
|
||||
DocumentNumber = NumberGenerator.GetNewNumber(NumberGenerator, Year(Now).ToString)
|
||||
End If
|
||||
Months = ObjectCreated.Month
|
||||
|
||||
If EmailHasBeenSent = False Then
|
||||
Try
|
||||
Dim _WebParameters As WebParameters = Session.FindObject(Of WebParameters)(CriteriaOperator.Parse("1=1"))
|
||||
If _WebParameters Is Nothing Then Throw New Exception("*Nincsnek e-mail paraméterek beállítva!")
|
||||
If _WebParameters.SMTPHost Is Nothing Then Throw New Exception("*Nincs SMTP server beállítva!")
|
||||
If _WebParameters.SMTPUserName = "" Then Throw New Exception("*Nincs felhasználói név beállítva!")
|
||||
If _WebParameters.SMTPPort = 0 Then Throw New Exception("*Nincs SMTP port beállítva!")
|
||||
|
||||
|
||||
Dim _MailMessage As New MailMessage
|
||||
Dim _SmtpClient As SmtpClient = New SmtpClient(_WebParameters.SMTPHost)
|
||||
_MailMessage.From = New MailAddress(_WebParameters.Email_SupportAdmin)
|
||||
If Customers.Contacts.Count > 0 Then
|
||||
For Each _Contacts As Contacts In Customers.Contacts
|
||||
If Not String.IsNullOrEmpty(_Contacts.Email) Then _MailMessage.To.Add(_Contacts.Email)
|
||||
Next
|
||||
ElseIf Not String.IsNullOrEmpty(Customers.Email) Then
|
||||
_MailMessage.To.Add(Customers.Email)
|
||||
Else
|
||||
Throw New Exception("*Nincs email cím beállítva!")
|
||||
End If
|
||||
|
||||
_MailMessage.Subject = "Új egyeztetés"
|
||||
_MailMessage.IsBodyHtml = True
|
||||
_MailMessage.Body = String.Format("{0} számmal új egyeztetés készült az Ön részére", DocumentNumber)
|
||||
|
||||
_SmtpClient.Port = _WebParameters.SMTPPort
|
||||
_SmtpClient.Credentials = New System.Net.NetworkCredential(_WebParameters.SMTPUserName, _WebParameters.SMTPPassword)
|
||||
_SmtpClient.EnableSsl = _WebParameters.EnableSsl
|
||||
|
||||
_SmtpClient.Send(_MailMessage)
|
||||
|
||||
EmailHasBeenSent = True
|
||||
Catch ex As Exception
|
||||
Dim sf As StackFrame = New StackFrame()
|
||||
Dim _uow As New UnitOfWork(Session.DataLayer)
|
||||
Dim _ErrorLog As New ErrorLog(_uow)
|
||||
_ErrorLog.Description = ex.Message
|
||||
_ErrorLog.SubName = TryCast(sf.GetMethod(), System.Reflection.MethodBase).Name
|
||||
_uow.CommitTransaction()
|
||||
End Try
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Property MeetPlace As eMeetPlace
|
||||
Get
|
||||
Return _MeetPlace
|
||||
End Get
|
||||
Set(value As eMeetPlace)
|
||||
SetPropertyValue("MeetPlace", _MeetPlace, value)
|
||||
End Set
|
||||
End Property
|
||||
Property CustomersMeetingState As CustomersMeetingType 'ELBASZTAM a nevét! R.
|
||||
Get
|
||||
Return _CustomersMeetingType
|
||||
End Get
|
||||
Set(value As CustomersMeetingType)
|
||||
SetPropertyValue("CustomersMeetingType", _CustomersMeetingType, value)
|
||||
If Not Session.IsObjectsLoading And Not Session.IsObjectsSaving Then
|
||||
If String.IsNullOrEmpty(ShortName) Then _
|
||||
ShortName = value.ShortName
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
<RuleRequiredField("CustomersMeeting - Customers", DefaultContexts.Save)> _
|
||||
Property Customers As Customers
|
||||
Get
|
||||
Return _Customers
|
||||
End Get
|
||||
Set(value As Customers)
|
||||
SetPropertyValue("Customers", _Customers, value)
|
||||
End Set
|
||||
End Property
|
||||
Property DocumentNumber As String
|
||||
Get
|
||||
Return _DocumentNumber
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("DocumentNumber", _DocumentNumber, value)
|
||||
End Set
|
||||
End Property
|
||||
Property DateExecution As Date
|
||||
Get
|
||||
Return _DateExecution
|
||||
End Get
|
||||
Set(value As Date)
|
||||
SetPropertyValue("DateExecution", _DateExecution, value)
|
||||
End Set
|
||||
End Property
|
||||
Property ShortName As String
|
||||
Get
|
||||
Return _ShortName
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("ShortName", _ShortName, value)
|
||||
End Set
|
||||
End Property
|
||||
<Size(-1)> _
|
||||
<RuleRequiredField("CustomersMeeting - Description", DefaultContexts.Save)> _
|
||||
Property Description As String
|
||||
Get
|
||||
Return _Description
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("Description", _Description, 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
|
||||
<VisibleInListView(False)> _
|
||||
Property IsEditable As Boolean
|
||||
Get
|
||||
Return _IsEditable
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
SetPropertyValue("IsEditable", _IsEditable, value)
|
||||
End Set
|
||||
End Property
|
||||
Property Months As eMonths
|
||||
Get
|
||||
Return _Months
|
||||
End Get
|
||||
Set(value As eMonths)
|
||||
SetPropertyValue("Months", _Months, value)
|
||||
End Set
|
||||
End Property
|
||||
<VisibleInListView(False)> _
|
||||
<VisibleInDetailView(False)> _
|
||||
<VisibleInLookupListView(False)> _
|
||||
Property EmailHasBeenSent As Boolean
|
||||
Get
|
||||
Return _EmailHasBeenSent
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
SetPropertyValue("EmailHasBeenSent", _EmailHasBeenSent, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
<VisibleInListView(False)> _
|
||||
<Association("CustomersMeeting-CustomersMeetingDocuments", GetType(CustomersMeetingDocuments))> _
|
||||
ReadOnly Property CustomersMeetingDocuments As XPCollection(Of CustomersMeetingDocuments)
|
||||
Get
|
||||
Return GetCollection(Of CustomersMeetingDocuments)("CustomersMeetingDocuments")
|
||||
End Get
|
||||
End Property
|
||||
<Browsable(False)> _
|
||||
ReadOnly Property NumberGenerator As NumberGenerator
|
||||
Get
|
||||
Return TryCast(Session.FindObject(Of SupportNG)(CriteriaOperator.Parse("SupportType=2")), SupportNG).NumberGenerator
|
||||
End Get
|
||||
End Property
|
||||
|
||||
<Browsable(False)> _
|
||||
ReadOnly Property CustomersMeetingSubContractorCustomers As XPCollection(Of Customers)
|
||||
Get
|
||||
If TryCast(SecuritySystem.CurrentUser, User) Is Nothing Then Return Nothing
|
||||
Dim _SubContractorCustomers_Collection As New XPCollection(Of Customers)(Session, CriteriaOperator.Parse("1=2"))
|
||||
Dim _User As User = Session.GetObjectByKey(Of User)(TryCast(SecuritySystem.CurrentUser, User).Oid)
|
||||
Dim _Contacts As Contacts = Session.FindObject(Of Contacts)(DevExpress.Data.Filtering.CriteriaOperator.Parse("User = ?", _User))
|
||||
If _Contacts.Customers IsNot Nothing Then
|
||||
Dim _Subcontractor As Subcontractor = Session.FindObject(Of Subcontractor)(CriteriaOperator.Parse("Customers=?", _Contacts.Customers))
|
||||
If _Subcontractor IsNot Nothing Then
|
||||
For Each _SubcontractorCustomers As SubcontractorCustomers In _Subcontractor.SubcontractorCustomers
|
||||
_SubContractorCustomers_Collection.Add(_SubcontractorCustomers.Customers)
|
||||
Next
|
||||
End If
|
||||
|
||||
Return _SubContractorCustomers_Collection
|
||||
Else
|
||||
Return Nothing
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
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 CustomersMeetingDocuments
|
||||
Inherits FileAttachmentBase
|
||||
Private _CustomersMeeting As CustomersMeeting
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
End Sub
|
||||
<Association("CustomersMeeting-CustomersMeetingDocuments", GetType(CustomersMeeting))> _
|
||||
Property CustomersMeeting As CustomersMeeting
|
||||
Get
|
||||
Return _CustomersMeeting
|
||||
End Get
|
||||
Set(value As CustomersMeeting)
|
||||
SetPropertyValue("CustomersMeeting", _CustomersMeeting, value)
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
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("Support")> _
|
||||
<CreatableItem(False)> _
|
||||
Public Class CustomersMeetingType
|
||||
Inherits BaseObject
|
||||
|
||||
Private _ShortName As String 'Megnevezés
|
||||
Private _Description As String 'Leírás
|
||||
Private _ReportData As ReportData
|
||||
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
End Sub
|
||||
|
||||
<RuleRequiredField("CustomersMeetingType - ShortName", DefaultContexts.Save)> _
|
||||
Property ShortName As String
|
||||
Get
|
||||
Return _ShortName
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("ShortName", _ShortName, value)
|
||||
End Set
|
||||
End Property
|
||||
<Size(-1)> _
|
||||
Property Description As String
|
||||
Get
|
||||
Return _Description
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("Description", _Description, value)
|
||||
End Set
|
||||
End Property
|
||||
<RuleRequiredField("CustomersMeetingType - ReportData", DefaultContexts.Save)> _
|
||||
Property ReportData As ReportData
|
||||
Get
|
||||
Return _ReportData
|
||||
End Get
|
||||
Set(value As ReportData)
|
||||
SetPropertyValue("ReportData", _ReportData, value)
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
Generated
+51
@@ -0,0 +1,51 @@
|
||||
Partial Class CustomersMeeting_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.aCustomersMeeting_Print = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
'
|
||||
'aCustomersMeeting_Print
|
||||
'
|
||||
Me.aCustomersMeeting_Print.Caption = "aCustomersMeeting_Print"
|
||||
Me.aCustomersMeeting_Print.Category = "View"
|
||||
Me.aCustomersMeeting_Print.ConfirmationMessage = Nothing
|
||||
Me.aCustomersMeeting_Print.Id = "aCustomersMeeting_Print"
|
||||
Me.aCustomersMeeting_Print.ImageName = Nothing
|
||||
Me.aCustomersMeeting_Print.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
|
||||
Me.aCustomersMeeting_Print.Shortcut = Nothing
|
||||
Me.aCustomersMeeting_Print.Tag = Nothing
|
||||
Me.aCustomersMeeting_Print.TargetObjectsCriteria = Nothing
|
||||
Me.aCustomersMeeting_Print.TargetObjectType = GetType(Nuvolar.[Module].CustomersMeeting)
|
||||
Me.aCustomersMeeting_Print.TargetViewId = Nothing
|
||||
Me.aCustomersMeeting_Print.ToolTip = Nothing
|
||||
Me.aCustomersMeeting_Print.TypeOfView = Nothing
|
||||
|
||||
End Sub
|
||||
Friend WithEvents aCustomersMeeting_Print As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
|
||||
End Class
|
||||
+126
@@ -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="aCustomersMeeting_Print.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
</root>
|
||||
+132
@@ -0,0 +1,132 @@
|
||||
Imports System
|
||||
Imports System.ComponentModel
|
||||
Imports System.Collections.Generic
|
||||
Imports System.Diagnostics
|
||||
Imports System.Text
|
||||
|
||||
Imports DevExpress.ExpressApp
|
||||
Imports DevExpress.ExpressApp.Actions
|
||||
Imports DevExpress.Persistent.Base
|
||||
Imports DevExpress.ExpressApp.SystemModule
|
||||
Imports DevExpress.ExpressApp.CloneObject
|
||||
Imports DevExpress.Data.Filtering
|
||||
Imports DevExpress.Persistent.BaseImpl
|
||||
|
||||
Public Class CustomersMeeting_VC
|
||||
Inherits DevExpress.ExpressApp.ViewController
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
End Sub
|
||||
|
||||
Protected Overrides Sub OnActivated()
|
||||
MyBase.OnActivated()
|
||||
If View.Id = "CustomersMeeting_CustomersMeetingDocuments_ListView" Then
|
||||
Frame.GetController(Of LinkUnlinkController)().Active.SetItemValue("", False)
|
||||
Frame.GetController(Of CloneObjectViewController)().Active.SetItemValue("", False)
|
||||
End If
|
||||
If View.Id = "CustomersMeeting_ListView_Support" Then
|
||||
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", False)
|
||||
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _User As DevExpress.Persistent.BaseImpl.User = TryCast(SecuritySystem.CurrentUser, DevExpress.Persistent.BaseImpl.User)
|
||||
Dim _Contacts As Contacts = _ocur.FindObject(Of Contacts)(DevExpress.Data.Filtering.CriteriaOperator.Parse("User = ?", _ocur.GetObject(_User)))
|
||||
|
||||
If _Contacts IsNot Nothing Then
|
||||
If _Contacts.Customers IsNot Nothing Then
|
||||
TryCast(View, ListView).CollectionSource.Criteria("BySupportCM") = DevExpress.Data.Filtering.CriteriaOperator.Parse("Customers.Oid = ?", _Contacts.Customers.Oid)
|
||||
Else
|
||||
TryCast(View, ListView).CollectionSource.Criteria("BySupportCM") = DevExpress.Data.Filtering.CriteriaOperator.Parse("1=2")
|
||||
End If
|
||||
Else
|
||||
TryCast(View, ListView).CollectionSource.Criteria("BySupportCM") = DevExpress.Data.Filtering.CriteriaOperator.Parse("1=2")
|
||||
End If
|
||||
End If
|
||||
If View.Id = "CustomersMeeting_ListView_Subcontractor" Then
|
||||
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", False)
|
||||
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _User As DevExpress.Persistent.BaseImpl.User = TryCast(SecuritySystem.CurrentUser, DevExpress.Persistent.BaseImpl.User)
|
||||
Dim _Contacts As Contacts = _ocur.FindObject(Of Contacts)(DevExpress.Data.Filtering.CriteriaOperator.Parse("User = ?", _ocur.GetObject(_User)))
|
||||
|
||||
If _Contacts IsNot Nothing Then
|
||||
If _Contacts.Customers IsNot Nothing Then
|
||||
|
||||
Dim _Filter As String = "UserCreated.Oid in("
|
||||
|
||||
For Each _ContactsIn As Contacts In _Contacts.Customers.Contacts
|
||||
_Filter += "'" + _ContactsIn.User.Oid.ToString + "',"
|
||||
Next
|
||||
_Filter = _Filter.Remove(_Filter.Length - 1, 1)
|
||||
_Filter += ")"
|
||||
|
||||
TryCast(View, ListView).CollectionSource.Criteria("BySupportCM") = DevExpress.Data.Filtering.CriteriaOperator.Parse(_Filter)
|
||||
Else
|
||||
TryCast(View, ListView).CollectionSource.Criteria("BySupportCM") = DevExpress.Data.Filtering.CriteriaOperator.Parse("1=2")
|
||||
End If
|
||||
Else
|
||||
TryCast(View, ListView).CollectionSource.Criteria("BySupportCM") = DevExpress.Data.Filtering.CriteriaOperator.Parse("1=2")
|
||||
End If
|
||||
End If
|
||||
If View.Id = "CustomersMeeting_DetailView_Subcontractor" Then
|
||||
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", False)
|
||||
End If
|
||||
If View.Id = "CustomersMeeting_DetailView" Then
|
||||
Dim _CustomersMeeting As CustomersMeeting = TryCast(View.SelectedObjects(0), CustomersMeeting)
|
||||
If _CustomersMeeting IsNot Nothing Then
|
||||
If Not TryCast(View.ObjectSpace, Xpo.XPObjectSpace).Session.IsNewObject(_CustomersMeeting) Then
|
||||
If _CustomersMeeting.IsEditable Then
|
||||
Dim _NeedCommit As Boolean = False
|
||||
If _CustomersMeeting.ObjectCreated.Year < GetSQLTime(TryCast(View.ObjectSpace, Xpo.XPObjectSpace).Session).Year Then
|
||||
_CustomersMeeting.IsEditable = False
|
||||
_NeedCommit = True
|
||||
ElseIf _CustomersMeeting.ObjectCreated.Month < GetSQLTime(TryCast(View.ObjectSpace, Xpo.XPObjectSpace).Session).Month Then
|
||||
_CustomersMeeting.IsEditable = False
|
||||
_NeedCommit = True
|
||||
ElseIf _CustomersMeeting.ObjectCreated.Day < GetSQLTime(TryCast(View.ObjectSpace, Xpo.XPObjectSpace).Session).Day Then
|
||||
_CustomersMeeting.IsEditable = False
|
||||
_NeedCommit = True
|
||||
End If
|
||||
If _NeedCommit Then TryCast(View.ObjectSpace, Xpo.XPObjectSpace).CommitChanges()
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Protected Overrides Sub OnDeactivated()
|
||||
MyBase.OnDeactivated()
|
||||
If View.Id = "CustomersMeeting_CustomersMeetingDocuments_ListView" Then
|
||||
Frame.GetController(Of LinkUnlinkController)().Active.SetItemValue("", True)
|
||||
Frame.GetController(Of CloneObjectViewController)().Active.SetItemValue("", True)
|
||||
End If
|
||||
If View.Id = "CustomersMeeting_ListView_Support" Then
|
||||
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", True)
|
||||
End If
|
||||
If View.Id = "CustomersMeeting_ListView_Subcontractor" Then
|
||||
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", True)
|
||||
End If
|
||||
If View.Id = "CustomersMeeting_DetailView_Subcontractor" Then
|
||||
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", True)
|
||||
|
||||
End If
|
||||
End Sub
|
||||
Private Sub aCustomersMeeting_Print_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aCustomersMeeting_Print.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _CustomersMeeting As CustomersMeeting = TryCast(View.SelectedObjects(0), CustomersMeeting)
|
||||
If _CustomersMeeting IsNot Nothing Then
|
||||
If _CustomersMeeting.CustomersMeetingState IsNot Nothing Then
|
||||
Dim _ReportData As ReportData = _CustomersMeeting.CustomersMeetingState.ReportData
|
||||
|
||||
If _ReportData IsNot Nothing Then
|
||||
Frame.GetController(Of Reports.ReportServiceController).ShowPreview(_ReportData, CriteriaOperator.Parse("Oid=?", _CustomersMeeting.Oid), True)
|
||||
Else
|
||||
MsgBox("Nincs beállítva nyomtatvány!")
|
||||
End If
|
||||
Else
|
||||
MsgBox("Nincs beállítva az egyeztetés típusa, így nem lehet nyomtatni!")
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
@@ -0,0 +1,147 @@
|
||||
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
|
||||
|
||||
Public Enum DashboardViewMode
|
||||
Viewer = 0
|
||||
Designer = 1
|
||||
End Enum
|
||||
|
||||
<DefaultClassOptions()> _
|
||||
<CreatableItem(False)> _
|
||||
<NavigationItem(False)> _
|
||||
<NonPersistent()> _
|
||||
<Appearance("Hide DashboardDesigner, when DashboardViewMode = 0", AppearanceItemType.ViewItem, "DashboardViewMode = 0", TargetItems:="DashboardDesigner", visibility:=Editors.ViewItemVisibility.Hide)> _
|
||||
<Appearance("Hide DashboardViewer, when DashboardViewMode = 1", AppearanceItemType.ViewItem, "DashboardViewMode = 1", TargetItems:="DashboardViewer", visibility:=Editors.ViewItemVisibility.Hide)> _
|
||||
Public Class Dashboard
|
||||
Inherits BaseObject
|
||||
|
||||
Private _DashboardViewMode As DashboardViewMode
|
||||
Private _DashboardViewer As String
|
||||
Private _DashboardDesigner As String
|
||||
Private _SQLServer As String
|
||||
Private _SQLType As eSQLType
|
||||
Private _Database As String
|
||||
Private _UserName As String
|
||||
Private _Password As String
|
||||
Private _XMLFileData As FileData
|
||||
Private _Object_Oid As String
|
||||
Private _Object_Type As System.Type
|
||||
Private _IsNewDashboard As Boolean
|
||||
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
IsNewDashboard = False
|
||||
End Sub
|
||||
|
||||
<ImmediatePostData()> _
|
||||
Property DashboardViewMode As DashboardViewMode
|
||||
Get
|
||||
Return _DashboardViewMode
|
||||
End Get
|
||||
Set(value As DashboardViewMode)
|
||||
SetPropertyValue("DashboardViewMode", _DashboardViewMode, value)
|
||||
End Set
|
||||
End Property
|
||||
<Size(-1)> _
|
||||
Property DashboardViewer As String
|
||||
Get
|
||||
Return _DashboardViewer
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("DashboardViewer", _DashboardViewer, value)
|
||||
End Set
|
||||
End Property
|
||||
<Size(-1)> _
|
||||
Property DashboardDesigner As String
|
||||
Get
|
||||
Return _DashboardDesigner
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("DashboardDesigner", _DashboardDesigner, value)
|
||||
End Set
|
||||
End Property
|
||||
Property SQLServer As String
|
||||
Get
|
||||
Return _SQLServer
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("SQLServer", _SQLServer, value)
|
||||
End Set
|
||||
End Property
|
||||
Property SQLType As eSQLType
|
||||
Get
|
||||
Return _SQLType
|
||||
End Get
|
||||
Set(value As eSQLType)
|
||||
SetPropertyValue("SQLType", _SQLType, value)
|
||||
End Set
|
||||
End Property
|
||||
Property Database As String
|
||||
Get
|
||||
Return _Database
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("Database", _Database, value)
|
||||
End Set
|
||||
End Property
|
||||
Property UserName As String
|
||||
Get
|
||||
Return _UserName
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("UserName", _UserName, value)
|
||||
End Set
|
||||
End Property
|
||||
Property Password As String
|
||||
Get
|
||||
Return _Password
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("Password", _Password, value)
|
||||
End Set
|
||||
End Property
|
||||
Property XMLFileData As FileData
|
||||
Get
|
||||
Return _XMLFileData
|
||||
End Get
|
||||
Set(value As FileData)
|
||||
SetPropertyValue("XMLFileData", _XMLFileData, value)
|
||||
End Set
|
||||
End Property
|
||||
Property Object_Oid As String
|
||||
Get
|
||||
Return _Object_Oid
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("Object_Oid", _Object_Oid, value)
|
||||
End Set
|
||||
End Property
|
||||
Property Object_Type As System.Type
|
||||
Get
|
||||
Return _Object_Type
|
||||
End Get
|
||||
Set(value As System.Type)
|
||||
SetPropertyValue("Object_Type", _Object_Type, value)
|
||||
End Set
|
||||
End Property
|
||||
Property IsNewDashboard As Boolean
|
||||
Get
|
||||
Return _IsNewDashboard
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
SetPropertyValue("IsNewDashboard", _IsNewDashboard, value)
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
Partial Class Dashboard_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()
|
||||
components = New System.ComponentModel.Container()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,21 @@
|
||||
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
|
||||
|
||||
Public Class Dashboard_VC
|
||||
Inherits DevExpress.ExpressApp.ViewController
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,113 @@
|
||||
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("EMailSendQueueHeader - Disable QueueNumber", TargetItems:="QueueNumber", Criteria:="1=1", Enabled:=False, Context:="DetailView")> _
|
||||
<Appearance("EMailSendQueueHeader - Disable ObjectCreated", TargetItems:="ObjectCreated", Criteria:="1=1", Enabled:=False, Context:="DetailView")> _
|
||||
<Appearance("EMailSendQueueHeader - Disable UserCreated", TargetItems:="UserCreated", Criteria:="1=1", Enabled:=False, Context:="DetailView")> _
|
||||
<Appearance("EMailSendQueueHeader - Disable IsExecuted", TargetItems:="IsExecuted", Criteria:="1=1", Enabled:=False, Context:="DetailView")> _
|
||||
Public Class EMailSendQueueHeader
|
||||
Inherits BaseObject
|
||||
Private _QueueNumber As String
|
||||
Private _ShortName As String 'Csomag megnevezése
|
||||
Private _EmailSendQueueParameters As EMailSendQueueParameters
|
||||
Private _UserCreated As User 'Létrehozta
|
||||
Private _ObjectCreated As Date 'Létrehozva
|
||||
Private _ScheduleDateTime As Date 'Mikorra ütemezzük
|
||||
Private _IsExecuted As Boolean 'El lett-e már küldve
|
||||
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
IsExecuted = False
|
||||
|
||||
End Sub
|
||||
Protected Overrides Sub OnSaving()
|
||||
MyBase.OnSaving()
|
||||
If String.IsNullOrEmpty(QueueNumber) Then QueueNumber = EmailSendQueueParameters.NumberGenerator.GetNewNumber(EmailSendQueueParameters.NumberGenerator)
|
||||
If Session.IsNewObject(Me) Then
|
||||
ObjectCreated = GetSQLTime(Session)
|
||||
UserCreated = Session.GetObjectByKey(Of User)(Session.GetKeyValue(SecuritySystem.CurrentUser))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Property QueueNumber As String
|
||||
Get
|
||||
Return _QueueNumber
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("QueueNumber", _QueueNumber, value)
|
||||
End Set
|
||||
End Property
|
||||
<Size(255)> _
|
||||
Property ShortName As String
|
||||
Get
|
||||
Return _ShortName
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("ShortName", _ShortName, value)
|
||||
End Set
|
||||
End Property
|
||||
<RuleRequiredField("EMailSendQueueHeader - EmailSendQueueParameters ", DefaultContexts.Save)> _
|
||||
Property EmailSendQueueParameters As EMailSendQueueParameters
|
||||
Get
|
||||
Return _EmailSendQueueParameters
|
||||
End Get
|
||||
Set(value As EMailSendQueueParameters)
|
||||
SetPropertyValue("EmailSendQueueParameters", _EmailSendQueueParameters, value)
|
||||
End Set
|
||||
End Property
|
||||
<NonCloneable> _
|
||||
Property UserCreated As User
|
||||
Get
|
||||
Return _UserCreated
|
||||
End Get
|
||||
Set(value As User)
|
||||
SetPropertyValue("UserCreated", _UserCreated, value)
|
||||
End Set
|
||||
End Property
|
||||
<NonCloneable> _
|
||||
Property ObjectCreated As Date
|
||||
Get
|
||||
Return _ObjectCreated
|
||||
End Get
|
||||
Set(value As Date)
|
||||
SetPropertyValue("ObjectCreated", _ObjectCreated, value)
|
||||
End Set
|
||||
End Property
|
||||
Property ScheduleDateTime As Date
|
||||
Get
|
||||
Return _ScheduleDateTime
|
||||
End Get
|
||||
Set(value As Date)
|
||||
SetPropertyValue("ScheduleDateTime", _ScheduleDateTime, value)
|
||||
End Set
|
||||
End Property
|
||||
Property IsExecuted As Boolean
|
||||
Get
|
||||
Return _IsExecuted
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
SetPropertyValue("IsExecuted", _IsExecuted, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'-------------ReadOnly------------
|
||||
<Association("EMailSendQueueHeader-EMailSendQueueRows", GetType(EMailSendQueueRows)), VisibleInListView(False)> _
|
||||
ReadOnly Property EMailSendQueueRows As XPCollection(Of EMailSendQueueRows)
|
||||
Get
|
||||
Return GetCollection(Of EMailSendQueueRows)("EMailSendQueueRows")
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
@@ -0,0 +1,72 @@
|
||||
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 EMailSendQueueParameters
|
||||
Inherits BaseObject
|
||||
Private _ShortName As String
|
||||
Private _NumberGenerator As NumberGenerator
|
||||
Private _HTMLBody As String 'Alapértelmezett HTML body
|
||||
Private _Subject As String 'Alapértelmezett tárgy mezõ {0},{1} formátumban
|
||||
Private _EMailFrom As String
|
||||
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
End Sub
|
||||
|
||||
<RuleRequiredField("EMailSendQueueParameters - ShortName ", DefaultContexts.Save)> _
|
||||
Property ShortName As String
|
||||
Get
|
||||
Return _ShortName
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("ShortName", _ShortName, value)
|
||||
End Set
|
||||
End Property
|
||||
<RuleRequiredField("EMailSendQueueParameters - NumberGenerator ", DefaultContexts.Save)> _
|
||||
Property NumberGenerator As NumberGenerator
|
||||
Get
|
||||
Return _NumberGenerator
|
||||
End Get
|
||||
Set(value As NumberGenerator)
|
||||
SetPropertyValue("NumberGenerator", _NumberGenerator, value)
|
||||
End Set
|
||||
End Property
|
||||
<Size(-1)> _
|
||||
Property HTMLBody As String
|
||||
Get
|
||||
Return _HTMLBody
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("HTMLBody", _HTMLBody, value)
|
||||
End Set
|
||||
End Property
|
||||
<Size(255)> _
|
||||
Property Subject As String
|
||||
Get
|
||||
Return _Subject
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("Subject", _Subject, value)
|
||||
End Set
|
||||
End Property
|
||||
Property EMailFrom As String
|
||||
Get
|
||||
Return _EMailFrom
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("EMailFrom", _EMailFrom, value)
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
@@ -0,0 +1,132 @@
|
||||
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 EMailSendQueueRows
|
||||
Inherits BaseObject
|
||||
|
||||
Private _EMailSendQueueHeader As EMailSendQueueHeader
|
||||
Private _EMailFrom As String '255
|
||||
Private _EMailTo As String '255
|
||||
Private _Subject As String '255
|
||||
Private _HTMLBody As String '-1
|
||||
Private _FileAttachments1 As FileData
|
||||
Private _FileAttachments2 As FileData
|
||||
Private _FileAttachments3 As FileData
|
||||
Private _ExceptionMessage As String ' -1
|
||||
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
End Sub
|
||||
|
||||
Protected Overrides Sub OnDeleting()
|
||||
MyBase.OnDeleting()
|
||||
Dim _AssetsHandling As AssetsHandling
|
||||
Dim _AssetsHandling_Collection As New XPCollection(Of AssetsHandling)(Session, CriteriaOperator.Parse("EMailSendQueueRows=?", Me))
|
||||
For Each _AssetsHandling In _AssetsHandling_Collection
|
||||
_AssetsHandling.EMailSendQueueRows = Nothing
|
||||
Dim _AssetsHandlingStatus As AssetsHandlingStatus = Session.FindObject(Of AssetsHandlingStatus)(CriteriaOperator.Parse("QueueIndex=0"))
|
||||
If _AssetsHandling.InvoiceHeader IsNot Nothing Then
|
||||
_AssetsHandling.InvoiceHeader.AssetsHandlingStatus = _AssetsHandlingStatus
|
||||
End If
|
||||
|
||||
Next
|
||||
End Sub
|
||||
<Association("EMailSendQueueHeader-EMailSendQueueRows", GetType(EMailSendQueueHeader))> _
|
||||
Property EMailSendQueueHeader As EMailSendQueueHeader
|
||||
Get
|
||||
Return _EMailSendQueueHeader
|
||||
End Get
|
||||
Set(value As EMailSendQueueHeader)
|
||||
SetPropertyValue("EMailSendQueueHeader", _EMailSendQueueHeader, value)
|
||||
End Set
|
||||
End Property
|
||||
<Size(255)> _
|
||||
Property EMailFrom As String
|
||||
Get
|
||||
Return _EMailFrom
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("EMailFrom", _EMailFrom, value)
|
||||
End Set
|
||||
End Property
|
||||
<Size(255)> _
|
||||
Property EMailTo As String
|
||||
Get
|
||||
Return _EMailTo
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("EMailTo", _EMailTo, value)
|
||||
End Set
|
||||
End Property
|
||||
<Size(255)> _
|
||||
Property Subject As String
|
||||
Get
|
||||
Return _Subject
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("Subject", _Subject, value)
|
||||
End Set
|
||||
End Property
|
||||
<Size(-1)> _
|
||||
Property HTMLBody As String
|
||||
Get
|
||||
Return _HTMLBody
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("HTMLBody", _HTMLBody, value)
|
||||
End Set
|
||||
End Property
|
||||
Property FileAttachments1 As FileData
|
||||
Get
|
||||
Return _FileAttachments1
|
||||
End Get
|
||||
Set(value As FileData)
|
||||
SetPropertyValue("FileAttachments1", _FileAttachments1, value)
|
||||
End Set
|
||||
End Property
|
||||
Property FileAttachments2 As FileData
|
||||
Get
|
||||
Return _FileAttachments2
|
||||
End Get
|
||||
Set(value As FileData)
|
||||
SetPropertyValue("FileAttachments2", _FileAttachments2, value)
|
||||
End Set
|
||||
End Property
|
||||
Property FileAttachments3 As FileData
|
||||
Get
|
||||
Return _FileAttachments3
|
||||
End Get
|
||||
Set(value As FileData)
|
||||
SetPropertyValue("FileAttachments3", _FileAttachments3, value)
|
||||
End Set
|
||||
End Property
|
||||
Property ExceptionMessage As String
|
||||
Get
|
||||
Return _ExceptionMessage
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("ExceptionMessage", _ExceptionMessage, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'ReadOnly
|
||||
<Association("EMailSendQueueRows-EMailSendQueueRows_FileAttachment", GetType(EMailSendQueueRows_FileAttachment)), VisibleInListView(False)> _
|
||||
ReadOnly Property EMailSendQueueRows_FileAttachment As XPCollection(Of EMailSendQueueRows_FileAttachment)
|
||||
Get
|
||||
Return GetCollection(Of EMailSendQueueRows_FileAttachment)("EMailSendQueueRows_FileAttachment")
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
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()> _
|
||||
Public Class EMailSendQueueRows_FileAttachment
|
||||
Inherits BaseObject
|
||||
|
||||
Private _EMailSendQueueRows As EMailSendQueueRows
|
||||
Private _FileAttachments As FileData
|
||||
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
End Sub
|
||||
|
||||
<Association("EMailSendQueueRows-EMailSendQueueRows_FileAttachment", GetType(EMailSendQueueRows))> _
|
||||
Property EMailSendQueueRows As EMailSendQueueRows
|
||||
Get
|
||||
Return _EMailSendQueueRows
|
||||
End Get
|
||||
Set(value As EMailSendQueueRows)
|
||||
SetPropertyValue("EMailSendQueueRows", _EMailSendQueueRows, value)
|
||||
End Set
|
||||
End Property
|
||||
Property FileAttachments As FileData
|
||||
Get
|
||||
Return _FileAttachments
|
||||
End Get
|
||||
Set(value As FileData)
|
||||
SetPropertyValue("FileAttachments", _FileAttachments, value)
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
Partial Class EMailSendQueueVC
|
||||
|
||||
<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.aEMailSendQueue_Send = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
'
|
||||
'aEMailSendQueue_Send
|
||||
'
|
||||
Me.aEMailSendQueue_Send.Caption = "aEMailSendQueue_Send"
|
||||
Me.aEMailSendQueue_Send.ConfirmationMessage = Nothing
|
||||
Me.aEMailSendQueue_Send.Id = "aEMailSendQueue_Send"
|
||||
Me.aEMailSendQueue_Send.ImageName = Nothing
|
||||
Me.aEMailSendQueue_Send.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireMultipleObjects
|
||||
Me.aEMailSendQueue_Send.Shortcut = Nothing
|
||||
Me.aEMailSendQueue_Send.Tag = Nothing
|
||||
Me.aEMailSendQueue_Send.TargetObjectsCriteria = Nothing
|
||||
Me.aEMailSendQueue_Send.TargetObjectType = GetType(Nuvolar.[Module].EMailSendQueueHeader)
|
||||
Me.aEMailSendQueue_Send.TargetViewId = Nothing
|
||||
Me.aEMailSendQueue_Send.ToolTip = Nothing
|
||||
Me.aEMailSendQueue_Send.TypeOfView = Nothing
|
||||
|
||||
End Sub
|
||||
Friend WithEvents aEMailSendQueue_Send As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,126 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="aEMailSendQueue_Send.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -0,0 +1,102 @@
|
||||
Imports System
|
||||
Imports System.ComponentModel
|
||||
Imports System.Collections.Generic
|
||||
Imports System.Diagnostics
|
||||
Imports System.Text
|
||||
Imports System.Net.Mail
|
||||
Imports DevExpress.ExpressApp
|
||||
Imports DevExpress.ExpressApp.Actions
|
||||
Imports DevExpress.Persistent.Base
|
||||
Imports DevExpress.Data.Filtering
|
||||
Imports System.IO
|
||||
Imports DevExpress.ExpressApp.Utils
|
||||
|
||||
Public Class EMailSendQueueVC
|
||||
Inherits DevExpress.ExpressApp.ViewController
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
End Sub
|
||||
Protected Overrides Sub OnActivated()
|
||||
MyBase.OnActivated()
|
||||
End Sub
|
||||
Protected Overrides Sub OnDeactivated()
|
||||
MyBase.OnDeactivated()
|
||||
End Sub
|
||||
|
||||
Private Sub aEMailSendQueue_Send_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aEMailSendQueue_Send.Execute
|
||||
Try
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
If View.SelectedObjects.Count = 0 Then Throw New Exception("*Nincs kiválasztva egyetlen sor sem! A folyamat megszakadt!")
|
||||
Dim _WebParameters As WebParameters = _ocur.FindObject(Of WebParameters)(CriteriaOperator.Parse("1=1"))
|
||||
If String.IsNullOrEmpty(_WebParameters.SMTPHost) Or
|
||||
String.IsNullOrEmpty(_WebParameters.SMTPPassword) Or
|
||||
String.IsNullOrEmpty(_WebParameters.SMTPPort) Or
|
||||
String.IsNullOrEmpty(_WebParameters.SMTPUserName) Then Throw New Exception("*Hiányosak az SMTP Server adatok! Kérem, ellenõrizze!")
|
||||
|
||||
For Each _EMailSendQueueHeader As EMailSendQueueHeader In View.SelectedObjects
|
||||
If _EMailSendQueueHeader.EMailSendQueueRows.Count > 0 Then
|
||||
Dim _SMTPServer As New SmtpClient
|
||||
With (_SMTPServer)
|
||||
.Credentials = New Net.NetworkCredential(_WebParameters.SMTPUserName, _WebParameters.SMTPPassword)
|
||||
.Port = _WebParameters.SMTPPort
|
||||
.Host = _WebParameters.SMTPHost
|
||||
.EnableSsl = _WebParameters.EnableSsl
|
||||
End With
|
||||
For Each _EMailSendQueueRows As EMailSendQueueRows In _EMailSendQueueHeader.EMailSendQueueRows
|
||||
Try
|
||||
Dim _Mail As New MailMessage
|
||||
With (_Mail)
|
||||
.From = New MailAddress(_EMailSendQueueRows.EMailFrom)
|
||||
.To.Add(_EMailSendQueueRows.EMailTo)
|
||||
.Subject = _EMailSendQueueRows.Subject
|
||||
.IsBodyHtml = True
|
||||
.Body = _EMailSendQueueRows.HTMLBody
|
||||
If _EMailSendQueueRows.FileAttachments1 IsNot Nothing Then
|
||||
Dim _MemoryStream As New MemoryStream()
|
||||
_EMailSendQueueRows.FileAttachments1.SaveToStream(_MemoryStream)
|
||||
_MemoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
||||
Dim _Attachment = New Attachment(_MemoryStream, _EMailSendQueueRows.FileAttachments1.FileName, "application/pdf")
|
||||
.Attachments.Add(_Attachment)
|
||||
End If
|
||||
If _EMailSendQueueRows.FileAttachments2 IsNot Nothing Then
|
||||
Dim _MemoryStream As New MemoryStream()
|
||||
_EMailSendQueueRows.FileAttachments2.SaveToStream(_MemoryStream)
|
||||
_MemoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
||||
Dim _Attachment = New Attachment(_MemoryStream, _EMailSendQueueRows.FileAttachments2.FileName, "application/pdf")
|
||||
.Attachments.Add(_Attachment)
|
||||
End If
|
||||
If _EMailSendQueueRows.FileAttachments3 IsNot Nothing Then
|
||||
Dim _MemoryStream As New MemoryStream()
|
||||
_EMailSendQueueRows.FileAttachments3.SaveToStream(_MemoryStream)
|
||||
_MemoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
||||
Dim _Attachment = New Attachment(_MemoryStream, _EMailSendQueueRows.FileAttachments3.FileName, "application/pdf")
|
||||
.Attachments.Add(_Attachment)
|
||||
End If
|
||||
|
||||
For Each _EMailSendQueueRows_FileAttachment As EMailSendQueueRows_FileAttachment In _EMailSendQueueRows.EMailSendQueueRows_FileAttachment
|
||||
Dim _MemoryStream As New MemoryStream()
|
||||
_EMailSendQueueRows_FileAttachment.FileAttachments.SaveToStream(_MemoryStream)
|
||||
_MemoryStream.Seek(0, System.IO.SeekOrigin.Begin)
|
||||
Dim _Attachment = New Attachment(_MemoryStream, _EMailSendQueueRows_FileAttachment.FileAttachments.FileName, "application/pdf")
|
||||
.Attachments.Add(_Attachment)
|
||||
Next
|
||||
End With
|
||||
|
||||
_SMTPServer.Send(_Mail)
|
||||
_EMailSendQueueRows.ExceptionMessage = ""
|
||||
Catch ex As Exception
|
||||
_EMailSendQueueRows.ExceptionMessage = ex.Message
|
||||
End Try
|
||||
Next
|
||||
End If
|
||||
_EMailSendQueueHeader.IsExecuted = True
|
||||
Next
|
||||
_ocur.CommitChanges()
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, String.Format(CaptionHelper.GetLocalizedText("Exceptions\NuvolarExceptions", "MsgBoxCheckItAgain")))
|
||||
End Try
|
||||
End Sub
|
||||
End Class
|
||||
@@ -0,0 +1,81 @@
|
||||
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 ErrorLog
|
||||
Inherits BaseObject
|
||||
|
||||
Private _Description As String
|
||||
Private _SubName As String
|
||||
Private _UserCreated As User
|
||||
Private _ObjectCreated As Date
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
' This constructor is used when an object is loaded from a persistent storage.
|
||||
' Do not place any code here or place it only when the IsLoading property is false:
|
||||
' if (!IsLoading){
|
||||
' It is now OK to place your initialization code here.
|
||||
' }
|
||||
' or as an alternative, move your initialization code into the AfterConstruction method.
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
' Place here your initialization code.
|
||||
End Sub
|
||||
Protected Overrides Sub OnSaving()
|
||||
MyBase.OnSaving()
|
||||
If Session.IsNewObject(Me) Then
|
||||
ObjectCreated = GetSQLTime(Session)
|
||||
If SecuritySystem.CurrentUser IsNot Nothing Then
|
||||
UserCreated = Session.GetObjectByKey(Of User)(Session.GetKeyValue(SecuritySystem.CurrentUser))
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
<Size(-1)> _
|
||||
Property Description As String
|
||||
Get
|
||||
Return _Description
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("Description", _Description, value)
|
||||
End Set
|
||||
End Property
|
||||
<Size(255)> _
|
||||
Property SubName As String
|
||||
Get
|
||||
Return _SubName
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("SubName", _SubName, value)
|
||||
End Set
|
||||
End Property
|
||||
<NonCloneable> _
|
||||
Property UserCreated As User
|
||||
Get
|
||||
Return _UserCreated
|
||||
End Get
|
||||
Set(value As User)
|
||||
SetPropertyValue("UserCreated", _UserCreated, value)
|
||||
End Set
|
||||
End Property
|
||||
<NonCloneable> _
|
||||
Property ObjectCreated As Date
|
||||
Get
|
||||
Return _ObjectCreated
|
||||
End Get
|
||||
Set(value As Date)
|
||||
SetPropertyValue("ObjectCreated", _ObjectCreated, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,177 @@
|
||||
Imports Microsoft.VisualBasic
|
||||
Imports System
|
||||
Imports System.IO
|
||||
Imports DevExpress.Xpo
|
||||
Imports System.ComponentModel
|
||||
Imports DevExpress.Persistent.Base
|
||||
Imports DevExpress.Persistent.BaseImpl
|
||||
Imports DevExpress.Persistent.Validation
|
||||
|
||||
'Dennis: the FileDataEx class allows you to store files in file system instead of the database. You can set the required path in the DefaultDirectory constant.
|
||||
<Persistent(), DefaultProperty("FileName")> _
|
||||
Public Class FileDataEx
|
||||
Inherits BaseObject
|
||||
Implements IFileData, IEmptyCheckable
|
||||
Public Const DefaultDirectory As String = "D:\Store\"
|
||||
Private Const ReadBytesSize As Integer = &H1000
|
||||
Private tempStream As Stream = Nothing
|
||||
Private tempFileName As String = String.Empty
|
||||
|
||||
<Persistent("Size")> _
|
||||
Private _Size As Integer
|
||||
<PersistentAlias("_Size")> _
|
||||
Public ReadOnly Property Size() As Integer Implements IFileData.Size
|
||||
Get
|
||||
Return _Size
|
||||
End Get
|
||||
End Property
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Public Overrides Function ToString() As String
|
||||
Return FileName
|
||||
End Function
|
||||
Private _Content() As Byte
|
||||
<Browsable(False), MemberDesignTimeVisibility(False), EditorBrowsable(EditorBrowsableState.Never)> _
|
||||
Public Property Content() As Byte()
|
||||
Get
|
||||
Return _Content
|
||||
End Get
|
||||
Set(ByVal value As Byte())
|
||||
SetPropertyValue("Content", _Content, value)
|
||||
End Set
|
||||
End Property
|
||||
<NonPersistent(), MemberDesignTimeVisibility(False)> _
|
||||
Public ReadOnly Property IsEmpty() As Boolean Implements IEmptyCheckable.IsEmpty
|
||||
Get
|
||||
Return String.IsNullOrEmpty(_FileName) AndAlso Not Exists
|
||||
End Get
|
||||
End Property
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
If (Not Directory.Exists(DefaultDirectory)) Then
|
||||
Directory.CreateDirectory(DefaultDirectory)
|
||||
End If
|
||||
End Sub
|
||||
Private _FileName As String = String.Empty
|
||||
<Size(260)> _
|
||||
Public Property FileName() As String Implements IFileData.FileName
|
||||
Get
|
||||
Return _FileName
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
SetPropertyValue("FileName", _FileName, value)
|
||||
End Set
|
||||
End Property
|
||||
Public ReadOnly Property RealFileName() As String
|
||||
Get
|
||||
|
||||
If _FileName <> String.Empty Then
|
||||
Return Path.Combine(DefaultDirectory, GetUniqueFileName(_FileName))
|
||||
Else
|
||||
Return String.Empty
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
Protected Overridable Function GetUniqueFileName(ByVal shortFileName As String) As String
|
||||
Return String.Format("{0}-{1}", Oid, shortFileName)
|
||||
End Function
|
||||
Protected Overridable Function GetShortFileName(ByVal uniqueFileName As String) As String
|
||||
Return uniqueFileName.Replace(String.Format("{0}-", Oid), String.Empty).Replace(DefaultDirectory, String.Empty)
|
||||
End Function
|
||||
Public ReadOnly Property Exists() As Boolean
|
||||
Get
|
||||
Return File.Exists(RealFileName)
|
||||
End Get
|
||||
End Property
|
||||
'Dennis: fires when assigning a file.
|
||||
Public Sub LoadFromStream(ByVal fileName As String, ByVal source As Stream) Implements IFileData.LoadFromStream
|
||||
tempStream = source
|
||||
'Dennis: when assigning a new file we need to save the name of the old file to remove it from the store in the future.
|
||||
If String.IsNullOrEmpty(tempFileName) Then
|
||||
tempFileName = RealFileName
|
||||
End If
|
||||
Me.FileName = fileName
|
||||
End Sub
|
||||
'Dennis: fires when saving or opening a file.
|
||||
Public Sub SaveToStream(ByVal destination As Stream) Implements IFileData.SaveToStream
|
||||
Try
|
||||
Using source As Stream = File.OpenRead(RealFileName)
|
||||
Dim buffer(ReadBytesSize - 1) As Byte
|
||||
Dim read As Integer = 0
|
||||
read = source.Read(buffer, 0, buffer.Length)
|
||||
Do While read > 0
|
||||
destination.Write(buffer, 0, read)
|
||||
read = source.Read(buffer, 0, buffer.Length)
|
||||
Loop
|
||||
End Using
|
||||
Catch exc As DirectoryNotFoundException
|
||||
Throw New Exception(String.Format("Cannot access the '{0}' store because it is not available.", DefaultDirectory), exc)
|
||||
Catch exc As FileNotFoundException
|
||||
Throw New Exception(String.Format("Cannot access the '{0}' file because it is not found in the store.", FileName), exc)
|
||||
End Try
|
||||
End Sub
|
||||
Protected Overrides Sub OnSaving()
|
||||
MyBase.OnSaving()
|
||||
If tempStream IsNot Nothing AndAlso (Not String.IsNullOrEmpty(RealFileName)) Then
|
||||
Dim source As Stream = Nothing
|
||||
'Dennis: for Windows Forms applications.
|
||||
If TypeOf tempStream Is FileStream Then
|
||||
Try
|
||||
source = File.OpenRead((CType(tempStream, FileStream)).Name)
|
||||
Catch exc As FileNotFoundException
|
||||
Throw New Exception(String.Format("Cannot read the '{0}' file from a temporary store.", FileName), exc)
|
||||
End Try
|
||||
Else
|
||||
'Dennis: for Web Forms applications.
|
||||
source = tempStream
|
||||
End If
|
||||
Try
|
||||
Using destination As Stream = File.OpenWrite(RealFileName)
|
||||
Dim buffer(ReadBytesSize - 1) As Byte
|
||||
Dim read As Integer = 0
|
||||
read = source.Read(buffer, 0, buffer.Length)
|
||||
Do While read > 0
|
||||
destination.Write(buffer, 0, read)
|
||||
read = source.Read(buffer, 0, buffer.Length)
|
||||
Loop
|
||||
UpdateSize(destination)
|
||||
End Using
|
||||
Catch exc As DirectoryNotFoundException
|
||||
Throw New Exception(String.Format("Cannot access the '{0}' store because it is not available.", DefaultDirectory), exc)
|
||||
Finally
|
||||
source.Close()
|
||||
source = Nothing
|
||||
End Try
|
||||
End If
|
||||
'Dennis: removing the old file from the store when saving the current object.
|
||||
If (Not String.IsNullOrEmpty(tempFileName)) Then
|
||||
Try
|
||||
File.Delete(tempFileName)
|
||||
tempFileName = String.Empty
|
||||
Catch exc As DirectoryNotFoundException
|
||||
Throw New Exception(String.Format("Cannot access the '{0}' store because it is not available.", DefaultDirectory), exc)
|
||||
End Try
|
||||
End If
|
||||
End Sub
|
||||
Protected Overrides Sub OnDeleting()
|
||||
'Dennis: first we need to remove the old file from the store.
|
||||
Clear()
|
||||
MyBase.OnDeleting()
|
||||
End Sub
|
||||
Private Sub UpdateSize(ByVal stream As Stream)
|
||||
If stream Is Nothing Then
|
||||
_Size = 0
|
||||
Else
|
||||
_Size = CInt(Fix(stream.Length))
|
||||
End If
|
||||
End Sub
|
||||
Public Sub Clear() Implements IFileData.Clear
|
||||
'Dennis: when clearing the file name property we need to save the name of the old file to remove it from the store in the future.
|
||||
If String.IsNullOrEmpty(tempFileName) Then
|
||||
tempFileName = RealFileName
|
||||
End If
|
||||
FileName = String.Empty
|
||||
UpdateSize(Nothing)
|
||||
End Sub
|
||||
End Class
|
||||
@@ -0,0 +1,61 @@
|
||||
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("GeneralStock")> _
|
||||
<DefaultProperty("CustomsTariffNumber")> _
|
||||
Public Class CustomsTariffs
|
||||
Inherits BaseObject
|
||||
Private _CustomsTariffNumber As String
|
||||
Private _Description As String
|
||||
Private _NAVCode As String
|
||||
Private _NAVDescription As String
|
||||
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Property CustomsTariffNumber As String
|
||||
Get
|
||||
Return _CustomsTariffNumber
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
SetPropertyValue("CustomsTariffNumber", _CustomsTariffNumber, value)
|
||||
End Set
|
||||
End Property
|
||||
<Size(255)>
|
||||
Property Description As String
|
||||
Get
|
||||
Return _Description
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
SetPropertyValue("Description", _Description, value)
|
||||
End Set
|
||||
End Property
|
||||
Property NAVCode As String
|
||||
Get
|
||||
Return _NAVCode
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("NAVCode", _NAVCode, value)
|
||||
End Set
|
||||
End Property
|
||||
<Size(255)>
|
||||
Property NAVDescription As String
|
||||
Get
|
||||
Return _NAVDescription
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("NAVDescription", _NAVDescription, value)
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
Imports Microsoft.VisualBasic
|
||||
Imports System
|
||||
Imports System.Linq
|
||||
Imports System.Text
|
||||
Imports DevExpress.Xpo
|
||||
Imports DevExpress.ExpressApp
|
||||
Imports System.ComponentModel
|
||||
Imports DevExpress.ExpressApp.DC
|
||||
Imports DevExpress.Data.Filtering
|
||||
Imports DevExpress.Persistent.Base
|
||||
Imports System.Collections.Generic
|
||||
Imports DevExpress.ExpressApp.Model
|
||||
Imports DevExpress.Persistent.BaseImpl
|
||||
Imports DevExpress.Persistent.Validation
|
||||
|
||||
'<ImageName("BO_Contact")> _
|
||||
'<DefaultProperty("DisplayMemberNameForLookupEditorsOfThisType")> _
|
||||
'<DefaultListViewOptions(MasterDetailMode.ListViewOnly, False, NewItemRowPosition.None)> _
|
||||
'<Persistent("DatabaseTableName")> _
|
||||
<DefaultClassOptions(), NavigationItem(False), CreatableItem(False)> _
|
||||
Public Class DocumentNote ' Specify more UI options using a declarative approach (http://documentation.devexpress.com/#Xaf/CustomDocument2701).
|
||||
Inherits BaseObject ' Inherit from a different class to provide a custom primary key, concurrency and deletion behavior, etc. (http://documentation.devexpress.com/#Xaf/CustomDocument3146).
|
||||
|
||||
Private _ShortName As String
|
||||
Private _IsActive As Boolean
|
||||
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
' Place your initialization code here (http://documentation.devexpress.com/#Xaf/CustomDocument2834).
|
||||
End Sub
|
||||
|
||||
<Size(255)> _
|
||||
Property ShortName As String
|
||||
Get
|
||||
Return _ShortName
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("ShortName", _ShortName, value)
|
||||
End Set
|
||||
End Property
|
||||
Property IsActive As Boolean
|
||||
Get
|
||||
Return _IsActive
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
SetPropertyValue("IsActive", _IsActive, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'Private _PersistentProperty As String
|
||||
'<XafDisplayName("My display name"), ToolTip("My hint message")> _
|
||||
'<ModelDefault("EditMask", "(000)-00"), Index(0), VisibleInListView(False)> _
|
||||
'<Persistent("DatabaseColumnName"), RuleRequiredField(DefaultContexts.Save)> _
|
||||
'Public Property PersistentProperty() As String
|
||||
' Get
|
||||
' Return _PersistentProperty
|
||||
' End Get
|
||||
' Set(ByVal value As String)
|
||||
' SetPropertyValue("PersistentProperty", _PersistentProperty, value)
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
'<Action(Caption:="My UI Action", ConfirmationMessage:="Are you sure?", ImageName:="Attention", AutoCommit:=True)> _
|
||||
'Public Sub ActionMethod()
|
||||
' ' Trigger a custom business logic for the current record in the UI (http://documentation.devexpress.com/#Xaf/CustomDocument2619).
|
||||
' Me.PersistentProperty = "Paid"
|
||||
'End Sub
|
||||
End Class
|
||||
@@ -0,0 +1,30 @@
|
||||
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 GeneralStock
|
||||
Inherits BaseObject
|
||||
Private _Name As String
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Property Name() As String
|
||||
Get
|
||||
Return _Name
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
SetPropertyValue("Name", _Name, value)
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
|
||||
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
Partial Class GeneralStocks_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()
|
||||
components = New System.ComponentModel.Container()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,38 @@
|
||||
Imports System
|
||||
Imports System.ComponentModel
|
||||
Imports System.Collections.Generic
|
||||
Imports System.Diagnostics
|
||||
Imports System.Text
|
||||
|
||||
Imports DevExpress.ExpressApp
|
||||
Imports DevExpress.ExpressApp.SystemModule
|
||||
Imports DevExpress.ExpressApp.CloneObject
|
||||
Imports DevExpress.ExpressApp.Actions
|
||||
Imports DevExpress.Persistent.Base
|
||||
|
||||
Public Class GeneralStocks_VC
|
||||
Inherits DevExpress.ExpressApp.ViewController
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
End Sub
|
||||
|
||||
Protected Overrides Sub OnActivated()
|
||||
MyBase.OnActivated()
|
||||
|
||||
If View.Id = "CustomsTariffs_LookupListView" 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 = "CustomsTariffs_LookupListView" Then
|
||||
Frame.GetController(Of NewObjectViewController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", True)
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
@@ -0,0 +1,62 @@
|
||||
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("GeneralStock")>
|
||||
Public Class PacketMode
|
||||
Inherits BaseObject
|
||||
Private _ShortName As String
|
||||
Private _ShortName_Gb As String
|
||||
Private _Shortname_De As String
|
||||
Private _Description As String
|
||||
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Property ShortName As String
|
||||
Get
|
||||
Return _ShortName
|
||||
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
SetPropertyValue("ShortName", _ShortName, value)
|
||||
End Set
|
||||
End Property
|
||||
Property ShortName_Gb As String
|
||||
Get
|
||||
Return _ShortName_Gb
|
||||
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
SetPropertyValue("ShortName_Gb", _ShortName_Gb, value)
|
||||
End Set
|
||||
End Property
|
||||
Property ShortName_De As String
|
||||
Get
|
||||
Return _Shortname_De
|
||||
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
SetPropertyValue("ShortName_De", _Shortname_De, 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,60 @@
|
||||
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
|
||||
|
||||
Public Enum eSentenceType
|
||||
R = 0
|
||||
S = 1
|
||||
P = 2
|
||||
H = 3
|
||||
EUH = 4
|
||||
End Enum
|
||||
<DefaultClassOptions()>
|
||||
<NavigationItem("GeneralStock")>
|
||||
Public Class Sentence
|
||||
Inherits BaseObject
|
||||
|
||||
Private _SentenceType As eSentenceType
|
||||
Private _ShortName As String
|
||||
Private _Description As String
|
||||
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Property SentenceType As eSentenceType
|
||||
Get
|
||||
Return _SentenceType
|
||||
End Get
|
||||
Set(value As eSentenceType)
|
||||
SetPropertyValue("SentenceType", _SentenceType, value)
|
||||
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
|
||||
<Size(1000)>
|
||||
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,42 @@
|
||||
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("GeneralStock")>
|
||||
Public Class UNList
|
||||
Inherits BaseObject
|
||||
Private _ShortName As String
|
||||
Private _Description As String
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
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,70 @@
|
||||
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("GeneralStock")> _
|
||||
Public Class Units
|
||||
Inherits BaseObject
|
||||
Private _ShortName As String
|
||||
Private _ShortName_Gb As String
|
||||
Private _Shortname_De As String
|
||||
Private _Description As String
|
||||
Private _DefaultForBusinnes As Boolean = False
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Property ShortName As String
|
||||
Get
|
||||
Return _ShortName
|
||||
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
SetPropertyValue("ShortName", _ShortName, value)
|
||||
End Set
|
||||
End Property
|
||||
Property ShortName_Gb As String
|
||||
Get
|
||||
Return _ShortName_Gb
|
||||
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
SetPropertyValue("ShortName_Gb", _ShortName_Gb, value)
|
||||
End Set
|
||||
End Property
|
||||
Property ShortName_De As String
|
||||
Get
|
||||
Return _Shortname_De
|
||||
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
SetPropertyValue("ShortName_De", _Shortname_De, 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
|
||||
Property DefaultForBusinnes As Boolean
|
||||
Get
|
||||
Return _DefaultForBusinnes
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
SetPropertyValue("DefaultForBusinnes", _DefaultForBusinnes, value)
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
|
||||
|
||||
@@ -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()>
|
||||
<ImmediatePostData(True), 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,215 @@
|
||||
Imports DevExpress.Xpo
|
||||
Imports DevExpress.Persistent.Base
|
||||
Imports DevExpress.Persistent.Validation
|
||||
Imports DevExpress.Persistent.Base.General
|
||||
Imports DevExpress.Xpo.Metadata
|
||||
Imports System.ComponentModel
|
||||
Imports System.Xml
|
||||
Imports DevExpress.Persistent.BaseImpl
|
||||
|
||||
<DefaultClassOptions(), NavigationItem(False), CreatableItem(False)> _
|
||||
Public Class HRPersonEvent
|
||||
Inherits 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
|
||||
+52
@@ -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(Nuvolar.[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\NuvolarExceptions", "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\NuvolarExceptions", "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(Nuvolar.[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(Nuvolar.[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\NuvolarExceptions", "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
|
||||
@@ -0,0 +1,38 @@
|
||||
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("SQL Imports")> _
|
||||
Public Class Hints
|
||||
Inherits BaseObject
|
||||
Private _View_ID As String
|
||||
Private _HintText As String
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Property View_ID As String
|
||||
Get
|
||||
Return _View_ID
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
SetPropertyValue("View_ID", _View_ID, value)
|
||||
End Set
|
||||
End Property
|
||||
<Size(-1)> _
|
||||
Property HintText As String
|
||||
Get
|
||||
Return _HintText
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
SetPropertyValue("HintText", _HintText, value)
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
@@ -0,0 +1,59 @@
|
||||
Imports DevExpress.Persistent.BaseImpl
|
||||
Imports DevExpress.Xpo
|
||||
Imports DevExpress.Data.Filtering
|
||||
Imports DevExpress.ExpressApp
|
||||
Imports DevExpress.ExpressApp.Model
|
||||
|
||||
Public Module LockingModule
|
||||
Public Function LockObject(_Paramuow As UnitOfWork, _ParamObjectType As Type, _ParamObjectKey As String, _ParamUser As User) As Boolean
|
||||
Dim _IsLocked As Boolean = False
|
||||
Dim _TableName As String
|
||||
Dim _LockingObject As LockingObject
|
||||
Try
|
||||
_TableName = _ParamObjectType.Name & "-" & _ParamObjectKey
|
||||
_LockingObject = New LockingObject(_Paramuow)
|
||||
_LockingObject.TableName = _TableName
|
||||
_LockingObject.User = _Paramuow.GetObjectByKey(Of User)(_ParamUser.Oid)
|
||||
_LockingObject.ObjectKey = _ParamObjectKey
|
||||
_LockingObject.ObjectType = _ParamObjectType
|
||||
_LockingObject.ObjectCreated = Now
|
||||
_LockingObject.SessionCreated = _Paramuow.ToString
|
||||
_Paramuow.CommitChanges()
|
||||
|
||||
_LockingObject = _Paramuow.FindObject(Of LockingObject)(PersistentCriteriaEvaluationBehavior.InTransaction, _
|
||||
CriteriaOperator.Parse("TableName=? and User=? and SessionCreated=?", _TableName, _Paramuow.GetObjectByKey(Of User)(_ParamUser.Oid), _Paramuow.ToString))
|
||||
If _LockingObject IsNot Nothing Then
|
||||
_IsLocked = True
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
_IsLocked = False
|
||||
End Try
|
||||
Return _IsLocked
|
||||
End Function
|
||||
Public Function UnLockObject(_Paramuow As UnitOfWork, _ParamObjectType As Type, _ParamObjectKey As String, _ParamUser As User) As Boolean
|
||||
Dim _TableName As String = _ParamObjectType.Name & "-" & _ParamObjectKey
|
||||
Dim _LockingObject As LockingObject = _Paramuow.FindObject(Of LockingObject)(PersistentCriteriaEvaluationBehavior.InTransaction, _
|
||||
CriteriaOperator.Parse("TableName=? AND User=? AND ObjectKey=?", _TableName, _Paramuow.GetObjectByKey(Of DevExpress.Persistent.BaseImpl.User)(_ParamUser.Oid), _ParamObjectKey))
|
||||
If _LockingObject IsNot Nothing Then
|
||||
_Paramuow.Delete(_LockingObject)
|
||||
_Paramuow.CommitChanges()
|
||||
End If
|
||||
End Function
|
||||
Public Function ReleaseAllLocking(_Paramuow As UnitOfWork, _Paramuser As User) As Boolean
|
||||
Dim _LockingObject_Collection As New XPCollection(Of LockingObject)(_Paramuow, CriteriaOperator.Parse("User.Oid=?", _Paramuser.Oid))
|
||||
Dim _IsUnlocked As Boolean = False
|
||||
Try
|
||||
_Paramuow.Delete(_LockingObject_Collection)
|
||||
_Paramuow.CommitChanges()
|
||||
|
||||
_LockingObject_Collection = New XPCollection(Of LockingObject)(_Paramuow, CriteriaOperator.Parse("User.Oid=?", _Paramuser.Oid))
|
||||
If _LockingObject_Collection.Count = 0 Then
|
||||
_IsUnlocked = True
|
||||
End If
|
||||
Catch ex As Exception
|
||||
_IsUnlocked = False
|
||||
End Try
|
||||
Return _IsUnlocked
|
||||
End Function
|
||||
End Module
|
||||
@@ -0,0 +1,87 @@
|
||||
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 LockingObject
|
||||
Inherits BaseObject
|
||||
|
||||
Private _TableName As String
|
||||
Private _User As User
|
||||
Private _ObjectType As Type
|
||||
Private _ObjectKey As String
|
||||
Private _ObjectCreated As Date
|
||||
Private _SessionCreated As String
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
' This constructor is used when an object is loaded from a persistent storage.
|
||||
' Do not place any code here or place it only when the IsLoading property is false:
|
||||
' if (!IsLoading){
|
||||
' It is now OK to place your initialization code here.
|
||||
' }
|
||||
' or as an alternative, move your initialization code into the AfterConstruction method.
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
' Place here your initialization code.
|
||||
End Sub
|
||||
|
||||
<Size(255), Indexed(Unique:=True)> _
|
||||
Property TableName As String
|
||||
Get
|
||||
Return _TableName
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("TableName", _TableName, 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 ObjectType As Type
|
||||
Get
|
||||
Return _ObjectType
|
||||
End Get
|
||||
Set(value As Type)
|
||||
SetPropertyValue("ObjectType", _ObjectType, value)
|
||||
End Set
|
||||
End Property
|
||||
Property ObjectKey As String
|
||||
Get
|
||||
Return _ObjectKey
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("ObjectKey", _ObjectKey, value)
|
||||
End Set
|
||||
End Property
|
||||
Property ObjectCreated As Date
|
||||
Get
|
||||
Return _ObjectCreated
|
||||
End Get
|
||||
Set(value As Date)
|
||||
SetPropertyValue("ObjectCreated", _ObjectCreated, value)
|
||||
End Set
|
||||
End Property
|
||||
<Size(-1)> _
|
||||
Property SessionCreated As String
|
||||
Get
|
||||
Return _SessionCreated
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("SessionCreated", _SessionCreated, value)
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
Generated
+32
@@ -0,0 +1,32 @@
|
||||
Partial Class ContractsLookupVC
|
||||
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Public Sub New(ByVal Container As System.ComponentModel.IContainer)
|
||||
MyClass.New()
|
||||
|
||||
'Required for Windows.Forms Class Composition Designer support
|
||||
Container.Add(Me)
|
||||
|
||||
End Sub
|
||||
|
||||
'Component overrides dispose to clean up the component list.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
MyBase.Dispose(disposing)
|
||||
End Sub
|
||||
|
||||
'Required by the Component Designer
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'NOTE: The following procedure is required by the Component Designer
|
||||
'It can be modified using the Component Designer.
|
||||
'Do not modify it using the code editor.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
components = New System.ComponentModel.Container()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,49 @@
|
||||
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.Editors
|
||||
|
||||
Public Class ContractsLookupVC
|
||||
Inherits ViewController
|
||||
Public Sub New()
|
||||
TargetObjectType = GetType(Contracts)
|
||||
TargetViewType = ViewType.ListView
|
||||
TargetViewId = "Contracts_LookupListView"
|
||||
End Sub
|
||||
Protected Overrides Sub OnActivated()
|
||||
MyBase.OnActivated()
|
||||
Dim c As NewObjectViewController = Frame.GetController(Of NewObjectViewController)()
|
||||
AddHandler c.ObjectCreated, AddressOf c_ObjectCreated
|
||||
End Sub
|
||||
|
||||
Private Sub c_ObjectCreated(ByVal sender As Object, ByVal e As ObjectCreatedEventArgs)
|
||||
If TypeOf Frame Is NestedFrame Then
|
||||
'for ASP.NET
|
||||
Dim editor As PropertyEditor = TryCast((CType(Frame, NestedFrame)).ViewItem, PropertyEditor)
|
||||
SetupNewObjectFromParent(e, editor)
|
||||
End If
|
||||
'for WinForms
|
||||
Dim controller As LinkToLookupViewController = Frame.GetController(Of LinkToLookupViewController)()
|
||||
If controller IsNot Nothing AndAlso controller.Lookup IsNot Nothing Then
|
||||
SetupNewObjectFromParent(e, controller.Lookup)
|
||||
End If
|
||||
End Sub
|
||||
Private Sub SetupNewObjectFromParent(ByVal e As ObjectCreatedEventArgs, ByVal editor As PropertyEditor)
|
||||
If GetType(Contracts).IsInstanceOfType(e.CreatedObject) Then
|
||||
If editor IsNot Nothing AndAlso GetType(RegistryRowsFinancialControlling).IsAssignableFrom(editor.ObjectType) Then
|
||||
Dim r As RegistryRowsFinancialControlling = DirectCast(editor.CurrentObject, RegistryRowsFinancialControlling)
|
||||
If Not editor.View.ObjectSpace.IsNewObject(r.RegistryHeader.Customers) Then
|
||||
CType(e.CreatedObject, Contracts).Customers = e.ObjectSpace.GetObject(Of Customers)(r.RegistryHeader.Customers)
|
||||
CType(e.CreatedObject, Contracts).CustomersFrom = e.ObjectSpace.GetObject(Of Customers)(r.RegistryHeader.CustomersFrom)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
Partial Class CustomersBankAccountsLookupVC
|
||||
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Public Sub New(ByVal Container As System.ComponentModel.IContainer)
|
||||
MyClass.New()
|
||||
|
||||
'Required for Windows.Forms Class Composition Designer support
|
||||
Container.Add(Me)
|
||||
|
||||
End Sub
|
||||
|
||||
'Component overrides dispose to clean up the component list.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
MyBase.Dispose(disposing)
|
||||
End Sub
|
||||
|
||||
'Required by the Component Designer
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'NOTE: The following procedure is required by the Component Designer
|
||||
'It can be modified using the Component Designer.
|
||||
'Do not modify it using the code editor.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
components = New System.ComponentModel.Container()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
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.Editors
|
||||
|
||||
Public Class CustomersBankAccountsLookupVC
|
||||
Inherits ViewController
|
||||
Public Sub New()
|
||||
TargetObjectType = GetType(CustomerBankAccounts)
|
||||
TargetViewType = ViewType.ListView
|
||||
TargetViewId = "CustomerBankAccounts_LookupListView"
|
||||
End Sub
|
||||
Protected Overrides Sub OnActivated()
|
||||
MyBase.OnActivated()
|
||||
Dim c As NewObjectViewController = Frame.GetController(Of NewObjectViewController)()
|
||||
AddHandler c.ObjectCreated, AddressOf c_ObjectCreated
|
||||
End Sub
|
||||
|
||||
Private Sub c_ObjectCreated(ByVal sender As Object, ByVal e As ObjectCreatedEventArgs)
|
||||
If TypeOf Frame Is NestedFrame Then
|
||||
'for ASP.NET
|
||||
Dim editor As PropertyEditor = TryCast((CType(Frame, NestedFrame)).ViewItem, PropertyEditor)
|
||||
SetupNewObjectFromParent(e, editor)
|
||||
End If
|
||||
'for WinForms
|
||||
Dim controller As LinkToLookupViewController = Frame.GetController(Of LinkToLookupViewController)()
|
||||
If controller IsNot Nothing AndAlso controller.Lookup IsNot Nothing Then
|
||||
SetupNewObjectFromParent(e, controller.Lookup)
|
||||
End If
|
||||
End Sub
|
||||
Private Sub SetupNewObjectFromParent(ByVal e As ObjectCreatedEventArgs, ByVal editor As PropertyEditor)
|
||||
'/// ITT KELL NEVESÍTENI !!!
|
||||
|
||||
If GetType(CustomerBankAccounts).IsInstanceOfType(e.CreatedObject) Then
|
||||
If editor IsNot Nothing Then
|
||||
If GetType(RegistryHeader).IsAssignableFrom(editor.ObjectType) Then
|
||||
Dim _RegistryHeader As RegistryHeader = DirectCast(editor.CurrentObject, RegistryHeader)
|
||||
If Not editor.View.ObjectSpace.IsNewObject(_RegistryHeader.Customers) Then
|
||||
CType(e.CreatedObject, CustomerBankAccounts).Customers = e.ObjectSpace.GetObject(Of Customers)(_RegistryHeader.Customers)
|
||||
End If
|
||||
End If
|
||||
If GetType(GLAccounts).IsAssignableFrom(editor.ObjectType) Then
|
||||
Dim _GLAccounts As GLAccounts = DirectCast(editor.CurrentObject, GLAccounts)
|
||||
If Not editor.View.ObjectSpace.IsNewObject(_GLAccounts.Customers) Then
|
||||
CType(e.CreatedObject, CustomerBankAccounts).Customers = e.ObjectSpace.GetObject(Of Customers)(_GLAccounts.Customers)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
Generated
+37
@@ -0,0 +1,37 @@
|
||||
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.Editors
|
||||
|
||||
Public Class LinkToLookupViewController
|
||||
Inherits ViewController(Of ListView)
|
||||
Private _LookupEditor As PropertyEditor
|
||||
Public Property Lookup() As PropertyEditor
|
||||
Get
|
||||
Return _LookupEditor
|
||||
End Get
|
||||
Set(ByVal value As PropertyEditor)
|
||||
_LookupEditor = value
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
|
||||
Public MustInherit Class LookupLinkViewController
|
||||
Inherits ViewController(Of DetailView)
|
||||
Protected Overrides Sub OnActivated()
|
||||
MyBase.OnActivated()
|
||||
For Each editor As PropertyEditor In View.GetItems(Of PropertyEditor)()
|
||||
AddHandler editor.ControlCreated, AddressOf editor_ControlCreated
|
||||
Next editor
|
||||
End Sub
|
||||
Private Sub editor_ControlCreated(ByVal sender As Object, ByVal e As EventArgs)
|
||||
ProcessLookupEditor(CType(sender, PropertyEditor))
|
||||
End Sub
|
||||
Protected MustOverride Sub ProcessLookupEditor(ByVal editor As PropertyEditor)
|
||||
End Class
|
||||
@@ -0,0 +1,20 @@
|
||||
Imports DevExpress.Xpo
|
||||
Imports DevExpress.Persistent.Base
|
||||
Imports DevExpress.ExpressApp.ConditionalAppearance
|
||||
|
||||
<DefaultClassOptions()>
|
||||
<NavigationItem(False)>
|
||||
<CreatableItem(False)>
|
||||
<Persistent("Names")>
|
||||
<Appearance("Names - Disable ID all time", AppearanceItemType.ViewItem, "1=1", TargetItems:="ID", Enabled:=False)>
|
||||
Public Class Names
|
||||
Inherits XPLiteObject
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
End Sub
|
||||
<Key()> Property ID As Long
|
||||
Property Names As String
|
||||
End Class
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user