First create solution
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
Partial Class AlertWC
|
||||
<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,275 @@
|
||||
'/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
'//
|
||||
'// AlertControl figyelmeztetõ a következõ objektumokra
|
||||
'// HRPersonTask
|
||||
'//
|
||||
'//
|
||||
'////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
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 System.Windows.Forms
|
||||
Imports DevExpress.XtraBars.Alerter
|
||||
Imports DevExpress.ExpressApp.Utils
|
||||
Imports DevExpress.Xpo
|
||||
Imports DevExpress.Data.Filtering
|
||||
Imports DevExpress.Persistent.BaseImpl
|
||||
Imports System.Net
|
||||
Imports System.IO
|
||||
|
||||
Public Class AlertWC
|
||||
Inherits DevExpress.ExpressApp.WindowController
|
||||
Private alertControlCore As AlertControl
|
||||
Private alertTimerCore As Timer
|
||||
Private alertTimerCoreLoggedOn As Timer
|
||||
|
||||
Private SISPushActivity As Timer
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
|
||||
'This call is required by the Component Designer.
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
|
||||
TargetWindowType = WindowType.Main
|
||||
End Sub
|
||||
Protected Overrides Sub OnActivated()
|
||||
MyBase.OnActivated()
|
||||
|
||||
InitAlertTimerCore()
|
||||
InitAlertControlCore()
|
||||
InitAlertControlCoreLoggedOn()
|
||||
InitSISPushActivity()
|
||||
End Sub
|
||||
Private Sub InitSISPushActivity()
|
||||
SISPushActivity = New Timer
|
||||
AddHandler SISPushActivity.Tick, AddressOf SISPushActivity_Tick
|
||||
SISPushActivity.Interval = 900000
|
||||
SISPushActivity.Start()
|
||||
End Sub
|
||||
Protected Overridable Sub InitAlertControlCore()
|
||||
alertControlCore = New AlertControl()
|
||||
alertControlCore.AllowHtmlText = True
|
||||
alertControlCore.AllowHotTrack = True
|
||||
AddHandler alertControlCore.AlertClick, AddressOf alertControlCore_AlertClick
|
||||
End Sub
|
||||
Protected Overridable Sub InitAlertTimerCore()
|
||||
alertTimerCore = New Timer()
|
||||
AddHandler alertTimerCore.Tick, AddressOf alertTimerCore_Tick
|
||||
alertTimerCore.Interval = 20000
|
||||
alertTimerCore.Start()
|
||||
End Sub
|
||||
Protected Overridable Sub InitAlertControlCoreLoggedOn()
|
||||
alertTimerCoreLoggedOn = New Timer()
|
||||
AddHandler alertTimerCoreLoggedOn.Tick, AddressOf alertTimerCoreLoggedOn_Tick
|
||||
alertTimerCoreLoggedOn.Interval = 10
|
||||
alertTimerCoreLoggedOn.Start()
|
||||
End Sub
|
||||
|
||||
Private Sub alertTimerCore_Tick(ByVal sender As Object, ByVal e As EventArgs)
|
||||
alertTimerCore.Enabled = False
|
||||
ActivateAlert_HRPersonTask()
|
||||
ActivateAlert_HRPersonTask_Alias()
|
||||
ActivateAlert_CRM_Leads_Activity_Task()
|
||||
alertTimerCore.Enabled = True
|
||||
End Sub
|
||||
Private Sub alertTimerCoreLoggedOn_Tick(sender As Object, e As EventArgs)
|
||||
alertTimerCoreLoggedOn.Enabled = False
|
||||
|
||||
InitAlartControlLoggedOn()
|
||||
End Sub
|
||||
Private Sub ActivateAlert_HRPersonTask()
|
||||
If Application Is Nothing Then Exit Sub
|
||||
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _uow As New UnitOfWork(_onew.Session.DataLayer)
|
||||
Dim _CurrentUser = _uow.GetObjectByKey(Of User)(_uow.GetKeyValue(SecuritySystem.CurrentUser))
|
||||
Dim _HRPerson As HRPerson = _uow.FindObject(Of HRPerson)(CriteriaOperator.Parse("User=?", _CurrentUser))
|
||||
|
||||
Dim _HRPersonTasks_Collection As New XPCollection(Of HRPersonTasks)(_uow, CriteriaOperator.Parse("HRPerson=? and Status in ('InProgress','NotStarted','WaitingForSomeoneElse') and isnull(AlertPeriod)=False", _HRPerson))
|
||||
Dim _HRPersonTasks As HRPersonTasks
|
||||
Dim _AlertMinute As Long = 0
|
||||
|
||||
If Application Is Nothing Then Exit Sub
|
||||
If Application.MainWindow Is Nothing Then Exit Sub
|
||||
If Application.MainWindow.Template Is Nothing Then Exit Sub
|
||||
|
||||
Dim mainForm As Form = CType(Application.MainWindow.Template, Form)
|
||||
|
||||
Dim i As Long = 0
|
||||
|
||||
For Each _HRPersonTasks In _HRPersonTasks_Collection
|
||||
'// itt kell az ellenõrzés !
|
||||
If DateAdd(DateInterval.Day, _HRPersonTasks.AlertPeriod.DateDayBefore, GetSQLTime(_uow)) >= _HRPersonTasks.DueDate Then
|
||||
_AlertMinute = (_HRPersonTasks.AlertPeriod.PeriodHour * 60) + _HRPersonTasks.AlertPeriod.PeriodMinute
|
||||
If _AlertMinute > 0 Then
|
||||
If GetSQLTime(_uow).Minute Mod _AlertMinute = 0 Then
|
||||
Dim info As New AlertInfo("Figyelem !", _HRPersonTasks.Subject, _HRPersonTasks.Description, ImageLoader.Instance.GetImageInfo("BO_Task").Image, _HRPersonTasks)
|
||||
alertControlCore.Show(mainForm, info)
|
||||
i += 1
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If i > 50 Then Exit For '// Cask az elsõ ötven jön fel !
|
||||
Next
|
||||
|
||||
_HRPersonTasks_Collection = New XPCollection(Of HRPersonTasks)(_uow, CriteriaOperator.Parse("HRPersonAlias=? and Status in ('InProgress','NotStarted','WaitingForSomeoneElse') and isnull(AlertPeriod)=False and DueDate<?", _HRPerson, GetSQLTime(_uow)))
|
||||
i = 0
|
||||
For Each _HRPersonTasks In _HRPersonTasks_Collection
|
||||
_AlertMinute = (_HRPersonTasks.AlertPeriod.PeriodHour * 60) + _HRPersonTasks.AlertPeriod.PeriodMinute
|
||||
If _AlertMinute > 0 Then
|
||||
If GetSQLTime(_uow).Minute Mod _AlertMinute = 0 Then
|
||||
Dim info As New AlertInfo("Figyelem ! Lejárt kiadott feladat !", _HRPersonTasks.Subject, _HRPersonTasks.Description, ImageLoader.Instance.GetImageInfo("warning").Image, _HRPersonTasks)
|
||||
alertControlCore.Show(mainForm, info)
|
||||
i += 1
|
||||
End If
|
||||
End If
|
||||
If i > 50 Then Exit For
|
||||
Next
|
||||
End Sub
|
||||
Private Sub ActivateAlert_CRM_Leads_Activity_Task()
|
||||
If Application Is Nothing Then Exit Sub
|
||||
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _uow As New UnitOfWork(_onew.Session.DataLayer)
|
||||
Dim _CurrentUser = _uow.GetObjectByKey(Of User)(_uow.GetKeyValue(SecuritySystem.CurrentUser))
|
||||
Dim _HRPerson As HRPerson = _uow.FindObject(Of HRPerson)(CriteriaOperator.Parse("User=?", _CurrentUser))
|
||||
|
||||
Dim _CRM_Leads_Activity_Task_Collection As New XPCollection(Of CRM_Leads_Activity_Task)(_uow, CriteriaOperator.Parse("HRPerson=? and Status in ('InProgress','NotStarted','WaitingForSomeoneElse') and isnull(AlertPeriod)=False", _HRPerson))
|
||||
Dim _CRM_Leads_Activity_Task As CRM_Leads_Activity_Task
|
||||
Dim mainForm As Form = CType(Application.MainWindow.Template, Form)
|
||||
|
||||
Dim i As Long = 0
|
||||
|
||||
For Each _CRM_Leads_Activity_Task In _CRM_Leads_Activity_Task_Collection
|
||||
'// itt kell az ellenõrzés !
|
||||
If DateAdd(DateInterval.Day, _CRM_Leads_Activity_Task.AlertPeriod.DateDayBefore, GetSQLTime(_uow)) >= _CRM_Leads_Activity_Task.DueDate Then
|
||||
If _CRM_Leads_Activity_Task.AlertPeriod IsNot Nothing Then
|
||||
If _CRM_Leads_Activity_Task.AlertPeriod.PeriodMinute > 0 Then
|
||||
If GetSQLTime(_uow).Minute Mod _CRM_Leads_Activity_Task.AlertPeriod.PeriodMinute = 0 Then
|
||||
Dim info As New AlertInfo("Figyelem !", _CRM_Leads_Activity_Task.Subject, _CRM_Leads_Activity_Task.Description, ImageLoader.Instance.GetImageInfo("BO_Task").Image, _CRM_Leads_Activity_Task)
|
||||
alertControlCore.Show(mainForm, info)
|
||||
i += 1
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
If i > 50 Then Exit For '// Cask az elsõ ötven jön fel !
|
||||
Next
|
||||
End Sub
|
||||
Private Sub alertControlCore_AlertClick(sender As Object, e As AlertClickEventArgs)
|
||||
If Application Is Nothing Then Exit Sub
|
||||
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _HRPersonTasks As HRPersonTasks
|
||||
Dim _ShowViewParameters As New ShowViewParameters
|
||||
Dim _ShowViewSource As New ShowViewSource(Frame, Nothing)
|
||||
Dim _CRM_Leads_Activity_Task As CRM_Leads_Activity_Task
|
||||
|
||||
_HRPersonTasks = TryCast(e.Info.Tag, HRPersonTasks)
|
||||
If _HRPersonTasks IsNot Nothing Then
|
||||
If _HRPersonTasks.IsView Then
|
||||
If _HRPersonTasks.ViewID <> "" Then
|
||||
|
||||
_ShowViewParameters.CreatedView = Application.CreateDashboardView(_onew, _HRPersonTasks.ViewID, True)
|
||||
_ShowViewParameters.NewWindowTarget = NewWindowTarget.MdiChild
|
||||
_ShowViewParameters.TargetWindow = TargetWindow.NewWindow
|
||||
Application.ShowViewStrategy.ShowView(_ShowViewParameters, _ShowViewSource)
|
||||
End If
|
||||
Else
|
||||
_ShowViewParameters.CreatedView = Application.CreateDetailView(_onew, "HRPersonTasks_DetailView", True, _onew.GetObject(_HRPersonTasks))
|
||||
_ShowViewParameters.NewWindowTarget = NewWindowTarget.MdiChild
|
||||
_ShowViewParameters.TargetWindow = TargetWindow.NewWindow
|
||||
|
||||
Application.ShowViewStrategy.ShowView(_ShowViewParameters, _ShowViewSource)
|
||||
End If
|
||||
End If
|
||||
_CRM_Leads_Activity_Task = TryCast(e.Info.Tag, CRM_Leads_Activity_Task)
|
||||
If _CRM_Leads_Activity_Task IsNot Nothing Then
|
||||
_ShowViewParameters.CreatedView = Application.CreateDetailView(_onew, "CRM_Leads_Activity_Task_DetailView", True, _onew.GetObject(_CRM_Leads_Activity_Task))
|
||||
_ShowViewParameters.NewWindowTarget = NewWindowTarget.MdiChild
|
||||
_ShowViewParameters.TargetWindow = TargetWindow.NewWindow
|
||||
|
||||
Application.ShowViewStrategy.ShowView(_ShowViewParameters, _ShowViewSource)
|
||||
End If
|
||||
End Sub
|
||||
Private Sub ActivateAlert_HRPersonTask_Alias()
|
||||
If Application Is Nothing Then Exit Sub
|
||||
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _uow As New UnitOfWork(_onew.Session.DataLayer)
|
||||
Dim _CurrentUser = _uow.GetObjectByKey(Of User)(_uow.GetKeyValue(SecuritySystem.CurrentUser))
|
||||
Dim _HRPerson As HRPerson = _uow.FindObject(Of HRPerson)(CriteriaOperator.Parse("User=?", _CurrentUser))
|
||||
|
||||
Dim _HRPersonTasks_Collection As New XPCollection(Of HRPersonTasks) _
|
||||
(_uow, CriteriaOperator.Parse("DueDate <= ? and HRPersonAlias=? and Status in ('InProgress','NotStarted','WaitingForSomeoneElse') and isnull(AlertPeriodAlias)=False", GetSQLTime(_uow), _HRPerson))
|
||||
Dim _HRPersonTasks As HRPersonTasks
|
||||
|
||||
If Application Is Nothing Then Exit Sub
|
||||
If Application.MainWindow Is Nothing Then Exit Sub
|
||||
|
||||
|
||||
Dim mainForm As Form = CType(Application.MainWindow.Template, Form)
|
||||
|
||||
Dim i As Long = 0
|
||||
|
||||
For Each _HRPersonTasks In _HRPersonTasks_Collection
|
||||
|
||||
Dim info As New AlertInfo("Figyelem !", _HRPersonTasks.Subject, _HRPersonTasks.Description, ImageLoader.Instance.GetImageInfo("BO_Task").Image, _HRPersonTasks)
|
||||
alertControlCore.Show(mainForm, info)
|
||||
i += 1
|
||||
|
||||
If i > 50 Then Exit For '// Cask az elsõ ötven jön fel !
|
||||
Next
|
||||
End Sub
|
||||
Private Sub InitAlartControlLoggedOn()
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _uow As New UnitOfWork(_onew.Session.DataLayer)
|
||||
Dim _CurrentUser = _uow.GetObjectByKey(Of User)(_uow.GetKeyValue(SecuritySystem.CurrentUser))
|
||||
Dim _HRPerson As HRPerson = _uow.FindObject(Of HRPerson)(CriteriaOperator.Parse("User=?", _CurrentUser))
|
||||
Dim _HRPersonTasks_Collection As New XPCollection(Of HRPersonTasks)(_uow, CriteriaOperator.Parse("HRPerson=? AND AlertPeriod.AlertType='eOnLoggedOn' AND Status<>4", _HRPerson))
|
||||
|
||||
If Application IsNot Nothing Then
|
||||
If Application.MainWindow IsNot Nothing Then
|
||||
If Application.MainWindow.Template IsNot Nothing Then
|
||||
Dim mainForm As Form = CType(Application.MainWindow.Template, Form)
|
||||
|
||||
For Each _HRPersonTasks As HRPersonTasks In _HRPersonTasks_Collection
|
||||
|
||||
Dim info As New AlertInfo("Figyelem !", _HRPersonTasks.Subject, _HRPersonTasks.Description, ImageLoader.Instance.GetImageInfo("lock_time").Image, _HRPersonTasks)
|
||||
alertControlCore.Show(mainForm, info)
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub SISPushActivity_Tick(sender As Object, e As EventArgs)
|
||||
Dim _infostring As String = GLOBAL_ActivityID
|
||||
Try
|
||||
_infostring = AESEncrypt(_infostring, "HrX12!!0Zm7764W2", "vXm657YS+!0@mmT")
|
||||
_infostring = Convert.ToBase64String(Encoding.UTF8.GetBytes(_infostring))
|
||||
|
||||
Dim _url = "http://sis-r.hu/SISChat/SISPushActivitySSL.ashx?id=" & _infostring
|
||||
Dim _request As HttpWebRequest = TryCast(WebRequest.Create(_url), HttpWebRequest)
|
||||
Dim _response As HttpWebResponse = TryCast(_request.GetResponse, HttpWebResponse)
|
||||
Dim _reader As StreamReader = New StreamReader(_response.GetResponseStream())
|
||||
_infostring = _reader.ReadToEnd
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
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.components = New System.ComponentModel.Container()
|
||||
Me.aContacts_SysncToOutlook = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
|
||||
Me.aContacts_SysncFromOutlook = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
|
||||
'
|
||||
'aContacts_SysncToOutlook
|
||||
'
|
||||
Me.aContacts_SysncToOutlook.AcceptButtonCaption = Nothing
|
||||
Me.aContacts_SysncToOutlook.CancelButtonCaption = Nothing
|
||||
Me.aContacts_SysncToOutlook.Caption = "aContacts_SysncToOutlook"
|
||||
Me.aContacts_SysncToOutlook.Category = ""
|
||||
Me.aContacts_SysncToOutlook.ConfirmationMessage = Nothing
|
||||
Me.aContacts_SysncToOutlook.Id = "aContacts_SysncToOutlook"
|
||||
Me.aContacts_SysncToOutlook.ImageName = Nothing
|
||||
Me.aContacts_SysncToOutlook.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireMultipleObjects
|
||||
Me.aContacts_SysncToOutlook.Shortcut = Nothing
|
||||
Me.aContacts_SysncToOutlook.Tag = Nothing
|
||||
Me.aContacts_SysncToOutlook.TargetObjectsCriteria = Nothing
|
||||
Me.aContacts_SysncToOutlook.TargetObjectType = GetType(Nuvolar.[Module].Contacts)
|
||||
Me.aContacts_SysncToOutlook.TargetViewId = Nothing
|
||||
Me.aContacts_SysncToOutlook.ToolTip = Nothing
|
||||
Me.aContacts_SysncToOutlook.TypeOfView = Nothing
|
||||
'
|
||||
'aContacts_SysncFromOutlook
|
||||
'
|
||||
Me.aContacts_SysncFromOutlook.AcceptButtonCaption = Nothing
|
||||
Me.aContacts_SysncFromOutlook.CancelButtonCaption = Nothing
|
||||
Me.aContacts_SysncFromOutlook.Caption = "aContacts_SysncFromOutlook"
|
||||
Me.aContacts_SysncFromOutlook.Category = ""
|
||||
Me.aContacts_SysncFromOutlook.ConfirmationMessage = Nothing
|
||||
Me.aContacts_SysncFromOutlook.Id = "aContacts_SysncFromOutlook"
|
||||
Me.aContacts_SysncFromOutlook.ImageName = Nothing
|
||||
Me.aContacts_SysncFromOutlook.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireMultipleObjects
|
||||
Me.aContacts_SysncFromOutlook.Shortcut = Nothing
|
||||
Me.aContacts_SysncFromOutlook.Tag = Nothing
|
||||
Me.aContacts_SysncFromOutlook.TargetObjectsCriteria = Nothing
|
||||
Me.aContacts_SysncFromOutlook.TargetObjectType = GetType(Nuvolar.[Module].Contacts)
|
||||
Me.aContacts_SysncFromOutlook.TargetViewId = Nothing
|
||||
Me.aContacts_SysncFromOutlook.ToolTip = Nothing
|
||||
Me.aContacts_SysncFromOutlook.TypeOfView = Nothing
|
||||
|
||||
End Sub
|
||||
Friend WithEvents aContacts_SysncToOutlook As DevExpress.ExpressApp.Actions.PopupWindowShowAction
|
||||
Friend WithEvents aContacts_SysncFromOutlook As DevExpress.ExpressApp.Actions.PopupWindowShowAction
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,129 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="aContacts_SysncToOutlook.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="aContacts_SysncFromOutlook.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>216, 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,337 @@
|
||||
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.Office.Interop.Outlook
|
||||
Imports Microsoft.Office.Interop
|
||||
Imports DevExpress.Xpo
|
||||
Imports System.IO
|
||||
Imports DevExpress.Data.Filtering
|
||||
Imports DevExpress.ExpressApp.Utils
|
||||
|
||||
Public Class ContactsVC
|
||||
Inherits Nuvolar.Module.ContactsVC
|
||||
|
||||
Dim _WaitFormClass As New WaitFormClass
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
End Sub
|
||||
|
||||
Protected Overrides Sub OnActivated()
|
||||
MyBase.OnActivated()
|
||||
If View.Id Like "Contacts_*" Then
|
||||
AddHandler MyBase.DoWork, AddressOf _WaitFormClass.DoWork
|
||||
AddHandler MyBase.InitWork, AddressOf _WaitFormClass.InitWork
|
||||
AddHandler MyBase.FinalWork, AddressOf _WaitFormClass.Finalwork
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Protected Overrides Sub OnDeactivated()
|
||||
MyBase.OnDeactivated()
|
||||
If View.Id Like "Contacts_*" Then
|
||||
RemoveHandler MyBase.DoWork, AddressOf _WaitFormClass.DoWork
|
||||
RemoveHandler MyBase.InitWork, AddressOf _WaitFormClass.InitWork
|
||||
RemoveHandler MyBase.FinalWork, AddressOf _WaitFormClass.Finalwork
|
||||
End If
|
||||
End Sub
|
||||
Private Sub aContacts_SysncToOutlook_CustomizePopupWindowParams(sender As Object, e As DevExpress.ExpressApp.Actions.CustomizePopupWindowParamsEventArgs) Handles aContacts_SysncToOutlook.CustomizePopupWindowParams
|
||||
Try
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _onew_Delete As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _Contacts_OutlookFolderContact_Collection As New XPCollection(Of Contacts_OutlookFolderContact)(_onew_Delete.Session)
|
||||
If _Contacts_OutlookFolderContact_Collection.Count > 0 Then
|
||||
_onew_Delete.Delete(_Contacts_OutlookFolderContact_Collection)
|
||||
End If
|
||||
_onew_Delete.CommitChanges()
|
||||
|
||||
Dim _Contacts_SysncOutlook As Contacts_SysncOutlook = _onew.CreateObject(Of Contacts_SysncOutlook)()
|
||||
e.View = Application.CreateDetailView(_onew, "Contacts_SysncOutlook_DetailView", True, _Contacts_SysncOutlook)
|
||||
Catch ex As System.Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, String.Format(CaptionHelper.GetLocalizedText("Exceptions\NuvolarExceptions", "MsgBoxCheckItAgain")))
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub aContacts_SysncToOutlook_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.PopupWindowShowActionExecuteEventArgs) Handles aContacts_SysncToOutlook.Execute
|
||||
Try
|
||||
Frame.GetController(Of DevExpress.ExpressApp.Validation.PersistenceValidationController)().Active.SetItemValue("", False)
|
||||
Dim _ocur As Xpo.XPObjectSpace = View.ObjectSpace
|
||||
Dim _NeedCommitChanges As Boolean = False
|
||||
Dim _Contacts_SysncOutlook As Contacts_SysncOutlook = TryCast(e.PopupWindow.View.SelectedObjects(0), Contacts_SysncOutlook)
|
||||
Dim _OutlookApp As New Outlook.Application()
|
||||
Dim _OutlookNameSpace As Outlook.NameSpace = _OutlookApp.GetNamespace("MAPI")
|
||||
_OutlookNameSpace.Logon(, , False, True)
|
||||
_WaitFormClass.InitWork(0, 1, View.SelectedObjects.Count)
|
||||
Select Case _Contacts_SysncOutlook.SyscType
|
||||
Case eSyscType.eFirstSync
|
||||
Dim _ContactFolder As Outlook.MAPIFolder = _OutlookNameSpace.GetFolderFromID(_Contacts_SysncOutlook.Contacts_OutlookFolderContact.EntryID)
|
||||
For Each _Contacts As Contacts In View.SelectedObjects
|
||||
_WaitFormClass.DoWork
|
||||
If _Contacts.IsOutlookSync Then
|
||||
Dim _FileName As String = Path.GetTempPath + _Contacts.Oid.ToString + ".jpg"
|
||||
Dim _ContactItem As Outlook.ContactItem = _OutlookApp.CreateItem(OlItemType.olContactItem)
|
||||
With (_ContactItem)
|
||||
.FirstName = _Contacts.FirstName
|
||||
.LastName = _Contacts.LastName
|
||||
.Email1Address = _Contacts.Email
|
||||
.Birthday = _Contacts.Birthday
|
||||
.JobTitle = _Contacts.Position
|
||||
.BusinessTelephoneNumber = _Contacts.BusinessTelephoneNumber
|
||||
.BusinessFaxNumber = _Contacts.BusinessFaxNumber
|
||||
.HomeFaxNumber = _Contacts.HomeFaxNumber
|
||||
.MobileTelephoneNumber = _Contacts.MobileTelephoneNumber
|
||||
|
||||
If _Contacts.Photo IsNot Nothing Then
|
||||
'_Contacts.Photo.Save(_FileName)
|
||||
'.AddPicture(_FileName)
|
||||
End If
|
||||
|
||||
If _Contacts.Address1 IsNot Nothing Then
|
||||
.BusinessAddress = _Contacts.Address1.FullAddress
|
||||
.BusinessAddressCity = _Contacts.Address1.City
|
||||
.BusinessAddressCountry = _Contacts.Address1.Country.Name
|
||||
.BusinessAddressPostalCode = _Contacts.Address1.ZipPostal
|
||||
.BusinessAddressState = _Contacts.Address1.StateProvince
|
||||
.BusinessAddressStreet = _Contacts.Address1.Street
|
||||
End If
|
||||
|
||||
If _Contacts.Customers IsNot Nothing Then
|
||||
.Companies = _Contacts.Customers.FullName
|
||||
.CompanyName = _Contacts.Customers.Name
|
||||
End If
|
||||
End With
|
||||
|
||||
_ContactItem.User1 = _Contacts.Oid.ToString
|
||||
_ContactItem.Save()
|
||||
_ContactItem.Move(_ContactFolder)
|
||||
|
||||
If File.Exists(_FileName) Then File.Delete(_FileName)
|
||||
|
||||
_Contacts.ContactItemFolderEntryID_Outlook = _ContactFolder.EntryID
|
||||
End If
|
||||
Next
|
||||
_NeedCommitChanges = True
|
||||
Case eSyscType.eNormalSysnc
|
||||
Select Case _Contacts_SysncOutlook.OverWriteDataType
|
||||
Case eOverWriteDataType.OverWriteOutlookData
|
||||
For Each _Contacts As Contacts In View.SelectedObjects
|
||||
_WaitFormClass.DoWork
|
||||
Dim _FileName As String = Path.GetTempPath + _Contacts.Oid.ToString + ".jpg"
|
||||
Dim _ContactFolder As Outlook.MAPIFolder = _OutlookNameSpace.GetFolderFromID(_Contacts.ContactItemFolderEntryID_Outlook)
|
||||
Dim _ContactItem_Collection As Outlook.Items = _ContactFolder.Items
|
||||
Dim _Filter As String = "[User1] = '" + _Contacts.Oid.ToString + "'"
|
||||
Dim _ContactItem As Outlook.ContactItem = _ContactItem_Collection.Find(_Filter)
|
||||
If _ContactItem IsNot Nothing Then
|
||||
_ContactItem.FirstName = _Contacts.FirstName
|
||||
_ContactItem.LastName = _Contacts.LastName
|
||||
_ContactItem.Email1Address = _Contacts.Email
|
||||
_ContactItem.Birthday = _Contacts.Birthday
|
||||
_ContactItem.JobTitle = _Contacts.Position
|
||||
_ContactItem.BusinessTelephoneNumber = _Contacts.BusinessTelephoneNumber
|
||||
_ContactItem.BusinessFaxNumber = _Contacts.BusinessFaxNumber
|
||||
_ContactItem.HomeFaxNumber = _Contacts.HomeFaxNumber
|
||||
_ContactItem.MobileTelephoneNumber = _Contacts.MobileTelephoneNumber
|
||||
|
||||
If _Contacts.Photo IsNot Nothing Then
|
||||
'_Contacts.Photo.Save(_FileName)
|
||||
'_ContactItem.AddPicture(_FileName)
|
||||
End If
|
||||
|
||||
If _Contacts.Address1 IsNot Nothing Then
|
||||
_ContactItem.BusinessAddress = _Contacts.Address1.FullAddress
|
||||
_ContactItem.BusinessAddressCity = _Contacts.Address1.City
|
||||
_ContactItem.BusinessAddressCountry = _Contacts.Address1.Country.Name
|
||||
_ContactItem.BusinessAddressPostalCode = _Contacts.Address1.ZipPostal
|
||||
_ContactItem.BusinessAddressState = _Contacts.Address1.StateProvince
|
||||
_ContactItem.BusinessAddressStreet = _Contacts.Address1.Street
|
||||
End If
|
||||
|
||||
If _Contacts.Customers IsNot Nothing Then
|
||||
_ContactItem.Companies = _Contacts.Customers.FullName
|
||||
_ContactItem.CompanyName = _Contacts.Customers.Name
|
||||
End If
|
||||
If File.Exists(_FileName) Then File.Delete(_FileName)
|
||||
End If
|
||||
_ContactItem.Save()
|
||||
Next
|
||||
Case eOverWriteDataType.OverWriteNuvolarData
|
||||
For Each _Contacts As Contacts In View.SelectedObjects
|
||||
_WaitFormClass.DoWork
|
||||
Dim _ContactFolder As Outlook.MAPIFolder = _OutlookNameSpace.GetFolderFromID(_Contacts.ContactItemFolderEntryID_Outlook)
|
||||
Dim _ContactItem_Collection As Outlook.Items = _ContactFolder.Items
|
||||
Dim _Filter As String = "[User1] = '" + _Contacts.Oid.ToString + "'"
|
||||
Dim _ContactItem As Outlook.ContactItem = _ContactItem_Collection.Find(_Filter)
|
||||
If _ContactItem IsNot Nothing Then
|
||||
Dim _FileName As String = Path.GetTempPath + _Contacts.Oid.ToString + ".jpg"
|
||||
|
||||
_Contacts.FirstName = _ContactItem.FirstName
|
||||
_Contacts.LastName = _ContactItem.LastName
|
||||
_Contacts.Email = _ContactItem.Email1Address
|
||||
_Contacts.Birthday = _ContactItem.Birthday
|
||||
_Contacts.Position = _ContactItem.JobTitle
|
||||
_Contacts.BusinessTelephoneNumber = _ContactItem.BusinessTelephoneNumber
|
||||
_Contacts.BusinessFaxNumber = _ContactItem.BusinessFaxNumber
|
||||
_Contacts.HomeFaxNumber = _ContactItem.HomeFaxNumber
|
||||
_Contacts.MobileTelephoneNumber = _ContactItem.MobileTelephoneNumber
|
||||
|
||||
Dim _Address As New DevExpress.Persistent.BaseImpl.Address(_ocur.Session)
|
||||
_Address.City = _ContactItem.BusinessAddressCity
|
||||
Dim _Country As New DevExpress.Persistent.BaseImpl.Country(_ocur.Session)
|
||||
_Country.Name = _ContactItem.BusinessAddressCountry
|
||||
_Address.Country = _Country
|
||||
_Address.ZipPostal = _ContactItem.BusinessAddressPostalCode
|
||||
_Address.StateProvince = _ContactItem.BusinessAddressState
|
||||
_Address.Street = _ContactItem.BusinessAddressStreet
|
||||
|
||||
_Contacts.Address1 = _Address
|
||||
|
||||
If Not String.IsNullOrEmpty(_ContactItem.Companies) Then
|
||||
Dim _Customers As Customers = _ocur.FindObject(Of Customers)(CriteriaOperator.Parse("FullName=?", _ContactItem.Companies))
|
||||
If _Customers IsNot Nothing Then
|
||||
_Contacts.Customers = _ocur.GetObject(_Customers)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
_NeedCommitChanges = True
|
||||
End Select
|
||||
End Select
|
||||
If _NeedCommitChanges Then _ocur.CommitChanges()
|
||||
Catch ex As System.Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, String.Format(CaptionHelper.GetLocalizedText("Exceptions\NuvolarExceptions", "MsgBoxCheckItAgain")))
|
||||
Finally
|
||||
_Waitformclass.FinalWork
|
||||
Frame.GetController(Of DevExpress.ExpressApp.Validation.PersistenceValidationController)().Active.SetItemValue("", True)
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub aContacts_SysncFromOutlook_CustomizePopupWindowParams(sender As Object, e As DevExpress.ExpressApp.Actions.CustomizePopupWindowParamsEventArgs) Handles aContacts_SysncFromOutlook.CustomizePopupWindowParams
|
||||
Try
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _onew_Delete As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _Contacts_OutlookFolderContact_Collection As New XPCollection(Of Contacts_OutlookFolderContact)(_onew_Delete.Session)
|
||||
If _Contacts_OutlookFolderContact_Collection.Count > 0 Then
|
||||
_onew_Delete.Delete(_Contacts_OutlookFolderContact_Collection)
|
||||
End If
|
||||
_onew_Delete.CommitChanges()
|
||||
|
||||
Dim _Contacts_SysncOutlook As Contacts_SysncOutlook = _onew.CreateObject(Of Contacts_SysncOutlook)()
|
||||
_Contacts_SysncOutlook.IsFromOutlook = True
|
||||
_Contacts_SysncOutlook.SyscType = eSyscType.eFirstSync
|
||||
e.View = Application.CreateDetailView(_onew, "Contacts_SysncOutlook_DetailView", True, _Contacts_SysncOutlook)
|
||||
Catch ex As System.Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, String.Format(CaptionHelper.GetLocalizedText("Exceptions\NuvolarExceptions", "MsgBoxCheckItAgain")))
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub aContacts_SysncFromOutlook_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.PopupWindowShowActionExecuteEventArgs) Handles aContacts_SysncFromOutlook.Execute
|
||||
Try
|
||||
Frame.GetController(Of DevExpress.ExpressApp.Validation.PersistenceValidationController)().Active.SetItemValue("", False)
|
||||
Dim _ocur As Xpo.XPObjectSpace = View.ObjectSpace
|
||||
Dim _NeedCommitChanges As Boolean = False
|
||||
Dim _Contacts_SysncOutlook As Contacts_SysncOutlook = TryCast(e.PopupWindow.View.SelectedObjects(0), Contacts_SysncOutlook)
|
||||
Dim _OutlookApp As New Outlook.Application()
|
||||
Dim _OutlookNameSpace As Outlook.NameSpace = _OutlookApp.GetNamespace("MAPI")
|
||||
_OutlookNameSpace.Logon(, , False, True)
|
||||
Dim _ContactFolder As Outlook.MAPIFolder = _OutlookNameSpace.GetFolderFromID(_Contacts_SysncOutlook.Contacts_OutlookFolderContact.EntryID)
|
||||
|
||||
Dim _ContactItem_Collection As Outlook.Items = _ContactFolder.Items
|
||||
_WaitFormClass.InitWork(0, 1, _ContactItem_Collection.Count)
|
||||
Select Case _Contacts_SysncOutlook.OverWriteDataType
|
||||
Case eOverWriteDataType.OverWriteOutlookData
|
||||
For Each _ContactItem As Outlook.ContactItem In _ContactItem_Collection
|
||||
_WaitFormClass.DoWork
|
||||
Dim _Contacts As Contacts = _ocur.FindObject(Of Contacts)(CriteriaOperator.Parse("Oid=?", _ContactItem.User1))
|
||||
If _Contacts Is Nothing Then
|
||||
_ContactItem.Delete()
|
||||
Else
|
||||
Dim _FileName As String = String.Format("{0}{1}.jpg", Path.GetTempPath, _Contacts.Oid)
|
||||
_ContactItem.FirstName = _Contacts.FirstName
|
||||
_ContactItem.LastName = _Contacts.LastName
|
||||
_ContactItem.Email1Address = _Contacts.Email
|
||||
_ContactItem.Birthday = _Contacts.Birthday
|
||||
_ContactItem.JobTitle = _Contacts.Position
|
||||
_ContactItem.BusinessTelephoneNumber = _Contacts.BusinessTelephoneNumber
|
||||
_ContactItem.BusinessFaxNumber = _Contacts.BusinessFaxNumber
|
||||
_ContactItem.HomeFaxNumber = _Contacts.HomeFaxNumber
|
||||
_ContactItem.MobileTelephoneNumber = _Contacts.MobileTelephoneNumber
|
||||
|
||||
If _Contacts.Photo IsNot Nothing Then
|
||||
'_Contacts.Photo.Save(_FileName)
|
||||
'_Contacts.ph()
|
||||
_ContactItem.AddPicture(_FileName)
|
||||
End If
|
||||
|
||||
If _Contacts.Address1 IsNot Nothing Then
|
||||
_ContactItem.BusinessAddress = _Contacts.Address1.FullAddress
|
||||
_ContactItem.BusinessAddressCity = _Contacts.Address1.City
|
||||
_ContactItem.BusinessAddressCountry = _Contacts.Address1.Country.Name
|
||||
_ContactItem.BusinessAddressPostalCode = _Contacts.Address1.ZipPostal
|
||||
_ContactItem.BusinessAddressState = _Contacts.Address1.StateProvince
|
||||
_ContactItem.BusinessAddressStreet = _Contacts.Address1.Street
|
||||
End If
|
||||
|
||||
If _Contacts.Customers IsNot Nothing Then
|
||||
_ContactItem.Companies = _Contacts.Customers.FullName
|
||||
_ContactItem.CompanyName = _Contacts.Customers.Name
|
||||
End If
|
||||
If File.Exists(_FileName) Then File.Delete(_FileName)
|
||||
_ContactItem.Save()
|
||||
End If
|
||||
Next
|
||||
Case eOverWriteDataType.OverWriteNuvolarData
|
||||
For Each _ContactItem As Outlook.ContactItem In _ContactItem_Collection
|
||||
_WaitFormClass.DoWork
|
||||
Dim _Contacts As Contacts = _ocur.FindObject(Of Contacts)(CriteriaOperator.Parse("Oid=?", _ContactItem.User1))
|
||||
If _Contacts Is Nothing Then _Contacts = New Contacts(_ocur.Session)
|
||||
Dim _FileName As String = Path.GetTempPath + _Contacts.Oid.ToString + ".jpg"
|
||||
|
||||
With (_Contacts)
|
||||
.FirstName = _ContactItem.FirstName
|
||||
.LastName = _ContactItem.LastName
|
||||
.Email = _ContactItem.Email1Address
|
||||
.Birthday = _ContactItem.Birthday
|
||||
.Position = _ContactItem.JobTitle
|
||||
.BusinessTelephoneNumber = _ContactItem.BusinessTelephoneNumber
|
||||
.BusinessFaxNumber = _ContactItem.BusinessFaxNumber
|
||||
.HomeFaxNumber = _ContactItem.HomeFaxNumber
|
||||
.MobileTelephoneNumber = _ContactItem.MobileTelephoneNumber
|
||||
|
||||
Dim _Address As New DevExpress.Persistent.BaseImpl.Address(_ocur.Session)
|
||||
_Address.City = _ContactItem.BusinessAddressCity
|
||||
Dim _Country As New DevExpress.Persistent.BaseImpl.Country(_ocur.Session)
|
||||
_Country.Name = _ContactItem.BusinessAddressCountry
|
||||
_Address.Country = _Country
|
||||
_Address.ZipPostal = _ContactItem.BusinessAddressPostalCode
|
||||
_Address.StateProvince = _ContactItem.BusinessAddressState
|
||||
_Address.Street = _ContactItem.BusinessAddressStreet
|
||||
|
||||
.Address1 = _Address
|
||||
|
||||
If Not String.IsNullOrEmpty(_ContactItem.Companies) Then
|
||||
Dim _Customers As Customers = _ocur.FindObject(Of Customers)(CriteriaOperator.Parse("FullName=?", _ContactItem.Companies))
|
||||
If _Customers IsNot Nothing Then
|
||||
.Customers = _ocur.GetObject(_Customers)
|
||||
End If
|
||||
End If
|
||||
.IsOutlookSync = True
|
||||
.ContactItemFolderEntryID_Outlook = _Contacts_SysncOutlook.Contacts_OutlookFolderContact.EntryID
|
||||
End With
|
||||
_ocur.CommitChanges()
|
||||
_ContactItem.User1 = _Contacts.Oid.ToString
|
||||
_ContactItem.Save()
|
||||
Next
|
||||
End Select
|
||||
If _NeedCommitChanges Then _ocur.CommitChanges()
|
||||
Catch ex As System.Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, String.Format(CaptionHelper.GetLocalizedText("Exceptions\NuvolarExceptions", "MsgBoxCheckItAgain")))
|
||||
Finally
|
||||
_Waitformclass.FinalWork
|
||||
Frame.GetController(Of DevExpress.ExpressApp.Validation.PersistenceValidationController)().Active.SetItemValue("", True)
|
||||
End Try
|
||||
End Sub
|
||||
End Class
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
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()
|
||||
components = New System.ComponentModel.Container()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,73 @@
|
||||
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
|
||||
Imports System.Windows.Forms
|
||||
Imports DevExpress.Data.Filtering
|
||||
Imports DevExpress.Persistent.BaseImpl
|
||||
|
||||
Public Class CustomersVC
|
||||
Inherits Nuvolar.Module.CustomersVC
|
||||
Dim _WaitFormClass As New WaitFormClass
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
|
||||
'This call is required by the Component Designer.
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
|
||||
End Sub
|
||||
Protected Overloads Overrides Sub OnActivated()
|
||||
MyBase.OnActivated()
|
||||
AddHandler DoWork, AddressOf _WaitFormClass.DoWork
|
||||
AddHandler InitWork, AddressOf _WaitFormClass.Initwork
|
||||
AddHandler FinalWork, AddressOf _WaitFormClass.Finalwork
|
||||
|
||||
If View.Id = "Customers_DetailView" Then
|
||||
For Each editor As PropertyEditor In (CType(View, DetailView)).GetItems(Of PropertyEditor)()
|
||||
If editor.PropertyName = "Name" Then
|
||||
AddHandler editor.ControlCreated, AddressOf editor_ControlCreated
|
||||
Exit For
|
||||
End If
|
||||
Next editor
|
||||
End If
|
||||
End Sub
|
||||
Protected Overrides Sub OnDeactivated()
|
||||
MyBase.OnDeactivated()
|
||||
RemoveHandler DoWork, AddressOf _WaitFormClass.DoWork
|
||||
RemoveHandler InitWork, AddressOf _WaitFormClass.Initwork
|
||||
RemoveHandler FinalWork, AddressOf _WaitFormClass.Finalwork
|
||||
End Sub
|
||||
Private Sub editor_ControlCreated(ByVal sender As Object, ByVal e As EventArgs)
|
||||
' You can access the corresponding property editor control by the following code:
|
||||
Dim editorControl As Control = TryCast((CType(sender, PropertyEditor)).Control, Control)
|
||||
AddHandler editorControl.HandleCreated, AddressOf editorControl_HandleCreated
|
||||
|
||||
Dim _Name As DevExpress.XtraEditors.TextEdit = TryCast(editorControl, DevExpress.XtraEditors.TextEdit)
|
||||
If _Name IsNot Nothing Then
|
||||
AddHandler _Name.LostFocus, AddressOf Name_LostFocus
|
||||
End If
|
||||
End Sub
|
||||
Private Sub editorControl_HandleCreated(ByVal sender As Object, ByVal e As EventArgs)
|
||||
' Sometimes it is necessary to access editor's control after it is visible (its handle is created).
|
||||
RemoveHandler (CType(sender, Control)).HandleCreated, AddressOf editorControl_HandleCreated
|
||||
End Sub
|
||||
Private Sub Name_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs)
|
||||
On Error Resume Next
|
||||
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _Customers = TryCast(View.SelectedObjects(0), Customers)
|
||||
|
||||
If _Customers IsNot Nothing Then
|
||||
If _Customers.FullName = "" Then _Customers.FullName = sender.text
|
||||
End If
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
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()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Me.aDashboard_SaveDashDesForBusinessDirectory = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
'
|
||||
'aDashboard_SaveDashDesForBusinessDirectory
|
||||
'
|
||||
Me.aDashboard_SaveDashDesForBusinessDirectory.Caption = "aDashboard_SaveDashDesForBusinessDirectory"
|
||||
Me.aDashboard_SaveDashDesForBusinessDirectory.ConfirmationMessage = Nothing
|
||||
Me.aDashboard_SaveDashDesForBusinessDirectory.Id = "aDashboard_SaveDashDesForBusinessDirectory"
|
||||
Me.aDashboard_SaveDashDesForBusinessDirectory.ImageName = Nothing
|
||||
Me.aDashboard_SaveDashDesForBusinessDirectory.Shortcut = Nothing
|
||||
Me.aDashboard_SaveDashDesForBusinessDirectory.Tag = Nothing
|
||||
Me.aDashboard_SaveDashDesForBusinessDirectory.TargetObjectsCriteria = Nothing
|
||||
Me.aDashboard_SaveDashDesForBusinessDirectory.TargetViewId = "Dashboard_DetailView_Designer"
|
||||
Me.aDashboard_SaveDashDesForBusinessDirectory.ToolTip = Nothing
|
||||
Me.aDashboard_SaveDashDesForBusinessDirectory.TypeOfView = Nothing
|
||||
|
||||
End Sub
|
||||
Friend WithEvents aDashboard_SaveDashDesForBusinessDirectory 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="aDashboard_SaveDashDesForBusinessDirectory.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>161, 121</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,205 @@
|
||||
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
|
||||
Imports DevExpress.ExpressApp.SystemModule
|
||||
Imports DevExpress.ExpressApp.CloneObject
|
||||
Imports DevExpress.Data.Filtering
|
||||
Imports DevExpress.Persistent.BaseImpl
|
||||
Imports DevExpress.DashboardCommon
|
||||
Imports DevExpress.Xpo
|
||||
|
||||
Imports System.IO
|
||||
Imports System.Xml
|
||||
Imports System.Reflection
|
||||
Imports DevExpress.DashboardWin
|
||||
|
||||
Public Class Dashboard_VC
|
||||
Inherits Nuvolar.Module.Dashboard_VC
|
||||
|
||||
Private _DashboardViewer As DashboardViewer
|
||||
Private _DashboardDesigner As DashboardDesigner
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
End Sub
|
||||
|
||||
Protected Overrides Sub OnActivated()
|
||||
MyBase.OnActivated()
|
||||
If View.Id = "Dashboard_DetailView_Viewer" Then
|
||||
|
||||
Frame.GetController(Of ModificationsController).SaveAction.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of ModificationsController).SaveAndCloseAction.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of ModificationsController).SaveAndNewAction.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of NewObjectViewController).Active.SetItemValue("", False)
|
||||
|
||||
Dim _DetailView As DetailView = TryCast(View, DetailView)
|
||||
Dim _DashboardViewer_ViewItem As ViewItem = _DetailView.FindItem("DashboardViewer")
|
||||
If _DashboardViewer_ViewItem IsNot Nothing Then
|
||||
AddHandler _DashboardViewer_ViewItem.ControlCreated, AddressOf DashboardViewer_ViewItem_ControlCreated
|
||||
End If
|
||||
End If
|
||||
If View.Id = "Dashboard_DetailView_Designer" Then
|
||||
Frame.GetController(Of ModificationsController).SaveAction.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of ModificationsController).SaveAndCloseAction.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of ModificationsController).SaveAndNewAction.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of NewObjectViewController).Active.SetItemValue("", False)
|
||||
|
||||
Dim _DetailView As DetailView = TryCast(View, DetailView)
|
||||
Dim _DashboardDesigner_ViewItem As ViewItem = _DetailView.FindItem("DashboardDesigner")
|
||||
If _DashboardDesigner_ViewItem IsNot Nothing Then
|
||||
AddHandler _DashboardDesigner_ViewItem.ControlCreated, AddressOf DashboardDesigner_ViewItem_ControlCreated
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
Protected Overrides Sub OnDeactivated()
|
||||
MyBase.OnDeactivated()
|
||||
If View.Id = "Dashboard_DetailView_Viewer" Or
|
||||
View.Id = "Dashboard_DetailView_Designer" Then
|
||||
Frame.GetController(Of ModificationsController).SaveAction.Active.SetItemValue("", True)
|
||||
Frame.GetController(Of ModificationsController).SaveAndCloseAction.Active.SetItemValue("", True)
|
||||
Frame.GetController(Of ModificationsController).SaveAndNewAction.Active.SetItemValue("", True)
|
||||
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of NewObjectViewController).Active.SetItemValue("", True)
|
||||
End If
|
||||
End Sub
|
||||
Private Sub DashboardViewer_ViewItem_ControlCreated(sender As Object, e As EventArgs)
|
||||
Dim _Dashboard As Dashboard = TryCast(View.SelectedObjects(0), Dashboard)
|
||||
Dim _ItemControl As Object = TryCast(sender, ViewItem).Control
|
||||
Dim _DashboardViewerUserControl As DashboardViewerUserControl = TryCast(_ItemControl, DashboardViewerUserControl)
|
||||
_DashboardViewer = _DashboardViewerUserControl.DashboardViewer1
|
||||
|
||||
If _DashboardViewer IsNot Nothing Then
|
||||
With _DashboardViewerUserControl
|
||||
.UserName = _Dashboard.UserName
|
||||
.Password = _Dashboard.Password
|
||||
.SQLType = _Dashboard.SQLType
|
||||
.SQLServer = _Dashboard.SQLServer
|
||||
.Database = _Dashboard.Database
|
||||
End With
|
||||
|
||||
Dim _MemoryStream As New IO.MemoryStream()
|
||||
_Dashboard.XMLFileData.SaveToStream(_MemoryStream)
|
||||
_MemoryStream.Seek(0, IO.SeekOrigin.Begin)
|
||||
With _DashboardViewer
|
||||
.LoadDashboard(_MemoryStream)
|
||||
End With
|
||||
End If
|
||||
End Sub
|
||||
Private Sub DashboardDesigner_ViewItem_ControlCreated(sender As Object, e As EventArgs)
|
||||
Dim _Dashboard As Dashboard = TryCast(View.SelectedObjects(0), Dashboard)
|
||||
Dim _ItemControl As Object = TryCast(sender, ViewItem).Control
|
||||
Dim _DashboardDesignerUserControl As DashboardDesignerUserControl = TryCast(_ItemControl, DashboardDesignerUserControl)
|
||||
_DashboardDesigner = _DashboardDesignerUserControl.DashboardDesigner1
|
||||
|
||||
If _DashboardDesigner IsNot Nothing Then
|
||||
If Not _Dashboard.IsNewDashboard Then
|
||||
With _DashboardDesignerUserControl
|
||||
.UserName = _Dashboard.UserName
|
||||
.Password = _Dashboard.Password
|
||||
.SQLType = _Dashboard.SQLType
|
||||
.SQLServer = _Dashboard.SQLServer
|
||||
.Database = _Dashboard.Database
|
||||
End With
|
||||
|
||||
Dim _MemoryStream As New IO.MemoryStream()
|
||||
_Dashboard.XMLFileData.SaveToStream(_MemoryStream)
|
||||
_MemoryStream.Seek(0, IO.SeekOrigin.Begin)
|
||||
With _DashboardDesigner
|
||||
.LoadDashboard(_MemoryStream)
|
||||
.ConfirmSaveOnClose = False
|
||||
End With
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Private Sub aDashboard_SaveDashDesForBusinessDirectory_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aDashboard_SaveDashDesForBusinessDirectory.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _Dashboard As Dashboard = _ocur.GetObject(TryCast(View.SelectedObjects(0), Dashboard))
|
||||
Dim _FileName As String = IO.Path.GetTempPath
|
||||
If _Dashboard.IsNewDashboard Then
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _BusinessDirectory As New BusinessDirectory(_onew.Session)
|
||||
With _BusinessDirectory
|
||||
.IsDashBoard = True
|
||||
_FileName += _DashboardDesigner.SelectedDataSource.Name + ".xml"
|
||||
_DashboardDesigner.Dashboard.SaveToXml(_FileName)
|
||||
If IO.File.Exists(_FileName) Then
|
||||
_BusinessDirectory.FileData = Nothing
|
||||
_BusinessDirectory.FileData = LoadOtherFile(_FileName, New FileData(_onew.Session))
|
||||
End If
|
||||
End With
|
||||
e.ShowViewParameters.CreatedView = Application.CreateDetailView(_onew, "BusinessDirectory_DetailView", True, _BusinessDirectory)
|
||||
Else
|
||||
Select Case _Dashboard.Object_Type
|
||||
Case GetType(BusinessDirectory)
|
||||
Dim _BusinessDirectory As BusinessDirectory = _ocur.FindObject(Of BusinessDirectory)(CriteriaOperator.Parse("Oid=?", _Dashboard.Object_Oid))
|
||||
If _BusinessDirectory IsNot Nothing Then
|
||||
_FileName += _BusinessDirectory.FileData.FileName
|
||||
_DashboardDesigner.Dashboard.SaveToXml(_FileName)
|
||||
If IO.File.Exists(_FileName) Then
|
||||
_BusinessDirectory.FileData = Nothing
|
||||
_BusinessDirectory.FileData = LoadOtherFile(_FileName, New FileData(_ocur.Session))
|
||||
End If
|
||||
End If
|
||||
Case Else
|
||||
MsgBox("Almafa!")
|
||||
End Select
|
||||
|
||||
'Dim _da As New DevExpress.DashboardCommon.Dashboard
|
||||
'Dim _dd As New DevExpress.XtraDashboard.DashboardDesigner
|
||||
'_dd.LoadDashboard(_FileName)
|
||||
'Beep()
|
||||
'_dd.d()
|
||||
''_dd.DataBindings
|
||||
_ocur.CommitChanges()
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
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
|
||||
|
||||
Private Sub GetXMLInfo(_FileName As String)
|
||||
Dim reader As New XmlTextReader("books.xml")
|
||||
While reader.Read()
|
||||
Select Case reader.NodeType
|
||||
Case XmlNodeType.Element
|
||||
' A csomópont egy összetevõ.
|
||||
Console.Write("<" & reader.Name)
|
||||
Console.WriteLine(">")
|
||||
Exit Select
|
||||
Case XmlNodeType.Text
|
||||
'Az egyes összetevõk szövegének megjelenítése.
|
||||
Console.WriteLine(reader.Value)
|
||||
Exit Select
|
||||
Case XmlNodeType.EndElement
|
||||
'Az összetevõ végének megjelenítése.
|
||||
Console.Write("</" & reader.Name)
|
||||
Console.WriteLine(">")
|
||||
Exit Select
|
||||
End Select
|
||||
End While
|
||||
Console.ReadLine()
|
||||
End Sub
|
||||
End Class
|
||||
@@ -0,0 +1,219 @@
|
||||
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 Microsoft.Office.Interop.Outlook
|
||||
Imports Microsoft.Office.Interop
|
||||
Imports System.IO
|
||||
Imports DevExpress.ExpressApp.ConditionalAppearance
|
||||
|
||||
Public Enum eCRMEstate_Leads
|
||||
eCRM = 0 'Klasszikus CRM rendszerbõl
|
||||
eCRMEstate = 1 'Ingatlanértékesítési rendszerbõl
|
||||
eManual = 2 'Manuálisan felvitt
|
||||
End Enum
|
||||
<Appearance("Hide CRMEstate_Leads", AppearanceItemType.ViewItem, "eCRMEstate_Leads=0", TargetItems:="CRMEstate_Leads", visibility:=Editors.ViewItemVisibility.Hide)> _
|
||||
<Appearance("Hide CRM_Leads, CRM_Opportunities", AppearanceItemType.ViewItem, "eCRMEstate_Leads=1", TargetItems:="CRM_Leads;CRM_Opportunities", visibility:=Editors.ViewItemVisibility.Hide)> _
|
||||
<Appearance("Hide CRM_Leads, CRM_Opportunities,eCRMEstate_Leads", AppearanceItemType.ViewItem, "eCRMEstate_Leads=2", TargetItems:="CRM_Leads;CRM_Opportunities;CRMEstate_Leads", visibility:=Editors.ViewItemVisibility.Hide)> _
|
||||
<DefaultClassOptions()> _
|
||||
<NavigationItem("Outlook e-mail")> _
|
||||
Public Class OutlookEMail
|
||||
Inherits BaseObject
|
||||
Private _Recipients As String 'Kinek megy az emil
|
||||
Private _Subject As String 'Tárgy
|
||||
Private _HTMLBody As String 'HTML szöveg
|
||||
Private _EntryID As String = "" 'Outlook item ID
|
||||
Private _ObjectCreated As Date 'Mikor készült az objektum
|
||||
Private _UserCreated As User 'Ki készítette
|
||||
Private _OwnerUser As User
|
||||
Private _CRM_Leads As CRM_Leads 'Leads-hoz tartozik-e
|
||||
Private _CRM_Opportunities As CRM_Opportunities
|
||||
Private _CRMEstate_Leads As CRMEstate_Leads
|
||||
Private _eCRMEstate_Leads As eCRMEstate_Leads
|
||||
Private _OutlookEMailIn_Oid As String
|
||||
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
Dim _CurrentUser As User = Session.GetObjectByKey(Of User)(Session.GetKeyValue(SecuritySystem.CurrentUser))
|
||||
|
||||
Me.ObjectCreated = GetSQLTime(Session)
|
||||
Me.UserCreated = _CurrentUser
|
||||
End Sub
|
||||
<Size(255)> _
|
||||
<RuleRequiredField("OutlookEMail-Recipients", DefaultContexts.Save)> _
|
||||
Property Recipients As String
|
||||
Get
|
||||
Return _Recipients
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("Recipients", _Recipients, value)
|
||||
End Set
|
||||
End Property
|
||||
<Size(255)> _
|
||||
<RuleRequiredField("OutlookEMail-Subject", DefaultContexts.Save)> _
|
||||
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
|
||||
<Size(255), Browsable(False)> _
|
||||
Property EntryID As String
|
||||
Get
|
||||
Return _EntryID
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("EntryID", _EntryID, 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
|
||||
Public Property OwnerUser As User
|
||||
Get
|
||||
Return _OwnerUser
|
||||
End Get
|
||||
Set(value As User)
|
||||
SetPropertyValue("OwnerUser", _OwnerUser, value)
|
||||
End Set
|
||||
End Property
|
||||
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
|
||||
Public Property CRM_Opportunities As CRM_Opportunities
|
||||
Get
|
||||
Return _CRM_Opportunities
|
||||
End Get
|
||||
Set(value As CRM_Opportunities)
|
||||
SetPropertyValue("CRM_Opportunities", _CRM_Opportunities, value)
|
||||
End Set
|
||||
End Property
|
||||
Public Property CRMEstate_Leads As CRMEstate_Leads
|
||||
Get
|
||||
Return _CRMEstate_Leads
|
||||
End Get
|
||||
Set(value As CRMEstate_Leads)
|
||||
SetPropertyValue("CRMEstate_Leads", _CRMEstate_Leads, value)
|
||||
End Set
|
||||
End Property
|
||||
<ImmediatePostData()> _
|
||||
Public Property eCRMEstate_Leads As eCRMEstate_Leads
|
||||
Get
|
||||
Return _eCRMEstate_Leads
|
||||
End Get
|
||||
Set(value As eCRMEstate_Leads)
|
||||
SetPropertyValue("eCRMEstate_Leads", _eCRMEstate_Leads, value)
|
||||
End Set
|
||||
End Property
|
||||
<Browsable(False)> _
|
||||
<VisibleInListView(False)> _
|
||||
<VisibleInDetailView(False)> _
|
||||
Public Property OutlookEMailIn_Oid As String
|
||||
Get
|
||||
Return _OutlookEMailIn_Oid
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("OutlookEMailIn_Oid", _OutlookEMailIn_Oid, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'--- ReadOnly ----------
|
||||
<VisibleInListView(False)> _
|
||||
<Association("OutlookEMail-OutlookEMailAttachments", GetType(OutlookEMailAttachments))> _
|
||||
ReadOnly Property OutlookEMailAttachments As XPCollection(Of OutlookEMailAttachments)
|
||||
Get
|
||||
Return GetCollection(Of OutlookEMailAttachments)("OutlookEMailAttachments")
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'--- Sub---------------
|
||||
Public Sub SendMail(_OutlookEmail As OutlookEMail, _ObjectSpace As Xpo.XPObjectSpace, Optional _WithCommit As Boolean = False)
|
||||
Dim _OutlookApp As New Outlook.Application()
|
||||
Dim _OutlookNameSpace As Outlook.NameSpace
|
||||
Dim _FdMail As Outlook.MAPIFolder
|
||||
Dim _Mail_New As Outlook.MailItem = _OutlookApp.CreateItem(OlItemType.olMailItem)
|
||||
Dim _OutlookEMailAttachments As OutlookEMailAttachments
|
||||
Dim _FileStream As Stream
|
||||
Dim _FilePath As String
|
||||
|
||||
_OutlookNameSpace = _OutlookApp.GetNamespace("MAPI")
|
||||
_OutlookNameSpace.Logon(, , True, True)
|
||||
|
||||
_FdMail = _OutlookNameSpace.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderOutbox)
|
||||
|
||||
_Mail_New = _FdMail.Items.Add(Outlook.OlItemType.olMailItem)
|
||||
_Mail_New.Subject = _OutlookEmail.Subject
|
||||
_Mail_New.To = _OutlookEmail.Recipients
|
||||
_Mail_New.HTMLBody = _OutlookEmail.HTMLBody
|
||||
|
||||
If _OutlookEmail.OutlookEMailAttachments.Count > 0 Then
|
||||
For Each _OutlookEMailAttachments In _OutlookEmail.OutlookEMailAttachments
|
||||
_FilePath = Path.GetTempPath & _OutlookEMailAttachments.DocumentFileData.File.FileName
|
||||
_FileStream = New FileStream(_FilePath, FileMode.Create)
|
||||
|
||||
|
||||
_OutlookEMailAttachments.DocumentFileData.File.SaveToStream(_FileStream)
|
||||
|
||||
Dim _AttachFile As Outlook.Attachments = _Mail_New.Attachments
|
||||
Dim _Attach As Outlook.Attachment = _AttachFile.Add(_FilePath)
|
||||
|
||||
_FileStream.Close()
|
||||
If System.IO.File.Exists(_FilePath) Then
|
||||
System.IO.File.Delete(_FilePath)
|
||||
End If
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
_Mail_New.Save()
|
||||
_OutlookEmail.EntryID = _Mail_New.EntryID
|
||||
_Mail_New.UnRead = True
|
||||
_Mail_New.Send()
|
||||
|
||||
If _WithCommit = True Then
|
||||
_OutlookEmail.Save()
|
||||
_ObjectSpace.CommitChanges()
|
||||
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
@@ -0,0 +1,53 @@
|
||||
Imports System
|
||||
Imports System.ComponentModel
|
||||
|
||||
Imports DevExpress.Xpo
|
||||
Imports DevExpress.Data.Filtering
|
||||
|
||||
Imports DevExpress.ExpressApp
|
||||
Imports DevExpress.Persistent.Base
|
||||
Imports DevExpress.Persistent.BaseImpl
|
||||
Imports DevExpress.Persistent.Validation
|
||||
|
||||
<DefaultClassOptions()> _
|
||||
<NavigationItem(False), CreatableItem(False)> _
|
||||
Public Class OutlookEMailAttachments
|
||||
Inherits BaseObject
|
||||
Private _OutlookEMail As OutlookEMail
|
||||
Private _OutlookEMailIn As OutlookEMailIn
|
||||
Private _DocumentFileData As DocumentFileData
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
End Sub
|
||||
<Association("OutlookEMail-OutlookEMailAttachments", GetType(OutlookEMail))> _
|
||||
<Browsable(False)> _
|
||||
Property OutlookEMail As OutlookEMail
|
||||
Get
|
||||
Return _OutlookEMail
|
||||
End Get
|
||||
Set(value As OutlookEMail)
|
||||
SetPropertyValue("OutlookEMail", _OutlookEMail, value)
|
||||
End Set
|
||||
End Property
|
||||
<Association("OutlookEMailIn-OutlookEMailAttachments", GetType(OutlookEMailIn))> _
|
||||
<Browsable(False)> _
|
||||
Property OutlookEMailIn As OutlookEMailIn
|
||||
Get
|
||||
Return _OutlookEMailIn
|
||||
End Get
|
||||
Set(value As OutlookEMailIn)
|
||||
SetPropertyValue("OutlookEMailIn", _OutlookEMailIn, value)
|
||||
End Set
|
||||
End Property
|
||||
Property DocumentFileData As DocumentFileData
|
||||
Get
|
||||
Return _DocumentFileData
|
||||
End Get
|
||||
Set(value As DocumentFileData)
|
||||
SetPropertyValue("DocumentFileData", _DocumentFileData, value)
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
@@ -0,0 +1,176 @@
|
||||
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.Drawing
|
||||
Imports DevExpress.ExpressApp.Utils
|
||||
|
||||
<DefaultClassOptions()> _
|
||||
<NavigationItem("Outlook e-mail")> _
|
||||
<Appearance("Hide EntryID", AppearanceItemType.ViewItem, "1=1", TargetItems:="EntryID", visibility:=Editors.ViewItemVisibility.Hide)> _
|
||||
<DeferredDeletion(False)> _
|
||||
<CreatableItem(False)> _
|
||||
Public Class OutlookEMailIn
|
||||
Inherits BaseObject
|
||||
|
||||
Private _SenderName As String
|
||||
Private _SenderEmailAddress As String
|
||||
Private _EmailSubject As String
|
||||
Private _EmailBody As String
|
||||
Private _EntryID As String
|
||||
Private _ObjectCreated As Date 'Mikor készült az objektum
|
||||
Private _OwnerUser As User
|
||||
Private _UserCreated As User 'Ki készítette
|
||||
Private _ReceivedTime As Date
|
||||
Private _ReceiverEmailAdress As String '
|
||||
Private _Qualified As Boolean 'Elintézett-e?
|
||||
Private _IsReaded As Boolean 'Elolvasott-e?
|
||||
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
|
||||
IsReaded = False
|
||||
Qualified = False
|
||||
End Sub
|
||||
Protected Overrides Sub OnSaving()
|
||||
MyBase.OnSaving()
|
||||
If Session.IsNewObject(Me) Then
|
||||
Dim _CurrentUser As User = Session.GetObjectByKey(Of User)(Session.GetKeyValue(SecuritySystem.CurrentUser))
|
||||
|
||||
ObjectCreated = GetSQLTime(Session)
|
||||
UserCreated = _CurrentUser
|
||||
End If
|
||||
End Sub
|
||||
<Size(255)> _
|
||||
Property SenderName As String
|
||||
Get
|
||||
Return _SenderName
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("SenderName", _SenderName, value)
|
||||
End Set
|
||||
End Property
|
||||
<Size(255)> _
|
||||
Property SenderEmailAddress As String
|
||||
Get
|
||||
Return _SenderEmailAddress
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("SenderEmailAddress", _SenderEmailAddress, value)
|
||||
End Set
|
||||
End Property
|
||||
<Size(255)> _
|
||||
Property EmailSubject As String
|
||||
Get
|
||||
Return _EmailSubject
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("EmailSubject", _EmailSubject, value)
|
||||
End Set
|
||||
End Property
|
||||
<Size(-1)> _
|
||||
Property EmailBody As String
|
||||
Get
|
||||
Return _EmailBody
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("EmailBody", _EmailBody, value)
|
||||
End Set
|
||||
End Property
|
||||
<Size(255)> _
|
||||
<Browsable(False)> _
|
||||
Property EntryID As String
|
||||
Get
|
||||
Return _EntryID
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("EntryID", _EntryID, 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 ReceivedTime As Date
|
||||
Get
|
||||
Return _ReceivedTime
|
||||
End Get
|
||||
Set(value As Date)
|
||||
SetPropertyValue("ReceivedTime", _ReceivedTime, value)
|
||||
End Set
|
||||
End Property
|
||||
Property OwnerUser As User
|
||||
Get
|
||||
Return _OwnerUser
|
||||
End Get
|
||||
Set(value As User)
|
||||
SetPropertyValue("OwnerUser", _OwnerUser, value)
|
||||
End Set
|
||||
End Property
|
||||
Property ReceiverEmailAdress As String
|
||||
Get
|
||||
Return _ReceiverEmailAdress
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("ReceiverEmailAdress", _ReceiverEmailAdress, value)
|
||||
End Set
|
||||
End Property
|
||||
Property Qualified As Boolean
|
||||
Get
|
||||
Return _Qualified
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
SetPropertyValue("Qualified", _Qualified, value)
|
||||
End Set
|
||||
End Property
|
||||
Property IsReaded As Boolean
|
||||
Get
|
||||
Return _IsReaded
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
SetPropertyValue("IsReaded", _IsReaded, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'-------------ReadOnly---------------
|
||||
<VisibleInListView(False)> _
|
||||
<Association("OutlookEMailIn-OutlookEMailAttachments", GetType(OutlookEMailAttachments)), Aggregated()> _
|
||||
ReadOnly Property OutlookEMailAttachments As XPCollection(Of OutlookEMailAttachments)
|
||||
Get
|
||||
Return GetCollection(Of OutlookEMailAttachments)("OutlookEMailAttachments")
|
||||
End Get
|
||||
End Property
|
||||
ReadOnly Property OutllokEmailInHasAttachments As Image
|
||||
Get
|
||||
Dim _ReturnImage As Image = Nothing
|
||||
If Me.OutlookEMailAttachments.Count > 0 Then _ReturnImage = ImageLoader.Instance.GetImageInfo("Action_FileAttachment_Attach").Image
|
||||
If Me.OutlookEMailAttachments.Count = 0 Then _ReturnImage = ImageLoader.Instance.GetImageInfo("NoImage").Image
|
||||
Return _ReturnImage
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
+130
@@ -0,0 +1,130 @@
|
||||
Partial Class OutlookEmailVC
|
||||
|
||||
<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.aSendOutlookEmail = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aRecieveEmails = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aEmailIn_To_CRMLeads = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
|
||||
Me.aAttachFile = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aViewAttachedFile = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aEmailIn_To_CRMEstateLeads = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
|
||||
'
|
||||
'aSendOutlookEmail
|
||||
'
|
||||
Me.aSendOutlookEmail.Caption = "Send email via outlook"
|
||||
Me.aSendOutlookEmail.ConfirmationMessage = Nothing
|
||||
Me.aSendOutlookEmail.Id = "aSendOutlookEmail"
|
||||
Me.aSendOutlookEmail.ImageName = "mail2"
|
||||
Me.aSendOutlookEmail.Shortcut = Nothing
|
||||
Me.aSendOutlookEmail.Tag = Nothing
|
||||
Me.aSendOutlookEmail.TargetObjectsCriteria = Nothing
|
||||
Me.aSendOutlookEmail.TargetViewId = "OutlookEMail_DetailView"
|
||||
Me.aSendOutlookEmail.ToolTip = Nothing
|
||||
Me.aSendOutlookEmail.TypeOfView = Nothing
|
||||
'
|
||||
'aRecieveEmails
|
||||
'
|
||||
Me.aRecieveEmails.Caption = "Recive Emails"
|
||||
Me.aRecieveEmails.ConfirmationMessage = "Do you want to execute command ?"
|
||||
Me.aRecieveEmails.Id = "aRecieveEmails"
|
||||
Me.aRecieveEmails.ImageName = "server_mail_download"
|
||||
Me.aRecieveEmails.Shortcut = Nothing
|
||||
Me.aRecieveEmails.Tag = Nothing
|
||||
Me.aRecieveEmails.TargetObjectsCriteria = Nothing
|
||||
Me.aRecieveEmails.TargetObjectType = GetType(Nuvolar.[Module].Win.OutlookEMailIn)
|
||||
Me.aRecieveEmails.TargetViewId = ""
|
||||
Me.aRecieveEmails.ToolTip = Nothing
|
||||
Me.aRecieveEmails.TypeOfView = Nothing
|
||||
'
|
||||
'aEmailIn_To_CRMLeads
|
||||
'
|
||||
Me.aEmailIn_To_CRMLeads.AcceptButtonCaption = Nothing
|
||||
Me.aEmailIn_To_CRMLeads.CancelButtonCaption = Nothing
|
||||
Me.aEmailIn_To_CRMLeads.Caption = "aEmailIn_To_CRMLeads"
|
||||
Me.aEmailIn_To_CRMLeads.ConfirmationMessage = Nothing
|
||||
Me.aEmailIn_To_CRMLeads.Id = "aEmailIn_To_CRMLeads"
|
||||
Me.aEmailIn_To_CRMLeads.ImageName = "BO_Opportunity"
|
||||
Me.aEmailIn_To_CRMLeads.Shortcut = Nothing
|
||||
Me.aEmailIn_To_CRMLeads.Tag = Nothing
|
||||
Me.aEmailIn_To_CRMLeads.TargetObjectsCriteria = Nothing
|
||||
Me.aEmailIn_To_CRMLeads.TargetViewId = "OutlookEMailIn_ListView"
|
||||
Me.aEmailIn_To_CRMLeads.ToolTip = Nothing
|
||||
Me.aEmailIn_To_CRMLeads.TypeOfView = Nothing
|
||||
'
|
||||
'aAttachFile
|
||||
'
|
||||
Me.aAttachFile.Caption = "Attach file"
|
||||
Me.aAttachFile.ConfirmationMessage = Nothing
|
||||
Me.aAttachFile.Id = "aAttachFile"
|
||||
Me.aAttachFile.ImageName = "Action_FileAttachment_Attach"
|
||||
Me.aAttachFile.Shortcut = Nothing
|
||||
Me.aAttachFile.Tag = Nothing
|
||||
Me.aAttachFile.TargetObjectsCriteria = Nothing
|
||||
Me.aAttachFile.TargetViewId = Nothing
|
||||
Me.aAttachFile.ToolTip = Nothing
|
||||
Me.aAttachFile.TypeOfView = Nothing
|
||||
'
|
||||
'aViewAttachedFile
|
||||
'
|
||||
Me.aViewAttachedFile.Caption = "View attached File"
|
||||
Me.aViewAttachedFile.ConfirmationMessage = Nothing
|
||||
Me.aViewAttachedFile.Id = "aViewAttachedFile"
|
||||
Me.aViewAttachedFile.ImageName = "BO_Folder"
|
||||
Me.aViewAttachedFile.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
|
||||
Me.aViewAttachedFile.Shortcut = Nothing
|
||||
Me.aViewAttachedFile.Tag = Nothing
|
||||
Me.aViewAttachedFile.TargetObjectsCriteria = Nothing
|
||||
Me.aViewAttachedFile.TargetViewId = Nothing
|
||||
Me.aViewAttachedFile.ToolTip = Nothing
|
||||
Me.aViewAttachedFile.TypeOfView = Nothing
|
||||
'
|
||||
'aEmailIn_To_CRMEstateLeads
|
||||
'
|
||||
Me.aEmailIn_To_CRMEstateLeads.AcceptButtonCaption = Nothing
|
||||
Me.aEmailIn_To_CRMEstateLeads.CancelButtonCaption = Nothing
|
||||
Me.aEmailIn_To_CRMEstateLeads.Caption = "aEmailIn_To_CRMEstateLeads"
|
||||
Me.aEmailIn_To_CRMEstateLeads.ConfirmationMessage = Nothing
|
||||
Me.aEmailIn_To_CRMEstateLeads.Id = "aEmailIn_To_CRMEstateLeads"
|
||||
Me.aEmailIn_To_CRMEstateLeads.ImageName = "BO_Opportunity"
|
||||
Me.aEmailIn_To_CRMEstateLeads.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireMultipleObjects
|
||||
Me.aEmailIn_To_CRMEstateLeads.Shortcut = Nothing
|
||||
Me.aEmailIn_To_CRMEstateLeads.Tag = Nothing
|
||||
Me.aEmailIn_To_CRMEstateLeads.TargetObjectsCriteria = Nothing
|
||||
Me.aEmailIn_To_CRMEstateLeads.TargetViewId = "OutlookEMailIn_ListView"
|
||||
Me.aEmailIn_To_CRMEstateLeads.ToolTip = Nothing
|
||||
Me.aEmailIn_To_CRMEstateLeads.TypeOfView = Nothing
|
||||
|
||||
End Sub
|
||||
Friend WithEvents aSendOutlookEmail As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aRecieveEmails As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aEmailIn_To_CRMLeads As DevExpress.ExpressApp.Actions.PopupWindowShowAction
|
||||
Friend WithEvents aAttachFile As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aViewAttachedFile As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aEmailIn_To_CRMEstateLeads As DevExpress.ExpressApp.Actions.PopupWindowShowAction
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,141 @@
|
||||
<?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="aSendOutlookEmail.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 56</value>
|
||||
</metadata>
|
||||
<metadata name="aRecieveEmails.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 95</value>
|
||||
</metadata>
|
||||
<metadata name="aEmailIn_To_CRMLeads.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 173</value>
|
||||
</metadata>
|
||||
<metadata name="aAttachFile.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 212</value>
|
||||
</metadata>
|
||||
<metadata name="aViewAttachedFile.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 134</value>
|
||||
</metadata>
|
||||
<metadata name="aEmailIn_To_CRMEstateLeads.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>600, 302</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,507 @@
|
||||
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.Office.Interop
|
||||
Imports DevExpress.Persistent.Validation
|
||||
Imports DevExpress.Xpo
|
||||
Imports System.IO
|
||||
Imports DevExpress.Persistent.BaseImpl
|
||||
Imports Microsoft.Office.Interop.Outlook
|
||||
Imports DevExpress.ExpressApp.SystemModule
|
||||
Imports DevExpress.ExpressApp.CloneObject
|
||||
Imports DevExpress.Data.Filtering
|
||||
Imports DevExpress.ExpressApp.Editors
|
||||
Imports System.Windows.Forms
|
||||
Imports DevExpress.ExpressApp.Utils
|
||||
|
||||
|
||||
Public Class OutlookEmailVC
|
||||
Inherits DevExpress.ExpressApp.ViewController
|
||||
Dim _WaitFormClass As New WaitFormClass
|
||||
Protected selection As ArrayList
|
||||
Protected noselect As Boolean = False
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
selection = New ArrayList()
|
||||
End Sub
|
||||
Protected Overrides Sub OnActivated()
|
||||
MyBase.OnActivated()
|
||||
|
||||
Frame.GetController(Of OutlookEmailVC).aEmailIn_To_CRMEstateLeads.Active.SetItemValue("", False)
|
||||
|
||||
If View IsNot Nothing Then
|
||||
If View.Id = "OutlookEMailIn_ListView" Then
|
||||
Dim _OutlookEmailListView As DevExpress.ExpressApp.ListView = TryCast(View, DevExpress.ExpressApp.ListView)
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _CurrentUser As User = _ocur.Session.GetObjectByKey(Of User)(_ocur.Session.GetKeyValue(SecuritySystem.CurrentUser))
|
||||
_OutlookEmailListView.CollectionSource.Criteria.Add("Criteria1", CriteriaOperator.Parse("ReceiverEmailAdress=?", _CurrentUser.Email))
|
||||
End If
|
||||
End If
|
||||
Frame.GetController(Of OutlookEmailVC).aAttachFile.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of OutlookEmailVC).aViewAttachedFile.Active.SetItemValue("", False)
|
||||
If View.Id = "OutlookEMailIn_ListView" Then
|
||||
Frame.GetController(Of NewObjectViewController)().Active.SetItemValue("", False)
|
||||
'Frame.GetController(Of DeleteObjectsViewController)().Active.SetItemValue("", False)
|
||||
Frame.GetController(Of ObjectViewController)().Active.SetItemValue("", False)
|
||||
AddHandler View.SelectionChanged, AddressOf view_SelectionChanged
|
||||
End If
|
||||
If View.Id = "OutlookEMailIn_DetailView" Then
|
||||
Frame.GetController(Of NewObjectViewController)().Active.SetItemValue("", False)
|
||||
Frame.GetController(Of DeleteObjectsViewController)().Active.SetItemValue("", False)
|
||||
Frame.GetController(Of ObjectViewController)().Active.SetItemValue("", False)
|
||||
Frame.GetController(Of ModificationsController)().Active.SetItemValue("", False)
|
||||
Frame.GetController(Of CloneObjectViewController)().Active.SetItemValue("", False)
|
||||
End If
|
||||
If View.Id = "OutlookEMail_OutlookEMailAttachments_ListView" Then
|
||||
Frame.GetController(Of LinkUnlinkController)().Active.SetItemValue("", False)
|
||||
Frame.GetController(Of CloneObjectViewController)().Active.SetItemValue("", False)
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.ListViewProcessCurrentObjectController)().Active.SetItemValue("", False)
|
||||
End If
|
||||
If View.Id = "OutlookEMail_DetailView" Then
|
||||
Dim _OutlookEMail As OutlookEMail = TryCast(View.SelectedObjects(0), OutlookEMail)
|
||||
Dim _OutlookEMailIn As OutlookEMailIn = TryCast(View.SelectedObjects(0), OutlookEMailIn)
|
||||
If _OutlookEMail IsNot Nothing Then
|
||||
If _OutlookEMail.EntryID <> "" Then
|
||||
Frame.GetController(Of OutlookEmailVC)().aSendOutlookEmail.Active.SetItemValue("", False)
|
||||
End If
|
||||
Else
|
||||
If _OutlookEMailIn.EntryID <> "" Then
|
||||
Frame.GetController(Of OutlookEmailVC)().aSendOutlookEmail.Active.SetItemValue("", False)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
If View.Id = "OutlookEMail_OutlookEMailAttachments_ListView" Or _
|
||||
View.Id = "OutlookEMailIn_OutlookEMailAttachments_ListView" Then
|
||||
Frame.GetController(Of NewObjectViewController)().Active.SetItemValue("", False)
|
||||
Frame.GetController(Of DevExpress.ExpressApp.Win.SystemModule.OpenObjectController)().Active.SetItemValue("", False)
|
||||
Frame.GetController(Of OutlookEmailVC).aAttachFile.Active.SetItemValue("", True)
|
||||
Frame.GetController(Of OutlookEmailVC).aViewAttachedFile.Active.SetItemValue("", True)
|
||||
End If
|
||||
End Sub
|
||||
Protected Overrides Sub OnDeactivated()
|
||||
MyBase.OnDeactivated()
|
||||
If View.Id = "OutlookEMailIn_ListView" Then
|
||||
Frame.GetController(Of NewObjectViewController)().Active.SetItemValue("", True)
|
||||
Frame.GetController(Of DeleteObjectsViewController)().Active.SetItemValue("", True)
|
||||
Frame.GetController(Of ObjectViewController)().Active.SetItemValue("", True)
|
||||
RemoveHandler View.SelectionChanged, AddressOf view_SelectionChanged
|
||||
End If
|
||||
If View.Id = "OutlookEMail_OutlookEMailAttachments_ListView" Then
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.LinkUnlinkController)().Active.SetItemValue("", True)
|
||||
Frame.GetController(Of DevExpress.ExpressApp.CloneObject.CloneObjectViewController)().Active.SetItemValue("", True)
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.ListViewProcessCurrentObjectController)().Active.SetItemValue("", True)
|
||||
End If
|
||||
If View.Id = "OutlookEMail_DetailView" Then
|
||||
Dim _OutlookEMail As OutlookEMail = TryCast(View.SelectedObjects(0), OutlookEMail)
|
||||
Dim _OutlookEMailIn As OutlookEMailIn = TryCast(View.SelectedObjects(0), OutlookEMailIn)
|
||||
If _OutlookEMail IsNot Nothing Then
|
||||
If _OutlookEMail.EntryID <> "" Then
|
||||
Frame.GetController(Of OutlookEmailVC)().aSendOutlookEmail.Active.SetItemValue("", False)
|
||||
End If
|
||||
Else
|
||||
If _OutlookEMailIn.EntryID <> "" Then
|
||||
Frame.GetController(Of OutlookEmailVC)().aSendOutlookEmail.Active.SetItemValue("", False)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
If View.Id = "OutlookEMail_OutlookEMailAttachments_ListView" Or _
|
||||
View.Id = "OutlookEMailIn_OutlookEMailAttachments_ListView" Then
|
||||
Frame.GetController(Of NewObjectViewController)().Active.SetItemValue("", True)
|
||||
Frame.GetController(Of DevExpress.ExpressApp.Win.SystemModule.OpenObjectController)().Active.SetItemValue("", True)
|
||||
End If
|
||||
End Sub
|
||||
Protected Overrides Sub OnViewControlsCreated()
|
||||
MyBase.OnViewControlsCreated()
|
||||
If View.Id = "OutlookEMailIn_DetailView" Then
|
||||
Dim _OutlookEMailIn As OutlookEMailIn = View.SelectedObjects(0)
|
||||
For Each _OutlookEMailAttachments As OutlookEMailAttachments In _OutlookEMailIn.OutlookEMailAttachments
|
||||
If _OutlookEMailIn.EmailBody.Contains(_OutlookEMailAttachments.DocumentFileData.File.FileName) Then
|
||||
Dim _ActCIDText As String = "cid:"
|
||||
Dim _GenString As String = _OutlookEMailIn.EmailBody.Substring(_OutlookEMailIn.EmailBody.IndexOf(_OutlookEMailAttachments.DocumentFileData.File.FileName))
|
||||
_GenString = _GenString.Remove(_GenString.IndexOf(Chr(34)), _GenString.Length - _GenString.IndexOf(Chr(34)))
|
||||
_ActCIDText += _GenString
|
||||
Dim _fs As New FileStream(Path.GetTempPath() + _OutlookEMailAttachments.DocumentFileData.File.FileName, FileMode.Create)
|
||||
_OutlookEMailAttachments.DocumentFileData.File.SaveToStream(_fs)
|
||||
_fs.Close()
|
||||
|
||||
_OutlookEMailIn.EmailBody = _OutlookEMailIn.EmailBody.Replace(_ActCIDText, Path.GetTempPath() + _OutlookEMailAttachments.DocumentFileData.File.FileName)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End Sub
|
||||
Private Sub aSendOutlookEmail_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aSendOutlookEmail.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _OutlookEMail As OutlookEMail = TryCast(View.SelectedObjects(0), OutlookEMail)
|
||||
_OutlookEMail.SendMail(_OutlookEMail, _ocur, True)
|
||||
|
||||
Dim _CRM_Leads As CRM_Leads = _OutlookEMail.CRM_Leads
|
||||
Dim _CRM_Opportunities As CRM_Opportunities = _OutlookEMail.CRM_Opportunities
|
||||
Dim _CRMEstate_Leads As CRMEstate_Leads = _OutlookEMail.CRMEstate_Leads
|
||||
|
||||
'--CRM_Leads; CRM_Opportunities ==>CRM_Leads_Activity-be
|
||||
If _CRM_Leads IsNot Nothing Then
|
||||
Dim _CRM_Leads_Activity As CRM_Leads_Activity = _ocur.CreateObject(Of CRM_Leads_Activity)()
|
||||
_CRM_Leads_Activity.CRM_Leads = _CRM_Leads
|
||||
_CRM_Leads_Activity.Subject = _OutlookEMail.Subject
|
||||
_CRM_Leads_Activity.Email_Oid = _OutlookEMail.Oid.ToString()
|
||||
_CRM_Leads_Activity.EventType = eEventType.eEmailOut
|
||||
|
||||
If _CRM_Opportunities IsNot Nothing Then
|
||||
_CRM_Leads_Activity.CRM_Opportunities = _CRM_Opportunities
|
||||
End If
|
||||
End If
|
||||
|
||||
If _CRMEstate_Leads IsNot Nothing Then
|
||||
Dim _CRMEstate_Leads_Activity As CRMEstate_Leads_Activity = _ocur.CreateObject(Of CRMEstate_Leads_Activity)()
|
||||
_CRMEstate_Leads_Activity.CRMEstate_Leads = _CRMEstate_Leads
|
||||
_CRMEstate_Leads_Activity.Email_Oid = _OutlookEMail.Oid.ToString()
|
||||
_CRMEstate_Leads_Activity.Subject = _OutlookEMail.Subject
|
||||
_CRMEstate_Leads_Activity.EventType = eEventType.eEmailOut
|
||||
_CRMEstate_Leads_Activity.HRPerson = _CRMEstate_Leads.HRPerson
|
||||
End If
|
||||
|
||||
_ocur.CommitChanges()
|
||||
View.Close(False)
|
||||
End Sub
|
||||
Private Sub aRecieveEmails_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aRecieveEmails.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _OutlookApp As New Outlook.Application()
|
||||
Dim _OutlookNameSpace As Outlook.NameSpace
|
||||
Dim _FolderMail As Outlook.MAPIFolder
|
||||
Dim _Mail As Outlook.MailItem
|
||||
Dim _OutlookEMailIn As OutlookEMailIn
|
||||
Dim _GO As Boolean = False
|
||||
Dim _CollectionOfEmailIn As XPCollection = _ocur.CreateCollection(GetType(OutlookEMailIn))
|
||||
Dim _Mail_New As OutlookEMailIn
|
||||
Dim _FilePath As String
|
||||
Dim _fs As FileStream
|
||||
Dim i As Long = 0
|
||||
Dim _uow As New UnitOfWork(_ocur.Session.DataLayer)
|
||||
Dim _FDObject As Object
|
||||
Dim _CurrentUser As User = _ocur.Session.GetObjectByKey(Of User)(_ocur.Session.GetKeyValue(SecuritySystem.CurrentUser))
|
||||
Dim _HRPerson As HRPerson = _ocur.FindObject(Of HRPerson)(CriteriaOperator.Parse("User=?", _CurrentUser))
|
||||
|
||||
|
||||
|
||||
If _HRPerson Is Nothing Then
|
||||
Throw New System.Exception("Nincs a felhasználó a személyzeti törzsben !")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If _CurrentUser.Email <> "" Then
|
||||
_OutlookNameSpace = _OutlookApp.GetNamespace("MAPI")
|
||||
_OutlookNameSpace.Logon(, , False, True)
|
||||
|
||||
'_FolderMail = _OutlookNameSpace.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox)
|
||||
_FolderMail = _OutlookNameSpace.GetFolderFromID(_HRPerson.DefaultOutlookFolderEntryID)
|
||||
|
||||
If _FolderMail Is Nothing Then
|
||||
Throw New System.Exception("Nem találom a megadott outlook könyvtárat ! ")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
_WaitFormClass.Initwork(1, 1, _FolderMail.Items.Count)
|
||||
For Each _FDObject In _FolderMail.Items
|
||||
_Mail = TryCast(_FDObject, MailItem)
|
||||
|
||||
If _Mail IsNot Nothing Then
|
||||
_GO = False
|
||||
_WaitFormClass.DoWork()
|
||||
i += 1
|
||||
For Each _OutlookEMailIn In _CollectionOfEmailIn
|
||||
If _Mail.EntryID = _OutlookEMailIn.EntryID Then
|
||||
_GO = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If _GO = False Then
|
||||
_Mail_New = New OutlookEMailIn(_uow)
|
||||
'If _Mail.SenderEmailType = "EX" Then
|
||||
' _Mail_New.SenderEmailAddress = GetExchangeSenderAddress(_Mail, _OutlookNameSpace)
|
||||
'Else
|
||||
' _Mail_New.SenderEmailAddress = _Mail.SenderEmailAddress
|
||||
'End If
|
||||
_Mail_New.SenderEmailAddress = GetSmtpAddress(_Mail)
|
||||
_Mail_New.ReceivedTime = _Mail.ReceivedTime
|
||||
_Mail_New.SenderName = _Mail.SenderName
|
||||
_Mail_New.EmailSubject = _Mail.Subject
|
||||
_Mail_New.EmailBody = _Mail.HTMLBody
|
||||
_Mail_New.EntryID = _Mail.EntryID
|
||||
_Mail_New.ReceiverEmailAdress = _CurrentUser.Email
|
||||
|
||||
If _Mail.Attachments.Count > 0 Then
|
||||
For Each _Attachment As Outlook.Attachment In _Mail.Attachments
|
||||
_FilePath = Path.GetTempPath & _Attachment.FileName
|
||||
_Attachment.SaveAsFile(_FilePath)
|
||||
|
||||
Dim _EmailAttachments As OutlookEMailAttachments
|
||||
Dim _DocumentFileData As DocumentFileData = New DocumentFileData(_uow)
|
||||
|
||||
_fs = New FileStream(_FilePath, FileMode.Open)
|
||||
|
||||
_DocumentFileData.File = New FileData(_uow)
|
||||
_DocumentFileData.File.LoadFromStream(Path.GetFileName(_Attachment.FileName), _fs)
|
||||
|
||||
_EmailAttachments = New OutlookEMailAttachments(_uow)
|
||||
_EmailAttachments.DocumentFileData = _DocumentFileData
|
||||
|
||||
_Mail_New.OutlookEMailAttachments.Add(_EmailAttachments)
|
||||
|
||||
_fs.Close()
|
||||
If System.IO.File.Exists(_FilePath) Then
|
||||
System.IO.File.Delete(_FilePath)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
'_Mail_New.Save()
|
||||
If i Mod 100 Then _uow.CommitChanges()
|
||||
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
_uow.CommitChanges()
|
||||
_WaitFormClass.FinalWork()
|
||||
If Frame.GetController(Of RefreshController).RefreshAction.Enabled Then
|
||||
Frame.GetController(Of RefreshController).RefreshAction.DoExecute()
|
||||
End If
|
||||
Else
|
||||
_ocur.Rollback()
|
||||
Throw New System.Exception("Nincs beállítva e-mail cím a bejelentkezett felhasználónak!")
|
||||
End If
|
||||
End Sub
|
||||
Private Function GetSmtpAddress(ByVal item As Outlook.MailItem) As String
|
||||
Dim sAddress As String
|
||||
Dim recip As Outlook.Recipient
|
||||
Dim exUser As Outlook.ExchangeUser
|
||||
Dim oOutlook As Outlook.Application
|
||||
Dim oNS As Outlook.NameSpace
|
||||
|
||||
On Error Resume Next
|
||||
|
||||
oOutlook = New Outlook.Application
|
||||
oNS = oOutlook.GetNamespace("MAPI")
|
||||
If UCase$(item.SenderEmailType) = "EX" Then
|
||||
recip = oNS.CreateRecipient(item.SenderEmailAddress)
|
||||
exUser = recip.AddressEntry.GetExchangeUser()
|
||||
sAddress = exUser.PrimarySmtpAddress
|
||||
Else
|
||||
sAddress = item.SenderEmailAddress
|
||||
End If
|
||||
GetSmtpAddress = sAddress
|
||||
oNS = Nothing
|
||||
oOutlook = Nothing
|
||||
End Function
|
||||
Private Sub aEmailIn_To_CRMLeads_Cancel(sender As Object, e As System.EventArgs) Handles aEmailIn_To_CRMLeads.Cancel
|
||||
noselect = False
|
||||
End Sub
|
||||
Private Sub aEmailIn_To_CRMLeads_CustomizePopupWindowParams(sender As System.Object, e As DevExpress.ExpressApp.Actions.CustomizePopupWindowParamsEventArgs) Handles aEmailIn_To_CRMLeads.CustomizePopupWindowParams
|
||||
If View.SelectedObjects.Count > 0 Then
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
noselect = True
|
||||
Dim _OutlookEmailIn_To_CRMLeads As OutlookEmailIn_To_CRMLeads = _onew.CreateObject(Of OutlookEmailIn_To_CRMLeads)()
|
||||
Dim _Mail As Outlook.MailItem = TryCast(View.SelectedObjects(0), Outlook.MailItem)
|
||||
Dim _OutlookEMailIn As OutlookEMailIn = TryCast(View.SelectedObjects(0), OutlookEMailIn)
|
||||
_OutlookEmailIn_To_CRMLeads.EMail = _OutlookEMailIn.SenderEmailAddress
|
||||
|
||||
e.View = Application.CreateDetailView(_onew, "OutlookEmailIn_To_CRMLeads_DetailView", False, _OutlookEmailIn_To_CRMLeads)
|
||||
View.Refresh()
|
||||
End If
|
||||
End Sub
|
||||
Private Sub aEmailIn_To_CRMLeads_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.PopupWindowShowActionExecuteEventArgs) Handles aEmailIn_To_CRMLeads.Execute
|
||||
Try
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _OutlookEmailIn_To_CRMLeads As OutlookEmailIn_To_CRMLeads = TryCast(e.PopupWindow.View.SelectedObjects(0), OutlookEmailIn_To_CRMLeads)
|
||||
Dim _OutlookEMailIn As OutlookEMailIn
|
||||
noselect = True
|
||||
|
||||
Select Case _OutlookEmailIn_To_CRMLeads.EmailTo
|
||||
Case eEmailTo.eCRM
|
||||
Dim _CRM_Leads_POPUP As CRM_Leads
|
||||
Dim _CRM_Opportunities_POPUP As CRM_Opportunities
|
||||
Dim _CRM_Leads_Activity As CRM_Leads_Activity
|
||||
|
||||
If _OutlookEmailIn_To_CRMLeads.CRM_Leads IsNot Nothing Then
|
||||
_CRM_Leads_POPUP = _ocur.GetObjectByKey(Of CRM_Leads)(_OutlookEmailIn_To_CRMLeads.CRM_Leads.Oid)
|
||||
End If
|
||||
If _OutlookEmailIn_To_CRMLeads.CRM_Opportunities IsNot Nothing Then
|
||||
_CRM_Opportunities_POPUP = _ocur.GetObjectByKey(Of CRM_Opportunities)(_OutlookEmailIn_To_CRMLeads.CRM_Opportunities.Oid)
|
||||
If _CRM_Leads_POPUP Is Nothing Then
|
||||
_CRM_Leads_POPUP = _CRM_Opportunities_POPUP.CRM_Leads
|
||||
End If
|
||||
End If
|
||||
_WaitFormClass.Initwork(1, 1, selection.Count)
|
||||
For Each _OutlookEMailIn In selection
|
||||
_WaitFormClass.DoWork()
|
||||
_OutlookEMailIn.IsReaded = True
|
||||
_OutlookEMailIn.Qualified = True
|
||||
If _OutlookEMailIn.SenderEmailAddress = _OutlookEmailIn_To_CRMLeads.EMail Then
|
||||
If _CRM_Leads_POPUP IsNot Nothing Then
|
||||
_CRM_Leads_Activity = _ocur.CreateObject(Of CRM_Leads_Activity)()
|
||||
|
||||
If _CRM_Opportunities_POPUP IsNot Nothing Then
|
||||
_CRM_Leads_Activity.CRM_Leads = _CRM_Leads_POPUP
|
||||
_CRM_Leads_Activity.CRM_Opportunities = _CRM_Opportunities_POPUP
|
||||
_CRM_Leads_Activity.Email_Oid = _OutlookEMailIn.Oid.ToString()
|
||||
_CRM_Leads_Activity.Subject = _OutlookEMailIn.EmailSubject
|
||||
_CRM_Leads_Activity.EventType = eEventType.eEMailIn
|
||||
Else
|
||||
|
||||
_CRM_Leads_Activity.CRM_Leads = _CRM_Leads_POPUP
|
||||
_CRM_Leads_Activity.CRM_Opportunities = Nothing
|
||||
_CRM_Leads_Activity.Email_Oid = _OutlookEMailIn.Oid.ToString()
|
||||
_CRM_Leads_Activity.Subject = _OutlookEMailIn.EmailSubject
|
||||
_CRM_Leads_Activity.EventType = eEventType.eEMailIn
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
Next
|
||||
Case eEmailTo.eRegistry
|
||||
_WaitFormClass.Initwork(1, 1, selection.Count)
|
||||
Dim _OutlookApp As New Outlook.Application()
|
||||
Dim _OutlookNameSpace As Outlook.NameSpace
|
||||
_OutlookNameSpace = _OutlookApp.GetNamespace("MAPI")
|
||||
_OutlookNameSpace.Logon(, , False, True)
|
||||
|
||||
For Each _OutlookEMailIn In selection
|
||||
_WaitFormClass.DoWork()
|
||||
_OutlookEMailIn.IsReaded = True
|
||||
_OutlookEMailIn.Qualified = True
|
||||
Dim _RegistryHeader As RegistryHeader = _ocur.CreateObject(Of RegistryHeader)()
|
||||
_RegistryHeader.RegistryType = _ocur.GetObjectByKey(Of RegistryType)(_OutlookEmailIn_To_CRMLeads.RegistryType.Oid)
|
||||
_RegistryHeader.DeliveryType = eDeliveryType.eMail
|
||||
_RegistryHeader.CustomersFrom = _ocur.GetObjectByKey(Of CustomersFrom)(_OutlookEmailIn_To_CRMLeads.CustomersFrom.Oid)
|
||||
|
||||
|
||||
Dim _Mail As Outlook.MailItem = TryCast(_OutlookNameSpace.GetItemFromID(_OutlookEMailIn.EntryID), Outlook.MailItem)
|
||||
_Mail.SaveAs(Path.GetTempPath() + "EmailMessage.msg")
|
||||
|
||||
Dim _fs As FileStream
|
||||
_fs = New FileStream(Path.GetTempPath() + "EmailMessage.msg", FileMode.Open)
|
||||
_RegistryHeader.DocumentFile = New FileData(_ocur.Session)
|
||||
_RegistryHeader.DocumentFile.LoadFromStream("EmailMessage.msg", _fs)
|
||||
|
||||
_fs.Close()
|
||||
If System.IO.File.Exists(Path.GetTempPath() + "EmailMessage.msg") Then
|
||||
System.IO.File.Delete(Path.GetTempPath() + "EmailMessage.msg")
|
||||
End If
|
||||
Next
|
||||
Case eEmailTo.eCRMEstate
|
||||
_WaitFormClass.Initwork(1, 1, selection.Count)
|
||||
|
||||
For Each _OutlookEMailIn In selection
|
||||
_WaitFormClass.DoWork()
|
||||
_OutlookEMailIn.IsReaded = True
|
||||
_OutlookEMailIn.Qualified = True
|
||||
|
||||
Dim _CRMEstate_Leads As CRMEstate_Leads = _ocur.GetObjectByKey(Of CRMEstate_Leads)(_OutlookEmailIn_To_CRMLeads.CRMEstate_Leads.Oid)
|
||||
If _CRMEstate_Leads Is Nothing Then Throw New System.Exception("Nem lett kiválasztva a felugró ablakban egyetlen ingatlan ügy sem!" + vbNewLine + "A folyamat megszakadt!")
|
||||
|
||||
Dim _CRMEstate_Leads_Activity As CRMEstate_Leads_Activity = _ocur.CreateObject(Of CRMEstate_Leads_Activity)()
|
||||
|
||||
_CRMEstate_Leads_Activity.EventType = eEventType.eEMailIn
|
||||
_CRMEstate_Leads_Activity.CRMEstate_Leads = _CRMEstate_Leads
|
||||
_CRMEstate_Leads_Activity.Email_Oid = _OutlookEMailIn.Oid.ToString
|
||||
_CRMEstate_Leads_Activity.HRPerson = _CRMEstate_Leads.HRPerson
|
||||
_CRMEstate_Leads_Activity.Subject = _OutlookEMailIn.EmailSubject
|
||||
|
||||
Next
|
||||
End Select
|
||||
noselect = False
|
||||
_ocur.CommitChanges()
|
||||
Catch ex As System.Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly)
|
||||
Finally
|
||||
Me._WaitFormClass.FinalWork()
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub view_SelectionChanged(ByVal sender As Object, ByVal e As System.EventArgs)
|
||||
Dim _OutlookEmailIn As OutlookEMailIn
|
||||
If View Is Nothing Then Exit Sub
|
||||
If noselect = False Then
|
||||
selection.Clear()
|
||||
|
||||
For Each _OutlookEmailIn In View.SelectedObjects
|
||||
selection.Add(_OutlookEmailIn)
|
||||
Next
|
||||
End If
|
||||
End Sub
|
||||
Private Sub aViewAttachedFile_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aViewAttachedFile.Execute
|
||||
Try
|
||||
Dim _ListView As DevExpress.ExpressApp.ListView = TryCast(View, DevExpress.ExpressApp.ListView)
|
||||
Dim _OutlookEMailAttachments As OutlookEMailAttachments = TryCast(View.SelectedObjects(0), OutlookEMailAttachments)
|
||||
Dim _FilePath As String = Path.Combine(Path.GetTempPath(), _OutlookEMailAttachments.DocumentFileData.File.FileName)
|
||||
Dim _Stream As Stream = New FileStream(_FilePath, FileMode.Create)
|
||||
_OutlookEMailAttachments.DocumentFileData.File.SaveToStream(_Stream)
|
||||
_Stream.Close()
|
||||
Process.Start(_FilePath)
|
||||
Catch
|
||||
Throw New UserFriendlyException("Nem tudom megnyitni a file-t!")
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub aAttachFile_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aAttachFile.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _ListView As DevExpress.ExpressApp.ListView = TryCast(View, DevExpress.ExpressApp.ListView)
|
||||
Dim _PropertyCollectionSource As PropertyCollectionSource = TryCast(_ListView.CollectionSource, PropertyCollectionSource)
|
||||
Dim _OutlookEMail As OutlookEMail = TryCast(_PropertyCollectionSource.MasterObject, OutlookEMail)
|
||||
Dim _MyStream As Stream = Nothing
|
||||
Dim _OpenFileDialog As New OpenFileDialog()
|
||||
|
||||
_OpenFileDialog.InitialDirectory = "c:\"
|
||||
_OpenFileDialog.RestoreDirectory = True
|
||||
|
||||
If _OpenFileDialog.ShowDialog() = System.Windows.Forms.DialogResult.OK Then
|
||||
Try
|
||||
_MyStream = _OpenFileDialog.OpenFile()
|
||||
If (_MyStream IsNot Nothing) Then
|
||||
|
||||
Dim _EmailAttachments As OutlookEMailAttachments
|
||||
Dim _DocumentFileData As DocumentFileData = _ocur.CreateObject(Of DocumentFileData)()
|
||||
|
||||
_DocumentFileData.File = _ocur.CreateObject(Of FileData)()
|
||||
_DocumentFileData.File.LoadFromStream(Path.GetFileName(_OpenFileDialog.FileName), _MyStream)
|
||||
|
||||
_EmailAttachments = _ocur.CreateObject(Of OutlookEMailAttachments)()
|
||||
_EmailAttachments.DocumentFileData = _DocumentFileData
|
||||
|
||||
_OutlookEMail.OutlookEMailAttachments.Add(_ocur.GetObject(_EmailAttachments))
|
||||
_OutlookEMail.Save()
|
||||
_ocur.CommitChanges()
|
||||
View.Refresh()
|
||||
End If
|
||||
Catch
|
||||
'--- TESZT MIATT!!! -----
|
||||
MessageBox.Show("Nem tudtam csatolni a file-t!")
|
||||
Finally
|
||||
|
||||
If (_MyStream IsNot Nothing) Then
|
||||
_MyStream.Close()
|
||||
End If
|
||||
End Try
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub aEmailIn_To_CRMEstateLeads_CustomizePopupWindowParams(sender As Object, e As DevExpress.ExpressApp.Actions.CustomizePopupWindowParamsEventArgs) Handles aEmailIn_To_CRMEstateLeads.CustomizePopupWindowParams
|
||||
Try
|
||||
|
||||
Catch ex As System.Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, String.Format(CaptionHelper.GetLocalizedText("Exceptions\NuvolarExceptions", "MsgBoxCheckItAgain")))
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub aEmailIn_To_CRMEstateLeads_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.PopupWindowShowActionExecuteEventArgs) Handles aEmailIn_To_CRMEstateLeads.Execute
|
||||
Try
|
||||
|
||||
Catch ex As System.Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, String.Format(CaptionHelper.GetLocalizedText("Exceptions\NuvolarExceptions", "MsgBoxCheckItAgain")))
|
||||
End Try
|
||||
End Sub
|
||||
End Class
|
||||
@@ -0,0 +1,93 @@
|
||||
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("Outlook e-mail")> _
|
||||
Public Class OutlookReminder
|
||||
Inherits BaseObject
|
||||
Private _Subject As String
|
||||
Private _Body As String
|
||||
Private _DueDate As DateTime
|
||||
Private _ReminderTimeDay As DateTime
|
||||
Private _Hours As Integer
|
||||
Private _Minutes As Integer
|
||||
Private _TaskEntryID As String
|
||||
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
End Sub
|
||||
|
||||
<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 Body As String
|
||||
Get
|
||||
Return _Body
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("Body", _Body, value)
|
||||
End Set
|
||||
End Property
|
||||
Property DueDate As DateTime
|
||||
Get
|
||||
Return _DueDate
|
||||
End Get
|
||||
Set(value As DateTime)
|
||||
SetPropertyValue("DueDate", _DueDate, value)
|
||||
End Set
|
||||
End Property
|
||||
Property ReminderTimeDay As DateTime
|
||||
Get
|
||||
Return _ReminderTimeDay
|
||||
End Get
|
||||
Set(value As DateTime)
|
||||
SetPropertyValue("ReminderTimeDay", _ReminderTimeDay, value)
|
||||
End Set
|
||||
End Property
|
||||
<RuleRange("Hours", DefaultContexts.Save, 0, 24)> _
|
||||
Property Hours As Integer
|
||||
Get
|
||||
Return _Hours
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
SetPropertyValue("Hours", _Hours, value)
|
||||
End Set
|
||||
End Property
|
||||
<RuleRange("Minutes", DefaultContexts.Save, 0, 60)> _
|
||||
Property Minutes As Integer
|
||||
Get
|
||||
Return _Minutes
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
SetPropertyValue("Minutes", _Minutes, value)
|
||||
End Set
|
||||
End Property
|
||||
<Size(255)> _
|
||||
<Browsable(False)> _
|
||||
Property TaskEntryID As String
|
||||
Get
|
||||
Return _TaskEntryID
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("TaskEntryID", _TaskEntryID, value)
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
Partial Class OutlookReminder_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,73 @@
|
||||
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.Office.Interop
|
||||
Imports DevExpress.ExpressApp.Win.Editors
|
||||
Imports DevExpress.ExpressApp.SystemModule
|
||||
Imports DevExpress.ExpressApp.Editors
|
||||
|
||||
Public Class OutlookReminder_VC
|
||||
Inherits DevExpress.ExpressApp.ViewController
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
|
||||
'This call is required by the Component Designer.
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
|
||||
End Sub
|
||||
Protected Overrides Sub OnActivated()
|
||||
MyBase.OnActivated()
|
||||
If View.Id = "OutlookReminder_DetailView" Then
|
||||
AddHandler Frame.GetController(Of ModificationsController)().SaveAction.Executing, AddressOf OutlookReminder_DetailView_Save
|
||||
AddHandler Frame.GetController(Of ModificationsController)().SaveAndCloseAction.Executing, AddressOf OutlookReminder_DetailView_Save
|
||||
AddHandler Frame.GetController(Of ModificationsController)().SaveAndNewAction.Executing, AddressOf OutlookReminder_DetailView_Save
|
||||
End If
|
||||
End Sub
|
||||
Protected Overrides Sub OnDeactivated()
|
||||
MyBase.OnDeactivated()
|
||||
If View.Id = "OutlookReminder_DetailView" Then
|
||||
RemoveHandler Frame.GetController(Of ModificationsController)().SaveAction.Executing, AddressOf OutlookReminder_DetailView_Save
|
||||
RemoveHandler Frame.GetController(Of ModificationsController)().SaveAndCloseAction.Executing, AddressOf OutlookReminder_DetailView_Save
|
||||
RemoveHandler Frame.GetController(Of ModificationsController)().SaveAndNewAction.Executing, AddressOf OutlookReminder_DetailView_Save
|
||||
End If
|
||||
End Sub
|
||||
Private Sub OutlookReminder_DetailView_Save()
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _OutlookApp As New Outlook.Application()
|
||||
Dim _OutlookNameSpace As Outlook.NameSpace = _OutlookApp.GetNamespace("MAPI")
|
||||
|
||||
Dim _OutlookReminder As OutlookReminder = TryCast(View.SelectedObjects(0), OutlookReminder)
|
||||
Dim _NewTask As Outlook.TaskItem = Nothing
|
||||
|
||||
If Not String.IsNullOrEmpty(_OutlookReminder.TaskEntryID) Then
|
||||
Try
|
||||
_NewTask = _OutlookNameSpace.GetItemFromID(_OutlookReminder.TaskEntryID)
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
End If
|
||||
|
||||
If _NewTask Is Nothing Then _NewTask = _OutlookApp.CreateItem(Outlook.OlItemType.olTaskItem)
|
||||
|
||||
_OutlookNameSpace.Logon(, , True, True)
|
||||
_NewTask.ReminderSet = True
|
||||
_NewTask.Body = _OutlookReminder.Body
|
||||
_NewTask.DueDate = New DateTime(_OutlookReminder.DueDate.Year, _OutlookReminder.DueDate.Month, _OutlookReminder.DueDate.Day, _OutlookReminder.Hours, _OutlookReminder.Minutes, 0)
|
||||
_NewTask.ReminderTime = _OutlookReminder.ReminderTimeDay
|
||||
_NewTask.Subject = _OutlookReminder.Subject
|
||||
_NewTask.UnRead = True
|
||||
_NewTask.Save()
|
||||
|
||||
If String.IsNullOrEmpty(_OutlookReminder.TaskEntryID) Then _OutlookReminder.TaskEntryID = _NewTask.EntryID
|
||||
|
||||
_ocur.CommitChanges()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
+118
@@ -0,0 +1,118 @@
|
||||
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 eEmailTo
|
||||
eCRM = 0
|
||||
eRegistry = 1
|
||||
eCRMEstate = 2
|
||||
End Enum
|
||||
<DefaultClassOptions()> _
|
||||
<NavigationItem(False)> _
|
||||
<CreatableItem(False)> _
|
||||
<NonPersistent()> _
|
||||
<Appearance("OutlookEmailIn_To_CRMLeads - Hide Registry properties when EmailTo=0", AppearanceItemType.ViewItem, "EmailTo=0", TargetItems:="CustomersFrom; RegistryType; DeliveryType; CRMEstate_Leads", visibility:=Editors.ViewItemVisibility.Hide)> _
|
||||
<Appearance("OutlookEmailIn_To_CRMLeads - Hide CRM properties when EmailTo=1", AppearanceItemType.ViewItem, "EmailTo=1", TargetItems:="CRM_Leads; CRM_Opportunities; CRMEstate_Leads", visibility:=Editors.ViewItemVisibility.Hide)> _
|
||||
<Appearance("OutlookEmailIn_To_CRMLeads - Hide CRM properties when EmailTo=2", AppearanceItemType.ViewItem, "EmailTo=2", TargetItems:="CRM_Leads; CRM_Opportunities; CustomersFrom; RegistryType; DeliveryType;", visibility:=Editors.ViewItemVisibility.Hide)> _
|
||||
Public Class OutlookEmailIn_To_CRMLeads
|
||||
Inherits BaseObject
|
||||
|
||||
Private _EmailTo As eEmailTo
|
||||
Private _EMail As String
|
||||
|
||||
'-------CRM----------
|
||||
Private _CRM_Leads As CRM_Leads
|
||||
Private _CRM_Opportunities As CRM_Opportunities
|
||||
|
||||
|
||||
'-------Registry-------
|
||||
Private _CustomersFrom As CustomersFrom
|
||||
Private _RegistryType As RegistryType 'Iktatás típusa
|
||||
|
||||
'-------CRMEstate------
|
||||
Private _CRMEstate_Leads As CRMEstate_Leads
|
||||
|
||||
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
|
||||
End Sub
|
||||
|
||||
<ImmediatePostData()> _
|
||||
Property EmailTo As eEmailTo
|
||||
Get
|
||||
Return _EmailTo
|
||||
End Get
|
||||
Set(value As eEmailTo)
|
||||
SetPropertyValue("EmailTo", _EmailTo, value)
|
||||
End Set
|
||||
End Property
|
||||
<Browsable(False)> _
|
||||
Property EMail As String
|
||||
Get
|
||||
Return _EMail
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("EMail", _EMail, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'-------CRM----------
|
||||
Public 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
|
||||
Public Property CRM_Opportunities As CRM_Opportunities
|
||||
Get
|
||||
Return _CRM_Opportunities
|
||||
End Get
|
||||
Set(value As CRM_Opportunities)
|
||||
SetPropertyValue("CRM_Opportunities", _CRM_Opportunities, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'-------Registry-------
|
||||
Property CustomersFrom As CustomersFrom
|
||||
Get
|
||||
Return _CustomersFrom
|
||||
End Get
|
||||
Set(value As CustomersFrom)
|
||||
SetPropertyValue("CustomersFrom", _CustomersFrom, value)
|
||||
End Set
|
||||
End Property
|
||||
<ImmediatePostData(True), DataSourceCriteria("CustomersFrom = '@This.CustomersFrom'")>
|
||||
Property RegistryType As RegistryType
|
||||
Get
|
||||
Return _RegistryType
|
||||
End Get
|
||||
Set(value As RegistryType)
|
||||
SetPropertyValue("RegistryType", _RegistryType, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'-------CRMEstate------
|
||||
Property CRMEstate_Leads As CRMEstate_Leads
|
||||
Get
|
||||
Return _CRMEstate_Leads
|
||||
End Get
|
||||
Set(value As CRMEstate_Leads)
|
||||
SetPropertyValue("CRMEstate_Leads", _CRMEstate_Leads, value)
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
@@ -0,0 +1,29 @@
|
||||
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 WEB
|
||||
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
|
||||
End Class
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
Partial Class HRPersonEventVC
|
||||
|
||||
<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.aSelectHRPersonToScheduler = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
|
||||
'
|
||||
'aSelectHRPersonToScheduler
|
||||
'
|
||||
Me.aSelectHRPersonToScheduler.AcceptButtonCaption = Nothing
|
||||
Me.aSelectHRPersonToScheduler.CancelButtonCaption = Nothing
|
||||
Me.aSelectHRPersonToScheduler.Caption = "aSelect HRPerson To Scheduler"
|
||||
Me.aSelectHRPersonToScheduler.ConfirmationMessage = Nothing
|
||||
Me.aSelectHRPersonToScheduler.Id = "aSelectHRPersonToScheduler"
|
||||
Me.aSelectHRPersonToScheduler.ImageName = Nothing
|
||||
Me.aSelectHRPersonToScheduler.Shortcut = Nothing
|
||||
Me.aSelectHRPersonToScheduler.Tag = Nothing
|
||||
Me.aSelectHRPersonToScheduler.TargetObjectsCriteria = Nothing
|
||||
Me.aSelectHRPersonToScheduler.TargetObjectType = GetType(Nuvolar.[Module].HRPersonEvent)
|
||||
Me.aSelectHRPersonToScheduler.TargetViewId = Nothing
|
||||
Me.aSelectHRPersonToScheduler.TargetViewType = DevExpress.ExpressApp.ViewType.ListView
|
||||
Me.aSelectHRPersonToScheduler.ToolTip = Nothing
|
||||
Me.aSelectHRPersonToScheduler.TypeOfView = GetType(DevExpress.ExpressApp.ListView)
|
||||
|
||||
End Sub
|
||||
Friend WithEvents aSelectHRPersonToScheduler 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="aSelectHRPersonToScheduler.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,123 @@
|
||||
Imports Microsoft.VisualBasic
|
||||
Imports System
|
||||
Imports DevExpress.Xpo
|
||||
Imports DevExpress.ExpressApp
|
||||
Imports DevExpress.Data.Filtering
|
||||
Imports System.Collections.Generic
|
||||
Imports DevExpress.ExpressApp.Actions
|
||||
Imports DevExpress.ExpressApp.Scheduler
|
||||
Imports DevExpress.ExpressApp.Scheduler.Win
|
||||
Imports DevExpress.Data.Helpers
|
||||
Imports DevExpress.Persistent.BaseImpl
|
||||
Imports DevExpress.XtraScheduler
|
||||
|
||||
|
||||
Public Class HRPersonEventVC
|
||||
Inherits DevExpress.ExpressApp.ViewController
|
||||
Private _SchedulerListEditor As SchedulerListEditor
|
||||
Public Sub New()
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
End Sub
|
||||
Protected Overloads Overrides Sub OnActivated()
|
||||
MyBase.OnActivated()
|
||||
|
||||
End Sub
|
||||
Protected Overloads Overrides Sub OnViewControlsCreated()
|
||||
MyBase.OnViewControlsCreated()
|
||||
If View.Id = "HRPersonEvent_ListView_CurrentUser" Then
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
_SchedulerListEditor = TryCast((CType(View, ListView)).Editor, SchedulerListEditor)
|
||||
If _SchedulerListEditor IsNot Nothing Then
|
||||
InitSchedulerControl(_SchedulerListEditor.SchedulerControl)
|
||||
Dim _Resources_Collection As XPCollection = TryCast(_SchedulerListEditor.ResourcesDataSource, XPCollection)
|
||||
Dim _HRPerson As HRPerson = _ocur.FindObject(Of HRPerson)(CriteriaOperator.Parse("User=?", _ocur.GetObject(SecuritySystem.CurrentUser)))
|
||||
If _HRPerson Is Nothing Then
|
||||
_Resources_Collection.Criteria = CriteriaOperator.Parse("1=2")
|
||||
Else
|
||||
_Resources_Collection.Criteria = New BinaryOperator("Oid", _HRPerson.Oid)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
If View.Id Like "HRPersonEvent_ListView*" Then
|
||||
_SchedulerListEditor = TryCast((CType(View, ListView)).Editor, SchedulerListEditor)
|
||||
If _SchedulerListEditor IsNot Nothing Then
|
||||
AddHandler _SchedulerListEditor.SchedulerControl.AppointmentViewInfoCustomizing, AddressOf SchedulerListEditor_SchedulerControl_AppointmentViewInfoCustomizing
|
||||
End If
|
||||
End If
|
||||
If View.Id = "HRPersonEvent_ListView_All" Then
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
_SchedulerListEditor = TryCast((CType(View, ListView)).Editor, SchedulerListEditor)
|
||||
If _SchedulerListEditor IsNot Nothing Then
|
||||
InitSchedulerControl(_SchedulerListEditor.SchedulerControl)
|
||||
Dim _Resources_Collection As XPCollection = TryCast(_SchedulerListEditor.ResourcesDataSource, XPCollection)
|
||||
Dim _HRPersonEventCriteria As HRPersonEventCriteria = _ocur.FindObject(Of HRPersonEventCriteria)(CriteriaOperator.Parse("ViewID=? and User.Oid=?", View.Id, SecuritySystem.CurrentUser.oid))
|
||||
If _HRPersonEventCriteria IsNot Nothing Then
|
||||
_Resources_Collection.CriteriaString = _HRPersonEventCriteria.Criteria
|
||||
_SchedulerListEditor.SchedulerControl.ActiveViewType = _HRPersonEventCriteria.ActiveViewType
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Protected Overrides Sub OnDeactivated()
|
||||
MyBase.OnDeactivated()
|
||||
If View.Id = "HRPersonEvent_ListView_All" Then
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
_SchedulerListEditor = TryCast((CType(View, ListView)).Editor, SchedulerListEditor)
|
||||
If _SchedulerListEditor IsNot Nothing Then
|
||||
Dim _HRPersonEventCriteria As HRPersonEventCriteria = _ocur.FindObject(Of HRPersonEventCriteria)(CriteriaOperator.Parse("ViewID=? and User.Oid=?", View.Id, SecuritySystem.CurrentUser.oid))
|
||||
If _HRPersonEventCriteria IsNot Nothing Then
|
||||
_HRPersonEventCriteria.ActiveViewType = _SchedulerListEditor.SchedulerControl.ActiveViewType
|
||||
_ocur.CommitChanges()
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Private Sub InitSchedulerControl(_SchedulerControl As DevExpress.XtraScheduler.SchedulerControl)
|
||||
_SchedulerControl.Views.DayView.VisibleTime = New TimeOfDayInterval(New TimeSpan(7, 0, 0), New TimeSpan(19, 0, 0))
|
||||
_SchedulerControl.Views.WorkWeekView.VisibleTime = New TimeOfDayInterval(New TimeSpan(7, 0, 0), New TimeSpan(19, 0, 0))
|
||||
_SchedulerControl.OptionsCustomization.AllowAppointmentDragBetweenResources = UsedAppointmentType.None
|
||||
End Sub
|
||||
Private Sub aSelectHRPersonToScheduler_CustomizePopupWindowParams(sender As Object, e As DevExpress.ExpressApp.Actions.CustomizePopupWindowParamsEventArgs) Handles aSelectHRPersonToScheduler.CustomizePopupWindowParams
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _CS As CollectionSource = New CollectionSource(_onew, GetType(HRPerson))
|
||||
|
||||
e.View = Application.CreateListView("HRPerson_ListView_Select", _CS, False)
|
||||
|
||||
End Sub
|
||||
Private Sub aSelectHRPersonToScheduler_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.PopupWindowShowActionExecuteEventArgs) Handles aSelectHRPersonToScheduler.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _SchedulerListEditor As SchedulerListEditor = TryCast((CType(View, ListView)).Editor, SchedulerListEditor)
|
||||
Dim _HRPerson As HRPerson
|
||||
If _SchedulerListEditor IsNot Nothing Then
|
||||
Dim _Resources_Collection As XPCollection = TryCast(_SchedulerListEditor.ResourcesDataSource, XPCollection)
|
||||
If _Resources_Collection IsNot Nothing Then
|
||||
Dim Keys As New Collection
|
||||
Keys.Clear()
|
||||
For Each _HRPerson In e.PopupWindow.View.SelectedObjects
|
||||
Keys.Add(_HRPerson.Oid)
|
||||
Next
|
||||
If Keys.Count <= 0 Then
|
||||
_Resources_Collection.Criteria = Nothing
|
||||
Else
|
||||
_Resources_Collection.Criteria = New InOperator("Oid", Keys)
|
||||
End If
|
||||
|
||||
Dim _HRPersonEventCriteria As HRPersonEventCriteria = _ocur.FindObject(Of HRPersonEventCriteria)(CriteriaOperator.Parse("ViewID=? and User.Oid=?", View.Id, SecuritySystem.CurrentUser.oid))
|
||||
If _HRPersonEventCriteria Is Nothing Then
|
||||
_HRPersonEventCriteria = _ocur.CreateObject(Of HRPersonEventCriteria)()
|
||||
End If
|
||||
_HRPersonEventCriteria.User = _ocur.FindObject(Of User)(CriteriaOperator.Parse("Oid=?", SecuritySystem.CurrentUser.oid))
|
||||
_HRPersonEventCriteria.ViewID = View.Id
|
||||
_HRPersonEventCriteria.Criteria = _Resources_Collection.CriteriaString
|
||||
|
||||
_ocur.CommitChanges()
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub SchedulerListEditor_SchedulerControl_AppointmentViewInfoCustomizing(sender As Object, e As DevExpress.XtraScheduler.AppointmentViewInfoCustomizingEventArgs)
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
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()
|
||||
components = New System.ComponentModel.Container()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,32 @@
|
||||
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 HRPerson_VC
|
||||
Inherits Nuvolar.Module.HRPerson_VC
|
||||
|
||||
Dim _WaitFormClass As New WaitFormClass
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
End Sub
|
||||
Protected Overrides Sub OnActivated()
|
||||
MyBase.OnActivated()
|
||||
AddHandler DoWork, AddressOf _WaitFormClass.DoWork
|
||||
AddHandler InitWork, AddressOf _WaitFormClass.InitWork
|
||||
AddHandler FinalWork, AddressOf _WaitFormClass.Finalwork
|
||||
End Sub
|
||||
Protected Overrides Sub OnDeactivated()
|
||||
MyBase.OnDeactivated()
|
||||
RemoveHandler DoWork, AddressOf _WaitFormClass.DoWork
|
||||
RemoveHandler InitWork, AddressOf _WaitFormClass.InitWork
|
||||
RemoveHandler FinalWork, AddressOf _WaitFormClass.Finalwork
|
||||
End Sub
|
||||
End Class
|
||||
+1
@@ -0,0 +1 @@
|
||||
|
||||
+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
|
||||
Imports DevExpress.ExpressApp.Win.Editors
|
||||
|
||||
Public Class WinLookupLinkViewControllerVC
|
||||
Inherits LookupLinkViewController
|
||||
Protected Overrides Sub ProcessLookupEditor(ByVal editor As PropertyEditor)
|
||||
Dim lookup As LookupPropertyEditor = TryCast(editor, LookupPropertyEditor)
|
||||
Dim list As ListPropertyEditor = TryCast(editor, ListPropertyEditor)
|
||||
If lookup IsNot Nothing Then
|
||||
AddHandler lookup.Control.Popup, AddressOf Control_Popup
|
||||
End If
|
||||
End Sub
|
||||
Private Sub Control_Popup(ByVal sender As Object, ByVal e As EventArgs)
|
||||
Dim control As LookupEdit = CType(sender, LookupEdit)
|
||||
Dim controller As LinkToLookupViewController = control.Frame.GetController(Of LinkToLookupViewController)()
|
||||
If controller IsNot Nothing Then
|
||||
For Each editor As LookupPropertyEditor In View.GetItems(Of LookupPropertyEditor)()
|
||||
If Equals(editor.Control, control) Then
|
||||
controller.Lookup = editor
|
||||
End If
|
||||
Next editor
|
||||
End If
|
||||
End Sub
|
||||
Private Sub ListPropertyEditor_ControlCreated(sender As Object, e As EventArgs)
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
+119
@@ -0,0 +1,119 @@
|
||||
Partial Class BusinessDirectory_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.aBusinessDirectory_OpenRTFDocument = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aOpenRTFDocument_InsertTable = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aOpenRTFDocument_SaveBusinessDiretory = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aOpenRTFDocument_SaveToCRM_Lead = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
|
||||
Me.aOpenRTFDocument_InsertDocVariable = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
|
||||
Me.aBusinessDirectory_OpenSpreadDocument = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
'
|
||||
'aBusinessDirectory_OpenRTFDocument
|
||||
'
|
||||
Me.aBusinessDirectory_OpenRTFDocument.Caption = "aBusinessDirectory_OpenRTFDocument"
|
||||
Me.aBusinessDirectory_OpenRTFDocument.Category = "RecordEdit"
|
||||
Me.aBusinessDirectory_OpenRTFDocument.ConfirmationMessage = Nothing
|
||||
Me.aBusinessDirectory_OpenRTFDocument.Id = "aBusinessDirectory_OpenRTFDocument"
|
||||
Me.aBusinessDirectory_OpenRTFDocument.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
|
||||
Me.aBusinessDirectory_OpenRTFDocument.TargetObjectsCriteria = "IsFolder=False"
|
||||
Me.aBusinessDirectory_OpenRTFDocument.TargetObjectType = GetType(Nuvolar.[Module].BusinessDirectory)
|
||||
Me.aBusinessDirectory_OpenRTFDocument.TargetViewType = DevExpress.ExpressApp.ViewType.ListView
|
||||
Me.aBusinessDirectory_OpenRTFDocument.ToolTip = Nothing
|
||||
Me.aBusinessDirectory_OpenRTFDocument.TypeOfView = GetType(DevExpress.ExpressApp.ListView)
|
||||
'
|
||||
'aOpenRTFDocument_InsertTable
|
||||
'
|
||||
Me.aOpenRTFDocument_InsertTable.Caption = "aOpenRTFDocument_InsertTable"
|
||||
Me.aOpenRTFDocument_InsertTable.Category = "RecordEdit"
|
||||
Me.aOpenRTFDocument_InsertTable.ConfirmationMessage = Nothing
|
||||
Me.aOpenRTFDocument_InsertTable.Id = "aOpenRTFDocument_InsertTable"
|
||||
Me.aOpenRTFDocument_InsertTable.TargetObjectType = GetType(Nuvolar.[Module].OpenRTFDocument_PopUp)
|
||||
Me.aOpenRTFDocument_InsertTable.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
|
||||
Me.aOpenRTFDocument_InsertTable.ToolTip = Nothing
|
||||
Me.aOpenRTFDocument_InsertTable.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
|
||||
'
|
||||
'aOpenRTFDocument_SaveBusinessDiretory
|
||||
'
|
||||
Me.aOpenRTFDocument_SaveBusinessDiretory.Caption = "aOpenRTFDocument_SaveBusinessDiretory"
|
||||
Me.aOpenRTFDocument_SaveBusinessDiretory.Category = "Save"
|
||||
Me.aOpenRTFDocument_SaveBusinessDiretory.ConfirmationMessage = Nothing
|
||||
Me.aOpenRTFDocument_SaveBusinessDiretory.Id = "aOpenRTFDocument_SaveBusinessDiretory"
|
||||
Me.aOpenRTFDocument_SaveBusinessDiretory.TargetObjectType = GetType(Nuvolar.[Module].OpenRTFDocument_PopUp)
|
||||
Me.aOpenRTFDocument_SaveBusinessDiretory.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
|
||||
Me.aOpenRTFDocument_SaveBusinessDiretory.ToolTip = Nothing
|
||||
Me.aOpenRTFDocument_SaveBusinessDiretory.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
|
||||
'
|
||||
'aOpenRTFDocument_SaveToCRM_Lead
|
||||
'
|
||||
Me.aOpenRTFDocument_SaveToCRM_Lead.AcceptButtonCaption = Nothing
|
||||
Me.aOpenRTFDocument_SaveToCRM_Lead.CancelButtonCaption = Nothing
|
||||
Me.aOpenRTFDocument_SaveToCRM_Lead.Caption = "aOpenRTFDocument_SaveToCRM_Lead"
|
||||
Me.aOpenRTFDocument_SaveToCRM_Lead.Category = "Save"
|
||||
Me.aOpenRTFDocument_SaveToCRM_Lead.ConfirmationMessage = Nothing
|
||||
Me.aOpenRTFDocument_SaveToCRM_Lead.Id = "aOpenRTFDocument_SaveToCRM_Lead"
|
||||
Me.aOpenRTFDocument_SaveToCRM_Lead.TargetObjectType = GetType(Nuvolar.[Module].OpenRTFDocument_PopUp)
|
||||
Me.aOpenRTFDocument_SaveToCRM_Lead.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
|
||||
Me.aOpenRTFDocument_SaveToCRM_Lead.ToolTip = Nothing
|
||||
Me.aOpenRTFDocument_SaveToCRM_Lead.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
|
||||
'
|
||||
'aOpenRTFDocument_InsertDocVariable
|
||||
'
|
||||
Me.aOpenRTFDocument_InsertDocVariable.AcceptButtonCaption = Nothing
|
||||
Me.aOpenRTFDocument_InsertDocVariable.CancelButtonCaption = Nothing
|
||||
Me.aOpenRTFDocument_InsertDocVariable.Caption = "aOpenRTFDocument_InsertDocVariable"
|
||||
Me.aOpenRTFDocument_InsertDocVariable.Category = "RecordEdit"
|
||||
Me.aOpenRTFDocument_InsertDocVariable.ConfirmationMessage = Nothing
|
||||
Me.aOpenRTFDocument_InsertDocVariable.Id = "aOpenRTFDocument_InsertDocVariable"
|
||||
Me.aOpenRTFDocument_InsertDocVariable.TargetObjectType = GetType(Nuvolar.[Module].OpenRTFDocument_PopUp)
|
||||
Me.aOpenRTFDocument_InsertDocVariable.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
|
||||
Me.aOpenRTFDocument_InsertDocVariable.ToolTip = Nothing
|
||||
Me.aOpenRTFDocument_InsertDocVariable.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
|
||||
'
|
||||
'aBusinessDirectory_OpenSpreadDocument
|
||||
'
|
||||
Me.aBusinessDirectory_OpenSpreadDocument.Caption = "aBusinessDirectory_OpenSpreadDocument"
|
||||
Me.aBusinessDirectory_OpenSpreadDocument.Category = "RecordEdit"
|
||||
Me.aBusinessDirectory_OpenSpreadDocument.ConfirmationMessage = Nothing
|
||||
Me.aBusinessDirectory_OpenSpreadDocument.Id = "aBusinessDirectory_OpenSpreadDocument"
|
||||
Me.aBusinessDirectory_OpenSpreadDocument.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
|
||||
Me.aBusinessDirectory_OpenSpreadDocument.TargetObjectsCriteria = "IsFolder=False"
|
||||
Me.aBusinessDirectory_OpenSpreadDocument.TargetObjectType = GetType(Nuvolar.[Module].BusinessDirectory)
|
||||
Me.aBusinessDirectory_OpenSpreadDocument.TargetViewType = DevExpress.ExpressApp.ViewType.ListView
|
||||
Me.aBusinessDirectory_OpenSpreadDocument.ToolTip = Nothing
|
||||
Me.aBusinessDirectory_OpenSpreadDocument.TypeOfView = GetType(DevExpress.ExpressApp.ListView)
|
||||
|
||||
End Sub
|
||||
Friend WithEvents aBusinessDirectory_OpenRTFDocument As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aOpenRTFDocument_InsertTable As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aOpenRTFDocument_SaveBusinessDiretory As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aOpenRTFDocument_SaveToCRM_Lead As DevExpress.ExpressApp.Actions.PopupWindowShowAction
|
||||
Friend WithEvents aOpenRTFDocument_InsertDocVariable As DevExpress.ExpressApp.Actions.PopupWindowShowAction
|
||||
Friend WithEvents aBusinessDirectory_OpenSpreadDocument As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
|
||||
End Class
|
||||
+141
@@ -0,0 +1,141 @@
|
||||
<?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="aBusinessDirectory_OpenRTFDocument.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 95</value>
|
||||
</metadata>
|
||||
<metadata name="aOpenRTFDocument_InsertTable.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 134</value>
|
||||
</metadata>
|
||||
<metadata name="aOpenRTFDocument_SaveBusinessDiretory.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 173</value>
|
||||
</metadata>
|
||||
<metadata name="aOpenRTFDocument_SaveToCRM_Lead.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 56</value>
|
||||
</metadata>
|
||||
<metadata name="aOpenRTFDocument_InsertDocVariable.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>1064, 17</value>
|
||||
</metadata>
|
||||
<metadata name="aBusinessDirectory_OpenSpreadDocument.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>302, 173</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
</root>
|
||||
+352
@@ -0,0 +1,352 @@
|
||||
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
|
||||
Imports DevExpress.XtraRichEdit.API.Native
|
||||
Imports DevExpress.XtraRichEdit
|
||||
Imports DevExpress.Persistent.BaseImpl
|
||||
Imports DevExpress.ExpressApp.SystemModule
|
||||
Imports DevExpress.Data.Filtering
|
||||
Imports DevExpress.ExpressApp.Utils
|
||||
Imports DevExpress.ExpressApp.TreeListEditors.Win
|
||||
Imports DevExpress.XtraTreeList
|
||||
Imports DevExpress.ExpressApp.Win.Controls
|
||||
Imports DevExpress.XtraSpreadsheet
|
||||
Imports DevExpress.XtraSpreadsheet.Services
|
||||
|
||||
Public Class BusinessDirectory_VC
|
||||
Inherits Nuvolar.Module.BusinessDirectory_VC
|
||||
|
||||
Private _RichEditControl As RichEditControl
|
||||
Private _SpreadsheetControl As SpreadsheetControl
|
||||
Private _ISpreadsheetCommandFactoryService As ISpreadsheetCommandFactoryService
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
End Sub
|
||||
Protected Overrides Sub OnActivated()
|
||||
MyBase.OnActivated()
|
||||
If View.Id = "OpenRTFDocument_PopUp_DetailView" Then
|
||||
Frame.GetController(Of ModificationsController).SaveAction.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of ModificationsController).SaveAndCloseAction.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of ModificationsController).SaveAndNewAction.Active.SetItemValue("", False)
|
||||
|
||||
Dim _DetailView As DetailView = TryCast(View, DetailView)
|
||||
Dim _RichEditContolViewItem As ViewItem = _DetailView.FindItem("RTFText")
|
||||
If _RichEditContolViewItem IsNot Nothing Then
|
||||
AddHandler _RichEditContolViewItem.ControlCreated, AddressOf RichEditContolViewItem_ControlCreated
|
||||
End If
|
||||
End If
|
||||
If View.Id = "OpenSpreadDocument_Popup_DetailView" Then
|
||||
Frame.GetController(Of ModificationsController).SaveAction.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of ModificationsController).SaveAndCloseAction.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of ModificationsController).SaveAndNewAction.Active.SetItemValue("", False)
|
||||
|
||||
Frame.GetController(Of CloneObject.CloneObjectViewController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of NewObjectViewController).Active.SetItemValue("", False)
|
||||
|
||||
Dim _DetailView As DetailView = TryCast(View, DetailView)
|
||||
Dim _SpreadXML_ViewItem As ViewItem = _DetailView.FindItem("SpreadXML")
|
||||
If _SpreadXML_ViewItem IsNot Nothing Then
|
||||
AddHandler _SpreadXML_ViewItem.ControlCreated, AddressOf _SpreadXML_ViewItem_ControlCreated
|
||||
End If
|
||||
End If
|
||||
If View.Id = "BusinessDirectory_ListView" Then
|
||||
AddHandler View.ControlsCreated, AddressOf BusinessDirectory_ListView_ControlsCreated
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Overrides Sub OnDeactivated()
|
||||
MyBase.OnDeactivated()
|
||||
If View.Id = "OpenRTFDocument_PopUp_DetailView" Then
|
||||
Frame.GetController(Of ModificationsController).SaveAction.Active.SetItemValue("", True)
|
||||
Frame.GetController(Of ModificationsController).SaveAndCloseAction.Active.SetItemValue("", True)
|
||||
Frame.GetController(Of ModificationsController).SaveAndNewAction.Active.SetItemValue("", True)
|
||||
End If
|
||||
If View.Id = "BusinessDirectory_ListView" Then
|
||||
RemoveHandler View.ControlsCreated, AddressOf BusinessDirectory_ListView_ControlsCreated
|
||||
End If
|
||||
End Sub
|
||||
Private Sub aBusinessDirectory_OpenRTFDocument_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aBusinessDirectory_OpenRTFDocument.Execute
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _BusinessDirectory As BusinessDirectory = TryCast(View.SelectedObjects(0), BusinessDirectory)
|
||||
Dim _FileType As String = GetFileType(_BusinessDirectory.FileData)
|
||||
If _FileType = ".rtf" Or _FileType = ".RTF" Or _FileType = ".doc" Or _FileType = ".DOC" Or _FileType = ".docx" Or _FileType = ".DOCX" Then
|
||||
Dim _OpenRTFDocument_PopUp As New OpenRTFDocument_PopUp(_onew.Session)
|
||||
Dim _RichEditControl_New As New RichEditControl
|
||||
_BusinessDirectory.Reload()
|
||||
_RichEditControl_New.LoadDocument(GetFile(_BusinessDirectory.FileData))
|
||||
_OpenRTFDocument_PopUp.RTFText = _RichEditControl_New.RtfText
|
||||
_OpenRTFDocument_PopUp.BusinessDirectory = _onew.GetObject(_BusinessDirectory)
|
||||
|
||||
e.ShowViewParameters.CreatedView = Application.CreateDetailView(_onew, "OpenRTFDocument_PopUp_DetailView", True, _OpenRTFDocument_PopUp)
|
||||
End If
|
||||
End Sub
|
||||
Private Sub aBusinessDirectory_OpenSpreadDocument_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aBusinessDirectory_OpenSpreadDocument.Execute
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _BusinessDirectory As BusinessDirectory = TryCast(View.SelectedObjects(0), BusinessDirectory)
|
||||
Dim _FileType As String = GetFileType(_BusinessDirectory.FileData)
|
||||
If UCase(_FileType) = ".XLS" Or UCase(_FileType) = ".XLSX" Then
|
||||
Dim _OpenSpreadDocument_PopUp As New OpenSpreadDocument_Popup(_onew.Session)
|
||||
_OpenSpreadDocument_PopUp.BusinessDirectory = _onew.GetObject(_BusinessDirectory)
|
||||
e.ShowViewParameters.CreatedView = Application.CreateDetailView(_onew, "OpenSpreadDocument_Popup_DetailView", True, _OpenSpreadDocument_PopUp)
|
||||
End If
|
||||
End Sub
|
||||
Private Sub aOpenRTFDocument_InsertTable_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aOpenRTFDocument_InsertTable.Execute
|
||||
Try
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _User As User = _onew.GetObjectByKey(Of User)(_onew.GetKeyValue(SecuritySystem.CurrentUser))
|
||||
Dim _RTFCopy As RTFCopy = _onew.FindObject(Of RTFCopy)(CriteriaOperator.Parse("UserCreated=?", _User))
|
||||
If _RTFCopy Is Nothing Then Throw New Exception("*Nincs táblázat elhelyezve a vágólapon!")
|
||||
Dim _ContractTemplate As ContractTemplate = TryCast(View.SelectedObjects(0), ContractTemplate)
|
||||
|
||||
Dim _DocPos As DocumentPosition = _RichEditControl.Document.CaretPosition
|
||||
|
||||
_RichEditControl.Document.InsertHtmlText(_DocPos, _RTFCopy.RTFString)
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, String.Format(CaptionHelper.GetLocalizedText("Exceptions\NuvolarExceptions", "MsgBoxCheckItAgain")))
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub aOpenRTFDocument_SaveBusinessDiretory_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aOpenRTFDocument_SaveBusinessDiretory.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _OpenRTFDocument_PopUp As OpenRTFDocument_PopUp = TryCast(View.SelectedObjects(0), OpenRTFDocument_PopUp)
|
||||
Dim _BusinessDirectory As BusinessDirectory = _ocur.GetObject(_OpenRTFDocument_PopUp.BusinessDirectory)
|
||||
|
||||
_RichEditControl.SaveDocument(IO.Path.GetTempPath + _BusinessDirectory.FileData.FileName.Remove(_BusinessDirectory.FileData.FileName.Length - 4, 4) + ".rtf", DocumentFormat.Rtf)
|
||||
|
||||
_BusinessDirectory.FileData = LoadOtherFile(IO.Path.GetTempPath + _BusinessDirectory.FileData.FileName.Remove(_BusinessDirectory.FileData.FileName.Length - 4, 4) + ".rtf", New FileData(_ocur.Session))
|
||||
|
||||
_BusinessDirectory.FileCreated = GetFileCreatedDate(IO.Path.GetTempPath + _BusinessDirectory.FileData.FileName.Remove(_BusinessDirectory.FileData.FileName.Length - 4, 4) + ".rtf")
|
||||
_BusinessDirectory.FileCreated = GetFileModifiedDate(IO.Path.GetTempPath + _BusinessDirectory.FileData.FileName.Remove(_BusinessDirectory.FileData.FileName.Length - 4, 4) + ".rtf")
|
||||
|
||||
If IO.File.Exists(IO.Path.GetTempPath + _BusinessDirectory.FileData.FileName.Remove(_BusinessDirectory.FileData.FileName.Length - 4, 4) + ".rtf") Then _
|
||||
IO.File.Delete(IO.Path.GetTempPath + _BusinessDirectory.FileData.FileName.Remove(_BusinessDirectory.FileData.FileName.Length - 4, 4) + ".rtf")
|
||||
|
||||
_ocur.CommitChanges()
|
||||
_BusinessDirectory.Reload()
|
||||
View.Close()
|
||||
End Sub
|
||||
Private Sub aOpenRTFDocument_SaveToCRM_Lead_CustomizePopupWindowParams(sender As Object, e As CustomizePopupWindowParamsEventArgs) Handles aOpenRTFDocument_SaveToCRM_Lead.CustomizePopupWindowParams
|
||||
Try
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _OpenRTFDocument_PopUp As OpenRTFDocument_PopUp = TryCast(View.SelectedObjects(0), OpenRTFDocument_PopUp)
|
||||
If _OpenRTFDocument_PopUp Is Nothing Then Throw New Exception("*Váratlan hiba történt a folyamat megszakadt!")
|
||||
Dim _RichEditControlNew As New RichEditControl
|
||||
_RichEditControlNew.RtfText = _OpenRTFDocument_PopUp.RTFText
|
||||
|
||||
Dim _RTFDocumentsCreatorHeader As New RTFDocumentsCreatorHeader(_onew.Session)
|
||||
Dim _Fields As DevExpress.XtraRichEdit.API.Native.FieldCollection = _RichEditControlNew.Document.Fields
|
||||
Dim _Document As DevExpress.XtraRichEdit.API.Native.Document = _RichEditControlNew.Document
|
||||
For Each _ActTagString As DevExpress.XtraRichEdit.API.Native.Field In _Fields
|
||||
Dim _RTFDocumentsCreatorRows As New RTFDocumentsCreatorRows(_onew.Session)
|
||||
With _RTFDocumentsCreatorRows
|
||||
.RTFDocumentsCreatorHeader = _RTFDocumentsCreatorHeader
|
||||
.InfoString = _Document.GetText(_ActTagString.CodeRange)
|
||||
_RTFDocumentsCreatorHeader.RTFDocumentsCreatorRows.Add(_RTFDocumentsCreatorRows)
|
||||
End With
|
||||
Next
|
||||
_RTFDocumentsCreatorHeader.FileName = _OpenRTFDocument_PopUp.BusinessDirectory.FileData.FileName
|
||||
|
||||
e.View = Application.CreateDetailView(_onew, "RTFDocumentsCreatorHeader_DetailView", False, _RTFDocumentsCreatorHeader)
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, "Hiba!")
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub aOpenRTFDocument_SaveToCRM_Lead_Execute(sender As Object, e As PopupWindowShowActionExecuteEventArgs) Handles aOpenRTFDocument_SaveToCRM_Lead.Execute
|
||||
Try
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _OpenRTFDocument_PopUp As OpenRTFDocument_PopUp = TryCast(View.SelectedObjects(0), OpenRTFDocument_PopUp)
|
||||
If _OpenRTFDocument_PopUp Is Nothing Then Throw New Exception("*Váratlan hiba történt a folyamat megszakadt!")
|
||||
Dim _RichEditControlNew As New RichEditControl
|
||||
_RichEditControlNew.RtfText = _OpenRTFDocument_PopUp.RTFText
|
||||
Dim _RTFDocumentsCreatorHeader As RTFDocumentsCreatorHeader = TryCast(e.PopupWindow.View.SelectedObjects(0), RTFDocumentsCreatorHeader)
|
||||
|
||||
Dim _FieldIndex As Int16 = 0
|
||||
Dim _Fields As DevExpress.XtraRichEdit.API.Native.FieldCollection = _RichEditControlNew.Document.Fields
|
||||
|
||||
_RichEditControlNew.BeginUpdate()
|
||||
|
||||
Dim _Document As DevExpress.XtraRichEdit.API.Native.Document = _RichEditControlNew.Document
|
||||
|
||||
_Document.BeginUpdate()
|
||||
|
||||
For Each _RTFDocumentsCreatorRows As RTFDocumentsCreatorRows In _RTFDocumentsCreatorHeader.RTFDocumentsCreatorRows
|
||||
Dim field As DevExpress.XtraRichEdit.API.Native.Field = _Fields(_FieldIndex)
|
||||
field.ShowCodes = True
|
||||
Dim _FieldCode As String = _Document.GetText(field.CodeRange)
|
||||
Dim _FieldResult As String = _RTFDocumentsCreatorRows.ValueString
|
||||
Dim _FieldPosition As DocumentPosition = field.Range.Start
|
||||
_Document.Delete(field.Range)
|
||||
_Document.InsertText(_FieldPosition, _FieldResult)
|
||||
Next
|
||||
_Document.EndUpdate()
|
||||
_RichEditControlNew.EndUpdate()
|
||||
|
||||
Dim _FilePath As String = System.IO.Path.GetTempPath
|
||||
Dim _FileName As String = ""
|
||||
Select Case _RTFDocumentsCreatorHeader.RTFExportFileType
|
||||
Case eRTFExportFileType.ePDF
|
||||
_FileName = _RTFDocumentsCreatorHeader.FileName + ".pdf"
|
||||
_RichEditControlNew.ExportToPdf(_FilePath + _FileName)
|
||||
Case eRTFExportFileType.eRTF
|
||||
_FileName = _RTFDocumentsCreatorHeader.FileName + ".rtf"
|
||||
_RichEditControlNew.SaveDocument(_FilePath + _FileName, DocumentFormat.Rtf)
|
||||
Case eRTFExportFileType.eWord
|
||||
_FileName = _RTFDocumentsCreatorHeader.FileName + ".doc"
|
||||
_RichEditControlNew.SaveDocument(_FilePath + _FileName, DocumentFormat.Doc)
|
||||
Case eRTFExportFileType.eWordXDoc
|
||||
_FileName = _RTFDocumentsCreatorHeader.FileName + ".docx"
|
||||
_RichEditControlNew.SaveDocument(_FilePath + _FileName, DocumentFormat.WordML)
|
||||
End Select
|
||||
|
||||
If System.IO.File.Exists(_FilePath + _FileName) Then
|
||||
Dim _CRM_LeadsDocumentation As New CRM_LeadsDocumentation(_ocur.Session)
|
||||
With _CRM_LeadsDocumentation
|
||||
.CRM_Leads = _ocur.GetObject(_OpenRTFDocument_PopUp.CRM_Opportunities.CRM_Leads)
|
||||
.File = LoadOtherFile(_FilePath + _FileName, New DevExpress.Persistent.BaseImpl.FileData(_ocur.Session))
|
||||
.FileCreated = GetFileCreatedDate(_FilePath + _FileName)
|
||||
.FileModified = GetFileModifiedDate(_FilePath + _FileName)
|
||||
.ShortName = .File.FileName
|
||||
.Status = eProductsDocumentationStatus.ePublic
|
||||
End With
|
||||
|
||||
System.IO.File.Delete(_FilePath + _FileName)
|
||||
End If
|
||||
|
||||
_ocur.CommitChanges()
|
||||
View.Close()
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, "Hiba!")
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub aOpenRTFDocument_InsertDocVariable_CustomizePopupWindowParams(sender As Object, e As CustomizePopupWindowParamsEventArgs) Handles aOpenRTFDocument_InsertDocVariable.CustomizePopupWindowParams
|
||||
Try
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _RTFDocumanetsHandler_DocVariable_PopUp As New RTFDocumanetsHandler_DocVariable_PopUp(_onew.Session)
|
||||
|
||||
e.View = Application.CreateDetailView(_onew, "RTFDocumanetsHandler_DocVariable_PopUp_DetailView", False, _RTFDocumanetsHandler_DocVariable_PopUp)
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, "Hiba!")
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub aOpenRTFDocument_InsertDocVariable_Execute(sender As Object, e As PopupWindowShowActionExecuteEventArgs) Handles aOpenRTFDocument_InsertDocVariable.Execute
|
||||
Try
|
||||
Dim _RTFDocumanetsHandler_DocVariable_PopUp As RTFDocumanetsHandler_DocVariable_PopUp = TryCast(e.PopupWindow.View.SelectedObjects(0), RTFDocumanetsHandler_DocVariable_PopUp)
|
||||
_RichEditControl.Document.Fields.Add(_RichEditControl.Document.CaretPosition, "DOCVARIABLE " + _RTFDocumanetsHandler_DocVariable_PopUp.DocVariableString)
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, "Hiba!")
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub BusinessDirectory_ListView_ControlsCreated(sender As Object, e As EventArgs)
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _TreeListEditor As TreeListEditor = CType((CType(View, DevExpress.ExpressApp.ListView)).Editor, TreeListEditor)
|
||||
Dim _TreeList As TreeList = _TreeListEditor.TreeList
|
||||
|
||||
AddHandler _TreeList.FilterNode, AddressOf _TreeList_FilterNode
|
||||
End Sub
|
||||
Private Sub _TreeList_FilterNode(sender As Object, e As FilterNodeEventArgs)
|
||||
e.Handled = True
|
||||
If View Is Nothing Then Exit Sub
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _ObjectTreeListNode As ObjectTreeListNode = TryCast(e.Node, ObjectTreeListNode)
|
||||
Dim _BusinessDirectory As BusinessDirectory = TryCast(_ObjectTreeListNode.Object, BusinessDirectory)
|
||||
If _BusinessDirectory IsNot Nothing Then
|
||||
Dim _BusinessDirectory_Roles As BusinessDirectory_Roles = _ocur.FindObject(Of BusinessDirectory_Roles)(CriteriaOperator.Parse("BusinessDirectory=?", _BusinessDirectory))
|
||||
If _BusinessDirectory_Roles IsNot Nothing Then
|
||||
If SecuritySystemHelper.IsUserInRoleCurrentUser(_BusinessDirectory_Roles.Role.Name) Then
|
||||
_ObjectTreeListNode.Visible = False
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
#Region "Other Functions and Subs"
|
||||
Private Function GetFileType(_FileData As FileData) As String
|
||||
Dim _FileExt As String = ""
|
||||
Dim _FilePath As String = System.IO.Path.Combine(System.IO.Path.GetTempPath(), _FileData.FileName)
|
||||
Dim _Stream As System.IO.Stream = New System.IO.FileStream(_FilePath, System.IO.FileMode.Create)
|
||||
_FileData.SaveToStream(_Stream)
|
||||
_Stream.Close()
|
||||
|
||||
_FileExt = System.IO.Path.GetExtension(_FilePath)
|
||||
|
||||
If IO.File.Exists(_FilePath) Then IO.File.Delete(_FilePath)
|
||||
|
||||
Return _FileExt
|
||||
End Function
|
||||
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 RichEditContolViewItem_ControlCreated(sender As Object, e As EventArgs)
|
||||
Dim _ItemControl As Object = TryCast(sender, ViewItem).Control
|
||||
Dim _RichEditUserControl As RichEditUserControl = TryCast(_ItemControl, RichEditUserControl)
|
||||
_RichEditControl = TryCast(_ItemControl, RichEditUserControl).RichEditControl
|
||||
End Sub
|
||||
Private Sub _SpreadXML_ViewItem_ControlCreated(sender As Object, e As EventArgs)
|
||||
Dim _OpenSpreadDocument_PopUp As OpenSpreadDocument_Popup = TryCast(View.SelectedObjects(0), OpenSpreadDocument_Popup)
|
||||
Dim _ItemControl As Object = TryCast(sender, ViewItem).Control
|
||||
Dim _SpreadUserControl As SpreadUserControl = TryCast(_ItemControl, SpreadUserControl)
|
||||
|
||||
_SpreadsheetControl = TryCast(_ItemControl, SpreadUserControl).SpreadsheetControl1
|
||||
|
||||
_ISpreadsheetCommandFactoryService = _SpreadsheetControl.GetService(Of ISpreadsheetCommandFactoryService)()
|
||||
_SpreadsheetControl.ReplaceService(Of ISpreadsheetCommandFactoryService)(New CustomCommandFactoryServise(_ISpreadsheetCommandFactoryService, _SpreadsheetControl, View))
|
||||
|
||||
'// IDE KELL !!! Itt már van SPREAD !!
|
||||
|
||||
If _OpenSpreadDocument_PopUp IsNot Nothing Then
|
||||
If _OpenSpreadDocument_PopUp.BusinessDirectory IsNot Nothing Then
|
||||
If _OpenSpreadDocument_PopUp.BusinessDirectory.FileData IsNot Nothing Then
|
||||
Dim _FilePath As String = System.IO.Path.Combine(System.IO.Path.GetTempPath(), _OpenSpreadDocument_PopUp.BusinessDirectory.FileData.FileName)
|
||||
Dim _Stream As System.IO.Stream = New System.IO.FileStream(_FilePath, System.IO.FileMode.Create)
|
||||
_OpenSpreadDocument_PopUp.BusinessDirectory.FileData.SaveToStream(_Stream)
|
||||
_Stream.Close()
|
||||
|
||||
|
||||
Dim _StreamFile = New System.IO.FileStream(_FilePath, System.IO.FileMode.Open, System.IO.FileAccess.Read)
|
||||
Dim _StreamReader As New System.IO.StreamReader(_StreamFile)
|
||||
Dim workbook As DevExpress.Spreadsheet.IWorkbook = _SpreadsheetControl.Document
|
||||
_StreamFile.Seek(0, System.IO.SeekOrigin.Begin)
|
||||
workbook.LoadDocument(_StreamFile, DevExpress.Spreadsheet.DocumentFormat.OpenXml)
|
||||
_StreamFile.Close()
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
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
|
||||
Private Function GetFileCreatedDate(_ActFile As String) As Date
|
||||
Return System.IO.File.GetCreationTime(_ActFile)
|
||||
End Function
|
||||
Private Function GetFileModifiedDate(_ActFile As String) As Date
|
||||
Return System.IO.File.GetLastAccessTime(_ActFile)
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
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 RTFDocumanetsHandler_DocVariable_PopUp
|
||||
Inherits BaseObject
|
||||
|
||||
Private _DocVariableString As String
|
||||
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
End Sub
|
||||
|
||||
Property DocVariableString As String
|
||||
Get
|
||||
Return _DocVariableString
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("DocVariableString", _DocVariableString, value)
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
+71
@@ -0,0 +1,71 @@
|
||||
Partial Class RTFDocumentsHandlerVC
|
||||
|
||||
<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.aRFTDocuments_CreateBusinessDirectoryDocument = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
|
||||
Me.aRTFDocuments_InsertRTFDocVariable = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
|
||||
'
|
||||
'aRFTDocuments_CreateBusinessDirectoryDocument
|
||||
'
|
||||
Me.aRFTDocuments_CreateBusinessDirectoryDocument.AcceptButtonCaption = Nothing
|
||||
Me.aRFTDocuments_CreateBusinessDirectoryDocument.CancelButtonCaption = Nothing
|
||||
Me.aRFTDocuments_CreateBusinessDirectoryDocument.Caption = "aRFTDocuments_CreateBusinessDirectoryDocument"
|
||||
Me.aRFTDocuments_CreateBusinessDirectoryDocument.ConfirmationMessage = Nothing
|
||||
Me.aRFTDocuments_CreateBusinessDirectoryDocument.Id = "aRFTDocuments_CreateBusinessDirectoryDocument"
|
||||
Me.aRFTDocuments_CreateBusinessDirectoryDocument.ImageName = Nothing
|
||||
Me.aRFTDocuments_CreateBusinessDirectoryDocument.Shortcut = Nothing
|
||||
Me.aRFTDocuments_CreateBusinessDirectoryDocument.Tag = Nothing
|
||||
Me.aRFTDocuments_CreateBusinessDirectoryDocument.TargetObjectsCriteria = Nothing
|
||||
Me.aRFTDocuments_CreateBusinessDirectoryDocument.TargetObjectType = GetType(Nuvolar.[Module].RTFDocumentsHandler)
|
||||
Me.aRFTDocuments_CreateBusinessDirectoryDocument.TargetViewId = Nothing
|
||||
Me.aRFTDocuments_CreateBusinessDirectoryDocument.TargetViewType = DevExpress.ExpressApp.ViewType.ListView
|
||||
Me.aRFTDocuments_CreateBusinessDirectoryDocument.ToolTip = Nothing
|
||||
Me.aRFTDocuments_CreateBusinessDirectoryDocument.TypeOfView = GetType(DevExpress.ExpressApp.ListView)
|
||||
'
|
||||
'aRTFDocuments_InsertRTFDocVariable
|
||||
'
|
||||
Me.aRTFDocuments_InsertRTFDocVariable.AcceptButtonCaption = Nothing
|
||||
Me.aRTFDocuments_InsertRTFDocVariable.CancelButtonCaption = Nothing
|
||||
Me.aRTFDocuments_InsertRTFDocVariable.Caption = "aRTFDocuments_InsertRTFDocVariable"
|
||||
Me.aRTFDocuments_InsertRTFDocVariable.ConfirmationMessage = Nothing
|
||||
Me.aRTFDocuments_InsertRTFDocVariable.Id = "aRTFDocuments_InsertRTFDocVariable"
|
||||
Me.aRTFDocuments_InsertRTFDocVariable.ImageName = Nothing
|
||||
Me.aRTFDocuments_InsertRTFDocVariable.Shortcut = Nothing
|
||||
Me.aRTFDocuments_InsertRTFDocVariable.Tag = Nothing
|
||||
Me.aRTFDocuments_InsertRTFDocVariable.TargetObjectsCriteria = Nothing
|
||||
Me.aRTFDocuments_InsertRTFDocVariable.TargetObjectType = GetType(Nuvolar.[Module].RTFDocumentsHandler)
|
||||
Me.aRTFDocuments_InsertRTFDocVariable.TargetViewId = Nothing
|
||||
Me.aRTFDocuments_InsertRTFDocVariable.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
|
||||
Me.aRTFDocuments_InsertRTFDocVariable.ToolTip = Nothing
|
||||
Me.aRTFDocuments_InsertRTFDocVariable.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
|
||||
|
||||
End Sub
|
||||
Friend WithEvents aRFTDocuments_CreateBusinessDirectoryDocument As DevExpress.ExpressApp.Actions.PopupWindowShowAction
|
||||
Friend WithEvents aRTFDocuments_InsertRTFDocVariable As DevExpress.ExpressApp.Actions.PopupWindowShowAction
|
||||
|
||||
End Class
|
||||
+129
@@ -0,0 +1,129 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="aRFTDocuments_CreateBusinessDirectoryDocument.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="aRTFDocuments_InsertRTFDocVariable.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>412, 140</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
</root>
|
||||
+167
@@ -0,0 +1,167 @@
|
||||
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
|
||||
Imports DevExpress.XtraRichEdit.API.Native
|
||||
Imports DevExpress.XtraRichEdit
|
||||
|
||||
Public Class RTFDocumentsHandlerVC
|
||||
Inherits Nuvolar.Module.RTFDocumentsHandlerVC
|
||||
|
||||
Private _RichEditControl As RichEditControl
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
End Sub
|
||||
Protected Overrides Sub OnActivated()
|
||||
MyBase.OnActivated()
|
||||
If View.Id = "RTFDocumentsHandler_DetailView" Then
|
||||
Dim _RTFDocumentsHandler As RTFDocumentsHandler = TryCast(View.SelectedObjects(0), RTFDocumentsHandler)
|
||||
Dim _DetailView As DetailView = TryCast(View, DetailView)
|
||||
Dim _RichEditContolViewItem As ViewItem = _DetailView.FindItem("DocumentBody")
|
||||
If _RichEditContolViewItem IsNot Nothing Then
|
||||
AddHandler _RichEditContolViewItem.ControlCreated, AddressOf RichEditContolViewItem_ControlCreated
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Private Sub aRFTDocuments_CreateBusinessDirectoryDocument_CustomizePopupWindowParams(sender As Object, e As CustomizePopupWindowParamsEventArgs) Handles aRFTDocuments_CreateBusinessDirectoryDocument.CustomizePopupWindowParams
|
||||
Try
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _RTFDocumentsHandler As RTFDocumentsHandler = TryCast(View.SelectedObjects(0), RTFDocumentsHandler)
|
||||
If _RTFDocumentsHandler Is Nothing Then Throw New Exception("*Váratlan hiba történt a folyamat megszakadt!")
|
||||
Dim _RichEditControlNew As New RichEditControl
|
||||
_RichEditControlNew.RtfText = _RTFDocumentsHandler.DocumentBody
|
||||
|
||||
Dim _RTFDocumentsCreatorHeader As New RTFDocumentsCreatorHeader(_onew.Session)
|
||||
Dim _Fields As DevExpress.XtraRichEdit.API.Native.FieldCollection = _RichEditControlNew.Document.Fields
|
||||
Dim _Document As DevExpress.XtraRichEdit.API.Native.Document = _RichEditControlNew.Document
|
||||
For Each _ActTagString As DevExpress.XtraRichEdit.API.Native.Field In _Fields
|
||||
Dim _RTFDocumentsCreatorRows As New RTFDocumentsCreatorRows(_onew.Session)
|
||||
With _RTFDocumentsCreatorRows
|
||||
.RTFDocumentsCreatorHeader = _RTFDocumentsCreatorHeader
|
||||
.InfoString = _Document.GetText(_ActTagString.CodeRange)
|
||||
_RTFDocumentsCreatorHeader.RTFDocumentsCreatorRows.Add(_RTFDocumentsCreatorRows)
|
||||
End With
|
||||
Next
|
||||
_RTFDocumentsCreatorHeader.FileName = _RTFDocumentsHandler.ShortName
|
||||
|
||||
e.View = Application.CreateDetailView(_onew, "RTFDocumentsCreatorHeader_DetailView", False, _RTFDocumentsCreatorHeader)
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, "Hiba!")
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub aRFTDocuments_CreateBusinessDirectoryDocument_Execute(sender As Object, e As PopupWindowShowActionExecuteEventArgs) Handles aRFTDocuments_CreateBusinessDirectoryDocument.Execute
|
||||
Try
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _RTFDocumentsHandler As RTFDocumentsHandler = TryCast(View.SelectedObjects(0), RTFDocumentsHandler)
|
||||
If _RTFDocumentsHandler Is Nothing Then Throw New Exception("*Váratlan hiba történt a folyamat megszakadt!")
|
||||
Dim _RichEditControlNew As New RichEditControl
|
||||
_RichEditControlNew.RtfText = _RTFDocumentsHandler.DocumentBody
|
||||
Dim _RTFDocumentsCreatorHeader As RTFDocumentsCreatorHeader = TryCast(e.PopupWindow.View.SelectedObjects(0), RTFDocumentsCreatorHeader)
|
||||
|
||||
Dim _FieldIndex As Int16 = 0
|
||||
Dim _Fields As DevExpress.XtraRichEdit.API.Native.FieldCollection = _RichEditControlNew.Document.Fields
|
||||
|
||||
_RichEditControlNew.BeginUpdate()
|
||||
|
||||
Dim _Document As DevExpress.XtraRichEdit.API.Native.Document = _RichEditControlNew.Document
|
||||
|
||||
_Document.BeginUpdate()
|
||||
|
||||
For Each _RTFDocumentsCreatorRows As RTFDocumentsCreatorRows In _RTFDocumentsCreatorHeader.RTFDocumentsCreatorRows
|
||||
Dim field As DevExpress.XtraRichEdit.API.Native.Field = _Fields(_FieldIndex)
|
||||
field.ShowCodes = True
|
||||
Dim _FieldCode As String = _Document.GetText(field.CodeRange)
|
||||
Dim _FieldResult As String = _RTFDocumentsCreatorRows.ValueString
|
||||
Dim _FieldPosition As DocumentPosition = field.Range.Start
|
||||
_Document.Delete(field.Range)
|
||||
_Document.InsertText(_FieldPosition, _FieldResult)
|
||||
Next
|
||||
_Document.EndUpdate()
|
||||
_RichEditControlNew.EndUpdate()
|
||||
|
||||
Dim _FilePath As String = System.IO.Path.GetTempPath
|
||||
Dim _FileName As String
|
||||
Select Case _RTFDocumentsCreatorHeader.RTFExportFileType
|
||||
Case eRTFExportFileType.ePDF
|
||||
_FileName = _RTFDocumentsCreatorHeader.FileName + ".pdf"
|
||||
_RichEditControlNew.ExportToPdf(_FilePath + _FileName)
|
||||
Case eRTFExportFileType.eRTF
|
||||
_FileName = _RTFDocumentsCreatorHeader.FileName + ".rtf"
|
||||
_RichEditControlNew.SaveDocument(_FilePath + _FileName, DocumentFormat.Rtf)
|
||||
Case eRTFExportFileType.eWord
|
||||
_FileName = _RTFDocumentsCreatorHeader.FileName + ".doc"
|
||||
_RichEditControlNew.SaveDocument(_FilePath + _FileName, DocumentFormat.Doc)
|
||||
Case eRTFExportFileType.eWordXDoc
|
||||
_FileName = _RTFDocumentsCreatorHeader.FileName + ".docx"
|
||||
_RichEditControlNew.SaveDocument(_FilePath + _FileName, DocumentFormat.WordML)
|
||||
End Select
|
||||
|
||||
If System.IO.File.Exists(_FilePath + _FileName) Then
|
||||
Dim _BusinessDirectory As New BusinessDirectory(_ocur.Session)
|
||||
With _BusinessDirectory
|
||||
_BusinessDirectory.BusinessDirectory_Parent = _ocur.GetObject(_RTFDocumentsCreatorHeader.BusinessDirectory)
|
||||
_BusinessDirectory.IsFolder = False
|
||||
_BusinessDirectory.FileData = LoadOtherFile(_FilePath + _FileName, New DevExpress.Persistent.BaseImpl.FileData(_ocur.Session))
|
||||
_BusinessDirectory.FileCreated = GetFileCreatedDate(_FilePath + _FileName)
|
||||
_BusinessDirectory.FileModified = GetFileModifiedDate(_FilePath + _FileName)
|
||||
End With
|
||||
|
||||
System.IO.File.Delete(_FilePath + _FileName)
|
||||
End If
|
||||
|
||||
_ocur.CommitChanges()
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, "Hiba!")
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub aRTFDocuments_InsertRTFDocVariable_CustomizePopupWindowParams(sender As Object, e As CustomizePopupWindowParamsEventArgs) Handles aRTFDocuments_InsertRTFDocVariable.CustomizePopupWindowParams
|
||||
Try
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _RTFDocumanetsHandler_DocVariable_PopUp As New RTFDocumanetsHandler_DocVariable_PopUp(_onew.Session)
|
||||
|
||||
e.View = Application.CreateDetailView(_onew, "RTFDocumanetsHandler_DocVariable_PopUp_DetailView", False, _RTFDocumanetsHandler_DocVariable_PopUp)
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, "Hiba!")
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub aRTFDocuments_InsertRTFDocVariable_Execute(sender As Object, e As PopupWindowShowActionExecuteEventArgs) Handles aRTFDocuments_InsertRTFDocVariable.Execute
|
||||
Try
|
||||
Dim _RTFDocumanetsHandler_DocVariable_PopUp As RTFDocumanetsHandler_DocVariable_PopUp = TryCast(e.PopupWindow.View.SelectedObjects(0), RTFDocumanetsHandler_DocVariable_PopUp)
|
||||
_RichEditControl.Document.Fields.Add(_RichEditControl.Document.CaretPosition, "DOCVARIABLE " + _RTFDocumanetsHandler_DocVariable_PopUp.DocVariableString)
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, "Hiba!")
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub RichEditContolViewItem_ControlCreated(sender As Object, e As EventArgs)
|
||||
Dim _ItemControl As Object = TryCast(sender, ViewItem).Control
|
||||
Dim _RichEditUserControl As RichEditUserControl = TryCast(_ItemControl, RichEditUserControl)
|
||||
_RichEditControl = TryCast(_ItemControl, RichEditUserControl).RichEditControl
|
||||
End Sub
|
||||
Private Function LoadOtherFile(ByVal _ActFile As String, _FileData As DevExpress.Persistent.BaseImpl.FileData) As DevExpress.Persistent.BaseImpl.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
|
||||
Private Function GetFileCreatedDate(_ActFile As String) As Date
|
||||
Return System.IO.File.GetCreationTime(_ActFile)
|
||||
End Function
|
||||
Private Function GetFileModifiedDate(_ActFile As String) As Date
|
||||
Return System.IO.File.GetLastAccessTime(_ActFile)
|
||||
End Function
|
||||
End Class
|
||||
@@ -0,0 +1,97 @@
|
||||
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 ePermissionType
|
||||
Allow = 1
|
||||
Deny = 0
|
||||
NotSet = -1
|
||||
End Enum
|
||||
<DefaultClassOptions()> _
|
||||
<NavigationItem("Default")> _
|
||||
Public Class PermissionMatrix
|
||||
Inherits BaseObject
|
||||
Private _Role As Role
|
||||
Private _ObjectType As String
|
||||
Private _IsCreate As ePermissionType = -1
|
||||
Private _IsDelete As ePermissionType = -1
|
||||
Private _IsWrite As ePermissionType = -1
|
||||
Private _IsRead As ePermissionType = -1
|
||||
Private _IsNavigate As ePermissionType = -1
|
||||
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 Role As Role
|
||||
Get
|
||||
Return _Role
|
||||
End Get
|
||||
Set(ByVal value As Role)
|
||||
SetPropertyValue("Role", _Role, value)
|
||||
End Set
|
||||
End Property
|
||||
<Size(255)> _
|
||||
Property ObjectType As String
|
||||
Get
|
||||
Return _ObjectType
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
SetPropertyValue("ObjectType", _ObjectType, value)
|
||||
End Set
|
||||
End Property
|
||||
Property IsCreate As ePermissionType
|
||||
Get
|
||||
Return _IsCreate
|
||||
End Get
|
||||
Set(ByVal value As ePermissionType)
|
||||
SetPropertyValue("IsCreate", _IsCreate, value)
|
||||
End Set
|
||||
End Property
|
||||
Property IsDelete As ePermissionType
|
||||
Get
|
||||
Return _IsDelete
|
||||
End Get
|
||||
Set(ByVal value As ePermissionType)
|
||||
SetPropertyValue("IsDelete", _IsDelete, value)
|
||||
End Set
|
||||
End Property
|
||||
Property IsWrite As ePermissionType
|
||||
Get
|
||||
Return _IsWrite
|
||||
End Get
|
||||
Set(ByVal value As ePermissionType)
|
||||
SetPropertyValue("IsWrite", _IsWrite, value)
|
||||
End Set
|
||||
End Property
|
||||
Property IsRead As ePermissionType
|
||||
Get
|
||||
Return _IsRead
|
||||
End Get
|
||||
Set(ByVal value As ePermissionType)
|
||||
SetPropertyValue("IsRead", _IsRead, value)
|
||||
End Set
|
||||
End Property
|
||||
Property IsNavigate As ePermissionType
|
||||
Get
|
||||
Return _IsNavigate
|
||||
End Get
|
||||
Set(ByVal value As ePermissionType)
|
||||
SetPropertyValue("IsNavigate", _IsNavigate, value)
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
Generated
+99
@@ -0,0 +1,99 @@
|
||||
Partial Class CustomRoleEditorVC
|
||||
|
||||
<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.aCustomRoleLoad = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aCustomRoleSave = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aCustomRoleGroupSetUp = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
|
||||
Me.aCreateCustomRoleObjectTypes = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
|
||||
'
|
||||
'aCustomRoleLoad
|
||||
'
|
||||
Me.aCustomRoleLoad.Caption = "Custom Role Load"
|
||||
Me.aCustomRoleLoad.ConfirmationMessage = Nothing
|
||||
Me.aCustomRoleLoad.Id = "aCustomRoleLoad"
|
||||
Me.aCustomRoleLoad.ImageName = Nothing
|
||||
Me.aCustomRoleLoad.Shortcut = Nothing
|
||||
Me.aCustomRoleLoad.Tag = Nothing
|
||||
Me.aCustomRoleLoad.TargetObjectsCriteria = Nothing
|
||||
Me.aCustomRoleLoad.TargetViewId = "PermissionMatrix_ListView"
|
||||
Me.aCustomRoleLoad.ToolTip = Nothing
|
||||
Me.aCustomRoleLoad.TypeOfView = Nothing
|
||||
'
|
||||
'aCustomRoleSave
|
||||
'
|
||||
Me.aCustomRoleSave.Caption = "Custom Role Save"
|
||||
Me.aCustomRoleSave.ConfirmationMessage = Nothing
|
||||
Me.aCustomRoleSave.Id = "aCustomRoleSave"
|
||||
Me.aCustomRoleSave.ImageName = Nothing
|
||||
Me.aCustomRoleSave.Shortcut = Nothing
|
||||
Me.aCustomRoleSave.Tag = Nothing
|
||||
Me.aCustomRoleSave.TargetObjectsCriteria = Nothing
|
||||
Me.aCustomRoleSave.TargetViewId = "PermissionMatrix_ListView"
|
||||
Me.aCustomRoleSave.ToolTip = Nothing
|
||||
Me.aCustomRoleSave.TypeOfView = Nothing
|
||||
'
|
||||
'aCustomRoleGroupSetUp
|
||||
'
|
||||
Me.aCustomRoleGroupSetUp.AcceptButtonCaption = Nothing
|
||||
Me.aCustomRoleGroupSetUp.CancelButtonCaption = Nothing
|
||||
Me.aCustomRoleGroupSetUp.Caption = "Custom Role Group SetUp"
|
||||
Me.aCustomRoleGroupSetUp.Category = "ObjectsCreation"
|
||||
Me.aCustomRoleGroupSetUp.ConfirmationMessage = Nothing
|
||||
Me.aCustomRoleGroupSetUp.Id = "aCustomRoleGroupSetUp"
|
||||
Me.aCustomRoleGroupSetUp.ImageName = Nothing
|
||||
Me.aCustomRoleGroupSetUp.Shortcut = Nothing
|
||||
Me.aCustomRoleGroupSetUp.Tag = Nothing
|
||||
Me.aCustomRoleGroupSetUp.TargetObjectsCriteria = Nothing
|
||||
Me.aCustomRoleGroupSetUp.TargetViewId = "PermissionMatrix_ListView"
|
||||
Me.aCustomRoleGroupSetUp.ToolTip = Nothing
|
||||
Me.aCustomRoleGroupSetUp.TypeOfView = Nothing
|
||||
'
|
||||
'aCreateCustomRoleObjectTypes
|
||||
'
|
||||
Me.aCreateCustomRoleObjectTypes.AcceptButtonCaption = Nothing
|
||||
Me.aCreateCustomRoleObjectTypes.CancelButtonCaption = Nothing
|
||||
Me.aCreateCustomRoleObjectTypes.Caption = "Create Custom Role ObjectTypes"
|
||||
Me.aCreateCustomRoleObjectTypes.Category = "ObjectsCreation"
|
||||
Me.aCreateCustomRoleObjectTypes.ConfirmationMessage = Nothing
|
||||
Me.aCreateCustomRoleObjectTypes.Id = "aCreateCustomRoleObjectTypes"
|
||||
Me.aCreateCustomRoleObjectTypes.ImageName = Nothing
|
||||
Me.aCreateCustomRoleObjectTypes.Shortcut = Nothing
|
||||
Me.aCreateCustomRoleObjectTypes.Tag = Nothing
|
||||
Me.aCreateCustomRoleObjectTypes.TargetObjectsCriteria = Nothing
|
||||
Me.aCreateCustomRoleObjectTypes.TargetViewId = "PermissionMatrix_ListView"
|
||||
Me.aCreateCustomRoleObjectTypes.ToolTip = Nothing
|
||||
Me.aCreateCustomRoleObjectTypes.TypeOfView = Nothing
|
||||
|
||||
End Sub
|
||||
Friend WithEvents aCustomRoleLoad As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aCustomRoleSave As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aCustomRoleGroupSetUp As DevExpress.ExpressApp.Actions.PopupWindowShowAction
|
||||
Friend WithEvents aCreateCustomRoleObjectTypes As DevExpress.ExpressApp.Actions.PopupWindowShowAction
|
||||
|
||||
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="aCustomRoleLoad.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 56</value>
|
||||
</metadata>
|
||||
<metadata name="aCustomRoleSave.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 95</value>
|
||||
</metadata>
|
||||
<metadata name="aCustomRoleGroupSetUp.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 134</value>
|
||||
</metadata>
|
||||
<metadata name="aCreateCustomRoleObjectTypes.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>476, 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,495 @@
|
||||
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.Xpo
|
||||
Imports DevExpress.Data.Filtering
|
||||
Imports System.IO
|
||||
Imports System.Security
|
||||
Imports System.Xml
|
||||
|
||||
Imports System.Security.Principal
|
||||
|
||||
Imports DevExpress.Persistent.BaseImpl
|
||||
Imports DevExpress.Persistent.Base.Security
|
||||
|
||||
Imports DevExpress.ExpressApp.Security
|
||||
Imports DevExpress.ExpressApp.Updating
|
||||
Imports DevExpress.ExpressApp.Win.Editors
|
||||
Imports Nuvolar.Module
|
||||
|
||||
|
||||
Public Class CustomRoleEditorVC
|
||||
Inherits DevExpress.ExpressApp.ViewController(Of ListView)
|
||||
Private _GridListEditor As GridListEditor
|
||||
Protected _selection As ArrayList
|
||||
Protected _noselect As Boolean = False
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
_selection = New ArrayList()
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
End Sub
|
||||
Protected Overrides Sub OnActivated()
|
||||
MyBase.OnActivated()
|
||||
''____________Továbbgondolásig letíltva!__________________________>>>>
|
||||
'Frame.GetController(Of CustomRoleEditorVC).aCustomRoleSave.Active.SetItemValue("", False)
|
||||
''____________Továbbgondolásig letíltva!__________________________<<<
|
||||
|
||||
If View.Id = "PermissionMatrix_ListView" Then
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.ListViewProcessCurrentObjectController)().Active.SetItemValue("", False)
|
||||
Frame.GetController(Of DevExpress.ExpressApp.Win.SystemModule.OpenObjectController)().Active.SetItemValue("", False)
|
||||
AddHandler View.SelectionChanged, AddressOf PermissionMatrix_selection_changed
|
||||
End If
|
||||
|
||||
'// Permission matrix beállítása Modelbõl
|
||||
|
||||
End Sub
|
||||
Protected Overrides Sub OnDeactivated()
|
||||
MyBase.OnDeactivated()
|
||||
If View.Id = "PermissionMatrix_ListView" Then
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.ListViewProcessCurrentObjectController)().Active.SetItemValue("", True)
|
||||
Frame.GetController(Of DevExpress.ExpressApp.Win.SystemModule.OpenObjectController)().Active.SetItemValue("", True)
|
||||
|
||||
RemoveHandler View.SelectionChanged, AddressOf PermissionMatrix_selection_changed
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Overrides Sub OnViewControlsCreated()
|
||||
MyBase.OnViewControlsCreated()
|
||||
'If View.Id = "PermissionMatrix_ListView" Then
|
||||
' Dim _ListView As ListView = CType(View, ListView)
|
||||
' _GridListEditor = TryCast(View.Editor, GridListEditor)
|
||||
' If _GridListEditor IsNot Nothing Then
|
||||
' _GridListEditor.AllowEdit = True
|
||||
' For i As Integer = 0 To _GridListEditor.Columns.Count - 1
|
||||
' If _GridListEditor.GridView.Columns(i).FieldName <> "IsCreate" And _
|
||||
' _GridListEditor.GridView.Columns(i).FieldName <> "IsRead" And _
|
||||
' _GridListEditor.GridView.Columns(i).FieldName <> "IsWrite" And _
|
||||
' _GridListEditor.GridView.Columns(i).FieldName <> "IsNavigate" And _
|
||||
' _GridListEditor.GridView.Columns(i).FieldName <> "IsDelete" Then
|
||||
' _GridListEditor.GridView.Columns(i).OptionsColumn.ReadOnly = True
|
||||
' _GridListEditor.GridView.Columns(i).OptionsColumn.AllowEdit = False
|
||||
' _GridListEditor.GridView.Columns(i).OptionsColumn.TabStop = False
|
||||
' End If
|
||||
' Next i
|
||||
' End If
|
||||
'End If
|
||||
End Sub
|
||||
Sub PermissionMatrix_selection_changed(ByVal sender As Object, ByVal e As System.EventArgs)
|
||||
If View Is Nothing Then Exit Sub
|
||||
If View.Id = "PermissionMatrix_ListView" Then
|
||||
If _noselect = False Then
|
||||
_selection.Clear()
|
||||
For Each _PermissionMatrix As PermissionMatrix In View.SelectedObjects
|
||||
_selection.Add(_PermissionMatrix)
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Sub CreatePermissionMatrix(ByVal ObjectSpace As Xpo.XPObjectSpace)
|
||||
Dim _PermissionMatrix_Collection As XPCollection(Of PermissionMatrix) = New XPCollection(Of PermissionMatrix)(ObjectSpace.Session, CriteriaOperator.Parse("Oid=Oid"))
|
||||
Dim _Role_Collection As XPCollection(Of Role) = New XPCollection(Of Role)(ObjectSpace.Session, CriteriaOperator.Parse("Oid=Oid"))
|
||||
|
||||
Dim _Type As Type
|
||||
Dim _Role As Role
|
||||
Dim _Permission As IPermission
|
||||
Dim _XMLDocument As New XmlDocument
|
||||
Dim _XmlNodes As Xml.XmlNodeList
|
||||
Dim _XmlNode As Xml.XmlNode
|
||||
Dim _XmlNode1 As Xml.XmlNode
|
||||
Dim i As Long
|
||||
Dim _PermissionMatrix As PermissionMatrix
|
||||
Dim _OT As String
|
||||
ObjectSpace.Delete(_PermissionMatrix_Collection)
|
||||
|
||||
For Each _Role In _Role_Collection
|
||||
|
||||
|
||||
For Each _Permission In _Role.Permissions
|
||||
_XMLDocument.LoadXml(_Permission.ToXml.ToString)
|
||||
_XmlNodes = _XMLDocument.SelectNodes("IPermission")
|
||||
For Each _XmlNode In _XmlNodes
|
||||
i = 0
|
||||
For Each _XmlNode1 In _XmlNode.SelectNodes("ParticularAccessItem")
|
||||
If i = 0 Then
|
||||
|
||||
_PermissionMatrix = ObjectSpace.CreateObject(Of PermissionMatrix)()
|
||||
_PermissionMatrix.Role = _Role
|
||||
|
||||
_OT = Replace(_XmlNode1.Attributes("objectType").Value.ToString, "Nuvolar.Module.", "")
|
||||
_PermissionMatrix.ObjectType = _OT
|
||||
End If
|
||||
If _XmlNode1.Attributes("access").Value.ToString = "Create" Then
|
||||
If _XmlNode1.Attributes("modifier").Value.ToString = "Allow" Then _PermissionMatrix.IsCreate = ePermissionType.Allow
|
||||
If _XmlNode1.Attributes("modifier").Value.ToString = "Deny" Then _PermissionMatrix.IsCreate = ePermissionType.Deny
|
||||
End If
|
||||
If _XmlNode1.Attributes("access").Value.ToString = "Read" Then
|
||||
If _XmlNode1.Attributes("modifier").Value.ToString = "Allow" Then _PermissionMatrix.IsRead = ePermissionType.Allow
|
||||
If _XmlNode1.Attributes("modifier").Value.ToString = "Deny" Then _PermissionMatrix.IsRead = ePermissionType.Deny
|
||||
End If
|
||||
If _XmlNode1.Attributes("access").Value.ToString = "Write" Then
|
||||
If _XmlNode1.Attributes("modifier").Value.ToString = "Allow" Then _PermissionMatrix.IsWrite = ePermissionType.Allow
|
||||
If _XmlNode1.Attributes("modifier").Value.ToString = "Deny" Then _PermissionMatrix.IsWrite = ePermissionType.Deny
|
||||
End If
|
||||
If _XmlNode1.Attributes("access").Value.ToString = "Delete" Then
|
||||
If _XmlNode1.Attributes("modifier").Value.ToString = "Allow" Then _PermissionMatrix.IsDelete = ePermissionType.Allow
|
||||
If _XmlNode1.Attributes("modifier").Value.ToString = "Deny" Then _PermissionMatrix.IsDelete = ePermissionType.Deny
|
||||
End If
|
||||
If _XmlNode1.Attributes("access").Value.ToString = "Navigate" Then
|
||||
If _XmlNode1.Attributes("modifier").Value.ToString = "Allow" Then _PermissionMatrix.IsNavigate = ePermissionType.Allow
|
||||
If _XmlNode1.Attributes("modifier").Value.ToString = "Deny" Then _PermissionMatrix.IsNavigate = ePermissionType.Deny
|
||||
End If
|
||||
i += 1
|
||||
Next
|
||||
_PermissionMatrix.Save()
|
||||
Next
|
||||
Next
|
||||
Next
|
||||
ObjectSpace.CommitChanges()
|
||||
View.Refresh()
|
||||
End Sub
|
||||
Private Sub aCustomRoleLoad_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aCustomRoleLoad.Execute
|
||||
Me.CreatePermissionMatrix(View.ObjectSpace)
|
||||
End Sub
|
||||
Private Sub aCustomRoleSave_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aCustomRoleSave.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = View.ObjectSpace
|
||||
' Dim _PermissionMatrix_Collection As XPCollection(Of PermissionMatrix) = New XPCollection(Of PermissionMatrix)(_ocur.Session, CriteriaOperator.Parse("IsCreate=? AND IsDelete=? AND IsNavigate=? AND IsRead=? AND IsWrite=?", _
|
||||
' ePermissionType.NotSet, ePermissionType.NotSet, ePermissionType.NotSet, ePermissionType.NotSet, ePermissionType.NotSet))
|
||||
Dim _ObjectName As String = ""
|
||||
Dim _PermissionMatrix_Collection As XPCollection(Of PermissionMatrix) = New XPCollection(Of PermissionMatrix)(_ocur.Session, CriteriaOperator.Parse("1=1"))
|
||||
Dim _Role_Collection As XPCollection(Of Role) = New XPCollection(Of Role)(_ocur.Session, CriteriaOperator.Parse("Oid=Oid"))
|
||||
Dim _PersistentPermission_Collection As XPCollection = _ocur.CreateCollection(GetType(PersistentPermission), CriteriaOperator.Parse("1=1"))
|
||||
|
||||
For Each _Role As Role In _Role_Collection
|
||||
For Each _PermissionMatrix As PermissionMatrix In _PermissionMatrix_Collection
|
||||
If _PermissionMatrix.Role Is _Role Then
|
||||
Dim _PersistentPermissionXPColl As XPCollection = _ocur.CreateCollection(GetType(PersistentPermission), CriteriaOperator.Parse("Role=?", _Role))
|
||||
For Each _PersistentPermission As PersistentPermission In _PersistentPermissionXPColl
|
||||
If TryCast(_PersistentPermission.Permission, EditModelPermission) IsNot Nothing Then
|
||||
_ObjectName = TryCast(_PersistentPermission.Permission, EditModelPermission).GetType.ToString
|
||||
End If
|
||||
If TryCast(_PersistentPermission.Permission, ObjectAccessPermission) IsNot Nothing Then
|
||||
_ObjectName = TryCast(_PersistentPermission.Permission, ObjectAccessPermission).AccessItemList(0).ObjectTypeInfo.FullName
|
||||
End If
|
||||
|
||||
Dim _ObjectNameArry As String() = _ObjectName.Split(New [Char]() {"."c})
|
||||
If _ObjectNameArry(_ObjectNameArry.Length - 2) = "Win" Then
|
||||
_ObjectName = _ObjectNameArry(_ObjectNameArry.Length - 2) & "." & _ObjectNameArry(_ObjectNameArry.Length - 1)
|
||||
End If
|
||||
|
||||
If _ObjectName <> _PermissionMatrix.ObjectType And _ObjectNameArry(_ObjectNameArry.Length - 1) <> _PermissionMatrix.ObjectType Then
|
||||
If _PermissionMatrix.IsCreate <> ePermissionType.NotSet And _
|
||||
_PermissionMatrix.IsDelete <> ePermissionType.NotSet And _
|
||||
_PermissionMatrix.IsNavigate <> ePermissionType.NotSet And _
|
||||
_PermissionMatrix.IsRead <> ePermissionType.NotSet And _
|
||||
_PermissionMatrix.IsWrite <> ePermissionType.NotSet Then
|
||||
|
||||
Dim _ActRole As Role = _PermissionMatrix.Role
|
||||
Dim _ActPersistentPermission As XPCollection = _ocur.CreateCollection(GetType(PersistentPermission), CriteriaOperator.Parse("Role=?", _PermissionMatrix.Role))
|
||||
Dim _ObjectAccessPermission As New ObjectAccessPermission
|
||||
_ObjectAccessPermission.ObjectType = ReflectionHelper.FindType(_PermissionMatrix.ObjectType)
|
||||
Select Case _PermissionMatrix.IsRead
|
||||
Case ePermissionType.Allow
|
||||
_ObjectAccessPermission.ReadAccess = ObjectAccessModifier.Allow
|
||||
Case ePermissionType.Deny
|
||||
_ObjectAccessPermission.ReadAccess = ObjectAccessModifier.Deny
|
||||
End Select
|
||||
Select Case _PermissionMatrix.IsWrite
|
||||
Case ePermissionType.Allow
|
||||
_ObjectAccessPermission.WriteAccess = ObjectAccessModifier.Allow
|
||||
Case ePermissionType.Deny
|
||||
_ObjectAccessPermission.WriteAccess = ObjectAccessModifier.Deny
|
||||
End Select
|
||||
Select Case _PermissionMatrix.IsNavigate
|
||||
Case ePermissionType.Allow
|
||||
_ObjectAccessPermission.NavigateAccess = ObjectAccessModifier.Allow
|
||||
Case ePermissionType.Deny
|
||||
_ObjectAccessPermission.NavigateAccess = ObjectAccessModifier.Deny
|
||||
End Select
|
||||
Select Case _PermissionMatrix.IsDelete
|
||||
Case ePermissionType.Allow
|
||||
_ObjectAccessPermission.DeleteAccess = ObjectAccessModifier.Allow
|
||||
Case ePermissionType.Deny
|
||||
_ObjectAccessPermission.DeleteAccess = ObjectAccessModifier.Deny
|
||||
End Select
|
||||
Select Case _PermissionMatrix.IsCreate
|
||||
Case ePermissionType.Allow
|
||||
_ObjectAccessPermission.CreateAccess = ObjectAccessModifier.Allow
|
||||
Case ePermissionType.Deny
|
||||
_ObjectAccessPermission.CreateAccess = ObjectAccessModifier.Deny
|
||||
End Select
|
||||
|
||||
_ActRole.AddPermission(_ObjectAccessPermission)
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
'Dim _ObjectName As String = ""
|
||||
'Dim _Needpermission As Boolean = False
|
||||
'For Each _ActRole As Role In _Role_Collection
|
||||
' For Each _MatrixElement As PermissionMatrix In _PermissionMatrix_Collection
|
||||
' If Equals(_ActRole, _MatrixElement.Role) Then
|
||||
|
||||
' If _MatrixElement.IsCreate <> ePermissionType.NotSet And _
|
||||
' _MatrixElement.IsDelete <> ePermissionType.NotSet And _
|
||||
' _MatrixElement.IsNavigate <> ePermissionType.NotSet And _
|
||||
' _MatrixElement.IsRead <> ePermissionType.NotSet And _
|
||||
' _MatrixElement.IsWrite <> ePermissionType.NotSet Then
|
||||
' Dim _ObjectAccessPermission As New ObjectAccessPermission
|
||||
|
||||
' Dim _ActPersistentPermission As XPCollection = _ocur.CreateCollection(GetType(PersistentPermission), CriteriaOperator.Parse("Role=?", _MatrixElement.Role))
|
||||
' If _ActPersistentPermission.Count > 0 Then
|
||||
' For Each _PersistentPermission As PersistentPermission In _ActPersistentPermission
|
||||
' If TryCast(_PersistentPermission.Permission, EditModelPermission) IsNot Nothing Then
|
||||
' _ObjectName = TryCast(_PersistentPermission.Permission, EditModelPermission).GetType.ToString
|
||||
' End If
|
||||
' If TryCast(_PersistentPermission.Permission, ObjectAccessPermission) IsNot Nothing Then
|
||||
' _ObjectName = TryCast(_PersistentPermission.Permission, ObjectAccessPermission).AccessItemList(0).ObjectTypeInfo.FullName
|
||||
' End If
|
||||
' If _ObjectName <> _MatrixElement.ObjectType Then
|
||||
' _Needpermission = True
|
||||
' End If
|
||||
' Next
|
||||
' End If
|
||||
' If _Needpermission Then
|
||||
' _ObjectAccessPermission.ObjectType = ReflectionHelper.FindType(_MatrixElement.ObjectType)
|
||||
' Select Case _MatrixElement.IsRead
|
||||
' Case ePermissionType.Allow
|
||||
' _ObjectAccessPermission.ReadAccess = ObjectAccessModifier.Allow
|
||||
' Case ePermissionType.Deny
|
||||
' _ObjectAccessPermission.ReadAccess = ObjectAccessModifier.Deny
|
||||
' End Select
|
||||
' Select Case _MatrixElement.IsWrite
|
||||
' Case ePermissionType.Allow
|
||||
' _ObjectAccessPermission.WriteAccess = ObjectAccessModifier.Allow
|
||||
' Case ePermissionType.Deny
|
||||
' _ObjectAccessPermission.WriteAccess = ObjectAccessModifier.Deny
|
||||
' End Select
|
||||
' Select Case _MatrixElement.IsNavigate
|
||||
' Case ePermissionType.Allow
|
||||
' _ObjectAccessPermission.NavigateAccess = ObjectAccessModifier.Allow
|
||||
' Case ePermissionType.Deny
|
||||
' _ObjectAccessPermission.NavigateAccess = ObjectAccessModifier.Deny
|
||||
' End Select
|
||||
' Select Case _MatrixElement.IsDelete
|
||||
' Case ePermissionType.Allow
|
||||
' _ObjectAccessPermission.DeleteAccess = ObjectAccessModifier.Allow
|
||||
' Case ePermissionType.Deny
|
||||
' _ObjectAccessPermission.DeleteAccess = ObjectAccessModifier.Deny
|
||||
' End Select
|
||||
' Select Case _MatrixElement.IsCreate
|
||||
' Case ePermissionType.Allow
|
||||
' _ObjectAccessPermission.CreateAccess = ObjectAccessModifier.Allow
|
||||
' Case ePermissionType.Deny
|
||||
' _ObjectAccessPermission.CreateAccess = ObjectAccessModifier.Deny
|
||||
' End Select
|
||||
|
||||
' _ActRole.AddPermission(_ObjectAccessPermission)
|
||||
' _Needpermission = False
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
' Next
|
||||
|
||||
'Next
|
||||
|
||||
|
||||
'Dim _NotExistPerimissons As New XPCollection
|
||||
'For Each _PermissionMatrix As PermissionMatrix In _PermissionMatrix_Collection
|
||||
' For Each _PersistentPermission As PersistentPermission In _PersistentPermission_Collection
|
||||
' If TryCast(_PersistentPermission.Permission, EditModelPermission) IsNot Nothing Then
|
||||
' _ObjectName = TryCast(_PersistentPermission.Permission, EditModelPermission).GetType.ToString
|
||||
' End If
|
||||
' If TryCast(_PersistentPermission.Permission, ObjectAccessPermission) IsNot Nothing Then
|
||||
' _ObjectName = TryCast(_PersistentPermission.Permission, ObjectAccessPermission).AccessItemList(0).ObjectTypeInfo.FullName
|
||||
' End If
|
||||
|
||||
' Next
|
||||
'Next
|
||||
|
||||
|
||||
'For Each _PermissionMatrix As PermissionMatrix In _PermissionMatrix_Collection
|
||||
' For Each _PersistentPermission As PersistentPermission In _PersistentPermission_Collection
|
||||
' If TryCast(_PersistentPermission.Permission, EditModelPermission) IsNot Nothing Then
|
||||
' _ObjectName = TryCast(_PersistentPermission.Permission, EditModelPermission).GetType.ToString
|
||||
' End If
|
||||
' If TryCast(_PersistentPermission.Permission, ObjectAccessPermission) IsNot Nothing Then
|
||||
' _ObjectName = TryCast(_PersistentPermission.Permission, ObjectAccessPermission).AccessItemList(0).ObjectTypeInfo.FullName
|
||||
' End If
|
||||
|
||||
' If Not Equals(_PersistentPermission.Role, _PermissionMatrix.Role) Then
|
||||
|
||||
' If _PermissionMatrix.IsCreate <> ePermissionType.NotSet And _
|
||||
' _PermissionMatrix.IsDelete <> ePermissionType.NotSet And _
|
||||
' _PermissionMatrix.IsNavigate <> ePermissionType.NotSet And _
|
||||
' _PermissionMatrix.IsRead <> ePermissionType.NotSet And _
|
||||
' _PermissionMatrix.IsWrite <> ePermissionType.NotSet Then
|
||||
|
||||
' Dim _ObjectAccessPermission As New ObjectAccessPermission
|
||||
' Dim _Role As Role = _PermissionMatrix.Role
|
||||
' _ObjectAccessPermission.ObjectType = ReflectionHelper.FindType(_PermissionMatrix.ObjectType)
|
||||
' Select Case _PermissionMatrix.IsRead
|
||||
' Case ePermissionType.Allow
|
||||
' _ObjectAccessPermission.ReadAccess = ObjectAccessModifier.Allow
|
||||
' Case ePermissionType.Deny
|
||||
' _ObjectAccessPermission.ReadAccess = ObjectAccessModifier.Deny
|
||||
' End Select
|
||||
' Select Case _PermissionMatrix.IsWrite
|
||||
' Case ePermissionType.Allow
|
||||
' _ObjectAccessPermission.WriteAccess = ObjectAccessModifier.Allow
|
||||
' Case ePermissionType.Deny
|
||||
' _ObjectAccessPermission.WriteAccess = ObjectAccessModifier.Deny
|
||||
' End Select
|
||||
' Select Case _PermissionMatrix.IsNavigate
|
||||
' Case ePermissionType.Allow
|
||||
' _ObjectAccessPermission.NavigateAccess = ObjectAccessModifier.Allow
|
||||
' Case ePermissionType.Deny
|
||||
' _ObjectAccessPermission.NavigateAccess = ObjectAccessModifier.Deny
|
||||
' End Select
|
||||
' Select Case _PermissionMatrix.IsDelete
|
||||
' Case ePermissionType.Allow
|
||||
' _ObjectAccessPermission.DeleteAccess = ObjectAccessModifier.Allow
|
||||
' Case ePermissionType.Deny
|
||||
' _ObjectAccessPermission.DeleteAccess = ObjectAccessModifier.Deny
|
||||
' End Select
|
||||
' Select Case _PermissionMatrix.IsCreate
|
||||
' Case ePermissionType.Allow
|
||||
' _ObjectAccessPermission.CreateAccess = ObjectAccessModifier.Allow
|
||||
' Case ePermissionType.Deny
|
||||
' _ObjectAccessPermission.CreateAccess = ObjectAccessModifier.Deny
|
||||
' End Select
|
||||
|
||||
' '_Role.AddPermission(_ObjectAccessPermission)
|
||||
' End If
|
||||
' End If
|
||||
' Next
|
||||
'Next
|
||||
|
||||
End Sub
|
||||
Private Sub aCustomRoleGroupSetUp_Cancel(sender As Object, e As System.EventArgs) Handles aCustomRoleGroupSetUp.Cancel
|
||||
_noselect = False
|
||||
End Sub
|
||||
Private Sub aCustomRoleGroupSetUp_CustomizePopupWindowParams(sender As System.Object, e As DevExpress.ExpressApp.Actions.CustomizePopupWindowParamsEventArgs) Handles aCustomRoleGroupSetUp.CustomizePopupWindowParams
|
||||
_noselect = True
|
||||
If _selection.Count > 0 Then
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _CustomRoleGroupSetUpPopUp As CustomRoleGroupSetUpPopUp = _onew.CreateObject(Of CustomRoleGroupSetUpPopUp)()
|
||||
|
||||
e.View = Application.CreateDetailView(_onew, "CustomRoleGroupSetUpPopUp_DetailView", False, _CustomRoleGroupSetUpPopUp)
|
||||
Else
|
||||
_noselect = False
|
||||
'_______________________________________TESZT MIATT____________________>>>>
|
||||
Throw New Exception("*Nincs kiválasztott sor(ok)!")
|
||||
'_______________________________________TESZT MIATT____________________<<<<
|
||||
|
||||
End If
|
||||
End Sub
|
||||
Private Sub aCustomRoleGroupSetUp_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.PopupWindowShowActionExecuteEventArgs) Handles aCustomRoleGroupSetUp.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = e.PopupWindow.View.ObjectSpace
|
||||
Dim _CustomRoleGroupSetUpPopUp As CustomRoleGroupSetUpPopUp = TryCast(e.PopupWindow.View.SelectedObjects(0), CustomRoleGroupSetUpPopUp)
|
||||
Dim _IsCreate As ePermissionType = _CustomRoleGroupSetUpPopUp.IsCreate
|
||||
Dim _IsDelete As ePermissionType = _CustomRoleGroupSetUpPopUp.IsDelete
|
||||
Dim _IsWrite As ePermissionType = _CustomRoleGroupSetUpPopUp.IsWrite
|
||||
Dim _IsRead As ePermissionType = _CustomRoleGroupSetUpPopUp.IsRead
|
||||
Dim _IsNavigate As ePermissionType = _CustomRoleGroupSetUpPopUp.IsNavigate
|
||||
|
||||
For Each _PermissionMatrix As PermissionMatrix In _selection
|
||||
_PermissionMatrix.IsCreate = _IsCreate
|
||||
_PermissionMatrix.IsDelete = _IsDelete
|
||||
_PermissionMatrix.IsWrite = _IsWrite
|
||||
_PermissionMatrix.IsRead = _IsRead
|
||||
_PermissionMatrix.IsNavigate = _IsNavigate
|
||||
|
||||
_PermissionMatrix.Save()
|
||||
Next
|
||||
_ocur.CommitChanges()
|
||||
_noselect = False
|
||||
End Sub
|
||||
Private Sub aCreateCustomRoleObjectTypes_CustomizePopupWindowParams(sender As System.Object, e As DevExpress.ExpressApp.Actions.CustomizePopupWindowParamsEventArgs) Handles aCreateCustomRoleObjectTypes.CustomizePopupWindowParams
|
||||
If View.SelectedObjects.Count > 0 Then
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _PermissionMatrix As PermissionMatrix = TryCast(View.SelectedObjects(0), PermissionMatrix)
|
||||
Dim _CreateCustomRoleObjectTypes As CreateCustomRoleObjectTypes
|
||||
Dim _FullObjectList As New ArrayList
|
||||
Dim _ActobjectList As New ArrayList
|
||||
Dim _CS As New CollectionSource(_onew, GetType(CreateCustomRoleObjectTypes))
|
||||
' _CreateCustomRoleObjectTypes.Role = _onew.GetObject(_PermissionMatrix.Role)
|
||||
Dim _PersistentPermission As XPCollection = _onew.CreateCollection(GetType(PersistentPermission), CriteriaOperator.Parse("1=1"))
|
||||
|
||||
|
||||
For Each _Permission As PersistentPermission In _PersistentPermission
|
||||
If TryCast(_Permission.Permission, ObjectAccessPermission) IsNot Nothing Then
|
||||
_FullObjectList.Add(TryCast(_Permission.Permission, ObjectAccessPermission).AccessItemList(0).ObjectTypeInfo.FullName)
|
||||
End If
|
||||
If TryCast(_Permission.Permission, EditModelPermission) IsNot Nothing Then
|
||||
_FullObjectList.Add(TryCast(_Permission.Permission, EditModelPermission).GetType.ToString)
|
||||
End If
|
||||
Next
|
||||
|
||||
For Each _Permissions As IPermission In _PermissionMatrix.Role.Permissions
|
||||
If TryCast(_Permissions, ObjectAccessPermission) IsNot Nothing Then
|
||||
_ActobjectList.Add(_onew.GetObject(TryCast(_Permissions, ObjectAccessPermission).AccessItemList(0).ObjectTypeInfo.FullName))
|
||||
End If
|
||||
If TryCast(_Permissions, EditModelPermission) IsNot Nothing Then
|
||||
_ActobjectList.Add(_onew.GetObject(TryCast(_Permissions, EditModelPermission).GetType.ToString))
|
||||
End If
|
||||
Next
|
||||
|
||||
Dim _Exist As Boolean = False
|
||||
For Each _s In _FullObjectList
|
||||
For Each _sa In _ActobjectList
|
||||
If _s = _sa Then
|
||||
_Exist = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If Not _Exist Then
|
||||
_CreateCustomRoleObjectTypes = _onew.CreateObject(Of CreateCustomRoleObjectTypes)()
|
||||
_CreateCustomRoleObjectTypes.Role = _onew.GetObject(_PermissionMatrix.Role)
|
||||
_CreateCustomRoleObjectTypes.MissingObjectType = _s
|
||||
|
||||
_cs.add(_CreateCustomRoleObjectTypes)
|
||||
End If
|
||||
_Exist = False
|
||||
Next
|
||||
e.View = Application.CreateListView("CreateCustomRoleObjectTypes_ListView", _CS, False)
|
||||
Else
|
||||
'_______________________________________TESZT MIATT____________________>>>>
|
||||
Throw New Exception("*Nincs kiválasztott sor!")
|
||||
'_______________________________________TESZT MIATT____________________<<<<
|
||||
End If
|
||||
End Sub
|
||||
Private Sub aCreateCustomRoleObjectTypes_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.PopupWindowShowActionExecuteEventArgs) Handles aCreateCustomRoleObjectTypes.Execute
|
||||
If e.PopupWindow.View.SelectedObjects.Count > 0 Then
|
||||
Dim _Role As Role = TryCast(View.SelectedObjects(0), PermissionMatrix).Role
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
For Each _CreateCustomRoleObjectTypes As CreateCustomRoleObjectTypes In e.PopupWindow.View.SelectedObjects
|
||||
Dim _PermissionMatrix As PermissionMatrix = _ocur.CreateObject(Of PermissionMatrix)()
|
||||
_PermissionMatrix.Role = _Role
|
||||
_PermissionMatrix.ObjectType = _CreateCustomRoleObjectTypes.MissingObjectType
|
||||
_PermissionMatrix.IsCreate = ePermissionType.NotSet
|
||||
_PermissionMatrix.IsDelete = ePermissionType.NotSet
|
||||
_PermissionMatrix.IsNavigate = ePermissionType.NotSet
|
||||
_PermissionMatrix.IsRead = ePermissionType.NotSet
|
||||
_PermissionMatrix.IsWrite = ePermissionType.NotSet
|
||||
|
||||
_PermissionMatrix.Save()
|
||||
Next
|
||||
_ocur.CommitChanges()
|
||||
Else
|
||||
'_______________________________________TESZT MIATT____________________>>>>
|
||||
Throw New Exception("*Legalább egy sort ki kell választani!")
|
||||
'_______________________________________TESZT MIATT____________________<<<<
|
||||
End If
|
||||
|
||||
End Sub
|
||||
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()> _
|
||||
<NonPersistent()> _
|
||||
<NavigationItem(False), CreatableItem(False)> _
|
||||
Public Class CreateCustomRoleObjectTypes
|
||||
Inherits BaseObject
|
||||
|
||||
Private _Role As Role
|
||||
Private _MissingObjectType As String
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
End Sub
|
||||
|
||||
Property Role As Role
|
||||
Get
|
||||
Return _Role
|
||||
End Get
|
||||
Set(ByVal value As Role)
|
||||
SetPropertyValue("Role", _Role, value)
|
||||
End Set
|
||||
End Property
|
||||
Property MissingObjectType As String
|
||||
Get
|
||||
Return _MissingObjectType
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("MissingObjectType", _MissingObjectType, value)
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
+70
@@ -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()> _
|
||||
<NonPersistent()> _
|
||||
<NavigationItem(False), CreatableItem(False)> _
|
||||
Public Class CustomRoleGroupSetUpPopUp
|
||||
Inherits BaseObject
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
End Sub
|
||||
|
||||
Private _IsCreate As ePermissionType = -1
|
||||
Private _IsDelete As ePermissionType = -1
|
||||
Private _IsWrite As ePermissionType = -1
|
||||
Private _IsRead As ePermissionType = -1
|
||||
Private _IsNavigate As ePermissionType = -1
|
||||
|
||||
Property IsCreate As ePermissionType
|
||||
Get
|
||||
Return _IsCreate
|
||||
End Get
|
||||
Set(ByVal value As ePermissionType)
|
||||
SetPropertyValue("IsCreate", _IsCreate, value)
|
||||
End Set
|
||||
End Property
|
||||
Property IsDelete As ePermissionType
|
||||
Get
|
||||
Return _IsDelete
|
||||
End Get
|
||||
Set(ByVal value As ePermissionType)
|
||||
SetPropertyValue("IsDelete", _IsDelete, value)
|
||||
End Set
|
||||
End Property
|
||||
Property IsWrite As ePermissionType
|
||||
Get
|
||||
Return _IsWrite
|
||||
End Get
|
||||
Set(ByVal value As ePermissionType)
|
||||
SetPropertyValue("IsWrite", _IsWrite, value)
|
||||
End Set
|
||||
End Property
|
||||
Property IsRead As ePermissionType
|
||||
Get
|
||||
Return _IsRead
|
||||
End Get
|
||||
Set(ByVal value As ePermissionType)
|
||||
SetPropertyValue("IsRead", _IsRead, value)
|
||||
End Set
|
||||
End Property
|
||||
Property IsNavigate As ePermissionType
|
||||
Get
|
||||
Return _IsNavigate
|
||||
End Get
|
||||
Set(ByVal value As ePermissionType)
|
||||
SetPropertyValue("IsNavigate", _IsNavigate, value)
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
Reference in New Issue
Block a user