First create solution

This commit is contained in:
2017-03-08 11:21:27 +01:00
commit a2fb86bacf
5508 changed files with 1082238 additions and 0 deletions
@@ -0,0 +1,85 @@
Partial Class CRM_LeadsVC
<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.aCRM_Leads_CreateMail = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aCRM_Leads_ReadMail = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aCRM_LeadsDocumentation_OpenBusinessDirectory = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
'
'aCRM_Leads_CreateMail
'
Me.aCRM_Leads_CreateMail.Caption = "Create mail"
Me.aCRM_Leads_CreateMail.ConfirmationMessage = Nothing
Me.aCRM_Leads_CreateMail.Id = "aCRM_Leads_CreateMail"
Me.aCRM_Leads_CreateMail.ImageName = "mail_add"
Me.aCRM_Leads_CreateMail.Shortcut = Nothing
Me.aCRM_Leads_CreateMail.Tag = Nothing
Me.aCRM_Leads_CreateMail.TargetObjectsCriteria = Nothing
Me.aCRM_Leads_CreateMail.TargetViewId = "CRM_Leads_DetailView"
Me.aCRM_Leads_CreateMail.ToolTip = Nothing
Me.aCRM_Leads_CreateMail.TypeOfView = Nothing
'
'aCRM_Leads_ReadMail
'
Me.aCRM_Leads_ReadMail.Caption = "Read mail"
Me.aCRM_Leads_ReadMail.ConfirmationMessage = Nothing
Me.aCRM_Leads_ReadMail.Id = "aCRM_Leads_ReadMail"
Me.aCRM_Leads_ReadMail.ImageName = "mail_view"
Me.aCRM_Leads_ReadMail.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
Me.aCRM_Leads_ReadMail.Shortcut = Nothing
Me.aCRM_Leads_ReadMail.Tag = Nothing
Me.aCRM_Leads_ReadMail.TargetObjectsCriteria = Nothing
Me.aCRM_Leads_ReadMail.TargetObjectType = GetType(Nuvolar.[Module].CRM_Leads_Activity)
Me.aCRM_Leads_ReadMail.TargetViewId = "CRM_Leads_CRM_Leads_Activity_ListView"
Me.aCRM_Leads_ReadMail.ToolTip = Nothing
Me.aCRM_Leads_ReadMail.TypeOfView = Nothing
'
'aCRM_LeadsDocumentation_OpenBusinessDirectory
'
Me.aCRM_LeadsDocumentation_OpenBusinessDirectory.AcceptButtonCaption = Nothing
Me.aCRM_LeadsDocumentation_OpenBusinessDirectory.CancelButtonCaption = Nothing
Me.aCRM_LeadsDocumentation_OpenBusinessDirectory.Caption = "aCRM_LeadsDocumentation_OpenBusinessDirectory"
Me.aCRM_LeadsDocumentation_OpenBusinessDirectory.Category = "ObjectsCreation"
Me.aCRM_LeadsDocumentation_OpenBusinessDirectory.ConfirmationMessage = Nothing
Me.aCRM_LeadsDocumentation_OpenBusinessDirectory.Id = "aCRM_LeadsDocumentation_OpenBusinessDirectory"
Me.aCRM_LeadsDocumentation_OpenBusinessDirectory.ImageName = Nothing
Me.aCRM_LeadsDocumentation_OpenBusinessDirectory.Shortcut = Nothing
Me.aCRM_LeadsDocumentation_OpenBusinessDirectory.Tag = Nothing
Me.aCRM_LeadsDocumentation_OpenBusinessDirectory.TargetObjectsCriteria = Nothing
Me.aCRM_LeadsDocumentation_OpenBusinessDirectory.TargetObjectType = GetType(Nuvolar.[Module].CRM_LeadsDocumentation)
Me.aCRM_LeadsDocumentation_OpenBusinessDirectory.TargetViewId = "CRM_Leads_CRM_LeadsDocumentation_ListView"
Me.aCRM_LeadsDocumentation_OpenBusinessDirectory.TargetViewType = DevExpress.ExpressApp.ViewType.ListView
Me.aCRM_LeadsDocumentation_OpenBusinessDirectory.ToolTip = Nothing
Me.aCRM_LeadsDocumentation_OpenBusinessDirectory.TypeOfView = GetType(DevExpress.ExpressApp.ListView)
End Sub
Friend WithEvents aCRM_Leads_CreateMail As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aCRM_Leads_ReadMail As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aCRM_LeadsDocumentation_OpenBusinessDirectory As DevExpress.ExpressApp.Actions.PopupWindowShowAction
End Class
@@ -0,0 +1,132 @@
<?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="aCRM_Leads_CreateMail.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 56</value>
</metadata>
<metadata name="aCRM_Leads_ReadMail.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 95</value>
</metadata>
<metadata name="aCRM_LeadsDocumentation_OpenBusinessDirectory.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>711, 304</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,152 @@
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.ExpressApp.Utils
Imports DevExpress.Xpo
Public Class CRM_LeadsVC
Inherits DevExpress.ExpressApp.ViewController
Public Sub New()
MyBase.New()
InitializeComponent()
RegisterActions(components)
End Sub
Private Sub aCRM_Leads_CreateMail_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aCRM_Leads_CreateMail.Execute
Try
Dim _CRM_Leads As CRM_Leads = TryCast(e.CurrentObject, CRM_Leads)
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
If _CRM_Leads.EMail = "" Then Throw New UserFriendlyException("Nincs beállítva e-mail cím!")
Dim _OutlookEMail As OutlookEMail = _ocur.CreateObject(Of OutlookEMail)()
_OutlookEMail.CRM_Leads = _CRM_Leads
_OutlookEMail.Recipients = _CRM_Leads.EMail
_OutlookEMail.Subject = _CRM_Leads.LeadSource
_OutlookEMail.eCRMEstate_Leads = eCRMEstate_Leads.eCRM
e.ShowViewParameters.CreatedView = Application.CreateDetailView(_ocur, "OutlookEMail_DetailView", False, _OutlookEMail)
View.Refresh()
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, String.Format(CaptionHelper.GetLocalizedText("Exceptions\NuvolarExceptions", "MsgBoxCheckItAgain")))
End Try
End Sub
Private Sub aCRM_Leads_ReadMail_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aCRM_Leads_ReadMail.Execute
Dim _CRM_Leads_Activity As CRM_Leads_Activity = TryCast(e.SelectedObjects(0), CRM_Leads_Activity)
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
If _CRM_Leads_Activity IsNot Nothing Then
'--Email megkeresése és új benyitása
If _CRM_Leads_Activity.Email_Oid = "" Then
Throw New UserFriendlyException("Nincs kapcsolódó e-mail üzenet!")
Else
Dim _OutlookEMail As OutlookEMail = _ocur.FindObject(Of OutlookEMail)(CriteriaOperator.Parse("Oid=?", _CRM_Leads_Activity.Email_Oid))
Dim _OutlookEMailIn As OutlookEMailIn = _ocur.FindObject(Of OutlookEMailIn)(CriteriaOperator.Parse("Oid=?", _CRM_Leads_Activity.Email_Oid))
If _OutlookEMail IsNot Nothing Then
e.ShowViewParameters.CreatedView = Application.CreateDetailView(_ocur, "OutlookEMail_DetailView", False, _OutlookEMail)
Else
e.ShowViewParameters.CreatedView = Application.CreateDetailView(_ocur, "OutlookEMailIn_DetailView", False, _OutlookEMailIn)
End If
View.Refresh()
End If
End If
End Sub
Private Sub aCRM_LeadsDocumentation_OpenBusinessDirectory_CustomizePopupWindowParams(sender As Object, e As CustomizePopupWindowParamsEventArgs) Handles aCRM_LeadsDocumentation_OpenBusinessDirectory.CustomizePopupWindowParams
Try
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
Dim _CRM_Opportunities As CRM_Opportunities = TryCast(TryCast(TryCast(View, ListView).CollectionSource, PropertyCollectionSource).MasterObject, CRM_Opportunities)
Dim _BusinessDirectoryList As New ArrayList
Dim _BusinessDirectory_CollectionSource As New CollectionSource(_onew, GetType(BusinessDirectory))
If _CRM_Opportunities.MasterBusinessDirectory IsNot Nothing Then
If _CRM_Opportunities.MasterBusinessDirectory.Children.Count > 0 Then
_BusinessDirectoryList.Add(_CRM_Opportunities.MasterBusinessDirectory)
RecursiveBusinessDirectory(_BusinessDirectoryList, _CRM_Opportunities.MasterBusinessDirectory.NestedBusinessDirectory)
Else
If _CRM_Opportunities.MasterBusinessDirectory.IsFolder Then _BusinessDirectoryList.Add(_CRM_Opportunities.MasterBusinessDirectory)
End If
End If
Dim _Filter As String = "Oid in("
For Each _BusinessDirectory As BusinessDirectory In _BusinessDirectoryList
_Filter += "'" + _BusinessDirectory.Oid.ToString + "',"
Next
_Filter = _Filter.Remove(_Filter.Length - 1, 1)
_Filter += ")"
_BusinessDirectory_CollectionSource.BeginUpdateCriteria()
_BusinessDirectory_CollectionSource.Criteria.Clear()
If _Filter.Length > 8 Then
_BusinessDirectory_CollectionSource.Criteria.Add("1", CriteriaOperator.Parse(_Filter))
Else
_BusinessDirectory_CollectionSource.Criteria.Add("1", CriteriaOperator.Parse("1=2"))
End If
_BusinessDirectory_CollectionSource.EndUpdateCriteria()
e.View = Application.CreateListView("BusinessDirectory_ListView", _BusinessDirectory_CollectionSource, 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 aCRM_LeadsDocumentation_OpenBusinessDirectory_Execute(sender As Object, e As PopupWindowShowActionExecuteEventArgs) Handles aCRM_LeadsDocumentation_OpenBusinessDirectory.Execute
Dim _BusinessDirectory As BusinessDirectory = TryCast(e.PopupWindow.View.SelectedObjects(0), BusinessDirectory)
If Not _BusinessDirectory.IsFolder Then
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
Dim _RichEditControl_New As New RichEditControl
_RichEditControl_New.LoadDocument(GetFile(_BusinessDirectory.FileData))
Dim _OpenRTFDocument_PopUp As New OpenRTFDocument_PopUp(_onew.Session)
_OpenRTFDocument_PopUp.BusinessDirectory = _onew.GetObject(_BusinessDirectory)
_OpenRTFDocument_PopUp.RTFText = _RichEditControl_New.RtfText
_OpenRTFDocument_PopUp.CRM_Opportunities = _onew.GetObject(TryCast(TryCast(TryCast(View, ListView).CollectionSource, PropertyCollectionSource).MasterObject, CRM_Opportunities))
DeleteTempFile(_BusinessDirectory.FileData)
Dim _ShowViewParameters As New ShowViewParameters
Dim _ShowViewSource As New ShowViewSource(Frame, Nothing)
_ShowViewParameters.CreatedView = Application.CreateDetailView(_onew, "OpenRTFDocument_PopUp_DetailView", True, _OpenRTFDocument_PopUp)
_ShowViewParameters.NewWindowTarget = NewWindowTarget.MdiChild
_ShowViewParameters.TargetWindow = TargetWindow.NewWindow
Application.ShowViewStrategy.ShowView(_ShowViewParameters, _ShowViewSource)
End If
End Sub
#Region "Other Functions and Subs"
Private Sub RecursiveBusinessDirectory(_BusinessDirectoryList As ArrayList, _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
Private Function GetFile(_DocumentFile As DevExpress.Persistent.BaseImpl.FileData) As String
Dim _FilePath As String = System.IO.Path.Combine(System.IO.Path.GetTempPath(), _DocumentFile.FileName)
Dim _Stream As System.IO.Stream = New System.IO.FileStream(_FilePath, System.IO.FileMode.Create)
_DocumentFile.SaveToStream(_Stream)
_Stream.Close()
Return _FilePath
End Function
Private Sub DeleteTempFile(_FileData As DevExpress.Persistent.BaseImpl.FileData)
Dim _FilePath As String = System.IO.Path.Combine(System.IO.Path.GetTempPath(), _FileData.FileName)
If IO.File.Exists(_FilePath) Then IO.File.Delete(_FilePath)
End Sub
#End Region
End Class
@@ -0,0 +1,80 @@
Partial Class CRM_OpportunitiesVC
<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.aCRM_Opportunities_CreateMail = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aCRM_Opportunities_ReadMail = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aCRM_Opportunities_Contact_Role_CreateMail = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
'
'aCRM_Opportunities_CreateMail
'
Me.aCRM_Opportunities_CreateMail.Caption = "Create mail"
Me.aCRM_Opportunities_CreateMail.Category = "ObjectsCreation"
Me.aCRM_Opportunities_CreateMail.ConfirmationMessage = Nothing
Me.aCRM_Opportunities_CreateMail.Id = "aCRM_Opportunities_CreateMail"
Me.aCRM_Opportunities_CreateMail.ImageName = "mail_add"
Me.aCRM_Opportunities_CreateMail.Shortcut = Nothing
Me.aCRM_Opportunities_CreateMail.Tag = Nothing
Me.aCRM_Opportunities_CreateMail.TargetObjectsCriteria = Nothing
Me.aCRM_Opportunities_CreateMail.TargetViewId = "CRM_Opportunities_DetailView"
Me.aCRM_Opportunities_CreateMail.ToolTip = Nothing
Me.aCRM_Opportunities_CreateMail.TypeOfView = Nothing
'
'aCRM_Opportunities_ReadMail
'
Me.aCRM_Opportunities_ReadMail.Caption = "Read mail"
Me.aCRM_Opportunities_ReadMail.ConfirmationMessage = Nothing
Me.aCRM_Opportunities_ReadMail.Id = "aCRM_Opportunities_ReadMail"
Me.aCRM_Opportunities_ReadMail.ImageName = "mail_view"
Me.aCRM_Opportunities_ReadMail.Shortcut = Nothing
Me.aCRM_Opportunities_ReadMail.Tag = Nothing
Me.aCRM_Opportunities_ReadMail.TargetObjectsCriteria = Nothing
Me.aCRM_Opportunities_ReadMail.TargetViewId = "CRM_Opportunities_CRM_Leads_Activity_ListView"
Me.aCRM_Opportunities_ReadMail.ToolTip = Nothing
Me.aCRM_Opportunities_ReadMail.TypeOfView = Nothing
'
'aCRM_Opportunities_Contact_Role_CreateMail
'
Me.aCRM_Opportunities_Contact_Role_CreateMail.Caption = "Contact Role CreateMail"
Me.aCRM_Opportunities_Contact_Role_CreateMail.ConfirmationMessage = Nothing
Me.aCRM_Opportunities_Contact_Role_CreateMail.Id = "aCRM_Opportunities_Contact_Role_CreateMail"
Me.aCRM_Opportunities_Contact_Role_CreateMail.ImageName = "mail_add"
Me.aCRM_Opportunities_Contact_Role_CreateMail.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireMultipleObjects
Me.aCRM_Opportunities_Contact_Role_CreateMail.Shortcut = Nothing
Me.aCRM_Opportunities_Contact_Role_CreateMail.Tag = Nothing
Me.aCRM_Opportunities_Contact_Role_CreateMail.TargetObjectsCriteria = Nothing
Me.aCRM_Opportunities_Contact_Role_CreateMail.TargetViewId = ""
Me.aCRM_Opportunities_Contact_Role_CreateMail.ToolTip = Nothing
Me.aCRM_Opportunities_Contact_Role_CreateMail.TypeOfView = Nothing
End Sub
Friend WithEvents aCRM_Opportunities_CreateMail As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aCRM_Opportunities_ReadMail As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aCRM_Opportunities_Contact_Role_CreateMail As DevExpress.ExpressApp.Actions.SimpleAction
End Class
@@ -0,0 +1,132 @@
<?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="aCRM_Opportunities_CreateMail.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 56</value>
</metadata>
<metadata name="aCRM_Opportunities_ReadMail.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 95</value>
</metadata>
<metadata name="aCRM_Opportunities_Contact_Role_CreateMail.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>465, 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,130 @@
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.ExpressApp.Utils
Public Class CRM_OpportunitiesVC
Inherits DevExpress.ExpressApp.ViewController
Public Sub New()
MyBase.New()
InitializeComponent()
RegisterActions(components)
End Sub
Protected Overrides Sub OnActivated()
MyBase.OnActivated()
Frame.GetController(Of CRM_OpportunitiesVC).aCRM_Opportunities_Contact_Role_CreateMail.Active.SetItemValue("", False)
If View.Id = "CRM_Opportunities_OfferOutHeader_ListView" Then
Frame.GetController(Of OffersOutPrintVC)().aOfferOutSendMailDeatil.Active.SetItemValue("", True)
End If
If View.Id = "CRM_Opportunities_CRM_Opportunities_Contacts_Roles_ListView" Then
Frame.GetController(Of CRM_OpportunitiesVC).aCRM_Opportunities_Contact_Role_CreateMail.Active.SetItemValue("", True)
End If
End Sub
Protected Overrides Sub OnDeactivated()
MyBase.OnDeactivated()
If View.Id = "CRM_Opportunities_OfferOutHeader_ListView" Then
Frame.GetController(Of OffersOutPrintVC)().aOfferOutSendMailDeatil.Active.SetItemValue("", False)
End If
If View.Id = "CRM_Opportunities_CRM_Opportunities_Contacts_Roles_ListView" Then
Frame.GetController(Of CRM_OpportunitiesVC).aCRM_Opportunities_Contact_Role_CreateMail.Active.SetItemValue("", False)
End If
End Sub
Private Sub aCRM_Opportunities_CreateMail_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aCRM_Opportunities_CreateMail.Execute
Try
Dim _CRM_Opportunities As CRM_Opportunities = TryCast(e.CurrentObject, CRM_Opportunities)
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
If _CRM_Opportunities.Contacts Is Nothing Then Throw New Exception("*Nincs kapcsolat ehhez az ügyfélhez!")
If _CRM_Opportunities.Contacts.Email Is Nothing Then Throw New UserFriendlyException("Nincs beállítva e-mail cím!")
If _CRM_Opportunities.Contacts.Email = "" Then Throw New UserFriendlyException("Nincs beállítva e-mail cím!")
Dim _OutlookEMail As OutlookEMail = _ocur.CreateObject(Of OutlookEMail)()
_OutlookEMail.CRM_Leads = _CRM_Opportunities.CRM_Leads
_OutlookEMail.CRM_Opportunities = _CRM_Opportunities
_OutlookEMail.Recipients = _CRM_Opportunities.Contacts.Email
_OutlookEMail.OwnerUser = _CRM_Opportunities.UserCreated
_OutlookEMail.eCRMEstate_Leads = eCRMEstate_Leads.eCRM
_OutlookEMail.Subject = _CRM_Opportunities.ShortName
_OutlookEMail.Save()
e.ShowViewParameters.CreatedView = Application.CreateDetailView(_ocur, "OutlookEMail_DetailView", False, _OutlookEMail)
View.Refresh()
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.OkOnly)
End Try
End Sub
Private Sub aCRM_Opportunities_ReadMail_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aCRM_Opportunities_ReadMail.Execute
Dim _CRM_Leads_Activity As CRM_Leads_Activity = TryCast(e.SelectedObjects(0), CRM_Leads_Activity)
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
If _CRM_Leads_Activity IsNot Nothing Then
'--Email megkeresése és új benyitása
If _CRM_Leads_Activity.Email_Oid = "" Then
Throw New UserFriendlyException("Nincs kapcsolódó e-mail üzenet!")
Else
Dim _OutlookEMail As OutlookEMail = _ocur.FindObject(Of OutlookEMail)(CriteriaOperator.Parse("Oid=?", _CRM_Leads_Activity.Email_Oid))
Dim _OutlookEMailIn As OutlookEMailIn = _ocur.FindObject(Of OutlookEMailIn)(CriteriaOperator.Parse("Oid=?", _CRM_Leads_Activity.Email_Oid))
If _OutlookEMail IsNot Nothing Then
e.ShowViewParameters.CreatedView = Application.CreateDetailView(_ocur, "OutlookEMail_DetailView", False, _OutlookEMail)
Else
e.ShowViewParameters.CreatedView = Application.CreateDetailView(_ocur, "OutlookEMailIn_DetailView", False, _OutlookEMailIn)
End If
View.Refresh()
End If
End If
End Sub
Private Sub aCRM_Opportunities_Contact_Role_CreateMail_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aCRM_Opportunities_Contact_Role_CreateMail.Execute
Try
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _OutlookEMail As OutlookEMail = _ocur.CreateObject(Of OutlookEMail)()
Dim _Contacts As Contacts = TryCast(View.SelectedObjects(0), CRM_Opportunities_Contacts_Roles).Contacts
Dim _CRM_Opportunities As CRM_Opportunities = TryCast(TryCast(View, ListView).CollectionSource, PropertyCollectionSource).MasterObject
Dim _Contacts_Collection As New ArrayList
For Each _CRM_Opportunities_Contacts_Roles As CRM_Opportunities_Contacts_Roles In View.SelectedObjects
If String.IsNullOrEmpty(_CRM_Opportunities_Contacts_Roles.Contacts.Email) Then _
_Contacts_Collection.Add(_CRM_Opportunities_Contacts_Roles.Contacts)
Next
If _Contacts_Collection.Count > 0 Then
Dim _ErrorMessage As String = "A következõ kapcsolatoknak nincs e-mail cím beállítva:" + vbNewLine
For Each _ContactsError As Contacts In _Contacts_Collection
_ErrorMessage += _ContactsError.FirstName + " " + _ContactsError.LastName + vbNewLine
Next
_ErrorMessage += "Kérem, ellenõrizze!"
Throw New Exception(_ErrorMessage)
End If
_OutlookEMail.CRM_Leads = _CRM_Opportunities.CRM_Leads
_OutlookEMail.CRM_Opportunities = _CRM_Opportunities
_OutlookEMail.Recipients = ""
For Each _CRM_Opportunities_Contacts_Roles As CRM_Opportunities_Contacts_Roles In View.SelectedObjects
_OutlookEMail.Recipients += _CRM_Opportunities_Contacts_Roles.Contacts.Email + "; "
Next
_OutlookEMail.OwnerUser = _CRM_Opportunities.UserCreated
_OutlookEMail.eCRMEstate_Leads = eCRMEstate_Leads.eCRM
e.ShowViewParameters.CreatedView = Application.CreateDetailView(_ocur, "OutlookEMail_DetailView", False, _OutlookEMail)
View.Refresh()
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, String.Format(CaptionHelper.GetLocalizedText("Exceptions\NuvolarExceptions", "MsgBoxCheckItAgain")))
End Try
End Sub
End Class