Reconfigure for GIT

This commit is contained in:
2017-03-26 20:00:03 +02:00
commit 00637826ab
8056 changed files with 535977 additions and 0 deletions
@@ -0,0 +1,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
@@ -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(SISBusiness.[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(SISBusiness.[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(SISBusiness.[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(SISBusiness.[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
Protected Event InitWork(ByVal _Minimum As Long, ByVal _Step As Long, ByVal _Maximum As Long)
Protected Event DoWork()
Protected 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\SISBusinessExceptions", "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\SISBusinessExceptions", "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\SISBusinessExceptions", "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
@@ -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
@@ -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
@@ -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
@@ -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
OverWriteSisBusinessData = 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
<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