First create solution
This commit is contained in:
Generated
+32
@@ -0,0 +1,32 @@
|
||||
Partial Class APCSheetReviewHeader_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,34 @@
|
||||
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 APCSheetReviewHeader_VC
|
||||
Inherits Nuvolar.Module.APCSheetReviewHeader_VC
|
||||
|
||||
Dim _WaitFormClass As New WaitFormClass
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
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
|
||||
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
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
Partial Class APCSheetVC
|
||||
|
||||
<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,34 @@
|
||||
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 APCSheetVC
|
||||
Inherits Nuvolar.Module.APCSheetVC
|
||||
Dim _WaitFormClass As New WaitFormClass
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
End Sub
|
||||
|
||||
Protected Overloads Overrides Sub OnActivated()
|
||||
MyBase.OnActivated()
|
||||
AddHandler DoWork, AddressOf _WaitFormClass.DoWork
|
||||
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
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
Partial Class CertificateOfContractVC
|
||||
|
||||
<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
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
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 Nuvolar.Module
|
||||
Public Class CertificateOfContractVC
|
||||
Inherits Nuvolar.Module.CertificateOfContractVC
|
||||
Dim _WaitFormClass As New WaitFormClass
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
|
||||
'This call is required by the Component Designer.
|
||||
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
|
||||
End Class
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
Partial Class ContractRowsFreeVC
|
||||
|
||||
<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
|
||||
+113
@@ -0,0 +1,113 @@
|
||||
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.Win.Editors
|
||||
Imports DevExpress.Xpo
|
||||
Imports DevExpress.ExpressApp.SystemModule
|
||||
Imports DevExpress.Data.Filtering
|
||||
|
||||
Public Class ContractRowsFreeVC
|
||||
Inherits DevExpress.ExpressApp.ViewController(Of ListView)
|
||||
|
||||
Private _GridListEditor As GridListEditor
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
|
||||
'This call is required by the Component Designer.
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Overrides Sub OnDeactivated()
|
||||
MyBase.OnDeactivated()
|
||||
If View.Id = "Contracts_ContractRows_ListView" Then
|
||||
If _GridListEditor IsNot Nothing Then
|
||||
Dim _GridView As XafGridView = TryCast(_GridListEditor.GridView, XafGridView)
|
||||
AddHandler _GridView.ShowingEditor, AddressOf _GridView_ShowingEditor
|
||||
End If
|
||||
End If
|
||||
If View.Id = "StorageInHeader_StorageInRows_ListView" Then
|
||||
If _GridListEditor IsNot Nothing Then
|
||||
RemoveHandler _GridListEditor.GridView.CellValueChanged, AddressOf Contracts_ContractRows_ListView_CellValueChanged
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Overrides Sub OnViewControlsCreated()
|
||||
MyBase.OnViewControlsCreated()
|
||||
If View.Id = "Contracts_ContractRows_ListView" Or _
|
||||
View.Id = "ContractRows_ListView_Invoice_Not_MileStone" Then
|
||||
Dim _ListView As ListView = CType(View, ListView)
|
||||
Dim _PropertyCollectionSource As PropertyCollectionSource = TryCast(_ListView.CollectionSource, PropertyCollectionSource)
|
||||
_GridListEditor = TryCast(View.Editor, GridListEditor)
|
||||
If _GridListEditor IsNot Nothing Then
|
||||
AddHandler _GridListEditor.GridView.CellValueChanged, AddressOf Contracts_ContractRows_ListView_CellValueChanged
|
||||
End If
|
||||
If _GridListEditor IsNot Nothing Then
|
||||
'_GridListEditor.AllowEdit = True
|
||||
Dim _GridView As XafGridView = TryCast(_GridListEditor.GridView, XafGridView)
|
||||
If _GridView IsNot Nothing Then
|
||||
AddHandler _GridView.ShowingEditor, AddressOf _GridView_ShowingEditor
|
||||
End If
|
||||
'For i As Integer = 0 To _GridListEditor.Columns.Count - 1
|
||||
' If _GridListEditor.GridView.Columns(i).FieldName <> "NettoPriceHUF" And _
|
||||
' _GridListEditor.GridView.Columns(i).FieldName <> "NettoPriceDEV" And _
|
||||
' _GridListEditor.GridView.Columns(i).FieldName <> "ShortName" And _
|
||||
' _GridListEditor.GridView.Columns(i).FieldName <> "Description" And _
|
||||
' _GridListEditor.GridView.Columns(i).FieldName <> "InvoicePeriod" And _
|
||||
' _GridListEditor.GridView.Columns(i).FieldName <> "Controlling!" And _
|
||||
' _GridListEditor.GridView.Columns(i).FieldName <> "PaymentOption!" And _
|
||||
' _GridListEditor.GridView.Columns(i).FieldName <> "VAT!" And _
|
||||
' _GridListEditor.GridView.Columns(i).FieldName <> "CurrencyRate" And _
|
||||
' _GridListEditor.GridView.Columns(i).FieldName <> "QTT" And _
|
||||
' _GridListEditor.GridView.Columns(i).FieldName <> "DateExecution" 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 _GridView_ShowingEditor(ender As Object, e As System.ComponentModel.CancelEventArgs)
|
||||
Dim _ocur As Xpo.XPObjectSpace = View.ObjectSpace
|
||||
Dim _ContractRows As ContractRows = TryCast(View.SelectedObjects(0), ContractRows)
|
||||
If _ContractRows.RegistryRowsFinancialControlling IsNot Nothing Or _
|
||||
_ContractRows.CertificateofContractRows IsNot Nothing Then
|
||||
e.Cancel = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub Contracts_ContractRows_ListView_CellValueChanged(sender As Object, e As DevExpress.XtraGrid.Views.Base.CellValueChangedEventArgs)
|
||||
Dim nestedFrame As NestedFrame = TryCast(Frame, NestedFrame)
|
||||
If nestedFrame IsNot Nothing Then
|
||||
Try
|
||||
Dim parentView As View = nestedFrame.View
|
||||
If parentView IsNot Nothing Then
|
||||
parentView.ObjectSpace.CommitChanges()
|
||||
End If
|
||||
|
||||
If Frame.GetController(Of RefreshController).RefreshAction.Active Then
|
||||
Frame.GetController(Of RefreshController).RefreshAction.DoExecute()
|
||||
End If
|
||||
Catch exp As Exception
|
||||
MsgBox(exp.Message)
|
||||
End Try
|
||||
Else
|
||||
Frame.View.ObjectSpace.CommitChanges()
|
||||
|
||||
If Frame.GetController(Of RefreshController).RefreshAction.Active Then
|
||||
Frame.GetController(Of RefreshController).RefreshAction.DoExecute()
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
Partial Class ContractRowsVC
|
||||
|
||||
<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()
|
||||
'
|
||||
'ContractRowsVC
|
||||
'
|
||||
Me.TargetObjectType = GetType(Nuvolar.[Module].ContractRows)
|
||||
Me.TypeOfView = GetType(DevExpress.ExpressApp.View)
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
+123
@@ -0,0 +1,123 @@
|
||||
<?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="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
</root>
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
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
|
||||
Imports DevExpress.ExpressApp.Win.Editors
|
||||
Imports DevExpress.Data.Filtering
|
||||
|
||||
Public Class ContractRowsVC
|
||||
Inherits Nuvolar.Module.ContractRowsVC
|
||||
Dim _WaitFormClass As New WaitFormClass
|
||||
'###################################################################################################################################
|
||||
'############################Ez a controller a ContractRows típusra van irányítva!##################################################
|
||||
'###################################################################################################################################
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
|
||||
'This call is required by the Component Designer.
|
||||
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
|
||||
Protected Overrides Sub OnViewControlsCreated()
|
||||
MyBase.OnViewControlsCreated()
|
||||
|
||||
If TryCast(View, DetailView) IsNot Nothing Then
|
||||
'-- a controlling lookupeditorjának elkapása a registryrowsfinancialcontrolling_detailview-n, hogy meg lehessen szûrni a lookuplistview-t (csak kiadás vagy nem beállított jöhet fel)
|
||||
Dim _ControllingLookupEditor As PropertyEditor = TryCast(View, DetailView).FindItem("Controlling")
|
||||
AddHandler TryCast(_ControllingLookupEditor, LookupPropertyEditor).Control.Popup, AddressOf lookuppropertyeditor_popup
|
||||
End If
|
||||
End Sub
|
||||
Private Sub lookuppropertyeditor_popup(sender As Object, e As EventArgs)
|
||||
TryCast(sender, LookupEdit).PopupForm.ListView.CollectionSource.Criteria.Remove("ControllingFilter")
|
||||
If TryCast(View.SelectedObjects(0), ContractRows).Contracts.ContractTemplate.PartnerType = ePartnerType.eReceivables Then
|
||||
TryCast(sender, LookupEdit).PopupForm.ListView.CollectionSource.Criteria.Add("ControllingFilter", CriteriaOperator.Parse("Controllingdirection In (0, -1)"))
|
||||
Else
|
||||
TryCast(sender, LookupEdit).PopupForm.ListView.CollectionSource.Criteria.Add("ControllingFilter", CriteriaOperator.Parse("Controllingdirection In (1, -1)"))
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
+83
@@ -0,0 +1,83 @@
|
||||
Partial Class ContractTemplate_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.aContractTemplate_InsertDocVariable = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aContractTemplate_InsertAPCSheetDocVariable = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aInsertRTFText = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
'
|
||||
'aContractTemplate_InsertDocVariable
|
||||
'
|
||||
Me.aContractTemplate_InsertDocVariable.Caption = "aContractTemplate_InsertDocVariable"
|
||||
Me.aContractTemplate_InsertDocVariable.Category = "aContractTemplate_InsertDocVariable"
|
||||
Me.aContractTemplate_InsertDocVariable.ConfirmationMessage = Nothing
|
||||
Me.aContractTemplate_InsertDocVariable.Id = "aContractTemplate_InsertDocVariable"
|
||||
Me.aContractTemplate_InsertDocVariable.ImageName = Nothing
|
||||
Me.aContractTemplate_InsertDocVariable.Shortcut = Nothing
|
||||
Me.aContractTemplate_InsertDocVariable.Tag = Nothing
|
||||
Me.aContractTemplate_InsertDocVariable.TargetObjectsCriteria = Nothing
|
||||
Me.aContractTemplate_InsertDocVariable.TargetObjectType = GetType(Nuvolar.[Module].ContractTemplate)
|
||||
Me.aContractTemplate_InsertDocVariable.TargetViewId = Nothing
|
||||
Me.aContractTemplate_InsertDocVariable.ToolTip = Nothing
|
||||
Me.aContractTemplate_InsertDocVariable.TypeOfView = Nothing
|
||||
'
|
||||
'aContractTemplate_InsertAPCSheetDocVariable
|
||||
'
|
||||
Me.aContractTemplate_InsertAPCSheetDocVariable.Caption = "aContractTemplate_InsertAPCSheetDocVariable"
|
||||
Me.aContractTemplate_InsertAPCSheetDocVariable.Category = "aContractTemplate_InsertAPCSheetDocVariable"
|
||||
Me.aContractTemplate_InsertAPCSheetDocVariable.ConfirmationMessage = Nothing
|
||||
Me.aContractTemplate_InsertAPCSheetDocVariable.Id = "aContractTemplate_InsertAPCSheetDocVariable"
|
||||
Me.aContractTemplate_InsertAPCSheetDocVariable.ImageName = Nothing
|
||||
Me.aContractTemplate_InsertAPCSheetDocVariable.Shortcut = Nothing
|
||||
Me.aContractTemplate_InsertAPCSheetDocVariable.Tag = Nothing
|
||||
Me.aContractTemplate_InsertAPCSheetDocVariable.TargetObjectsCriteria = Nothing
|
||||
Me.aContractTemplate_InsertAPCSheetDocVariable.TargetObjectType = GetType(Nuvolar.[Module].ContractTemplate)
|
||||
Me.aContractTemplate_InsertAPCSheetDocVariable.TargetViewId = Nothing
|
||||
Me.aContractTemplate_InsertAPCSheetDocVariable.ToolTip = Nothing
|
||||
Me.aContractTemplate_InsertAPCSheetDocVariable.TypeOfView = Nothing
|
||||
'
|
||||
'aInsertRTFText
|
||||
'
|
||||
Me.aInsertRTFText.Caption = "aInsert RTFText"
|
||||
Me.aInsertRTFText.Category = "aInsertRTFText"
|
||||
Me.aInsertRTFText.ConfirmationMessage = Nothing
|
||||
Me.aInsertRTFText.Id = "aInsertRTFText"
|
||||
Me.aInsertRTFText.ImageName = Nothing
|
||||
Me.aInsertRTFText.Shortcut = Nothing
|
||||
Me.aInsertRTFText.Tag = Nothing
|
||||
Me.aInsertRTFText.TargetObjectsCriteria = Nothing
|
||||
Me.aInsertRTFText.TargetViewId = Nothing
|
||||
Me.aInsertRTFText.ToolTip = Nothing
|
||||
Me.aInsertRTFText.TypeOfView = Nothing
|
||||
|
||||
End Sub
|
||||
Friend WithEvents aContractTemplate_InsertDocVariable As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aContractTemplate_InsertAPCSheetDocVariable As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aInsertRTFText As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
|
||||
End Class
|
||||
+132
@@ -0,0 +1,132 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="aContractTemplate_InsertDocVariable.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 56</value>
|
||||
</metadata>
|
||||
<metadata name="aContractTemplate_InsertAPCSheetDocVariable.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>186, 156</value>
|
||||
</metadata>
|
||||
<metadata name="aInsertRTFText.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>496, 156</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
</root>
|
||||
+77
@@ -0,0 +1,77 @@
|
||||
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.Data.Filtering
|
||||
Imports DevExpress.Persistent.BaseImpl
|
||||
|
||||
Public Class ContractTemplate_VC
|
||||
Inherits Nuvolar.Module.ContractTemplate_VC
|
||||
|
||||
Private _RichEditControl As RichEditControl
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
End Sub
|
||||
Protected Overrides Sub OnActivated()
|
||||
MyBase.OnActivated()
|
||||
If View.Id = "ContractTemplate_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 aContractTemplate_InsertDocVariable_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aContractTemplate_InsertDocVariable.Execute
|
||||
Try
|
||||
Dim _ContractTemplate As ContractTemplate = TryCast(View.SelectedObjects(0), ContractTemplate)
|
||||
If _ContractTemplate Is Nothing Then Throw New Exception("*Váratlan hiba történt, a folyamat megszakadt!")
|
||||
If String.IsNullOrEmpty(_ContractTemplate.ContractsProperties) Then Throw New Exception("*Nem lett kiválasztva a kapcsolódó objektum!")
|
||||
_RichEditControl.Document.Fields.Add(_RichEditControl.Document.CaretPosition, "DOCVARIABLE Contracts." + _ContractTemplate.ContractsProperties)
|
||||
_ContractTemplate.ContractsProperties = ""
|
||||
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 Sub aContractTemplate_InsertAPCSheetDocVariable_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aContractTemplate_InsertAPCSheetDocVariable.Execute
|
||||
Try
|
||||
Dim _ContractTemplate As ContractTemplate = TryCast(View.SelectedObjects(0), ContractTemplate)
|
||||
If _ContractTemplate Is Nothing Then Throw New Exception("*Váratlan hiba történt, a folyamat megszakadt!")
|
||||
If String.IsNullOrEmpty(_ContractTemplate.APCSheetByProductsProperties) Then Throw New Exception("*Nem lett kiválasztva a kapcsolódó objektum!")
|
||||
_RichEditControl.Document.Fields.Add(_RichEditControl.Document.CaretPosition, "DOCVARIABLE APCSheetByProducts." + _ContractTemplate.APCSheetByProductsProperties)
|
||||
_ContractTemplate.APCSheetByProductsProperties = ""
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, "Hiba!")
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub aInsertRTFText_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aInsertRTFText.Execute
|
||||
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))
|
||||
Dim _ContractTemplate As ContractTemplate = TryCast(View.SelectedObjects(0), ContractTemplate)
|
||||
|
||||
Dim _DocPos As DocumentPosition = _RichEditControl.Document.CaretPosition
|
||||
|
||||
_RichEditControl.Document.InsertHtmlText(_DocPos, _RTFCopy.RTFString)
|
||||
End Sub
|
||||
End Class
|
||||
Generated
+106
@@ -0,0 +1,106 @@
|
||||
Partial Class ContractsVC
|
||||
|
||||
<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.aContractsRTFRestoreTemplate = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aContractsRTFReplaceValue = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aContractsTemplateRTFSelectField = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
|
||||
Me.aInsertRTFTextContracts = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
'
|
||||
'aContractsRTFRestoreTemplate
|
||||
'
|
||||
Me.aContractsRTFRestoreTemplate.Caption = "aContracts RTFRestore Template"
|
||||
Me.aContractsRTFRestoreTemplate.Category = "aContractsRTFRestoreTemplate"
|
||||
Me.aContractsRTFRestoreTemplate.ConfirmationMessage = Nothing
|
||||
Me.aContractsRTFRestoreTemplate.Id = "aContractsRTFRestoreTemplate"
|
||||
Me.aContractsRTFRestoreTemplate.ImageName = Nothing
|
||||
Me.aContractsRTFRestoreTemplate.Shortcut = Nothing
|
||||
Me.aContractsRTFRestoreTemplate.Tag = Nothing
|
||||
Me.aContractsRTFRestoreTemplate.TargetObjectsCriteria = Nothing
|
||||
Me.aContractsRTFRestoreTemplate.TargetObjectType = GetType(Nuvolar.[Module].Contracts)
|
||||
Me.aContractsRTFRestoreTemplate.TargetViewId = Nothing
|
||||
Me.aContractsRTFRestoreTemplate.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
|
||||
Me.aContractsRTFRestoreTemplate.ToolTip = Nothing
|
||||
Me.aContractsRTFRestoreTemplate.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
|
||||
'
|
||||
'aContractsRTFReplaceValue
|
||||
'
|
||||
Me.aContractsRTFReplaceValue.Caption = "aContracts RTFReplace Value"
|
||||
Me.aContractsRTFReplaceValue.Category = "aContractsRTFReplaceValue"
|
||||
Me.aContractsRTFReplaceValue.ConfirmationMessage = Nothing
|
||||
Me.aContractsRTFReplaceValue.Id = "aContractsRTFReplaceValue"
|
||||
Me.aContractsRTFReplaceValue.ImageName = Nothing
|
||||
Me.aContractsRTFReplaceValue.Shortcut = Nothing
|
||||
Me.aContractsRTFReplaceValue.Tag = Nothing
|
||||
Me.aContractsRTFReplaceValue.TargetObjectsCriteria = Nothing
|
||||
Me.aContractsRTFReplaceValue.TargetObjectType = GetType(Nuvolar.[Module].Contracts)
|
||||
Me.aContractsRTFReplaceValue.TargetViewId = Nothing
|
||||
Me.aContractsRTFReplaceValue.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
|
||||
Me.aContractsRTFReplaceValue.ToolTip = Nothing
|
||||
Me.aContractsRTFReplaceValue.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
|
||||
'
|
||||
'aContractsTemplateRTFSelectField
|
||||
'
|
||||
Me.aContractsTemplateRTFSelectField.AcceptButtonCaption = Nothing
|
||||
Me.aContractsTemplateRTFSelectField.CancelButtonCaption = Nothing
|
||||
Me.aContractsTemplateRTFSelectField.Caption = "aContracts Template RTFSelect Field"
|
||||
Me.aContractsTemplateRTFSelectField.Category = "aContractsTemplateRTFSelectField"
|
||||
Me.aContractsTemplateRTFSelectField.ConfirmationMessage = Nothing
|
||||
Me.aContractsTemplateRTFSelectField.Id = "aContractsTemplateRTFSelectField"
|
||||
Me.aContractsTemplateRTFSelectField.ImageName = Nothing
|
||||
Me.aContractsTemplateRTFSelectField.Shortcut = Nothing
|
||||
Me.aContractsTemplateRTFSelectField.Tag = Nothing
|
||||
Me.aContractsTemplateRTFSelectField.TargetObjectsCriteria = Nothing
|
||||
Me.aContractsTemplateRTFSelectField.TargetObjectType = GetType(Nuvolar.[Module].ContractTemplate)
|
||||
Me.aContractsTemplateRTFSelectField.TargetViewId = Nothing
|
||||
Me.aContractsTemplateRTFSelectField.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
|
||||
Me.aContractsTemplateRTFSelectField.ToolTip = Nothing
|
||||
Me.aContractsTemplateRTFSelectField.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
|
||||
'
|
||||
'aInsertRTFTextContracts
|
||||
'
|
||||
Me.aInsertRTFTextContracts.Caption = "aInsert RTFText Contracts"
|
||||
Me.aInsertRTFTextContracts.Category = "aInsertRTFTextContracts"
|
||||
Me.aInsertRTFTextContracts.ConfirmationMessage = Nothing
|
||||
Me.aInsertRTFTextContracts.Id = "aInsertRTFTextContracts"
|
||||
Me.aInsertRTFTextContracts.ImageName = Nothing
|
||||
Me.aInsertRTFTextContracts.Shortcut = Nothing
|
||||
Me.aInsertRTFTextContracts.Tag = Nothing
|
||||
Me.aInsertRTFTextContracts.TargetObjectsCriteria = Nothing
|
||||
Me.aInsertRTFTextContracts.TargetObjectType = GetType(Nuvolar.[Module].Contracts)
|
||||
Me.aInsertRTFTextContracts.TargetViewId = Nothing
|
||||
Me.aInsertRTFTextContracts.ToolTip = Nothing
|
||||
Me.aInsertRTFTextContracts.TypeOfView = Nothing
|
||||
|
||||
End Sub
|
||||
Friend WithEvents aContractsRTFRestoreTemplate As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aContractsRTFReplaceValue As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aContractsTemplateRTFSelectField As DevExpress.ExpressApp.Actions.PopupWindowShowAction
|
||||
Friend WithEvents aInsertRTFTextContracts As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
|
||||
End Class
|
||||
+135
@@ -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="aContractsRTFRestoreTemplate.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>457, 17</value>
|
||||
</metadata>
|
||||
<metadata name="aContractsRTFReplaceValue.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="aContractsTemplateRTFSelectField.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>219, 17</value>
|
||||
</metadata>
|
||||
<metadata name="aInsertRTFTextContracts.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>627, 156</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
</root>
|
||||
+317
@@ -0,0 +1,317 @@
|
||||
Imports System
|
||||
Imports System.ComponentModel
|
||||
Imports System.Collections.Generic
|
||||
Imports System.Diagnostics
|
||||
Imports System.Text
|
||||
Imports System.Security
|
||||
Imports System.Security.Permissions
|
||||
Imports DevExpress.ExpressApp
|
||||
Imports DevExpress.ExpressApp.Actions
|
||||
Imports DevExpress.Persistent.Base
|
||||
Imports DevExpress.ExpressApp.Win.SystemModule
|
||||
Imports DevExpress.ExpressApp.ValidateObjectEventArgs
|
||||
Imports DevExpress.XtraGrid.Views.Grid
|
||||
Imports DevExpress.ExpressApp.Editors
|
||||
Imports DevExpress.ExpressApp.Win.Editors
|
||||
Imports DevExpress.ExpressApp.Security
|
||||
Imports DevExpress.XtraGrid.Columns
|
||||
Imports DevExpress.Data
|
||||
Imports DevExpress.ExpressApp.FileAttachments.Win
|
||||
Imports System.Reflection
|
||||
|
||||
Imports Nuvolar.Module
|
||||
Imports DevExpress.Data.Filtering
|
||||
Imports DevExpress.ExpressApp.Model
|
||||
Imports DevExpress.Xpo
|
||||
|
||||
Public Class ContractsVC
|
||||
Inherits DevExpress.ExpressApp.ViewController
|
||||
Private _GridListEditor As GridListEditor
|
||||
Private _RichEditControl As RichEditControl
|
||||
Private _Contracts As Contracts
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
'This call is required by the Component Designer.
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
End Sub
|
||||
Protected Overrides Sub OnActivated()
|
||||
MyBase.OnActivated()
|
||||
Frame.GetController(Of WinModificationsController).ModificationsHandlingMode = SystemModule.ModificationsHandlingMode.AutoRollback
|
||||
If View.Id Like "Contracts_ListView*" Or View.Id Like "Contract*LookupListView" Then
|
||||
Frame.GetController(Of FileAttachmentListViewController)().Active.SetItemValue("", False)
|
||||
End If
|
||||
If View.Id = "Contracts_DetailView" Then
|
||||
_Contracts = TryCast(View.SelectedObjects(0), Contracts)
|
||||
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
|
||||
Protected Overrides Sub OnViewControlsCreated()
|
||||
MyBase.OnViewControlsCreated()
|
||||
If View.Id = "Contracts_ListView" Then
|
||||
Frame.GetController(Of FileAttachmentListViewController)().Active.SetItemValue("", True)
|
||||
End If
|
||||
End Sub
|
||||
Sub InitQTT_ProcessColumn()
|
||||
For i As Integer = 0 To _GridListEditor.Columns.Count - 1
|
||||
Dim _ColumnWrapper As ColumnWrapper = _GridListEditor.Columns(i)
|
||||
If _ColumnWrapper.PropertyName = "QTT" Then
|
||||
Dim _QTTColumn As GridColumn = _GridListEditor.GridView.Columns("QTT")
|
||||
_QTTColumn.OptionsColumn.AllowEdit = True
|
||||
_QTTColumn.OptionsColumn.AllowFocus = True
|
||||
_QTTColumn.OptionsColumn.ReadOnly = False
|
||||
_QTTColumn.UnboundType = UnboundColumnType.Decimal
|
||||
End If
|
||||
If _ColumnWrapper.PropertyName = "Units" Then
|
||||
Dim _UnitsColumn As GridColumn = _GridListEditor.GridView.Columns("Units")
|
||||
_UnitsColumn.OptionsColumn.AllowEdit = True
|
||||
_UnitsColumn.OptionsColumn.AllowFocus = True
|
||||
_UnitsColumn.OptionsColumn.ReadOnly = False
|
||||
_UnitsColumn.UnboundType = UnboundColumnType.Object
|
||||
End If
|
||||
Exit For
|
||||
Next
|
||||
End Sub
|
||||
Sub view_selectionchanged(ByVal sender As Object, ByVal e As System.EventArgs)
|
||||
Dim _view = TryCast(View, ListView)
|
||||
_GridListEditor = TryCast(_view.Editor, GridListEditor)
|
||||
If _GridListEditor IsNot Nothing Then
|
||||
InitQTT_ProcessColumn()
|
||||
End If
|
||||
End Sub
|
||||
Public Sub _gridView_SelectionChanged(ByVal sender As Object, ByVal e As DevExpress.Data.SelectionChangedEventArgs)
|
||||
Dim _GridView As GridView = TryCast(sender, GridView)
|
||||
Dim _Contracts As Contracts
|
||||
If View.SelectedObjects.Count = 1 Then
|
||||
_Contracts = TryCast(View.SelectedObjects(0), Contracts)
|
||||
If Not _Contracts Is Nothing Then
|
||||
If _Contracts.State = State.Ready Or _Contracts.State = State.Signed Then
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.DeleteObjectsViewController).Active.SetItemValue("", False)
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.DeleteObjectsViewController).Active.SetItemValue("", False)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub aContractsRTFRestoreTemplate_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aContractsRTFRestoreTemplate.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _Contracts As Contracts = TryCast(View.SelectedObjects(0), Contracts)
|
||||
|
||||
If _Contracts IsNot Nothing Then
|
||||
If _Contracts.ContractTemplate IsNot Nothing Then
|
||||
_Contracts.DocumentBody = _Contracts.ContractTemplate.DocumentBody
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Private Sub aContractsRTFReplaceValue_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aContractsRTFReplaceValue.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _Contracts As Contracts = TryCast(View.SelectedObjects(0), Contracts)
|
||||
|
||||
Dim _APCSheetByProducts As APCSheetByProducts = Nothing
|
||||
If _Contracts.ContractTemplate.IsAPCSheet Then
|
||||
_APCSheetByProducts = _ocur.FindObject(Of APCSheetByProducts)(CriteriaOperator.Parse("Contracts=?", _Contracts))
|
||||
End If
|
||||
|
||||
Dim _Fields As DevExpress.XtraRichEdit.API.Native.FieldCollection = _RichEditControl.Document.Fields
|
||||
|
||||
Dim _ContractsProperties As New ArrayList
|
||||
_ContractsProperties.AddRange(TryCast(_Contracts.[GetType](), System.Type).GetProperties())
|
||||
Dim _TemplateFields As New ArrayList
|
||||
For Each _Field As DevExpress.XtraRichEdit.API.Native.Field In _Fields
|
||||
_Field.ShowCodes = True
|
||||
Dim _ActString As String = _RichEditControl.Document.GetText(_Field.CodeRange)
|
||||
If Not _ActString.Contains("FORMTEXT") Then
|
||||
_TemplateFields.Add(_ActString.Replace("DOCVARIABLE ", ""))
|
||||
Else
|
||||
_TemplateFields.Add(_ActString)
|
||||
End If
|
||||
Next
|
||||
|
||||
Dim _TemplateFieldsValue As New ArrayList
|
||||
For Each _ActTemplateField As String In _TemplateFields
|
||||
Dim _FiledLocation() As String = _ActTemplateField.Split(New Char() {"."c}, StringSplitOptions.RemoveEmptyEntries)
|
||||
If _FiledLocation.Length > 0 Then
|
||||
If _FiledLocation(0) = "APCSheetByProducts" Then
|
||||
_TemplateFieldsValue.Add(FieldValue(_FiledLocation, Nothing, _APCSheetByProducts))
|
||||
ElseIf _FiledLocation(0) = "Contracts" Then
|
||||
_TemplateFieldsValue.Add(FieldValue(_FiledLocation, _Contracts, Nothing))
|
||||
Else
|
||||
_TemplateFieldsValue.Add(FieldValue(_FiledLocation, _Contracts, _APCSheetByProducts))
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
Dim _FieldIndex As Int16 = 0
|
||||
_RichEditControl.BeginUpdate()
|
||||
Dim _Document As DevExpress.XtraRichEdit.API.Native.Document = _RichEditControl.Document
|
||||
_Document.BeginUpdate()
|
||||
|
||||
For Each _ActTemplateField As String In _TemplateFields
|
||||
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 = _TemplateFieldsValue(_FieldIndex).ToString
|
||||
Dim _FieldPosition As DevExpress.XtraRichEdit.API.Native.DocumentPosition = field.Range.Start
|
||||
_Document.InsertText(_FieldPosition, _FieldResult)
|
||||
_FieldIndex += 1
|
||||
Next
|
||||
|
||||
For ik = _Document.Fields.Count - 1 To 0 Step -1
|
||||
Dim field As DevExpress.XtraRichEdit.API.Native.Field = _Fields(ik)
|
||||
_Document.Delete(field.Range)
|
||||
Next
|
||||
|
||||
_Document.EndUpdate()
|
||||
_RichEditControl.EndUpdate()
|
||||
End Sub
|
||||
Private Function FieldValue(_FiledLocation As String(), _Contracts As Contracts, _APCSheetByProducts As APCSheetByProducts) As String
|
||||
Dim _Value As String = ""
|
||||
Dim _ObjectType As Type = Nothing
|
||||
Dim _Object As Object = Nothing
|
||||
Dim _ikStart As Long = 0
|
||||
|
||||
Try
|
||||
|
||||
|
||||
If _Contracts Is Nothing And _APCSheetByProducts Is Nothing Then
|
||||
_Value = "[Nincs beállítva]"
|
||||
ElseIf _Contracts IsNot Nothing And _APCSheetByProducts Is Nothing Then
|
||||
_ObjectType = _Contracts.[GetType]()
|
||||
_Object = _Contracts
|
||||
_ikStart = 1
|
||||
ElseIf _Contracts Is Nothing And _APCSheetByProducts IsNot Nothing Then
|
||||
_ObjectType = _APCSheetByProducts.[GetType]()
|
||||
_Object = _APCSheetByProducts
|
||||
_ikStart = 1
|
||||
Else
|
||||
_ObjectType = _Contracts.[GetType]()
|
||||
_Object = _Contracts
|
||||
_ikStart = 0
|
||||
End If
|
||||
|
||||
If String.IsNullOrEmpty(_Value) Then
|
||||
For _ik = _ikStart To _FiledLocation.Length - 1
|
||||
If _ik < _FiledLocation.Length - 1 Then
|
||||
|
||||
Dim _PropertyInfo As PropertyInfo = _ObjectType.GetProperty(_FiledLocation(_ik))
|
||||
|
||||
If _PropertyInfo IsNot Nothing Then
|
||||
_Object = _PropertyInfo.GetValue(_Object, Nothing)
|
||||
If _Object IsNot Nothing Then
|
||||
_ObjectType = _Object.[GetType]()
|
||||
Else
|
||||
_Value = "[Nincs beállítva]"
|
||||
End If
|
||||
Else
|
||||
_Value = "[Nincs beállítva]"
|
||||
End If
|
||||
Else
|
||||
Dim _PropertyInfo As PropertyInfo = _ObjectType.GetProperty(_FiledLocation(_ik))
|
||||
|
||||
If _PropertyInfo IsNot Nothing Then
|
||||
_Object = _PropertyInfo.GetValue(_Object, Nothing)
|
||||
If _Object IsNot Nothing Then
|
||||
|
||||
If TryCast(_Object, IList) IsNot Nothing Then
|
||||
|
||||
For Each _ListElement In TryCast(_Object, IList)
|
||||
_Value += _ListElement.ToString & " "
|
||||
Next
|
||||
Else
|
||||
_Value = _Object.ToString
|
||||
|
||||
Dim _IModelClass As IModelClass = Application.Model.BOModel.GetNode(_ObjectType.FullName)
|
||||
For Each _OwnMembers In _IModelClass.OwnMembers
|
||||
|
||||
If TryCast(_OwnMembers, IModelMember) IsNot Nothing Then
|
||||
If TryCast(_OwnMembers, IModelMember).Name = _PropertyInfo.Name Then
|
||||
Try
|
||||
If LTrim(RTrim(TryCast(_OwnMembers, IModelMember).DisplayFormat)) <> "" Then
|
||||
_Value = String.Format(TryCast(_OwnMembers, IModelMember).DisplayFormat, _Object)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
Else
|
||||
_Value = "[Nincs beállítva]"
|
||||
End If
|
||||
Else
|
||||
_Value = "[Nincs beállítva]"
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
Return _Value
|
||||
End Function
|
||||
Sub RecursivePropertyInfo(_Property_In As Object, _ArrayList_Value_In As ArrayList, _TagArray_In As String(), _TagArrayIndex As Int16, _ValueIndex_In As Int16)
|
||||
If _Property_In IsNot Nothing Then
|
||||
Dim _ObjctType As Type = _Property_In.[GetType]()
|
||||
|
||||
For Each _PropertyInfo_In As PropertyInfo In _ObjctType.GetProperties()
|
||||
Dim _TagArrayIndex_new As Int16 = 0
|
||||
If _TagArray_In.Length = 2 Then
|
||||
_TagArrayIndex_new = 1
|
||||
Else
|
||||
_TagArrayIndex_new = _TagArrayIndex + 1
|
||||
End If
|
||||
If _PropertyInfo_In.Name = _TagArray_In(_TagArrayIndex_new) Then
|
||||
|
||||
If _TagArray_In.Length - 1 = _TagArrayIndex + 1 Then
|
||||
_ArrayList_Value_In.Add(_PropertyInfo_In.GetValue(_Property_In, Nothing))
|
||||
Exit For
|
||||
Else
|
||||
RecursivePropertyInfo(_PropertyInfo_In.GetValue(_Property_In, Nothing), _ArrayList_Value_In, _TagArray_In, _TagArrayIndex + 1, _ValueIndex_In)
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
If _ArrayList_Value_In.Count < _ValueIndex_In Then _ArrayList_Value_In.Add(TagBuilder(_TagArray_In))
|
||||
Else
|
||||
_ArrayList_Value_In.Add(TagBuilder(_TagArray_In))
|
||||
End If
|
||||
End Sub
|
||||
Function TagBuilder(_TagArray_In As String()) As String
|
||||
Dim _ActTag As New StringBuilder
|
||||
_ActTag.Append("[")
|
||||
For Each _TTag As String In _TagArray_In
|
||||
_ActTag.Append(_TTag + ".")
|
||||
Next
|
||||
_ActTag.Append("]")
|
||||
Return (_ActTag.ToString).Remove(_ActTag.ToString.Length - 2, 1)
|
||||
End Function
|
||||
'((_PropertyInfo_In.GetValue(_Property_In, Nothing)).[GetType]()).GetProperties().Length > 0 And
|
||||
'If (((_PropertyInfo_In.GetValue(_Property_In, Nothing)).[GetType]().ToString.Split(New Char() {"."c}, StringSplitOptions.RemoveEmptyEntries)))(0) = "Nuvolar" Then
|
||||
' RecursivePropertyInfo(_PropertyInfo_In.GetValue(_Property_In, Nothing), _RecursionLevel + 1, _ArrayList_Name_In, _ArrayList_Value_In)
|
||||
'End If
|
||||
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 aInsertRTFTextContracts_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aInsertRTFTextContracts.Execute
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _User As DevExpress.Persistent.BaseImpl.User = _onew.GetObjectByKey(Of DevExpress.Persistent.BaseImpl.User)(_onew.GetKeyValue(SecuritySystem.CurrentUser))
|
||||
Dim _RTFCopy As RTFCopy = _onew.FindObject(Of RTFCopy)(CriteriaOperator.Parse("UserCreated=?", _User))
|
||||
Dim _Contracts As Contracts = TryCast(View.SelectedObjects(0), Contracts)
|
||||
|
||||
Dim _DocPos As API.Native.DocumentPosition = _RichEditControl.Document.CaretPosition
|
||||
|
||||
_RichEditControl.Document.InsertHtmlText(_DocPos, _RTFCopy.RTFString)
|
||||
End Sub
|
||||
End Class
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
Partial Class DeliveryNoteInVC
|
||||
|
||||
<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
|
||||
+87
@@ -0,0 +1,87 @@
|
||||
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.Win.Editors
|
||||
|
||||
Public Class DeliveryNoteInVC
|
||||
Inherits Nuvolar.Module.DeliveryNoteInVC
|
||||
Dim _WaitFormClass As New WaitFormClass
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
|
||||
'This call is required by the Component Designer.
|
||||
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
|
||||
|
||||
If View.Id = "DeliveryNoteInHeader_DetailView" Then
|
||||
AddHandler View.ControlsCreated, AddressOf DeliveryNoteInHeader_DetailView_ControlCreated
|
||||
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 DeliveryNoteInHeader_DetailView_ControlCreated(sender As Object, e As EventArgs)
|
||||
If View.Id = "DeliveryNoteInHeader_DetailView" Then
|
||||
Dim _row_Products_Editor As DevExpress.ExpressApp.Win.Editors.LookupPropertyEditor
|
||||
_row_Products_Editor = TryCast(View, DetailView).FindItem("row_Products")
|
||||
|
||||
AddHandler _row_Products_Editor.ControlValueChanged, AddressOf _row_Products_Editor_ControlValueChanged
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub _row_Products_Editor_ControlValueChanged(sender As Object, e As EventArgs)
|
||||
Dim _row_QTT As DevExpress.ExpressApp.Win.Editors.DoublePropertyEditor
|
||||
_row_QTT = TryCast(View, DetailView).FindItem("row_QTT")
|
||||
If _row_QTT IsNot Nothing Then
|
||||
Dim _row_Products_Editor As DevExpress.ExpressApp.Win.Editors.LookupPropertyEditor
|
||||
_row_Products_Editor = TryCast(View, DetailView).FindItem("row_Products")
|
||||
If _row_Products_Editor IsNot Nothing Then
|
||||
Dim _Products As Nuvolar.Module.Products = TryCast(_row_Products_Editor.ControlValue, Nuvolar.Module.Products)
|
||||
If _Products IsNot Nothing Then
|
||||
Dim _SpinEdit As DevExpress.XtraEditors.SpinEdit
|
||||
_SpinEdit = TryCast(_row_QTT.Control, DevExpress.XtraEditors.SpinEdit)
|
||||
If _SpinEdit IsNot Nothing Then
|
||||
Select Case _Products.DecimalIn
|
||||
Case 0
|
||||
_SpinEdit.Properties.Mask.EditMask = "#,##0"
|
||||
_SpinEdit.Properties.Mask.UseMaskAsDisplayFormat = True
|
||||
Case 1
|
||||
_SpinEdit.Properties.Mask.EditMask = "#,##0.0"
|
||||
_SpinEdit.Properties.Mask.UseMaskAsDisplayFormat = True
|
||||
Case 2
|
||||
_SpinEdit.Properties.Mask.EditMask = "#,##0.00"
|
||||
_SpinEdit.Properties.Mask.UseMaskAsDisplayFormat = True
|
||||
Case 3
|
||||
_SpinEdit.Properties.Mask.EditMask = "#,##0.000"
|
||||
_SpinEdit.Properties.Mask.UseMaskAsDisplayFormat = True
|
||||
Case 4
|
||||
_SpinEdit.Properties.Mask.EditMask = "#,##0.0000"
|
||||
_SpinEdit.Properties.Mask.UseMaskAsDisplayFormat = True
|
||||
Case Else
|
||||
_SpinEdit.Properties.Mask.EditMask = ""
|
||||
_SpinEdit.Properties.Mask.UseMaskAsDisplayFormat = False
|
||||
End Select
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
Partial Class DeliveryNoteOutVC
|
||||
|
||||
<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
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
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.Win.Editors
|
||||
|
||||
Public Class DeliveryNoteOutVC
|
||||
Inherits DevExpress.ExpressApp.ViewController(Of ListView)
|
||||
Private _GridListEditor As GridListEditor
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
|
||||
End Sub
|
||||
Protected Overrides Sub OnViewControlsCreated()
|
||||
MyBase.OnViewControlsCreated()
|
||||
'If View.Id = "StorageOutRowsInRows_ListView_DeliveryNote_OrderIn" Or _
|
||||
' View.Id = "StorageOutRowsInRows_ListView_DeliveryNote_Transfer" Or _
|
||||
' View.Id = "DeliveryNoteOutRows_ListView_Invoice" Then
|
||||
' _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 <> "QTT_Will" 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
|
||||
End Class
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
Partial Class IntrastatHeader_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
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
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 IntrastatHeader_VC
|
||||
Inherits Nuvolar.Module.IntrastatHeader_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
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
Partial Class CRMEstateStatisticsVC
|
||||
|
||||
<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
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
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.PivotGrid.Win
|
||||
Imports DevExpress.XtraPivotGrid
|
||||
Imports DevExpress.ExpressApp.Utils
|
||||
|
||||
Public Class CRMEstateStatisticsVC
|
||||
Inherits Nuvolar.Module.CRMEstateStatisticsVC
|
||||
Dim _WaitFormClass as New WaitFormClass
|
||||
Private _PivotGridListEditor As PivotGridListEditor
|
||||
Private _PivotGrdidControl As PivotGridControl
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
|
||||
'This call is required by the Component Designer.
|
||||
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
|
||||
Protected Overrides Sub OnViewControlsCreated()
|
||||
MyBase.OnViewControlsCreated()
|
||||
If View.Id = "CRMEstateStatistics_ListView_Pivot" Then
|
||||
_PivotGridListEditor = TryCast(TryCast(View, ListView).Editor, PivotGridListEditor)
|
||||
|
||||
If _PivotGridListEditor IsNot Nothing Then
|
||||
_PivotGrdidControl = _PivotGridListEditor.PivotGridControl
|
||||
AddHandler _PivotGrdidControl.FieldValueDisplayText, AddressOf PivotGridControl_FieldValueDisplayText
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Private Sub PivotGridControl_FieldValueDisplayText(sender As Object, e As PivotFieldDisplayTextEventArgs)
|
||||
If e.Field IsNot Nothing Then
|
||||
If e.Field.Name = "Field_Immovables.ImmovablesTypes" Then
|
||||
e.DisplayText = CaptionHelper.GetLocalizedText("Enums\Nuvolar.Module.eImmovablesTypes", e.DisplayText.ToString)
|
||||
End If
|
||||
If e.Field.Name = "Field_Immovables.ImmovableSoldState" Then
|
||||
e.DisplayText = CaptionHelper.GetLocalizedText("Enums\Nuvolar.Module.eImmovableSoldState", e.DisplayText.ToString)
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
Generated
+82
@@ -0,0 +1,82 @@
|
||||
Partial Class CRMEstateVC
|
||||
|
||||
<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.aViewEMail_CRMEstate = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aSendEMail_CRMEstate = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aReplyEmail_CRMEstate = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
'
|
||||
'aViewEMail_CRMEstate
|
||||
'
|
||||
Me.aViewEMail_CRMEstate.Caption = "aViewEMail_CRMEstate"
|
||||
Me.aViewEMail_CRMEstate.ConfirmationMessage = Nothing
|
||||
Me.aViewEMail_CRMEstate.Id = "aViewEMail_CRMEstate"
|
||||
Me.aViewEMail_CRMEstate.ImageName = "mail_view"
|
||||
Me.aViewEMail_CRMEstate.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
|
||||
Me.aViewEMail_CRMEstate.Shortcut = Nothing
|
||||
Me.aViewEMail_CRMEstate.Tag = Nothing
|
||||
Me.aViewEMail_CRMEstate.TargetObjectsCriteria = "EventType=2 OR EventType=3"
|
||||
Me.aViewEMail_CRMEstate.TargetObjectType = GetType(Nuvolar.[Module].CRMEstate_Leads_Activity)
|
||||
Me.aViewEMail_CRMEstate.TargetViewId = Nothing
|
||||
Me.aViewEMail_CRMEstate.ToolTip = Nothing
|
||||
Me.aViewEMail_CRMEstate.TypeOfView = Nothing
|
||||
'
|
||||
'aSendEMail_CRMEstate
|
||||
'
|
||||
Me.aSendEMail_CRMEstate.Caption = "aSendEMail_CRMEstate"
|
||||
Me.aSendEMail_CRMEstate.ConfirmationMessage = Nothing
|
||||
Me.aSendEMail_CRMEstate.Id = "aSendEMail_CRMEstate"
|
||||
Me.aSendEMail_CRMEstate.ImageName = "mail_new"
|
||||
Me.aSendEMail_CRMEstate.Shortcut = Nothing
|
||||
Me.aSendEMail_CRMEstate.Tag = Nothing
|
||||
Me.aSendEMail_CRMEstate.TargetObjectsCriteria = Nothing
|
||||
Me.aSendEMail_CRMEstate.TargetObjectType = GetType(Nuvolar.[Module].CRMEstate_Leads_Activity)
|
||||
Me.aSendEMail_CRMEstate.TargetViewId = Nothing
|
||||
Me.aSendEMail_CRMEstate.ToolTip = Nothing
|
||||
Me.aSendEMail_CRMEstate.TypeOfView = Nothing
|
||||
'
|
||||
'aReplyEmail_CRMEstate
|
||||
'
|
||||
Me.aReplyEmail_CRMEstate.Caption = "aReplyEmail_CRMEstate"
|
||||
Me.aReplyEmail_CRMEstate.ConfirmationMessage = Nothing
|
||||
Me.aReplyEmail_CRMEstate.Id = "aReplyEmail_CRMEstate"
|
||||
Me.aReplyEmail_CRMEstate.ImageName = "mail_write"
|
||||
Me.aReplyEmail_CRMEstate.Shortcut = Nothing
|
||||
Me.aReplyEmail_CRMEstate.Tag = Nothing
|
||||
Me.aReplyEmail_CRMEstate.TargetObjectsCriteria = Nothing
|
||||
Me.aReplyEmail_CRMEstate.TargetObjectType = GetType(Nuvolar.[Module].Win.OutlookEMail)
|
||||
Me.aReplyEmail_CRMEstate.TargetViewId = "OutlookEMail_DetailView_View"
|
||||
Me.aReplyEmail_CRMEstate.ToolTip = Nothing
|
||||
Me.aReplyEmail_CRMEstate.TypeOfView = Nothing
|
||||
|
||||
End Sub
|
||||
Friend WithEvents aViewEMail_CRMEstate As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aSendEMail_CRMEstate As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aReplyEmail_CRMEstate As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
|
||||
End Class
|
||||
+132
@@ -0,0 +1,132 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="aViewEMail_CRMEstate.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>750, 233</value>
|
||||
</metadata>
|
||||
<metadata name="aSendEMail_CRMEstate.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>738, 180</value>
|
||||
</metadata>
|
||||
<metadata name="aReplyEmail_CRMEstate.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>845, 336</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
</root>
|
||||
+227
@@ -0,0 +1,227 @@
|
||||
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.CloneObject
|
||||
Imports DevExpress.ExpressApp.Editors
|
||||
|
||||
Public Class CRMEstateVC
|
||||
Inherits Nuvolar.Module.CRMEstateVC
|
||||
Private _GridListEditor As GridListEditor
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
End Sub
|
||||
Protected Overrides Sub OnViewControlsCreated()
|
||||
MyBase.OnViewControlsCreated()
|
||||
|
||||
|
||||
End Sub
|
||||
Protected Overrides Sub OnActivated()
|
||||
MyBase.OnActivated()
|
||||
AddHandler CreateReservationReminder, AddressOf _CreateReservationReminder
|
||||
If View.Id = "CRMEstate_Leads_CRMEstate_Leads_Immovables_ListView" Or View.Id = "CRMEstate_Opportunity_CRMEstate_Opportunity_Immovables_ListView" Then
|
||||
Frame.GetController(Of DevExpress.ExpressApp.Win.SystemModule.WinModificationsController).ModificationsHandlingMode = ModificationsHandlingMode.AutoCommit
|
||||
End If
|
||||
If View.Id = "CRMEstate_Leads_CRMEstate_Leads_Activity_ListView" Then
|
||||
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of ModificationsController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of LinkUnlinkController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", False)
|
||||
End If
|
||||
If View.Id = "OutlookEMail_DetailView_View" Then
|
||||
Frame.GetController(Of ModificationsController).Active.SetItemValue("", False)
|
||||
End If
|
||||
If View.Id = "CRMEstate_Leads_DetailView" Then
|
||||
For Each editor As PropertyEditor In (CType(View, DetailView)).GetItems(Of PropertyEditor)()
|
||||
|
||||
If editor.PropertyName = "FirstName" Then
|
||||
AddHandler editor.ControlCreated, AddressOf editor_FirstName
|
||||
End If
|
||||
If editor.PropertyName = "LastName" Then
|
||||
AddHandler editor.ControlCreated, AddressOf editor_LastName
|
||||
End If
|
||||
Next editor
|
||||
End If
|
||||
'If View.Id = "CRMEstate_Opportunity_Payment_Forecast_DetailView" Then
|
||||
' Dim _CRMEstate_Opportunity_Payment_Forecast As CRMEstate_Opportunity_Payment_Forecast = TryCast(View.SelectedObjects(0), CRMEstate_Opportunity_Payment_Forecast)
|
||||
' If _CRMEstate_Opportunity_Payment_Forecast.CurrencyName.ShortName = "HUF" Then
|
||||
' Dim _SumPriceNettoHUF_ViewItem As DevExpress.ExpressApp.Editors.ViewItem = TryCast(View, DetailView).FindItem("SumPriceNettoHUF")
|
||||
' Dim _DoublePropertyEditor_HUF As DevExpress.ExpressApp.Win.Editors.DoublePropertyEditor = TryCast(_SumPriceNettoHUF_ViewItem, DevExpress.ExpressApp.Win.Editors.DoublePropertyEditor)
|
||||
' AddHandler _DoublePropertyEditor_HUF.ControlValueChanged, AddressOf DoublePropertyEditor_HUF_ControlValueChanged
|
||||
' End If
|
||||
|
||||
'End If
|
||||
End Sub
|
||||
Protected Overrides Sub OnDeactivated()
|
||||
MyBase.OnDeactivated()
|
||||
If View.Id = "CRMEstate_Leads_CRMEstate_Leads_Immovables_ListView" Or View.Id = "CRMEstate_Opportunity_CRMEstate_Opportunity_Immovables_ListView" Then
|
||||
Frame.GetController(Of DevExpress.ExpressApp.Win.SystemModule.WinModificationsController).ModificationsHandlingMode = ModificationsHandlingMode.Confirmation
|
||||
End If
|
||||
If View.Id = "CRMEstate_Leads_CRMEstate_Leads_Activity_ListView" Then
|
||||
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of ModificationsController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of LinkUnlinkController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", True)
|
||||
End If
|
||||
If View.Id = "OutlookEMail_DetailView_View" Then
|
||||
Frame.GetController(Of ModificationsController).Active.SetItemValue("", True)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Public Sub _CreateReservationReminder(ByVal _CRMEstate_Leads_Immovables_Reservation As CRMEstate_Leads_Immovables_Reservation)
|
||||
Dim _OutlookApp As New Outlook.Application()
|
||||
Dim _OutlookNameSpace As Outlook.NameSpace = _OutlookApp.GetNamespace("MAPI")
|
||||
Dim _NewTask As Outlook.TaskItem = _OutlookApp.CreateItem(Outlook.OlItemType.olTaskItem)
|
||||
Dim _Date As New DateTime(_CRMEstate_Leads_Immovables_Reservation.DateTo.Year, _CRMEstate_Leads_Immovables_Reservation.DateTo.Month, _CRMEstate_Leads_Immovables_Reservation.DateTo.Day, 9, 0, 0)
|
||||
Dim _DueDate As New DateTime(_CRMEstate_Leads_Immovables_Reservation.DateTo.Year, _CRMEstate_Leads_Immovables_Reservation.DateTo.Month, _CRMEstate_Leads_Immovables_Reservation.DateTo.Day, 12, 0, 0)
|
||||
|
||||
_OutlookNameSpace.Logon(, , True, True)
|
||||
_NewTask.ReminderSet = True
|
||||
_NewTask.Body = "Lejáró opcionális foglalás!"
|
||||
_NewTask.DueDate = _DueDate
|
||||
_NewTask.ReminderTime = _Date
|
||||
_NewTask.Subject = _CRMEstate_Leads_Immovables_Reservation.CRMEstate_Leads_Immovables.Immovables.DisplayName
|
||||
_NewTask.UnRead = True
|
||||
_NewTask.Save()
|
||||
|
||||
End Sub
|
||||
Private Sub aViewEMail_CRMEstate_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aViewEMail_CRMEstate.Execute
|
||||
Try
|
||||
Dim _ocur As Xpo.XPObjectSpace = View.ObjectSpace
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _CRMEstate_Leads_Activity As CRMEstate_Leads_Activity = TryCast(View.SelectedObjects(0), CRMEstate_Leads_Activity)
|
||||
If _CRMEstate_Leads_Activity Is Nothing Then Throw New Exception("*Nincs kijelölve egyetlen sor sem!")
|
||||
|
||||
Dim _OutlookEMail As OutlookEMail = _onew.FindObject(Of OutlookEMail)(DevExpress.Data.Filtering.CriteriaOperator.Parse("Oid=?", _CRMEstate_Leads_Activity.Email_Oid))
|
||||
Dim _OutlookEMailIn As OutlookEMailIn = _onew.FindObject(Of OutlookEMailIn)(DevExpress.Data.Filtering.CriteriaOperator.Parse("Oid=?", _CRMEstate_Leads_Activity.Email_Oid))
|
||||
|
||||
If _OutlookEMail Is Nothing And _OutlookEMailIn Is Nothing Then Throw New Exception("*Váratlan hiba történt, a folyamat megszakadt!")
|
||||
|
||||
If _OutlookEMail Is Nothing Then
|
||||
_OutlookEMail = _onew.CreateObject(Of OutlookEMail)()
|
||||
_OutlookEMail.eCRMEstate_Leads = eCRMEstate_Leads.eCRMEstate
|
||||
_OutlookEMail.HTMLBody = _OutlookEMailIn.EmailBody
|
||||
_OutlookEMail.Subject = _OutlookEMailIn.EmailSubject
|
||||
|
||||
For Each _OutlookEMailAttachments As OutlookEMailAttachments In _OutlookEMailIn.OutlookEMailAttachments
|
||||
_OutlookEMail.OutlookEMailAttachments.Add(_OutlookEMailAttachments)
|
||||
Next
|
||||
_OutlookEMail.Recipients = _OutlookEMailIn.ReceiverEmailAdress
|
||||
_OutlookEMail.OutlookEMailIn_Oid = _OutlookEMailIn.Oid.ToString
|
||||
_OutlookEMail.eCRMEstate_Leads = eCRMEstate_Leads.eCRMEstate
|
||||
|
||||
If TryCast(TryCast(TryCast(View, ListView).CollectionSource, PropertyCollectionSource).MasterObject, CRMEstate_Leads) IsNot Nothing Then
|
||||
_OutlookEMail.CRMEstate_Leads = _onew.GetObjectByKey(Of CRMEstate_Leads)(TryCast(TryCast(TryCast(View, ListView).CollectionSource, PropertyCollectionSource).MasterObject, CRMEstate_Leads).Oid)
|
||||
Else
|
||||
_OutlookEMail.CRMEstate_Leads = _onew.GetObjectByKey(Of CRMEstate_Leads)(TryCast(TryCast(TryCast(View, ListView).CollectionSource, PropertyCollectionSource).MasterObject, CRMEstate_Opportunity).CRMEstate_Leads.Oid)
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
e.ShowViewParameters.CreatedView = Application.CreateDetailView(_onew, "OutlookEMail_DetailView_View", False, _OutlookEMail)
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly)
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub aSendEMail_CRMEstate_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aSendEMail_CRMEstate.Execute
|
||||
Try
|
||||
Dim _ocur As Xpo.XPObjectSpace = View.ObjectSpace
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _PropertyCollectionSource As PropertyCollectionSource = TryCast(TryCast(View, ListView).CollectionSource, PropertyCollectionSource)
|
||||
If _PropertyCollectionSource Is Nothing Then Throw New Exception("*Váratlan hiba történt, a folyamat megszakadt!")
|
||||
|
||||
Dim _OutlookEMail As OutlookEMail = _onew.CreateObject(Of OutlookEMail)()
|
||||
|
||||
If TryCast(_PropertyCollectionSource.MasterObject, CRMEstate_Leads) IsNot Nothing Then
|
||||
Dim _CRMEstate_Leads As CRMEstate_Leads = TryCast(_PropertyCollectionSource.MasterObject, CRMEstate_Leads)
|
||||
|
||||
_OutlookEMail.Subject = "< Nincs beállítva >"
|
||||
If _CRMEstate_Leads.EMail = "" Or _CRMEstate_Leads.EMail Is Nothing Then
|
||||
_OutlookEMail.Recipients = "< Nincs beállítva >"
|
||||
Else
|
||||
_OutlookEMail.Recipients = _CRMEstate_Leads.EMail
|
||||
End If
|
||||
_OutlookEMail.eCRMEstate_Leads = eCRMEstate_Leads.eCRMEstate
|
||||
_OutlookEMail.HTMLBody = "Tisztelt " + _CRMEstate_Leads.LastName + " " + _CRMEstate_Leads.FirstName + _
|
||||
"!<P> </P><P> </P><P> </P>Üdvözlettel: " + _CRMEstate_Leads.HRPerson.FullName
|
||||
_OutlookEMail.CRMEstate_Leads = _onew.GetObjectByKey(Of CRMEstate_Leads)(_CRMEstate_Leads.Oid)
|
||||
End If
|
||||
|
||||
If TryCast(_PropertyCollectionSource.MasterObject, CRMEstate_Opportunity) IsNot Nothing Then
|
||||
Dim _CRMEstate_Opportunity As CRMEstate_Opportunity = TryCast(_PropertyCollectionSource.MasterObject, CRMEstate_Opportunity)
|
||||
|
||||
_OutlookEMail.Subject = "< Nincs beállítva >"
|
||||
If _CRMEstate_Opportunity.CRMEstate_Leads.EMail = "" Or _CRMEstate_Opportunity.CRMEstate_Leads.EMail Is Nothing Then
|
||||
_OutlookEMail.Recipients = "< Nincs beállítva >"
|
||||
Else
|
||||
_OutlookEMail.Recipients = _CRMEstate_Opportunity.CRMEstate_Leads.EMail
|
||||
End If
|
||||
_OutlookEMail.eCRMEstate_Leads = eCRMEstate_Leads.eCRMEstate
|
||||
_OutlookEMail.HTMLBody = "Tisztelt " + _CRMEstate_Opportunity.CRMEstate_Leads.LastName + " " + _CRMEstate_Opportunity.CRMEstate_Leads.FirstName + _
|
||||
"!<P> </P><P> </P><P> </P>Üdvözlettel: " + _CRMEstate_Opportunity.CRMEstate_Leads.HRPerson.FullName
|
||||
_OutlookEMail.CRMEstate_Leads = _onew.GetObjectByKey(Of CRMEstate_Leads)(_CRMEstate_Opportunity.CRMEstate_Leads.Oid)
|
||||
End If
|
||||
|
||||
e.ShowViewParameters.CreatedView = Application.CreateDetailView(_onew, "OutlookEMail_DetailView", False, _OutlookEMail)
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly)
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub aReplyEmail_CRMEstate_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aReplyEmail_CRMEstate.Execute
|
||||
Try
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _OutlookEMail As OutlookEMail = TryCast(View.SelectedObjects(0), OutlookEMail)
|
||||
If _OutlookEMail Is Nothing Then Throw New Exception("*Váratlan hiba történt, a folyamat megszakadt!")
|
||||
|
||||
Dim _OutlookEMailIn_old As OutlookEMailIn = _onew.FindObject(Of OutlookEMailIn)(DevExpress.Data.Filtering.CriteriaOperator.Parse("Oid=?", _OutlookEMail.OutlookEMailIn_Oid))
|
||||
If _OutlookEMailIn_old Is Nothing Then Throw New Exception("*Kimenõ e-mail-re nem lehet válaszolni!")
|
||||
|
||||
Dim _OutlookEMail_new As OutlookEMail = _onew.CreateObject(Of OutlookEMail)()
|
||||
|
||||
_OutlookEMail_new.Recipients = _OutlookEMailIn_old.SenderEmailAddress
|
||||
_OutlookEMail_new.Subject = "RE: " + _OutlookEMailIn_old.EmailSubject
|
||||
Dim _HTML_Body As String = "<br><br><p class=""MsoNormal""><span style=""COLOR: #1f497d""><o:p> </o:p></span></p><div><div style=""BORDER-BOTTOM: medium none; BORDER-LEFT:" + _
|
||||
"medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt""><p class=""MsoNormal"" > " + _
|
||||
"<br><b><span style=""FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt"" lang=""HU"">From:</span></b>" + _OutlookEMailIn_old.SenderName + _
|
||||
"<span style=""FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt"" lang=""HU""> " + _OutlookEMailIn_old.SenderEmailAddress + "<br>" + _
|
||||
"<b>Sent:</b>" + _OutlookEMailIn_old.ReceivedTime.ToString + "<br><b>To:</b>" + _OutlookEMailIn_old.ReceiverEmailAdress + "<br><b>Subject:</b>" + _OutlookEMailIn_old.EmailSubject + "<br><br>"
|
||||
_HTML_Body = _HTML_Body + _OutlookEMailIn_old.EmailBody
|
||||
|
||||
_OutlookEMail_new.HTMLBody = _HTML_Body
|
||||
_OutlookEMail_new.CRMEstate_Leads = _onew.GetObjectByKey(Of CRMEstate_Leads)(_OutlookEMail.CRMEstate_Leads.Oid)
|
||||
_OutlookEMail_new.eCRMEstate_Leads = eCRMEstate_Leads.eCRMEstate
|
||||
|
||||
e.ShowViewParameters.CreatedView = Application.CreateDetailView(_onew, "OutlookEMail_DetailView", True, _OutlookEMail_new)
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub DoublePropertyEditor_HUF_ControlValueChanged(sender As Object, e As EventArgs)
|
||||
Throw New NotImplementedException
|
||||
End Sub
|
||||
|
||||
Private Sub editor_LastName(sender As Object, e As EventArgs)
|
||||
Dim _LastNameStringPropertyEditor As StringPropertyEditor = TryCast(sender, StringPropertyEditor)
|
||||
AddHandler _LastNameStringPropertyEditor.Control.Click, AddressOf StringPropertyEditor_Click
|
||||
End Sub
|
||||
Private Sub editor_FirstName(sender As Object, e As EventArgs)
|
||||
Dim _FirstNameStringPropertyEditor As StringPropertyEditor = TryCast(sender, StringPropertyEditor)
|
||||
AddHandler _FirstNameStringPropertyEditor.Control.Click, AddressOf StringPropertyEditor_Click
|
||||
End Sub
|
||||
Private Sub StringPropertyEditor_Click(sender As Object, e As EventArgs)
|
||||
sender.SelectAll()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
Partial Class InsertGridToRTF_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.aInsertGridToRTF = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aInsertGridToRTFCurrentPos = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aRestoreDocumentTemplate = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
'
|
||||
'aInsertGridToRTF
|
||||
'
|
||||
Me.aInsertGridToRTF.Caption = "Insert grid"
|
||||
Me.aInsertGridToRTF.Category = "aInsertGridToRTF"
|
||||
Me.aInsertGridToRTF.ConfirmationMessage = Nothing
|
||||
Me.aInsertGridToRTF.Id = "aInsertGridToRTF"
|
||||
Me.aInsertGridToRTF.ImageName = "paste"
|
||||
Me.aInsertGridToRTF.Shortcut = Nothing
|
||||
Me.aInsertGridToRTF.Tag = Nothing
|
||||
Me.aInsertGridToRTF.TargetObjectsCriteria = Nothing
|
||||
Me.aInsertGridToRTF.TargetViewId = "CRMEstate_Leads_DetailView"
|
||||
Me.aInsertGridToRTF.ToolTip = Nothing
|
||||
Me.aInsertGridToRTF.TypeOfView = Nothing
|
||||
'
|
||||
'aInsertGridToRTFCurrentPos
|
||||
'
|
||||
Me.aInsertGridToRTFCurrentPos.Caption = "Insert grid Current position"
|
||||
Me.aInsertGridToRTFCurrentPos.Category = "aInsertGridToRTFCurrentPos"
|
||||
Me.aInsertGridToRTFCurrentPos.ConfirmationMessage = Nothing
|
||||
Me.aInsertGridToRTFCurrentPos.Id = "aInsertGridToRTFCurrentPos"
|
||||
Me.aInsertGridToRTFCurrentPos.ImageName = "paste"
|
||||
Me.aInsertGridToRTFCurrentPos.Shortcut = Nothing
|
||||
Me.aInsertGridToRTFCurrentPos.Tag = Nothing
|
||||
Me.aInsertGridToRTFCurrentPos.TargetObjectsCriteria = Nothing
|
||||
Me.aInsertGridToRTFCurrentPos.TargetViewId = "CRMEstate_Leads_DetailView"
|
||||
Me.aInsertGridToRTFCurrentPos.ToolTip = Nothing
|
||||
Me.aInsertGridToRTFCurrentPos.TypeOfView = Nothing
|
||||
'
|
||||
'aRestoreDocumentTemplate
|
||||
'
|
||||
Me.aRestoreDocumentTemplate.Caption = "aRestore Document Template"
|
||||
Me.aRestoreDocumentTemplate.Category = "aRestoreDocumentTemplate"
|
||||
Me.aRestoreDocumentTemplate.ConfirmationMessage = Nothing
|
||||
Me.aRestoreDocumentTemplate.Id = "aRestoreDocumentTemplate"
|
||||
Me.aRestoreDocumentTemplate.ImageName = Nothing
|
||||
Me.aRestoreDocumentTemplate.Shortcut = Nothing
|
||||
Me.aRestoreDocumentTemplate.Tag = Nothing
|
||||
Me.aRestoreDocumentTemplate.TargetObjectsCriteria = Nothing
|
||||
Me.aRestoreDocumentTemplate.TargetViewId = Nothing
|
||||
Me.aRestoreDocumentTemplate.ToolTip = Nothing
|
||||
Me.aRestoreDocumentTemplate.TypeOfView = Nothing
|
||||
|
||||
End Sub
|
||||
Friend WithEvents aInsertGridToRTF As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aInsertGridToRTFCurrentPos As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aRestoreDocumentTemplate As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
|
||||
End Class
|
||||
+132
@@ -0,0 +1,132 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="aInsertGridToRTF.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 95</value>
|
||||
</metadata>
|
||||
<metadata name="aInsertGridToRTFCurrentPos.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 56</value>
|
||||
</metadata>
|
||||
<metadata name="aRestoreDocumentTemplate.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>343, 89</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
</root>
|
||||
+447
@@ -0,0 +1,447 @@
|
||||
Imports System
|
||||
Imports System.IO
|
||||
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.XtraGrid.Views.Grid
|
||||
|
||||
Imports DevExpress.ExpressApp.Win.Editors
|
||||
Imports DevExpress.Xpo
|
||||
Imports DevExpress.XtraGrid.Columns
|
||||
Imports DevExpress.XtraEditors.Controls
|
||||
Imports DevExpress.XtraEditors.Repository
|
||||
Imports DevExpress.Data
|
||||
Imports DevExpress.ExpressApp.Editors
|
||||
Imports DevExpress.Data.Filtering
|
||||
|
||||
|
||||
Public Class InsertGridToRTF_VC
|
||||
Inherits DevExpress.ExpressApp.ViewController
|
||||
Dim _RichEditControl As RichEditControl
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
|
||||
End Sub
|
||||
Protected Overrides Sub OnViewControlsCreated()
|
||||
MyBase.OnViewControlsCreated()
|
||||
If View.Id = "CRMEstate_Leads_DetailView" Then
|
||||
'_RichEditControl = TryCast(View, DetailView).GetItems(Of RichEditPropertyEditor)(0).RichEditUserControl.RichEditControl
|
||||
End If
|
||||
End Sub
|
||||
Private Sub aInsertGridToRTF_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aInsertGridToRTF.Execute
|
||||
Dim _DetailView As DetailView = CType(View, DetailView)
|
||||
Dim _CRMEstate_Leads As CRMEstate_Leads = TryCast(e.CurrentObject, CRMEstate_Leads)
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _ImmovablesGroupsParameters As ImmovablesGroupsParameters = _ocur.FindObject(Of ImmovablesGroupsParameters)(CriteriaOperator.Parse("ImmovablesGroups=?", _CRMEstate_Leads.ImmovablesPriceListHeader.ImmovablesGroups))
|
||||
|
||||
If _CRMEstate_Leads.DocumentBody Is Nothing Then
|
||||
_CRMEstate_Leads.DocumentBody = _ImmovablesGroupsParameters.DocumentBody
|
||||
If _CRMEstate_Leads.DocumentBody Is Nothing Then
|
||||
_CRMEstate_Leads.DocumentBody = "{\rtf1\deff0{\fonttbl{\f0 Times New Roman;}}" & _
|
||||
"{\colortbl\red0\green0\blue0 ;\red0\green0\blue255 ;}{\*\listoverridetable}{\stylesheet {\ql\cf0 Normal;}" & _
|
||||
"{\*\cs1\cf0 Default Paragraph Font;}{\*\cs2\sbasedon1\cf0 Line Number;}{\*\cs3\ul\cf1 Hyperlink;}}\sectd\pard\plain" & _
|
||||
"\ql\f1\par\pard\plain\ql\f1\par\pard\plain\ql\f1\par\pard\plain\ql{\f2\fs18\cf0 imapartmentsim}\f2\fs18\cf2\par" & _
|
||||
"\pard\plain\ql\f2\fs18\cf0\par\pard\plain\ql{\f2\fs18\cf0 imgaragesim}\f2\fs18\cf0\par\pard\plain\ql\f2\fs18\cf0\par" & _
|
||||
"\pard\plain\ql{\f2\fs18\cf0 imofficesim}\f2\fs18\cf0\par\pard\plain\ql\f2\fs18\cf0\par\pard\plain\ql{\f2\fs18\cf0 imcontainerim}" & _
|
||||
"\f2\fs18\cf0\par\pard\plain\ql\f1\par}"
|
||||
End If
|
||||
End If
|
||||
|
||||
_CRMEstate_Leads.DocumentBody = _CRMEstate_Leads.DocumentBody.Replace("{\cf0 im}{\cf0 apartments}{\cf0 im}", "{\cf0 imapartmentsim}")
|
||||
_CRMEstate_Leads.DocumentBody = _CRMEstate_Leads.DocumentBody.Replace("{\cf0 im}{\cf0 garages}{\cf0 im}", "{\cf0 imgaragesim}")
|
||||
_CRMEstate_Leads.DocumentBody = _CRMEstate_Leads.DocumentBody.Replace("{\cf0 im}{\cf0 offices}{\cf0 im}", "{\cf0 imofficesim}")
|
||||
_CRMEstate_Leads.DocumentBody = _CRMEstate_Leads.DocumentBody.Replace("{\cf0 im}{\cf0 container}{\cf0 im}", "{\cf0 imcontainerim}")
|
||||
|
||||
'=========================== ColorTable =======================================
|
||||
Dim _actColorNum As Int32 = 0
|
||||
Dim _OrigColorTable As String
|
||||
Dim _ColorTable As String = (_CRMEstate_Leads.DocumentBody.Remove(0, (InStr(_CRMEstate_Leads.DocumentBody, "{\colortbl")) + "{\colortbl".Length - 1))
|
||||
_ColorTable = _ColorTable.Remove(InStr(_ColorTable, "}") - 1) '--Act Color table
|
||||
Dim _ColorArray As String() = _ColorTable.Split(New [Char]() {";"c})
|
||||
Dim _CTable As New StringBuilder()
|
||||
_CTable.Append("{\colortbl")
|
||||
For _ik As Int32 = 0 To _ColorArray.Length - 2
|
||||
_CTable.Append(_ColorArray(_ik) & ";")
|
||||
Next
|
||||
_CTable.Append("\red240\green240\blue240 ;}")
|
||||
_OrigColorTable = "{\colortbl" & _ColorTable & "}"
|
||||
_CRMEstate_Leads.DocumentBody = _CRMEstate_Leads.DocumentBody.Replace(_OrigColorTable, _CTable.ToString())
|
||||
_CRMEstate_Leads.DocumentBody = _CRMEstate_Leads.DocumentBody.Replace("improjectim", _CRMEstate_Leads.ImmovablesPriceListHeader.ImmovablesGroups.ShortName)
|
||||
_CRMEstate_Leads.DocumentBody = _CRMEstate_Leads.DocumentBody.Replace("imlastnameim", _CRMEstate_Leads.LastName)
|
||||
_CRMEstate_Leads.DocumentBody = _CRMEstate_Leads.DocumentBody.Replace("imfirstnameim", _CRMEstate_Leads.FirstName)
|
||||
'=================================================================================
|
||||
|
||||
'=========================== Apartments =======================================
|
||||
Dim _CRMEstate_Leads_Immovables_Apartments As ListPropertyEditor
|
||||
_CRMEstate_Leads_Immovables_Apartments = TryCast(View, DetailView).FindItem("Selected_Apartments")
|
||||
|
||||
If _CRMEstate_Leads_Immovables_Apartments.ListView IsNot Nothing Then
|
||||
Dim _ListView_Apartments As ListView = CType(_CRMEstate_Leads_Immovables_Apartments.ListView, ListView)
|
||||
Dim _GridListEditor_Apartments As GridListEditor = TryCast(_ListView_Apartments.Editor, GridListEditor)
|
||||
Dim _Grid_Apartments As GridView = TryCast(_GridListEditor_Apartments.GridView, GridView)
|
||||
|
||||
If _Grid_Apartments IsNot Nothing Then
|
||||
_CRMEstate_Leads.DocumentBody = RTFTableCreator(_Grid_Apartments, "imapartmentsim", _CRMEstate_Leads.DocumentBody)
|
||||
End If
|
||||
End If
|
||||
|
||||
'=================================================================================
|
||||
|
||||
'=========================== Offices ==========================================
|
||||
Dim _CRMEstate_Leads_Immovables_Offices As ListPropertyEditor
|
||||
_CRMEstate_Leads_Immovables_Offices = TryCast(View, DetailView).FindItem("Selected_Offices")
|
||||
|
||||
If _CRMEstate_Leads_Immovables_Offices.ListView IsNot Nothing Then
|
||||
Dim _ListView_Offices As ListView = CType(_CRMEstate_Leads_Immovables_Offices.ListView, ListView)
|
||||
Dim _GridListEditor_Offices As GridListEditor = TryCast(_ListView_Offices.Editor, GridListEditor)
|
||||
Dim _Grid_Offices As GridView = TryCast(_GridListEditor_Offices.GridView, GridView)
|
||||
|
||||
If _Grid_Offices IsNot Nothing Then
|
||||
_CRMEstate_Leads.DocumentBody = RTFTableCreator(_Grid_Offices, "imofficesim", _CRMEstate_Leads.DocumentBody)
|
||||
End If
|
||||
End If
|
||||
'=================================================================================
|
||||
|
||||
'=========================== Garages ==========================================
|
||||
Dim _CRMEstate_Leads_Immovables_Garages As ListPropertyEditor
|
||||
_CRMEstate_Leads_Immovables_Garages = TryCast(View, DetailView).FindItem("Selected_Garages")
|
||||
If _CRMEstate_Leads_Immovables_Garages.ListView IsNot Nothing Then
|
||||
Dim _ListView_Garages As ListView = CType(_CRMEstate_Leads_Immovables_Garages.ListView, ListView)
|
||||
Dim _GridListEditor_Garages As GridListEditor = TryCast(_ListView_Garages.Editor, GridListEditor)
|
||||
Dim _Grid_Garages As GridView = TryCast(_GridListEditor_Garages.GridView, GridView)
|
||||
|
||||
If _Grid_Garages IsNot Nothing Then
|
||||
_CRMEstate_Leads.DocumentBody = RTFTableCreator(_Grid_Garages, "imgaragesim", _CRMEstate_Leads.DocumentBody)
|
||||
End If
|
||||
End If
|
||||
'=================================================================================
|
||||
|
||||
'=========================== Container ==========================================
|
||||
Dim _CRMEstate_Leads_Immovables_Container As ListPropertyEditor
|
||||
_CRMEstate_Leads_Immovables_Container = TryCast(View, DetailView).FindItem("Selected_Container")
|
||||
If _CRMEstate_Leads_Immovables_Container.ListView IsNot Nothing Then
|
||||
Dim _ListView_Container As ListView = CType(_CRMEstate_Leads_Immovables_Container.ListView, ListView)
|
||||
Dim _GridListEditor_Container As GridListEditor = TryCast(_ListView_Container.Editor, GridListEditor)
|
||||
Dim _Grid_Container As GridView = TryCast(_GridListEditor_Container.GridView, GridView)
|
||||
|
||||
If _Grid_Container IsNot Nothing Then
|
||||
_CRMEstate_Leads.DocumentBody = RTFTableCreator(_Grid_Container, "imcontainerim", _CRMEstate_Leads.DocumentBody)
|
||||
End If
|
||||
End If
|
||||
'=================================================================================
|
||||
End Sub
|
||||
Private Sub aInsertGridToRTFCurrentPos_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aInsertGridToRTFCurrentPos.Execute
|
||||
'Dim _DetailView As DetailView = CType(View, DetailView)
|
||||
Dim _CRMEstate_Leads As CRMEstate_Leads = TryCast(e.CurrentObject, CRMEstate_Leads)
|
||||
|
||||
Dim _CRMEstate_Leads_Immovables As ListPropertyEditor
|
||||
_CRMEstate_Leads_Immovables = TryCast(View, DetailView).FindItem("CRMEstate_Leads_Immovables")
|
||||
|
||||
Dim _ListView As ListView = CType(_CRMEstate_Leads_Immovables.ListView, ListView)
|
||||
Dim _GridListEditor As GridListEditor = TryCast(_ListView.Editor, GridListEditor)
|
||||
Dim _Grid As GridView = TryCast(_GridListEditor.GridView, GridView)
|
||||
|
||||
|
||||
_RichEditControl.Document.InsertText(_RichEditControl.Document.CaretPosition, "LilaLiba")
|
||||
|
||||
|
||||
Dim _RTFTable As String = RTFTableCreatorCurrentPos(_Grid)
|
||||
|
||||
Dim _DocumentBody_NEW As String = _CRMEstate_Leads.DocumentBody
|
||||
_DocumentBody_NEW = _CRMEstate_Leads.DocumentBody.Replace("LilaLiba", _RTFTable)
|
||||
_CRMEstate_Leads.DocumentBody = ""
|
||||
_CRMEstate_Leads.DocumentBody = _DocumentBody_NEW
|
||||
|
||||
' _RichEditControl.Document.InsertRtfText(_DocumentPosition, RTFTableCreatorCurrentPos(_Grid))
|
||||
'_RichEditControl.Document.CaretPosition = _RichEditControl.Document.Range.End
|
||||
|
||||
|
||||
End Sub
|
||||
Private Function RTFTableCreatorCurrentPos(_Grid As GridView) ', _DocumentBody As String) As String
|
||||
Dim _RTFtext As New StringBuilder
|
||||
Dim _RowNum As Integer = _Grid.RowCount
|
||||
Dim _ColumnsNum As Integer = _Grid.Columns.Count
|
||||
Dim irowIndex As Integer = 0
|
||||
'--Fejléc kiírása RTFként--
|
||||
|
||||
_RTFtext.Append("\par\pard\plain\ql\par\trowd\irow" & irowIndex & "\irowband" & irowIndex & "\trbrdrt\brdrs\brdrw10\trbrdrl\brdrs\brdrw10" & _
|
||||
"\trbrdrb\brdrs\brdrw10\trbrdrr\brdrs\brdrw10\trleft-108\trautofit1\trpaddfl3\trpaddl108\trpaddfr3\trpaddr108")
|
||||
For _ik As Integer = 0 To _ColumnsNum - 1
|
||||
If _Grid.Columns(_ik).Visible = True Then
|
||||
_RTFtext.Append("\clvertalt\clcbpat2\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10" &
|
||||
"\cltxlrtb\clftsWidth3\clwWidth3302\clpadfr3\clpadr108\clpadft3\clpadt108\cellx" & _ik)
|
||||
End If
|
||||
Next
|
||||
For _ik As Integer = 0 To _ColumnsNum - 1
|
||||
If _Grid.Columns(_ik).Visible = True Then
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\b\cf0" & _Grid.Columns(_ik).Caption & "}\b\cell")
|
||||
End If
|
||||
Next
|
||||
|
||||
_RTFtext.Append("\trowd\irow" & irowIndex & "\irowband" & irowIndex & "\trbrdrt\brdrs\brdrw10\trbrdrl\brdrs\brdrw10" & _
|
||||
"\trbrdrb\brdrs\brdrw10\trbrdrr\brdrs\brdrw10\trleft-108\trautofit1\trpaddfl3\trpaddl108\trpaddfr3\trpaddr108")
|
||||
For _ik As Integer = 0 To _ColumnsNum - 1
|
||||
If _Grid.Columns(_ik).Visible = True Then
|
||||
_RTFtext.Append("\clvertalt\clcbpat2\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10" &
|
||||
"\cltxlrtb\clftsWidth3\clwWidth3302\clpadfr3\clpadr108\clpadft3\clpadt108\cellx" & _ik)
|
||||
End If
|
||||
Next
|
||||
irowIndex += 1
|
||||
|
||||
'' --Adatsorok kiírása RTFként--
|
||||
For _ik As Integer = 0 To _RowNum - 2
|
||||
|
||||
_RTFtext.Append("\row")
|
||||
For _jk As Integer = 0 To _ColumnsNum - 2
|
||||
If _Grid.Columns(_jk).Visible = True Then
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\cf0" & (_Grid.GetRowCellValue(_ik, _Grid.Columns(_jk)).ToString()) & "}\cell")
|
||||
End If
|
||||
Next
|
||||
|
||||
_RTFtext.Append("\trowd\irow" & irowIndex & "\irowband" & irowIndex & "\trbrdrt\brdrs\brdrw10\trbrdrl\brdrs\brdrw10\trbrdrb\brdrs\brdrw10\trbrdrr\brdrs\brdrw10" & _
|
||||
"\trleft-108\trautofit1\trpaddfl3\trpaddl108\trpaddfr3\trpaddr108")
|
||||
|
||||
For _jk As Integer = 0 To _ColumnsNum - 1
|
||||
If _Grid.Columns(_jk).Visible = True Then
|
||||
_RTFtext.Append("\clvertalt\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10\cltxlrtb\clftsWidth3\clwWidth3302" & _
|
||||
"\clpadfr3\clpadr108\clpadft3\clpadt108\cellx" & _jk)
|
||||
End If
|
||||
Next
|
||||
irowIndex += 1
|
||||
Next
|
||||
|
||||
''--Utolsó sor --
|
||||
_RTFtext.Append("\row")
|
||||
For _jk As Integer = 0 To _ColumnsNum - 2
|
||||
If _Grid.Columns(_jk).Visible = True Then
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\cf0" & (_Grid.GetRowCellValue(_RowNum - 1, _Grid.Columns(_jk)).ToString()) & "}\cell")
|
||||
End If
|
||||
Next
|
||||
|
||||
_RTFtext.Append("\trowd\irow" & irowIndex & "\irowband" & irowIndex & "\lastrow\trbrdrt\brdrs\brdrw10\trbrdrl\brdrs\brdrw10\trbrdrb\brdrs\brdrw10\trbrdrr\brdrs\brdrw10" & _
|
||||
"\trleft-108\trautofit1\trpaddfl3\trpaddl108\trpaddfr3\trpaddr108")
|
||||
|
||||
For _jk As Integer = 0 To _ColumnsNum - 1
|
||||
If _Grid.Columns(_jk).Visible = True Then
|
||||
_RTFtext.Append("\clvertalt\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10\cltxlrtb\clftsWidth3\clwWidth3302" & _
|
||||
"\clpadfr3\clpadr108\clpadft3\clpadt108\cellx" & _jk)
|
||||
End If
|
||||
Next
|
||||
_RTFtext.Append("\row\pard\plain\ql\par")
|
||||
|
||||
'_DocumentBody_NEW = _DocumentBody.Replace(_Tag, _RTFtext.ToString())
|
||||
'_DocumentBody_NEW = _DocumentBody_NEW.Replace("{\colortbl\red0\green0\blue0 ;\red0\green0\blue255 ;}", "{\colortbl\red0\green0\blue0 ;\red0\green0\blue255 ;\red192\green192\blue192 ;}")
|
||||
|
||||
Return _RTFtext.ToString()
|
||||
End Function
|
||||
Private Sub aRestoreDocumentTemplate_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aRestoreDocumentTemplate.Execute
|
||||
Try
|
||||
Dim _ocur As Xpo.XPObjectSpace = View.ObjectSpace
|
||||
Dim _CRMEstate_Leads As CRMEstate_Leads = TryCast(View.SelectedObjects(0), CRMEstate_Leads)
|
||||
If _CRMEstate_Leads Is Nothing Then Throw New Exception("*Váratlan hiba történt, a folyamat megszakadt!")
|
||||
|
||||
Dim _ImmovablesGroupsParameters As ImmovablesGroupsParameters = _ocur.FindObject(Of ImmovablesGroupsParameters)(CriteriaOperator.Parse("ImmovablesGroups=?", _
|
||||
_CRMEstate_Leads.ImmovablesPriceListHeader.ImmovablesGroups))
|
||||
|
||||
If _ImmovablesGroupsParameters Is Nothing Then Throw New Exception("*Nincs beállítva ingatlancsoport paraméter!")
|
||||
|
||||
_CRMEstate_Leads.DocumentBody = _ImmovablesGroupsParameters.DocumentBody
|
||||
_ocur.CommitChanges()
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly)
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
'-------------------Functions----------------------
|
||||
Function RTFTableCreator(_Grid As GridView, _Tag As String, _DocumentBody As String, Optional _FontSize As String = "8", _
|
||||
Optional _FontType As String = "Tahoma", Optional _RGB As String = "240,240,240") As String
|
||||
|
||||
|
||||
Dim _DocumentBody_NEW As String
|
||||
Dim _HeaderFillColor As Int32 ' -- Current table header fill color index in colot table
|
||||
|
||||
If _RGB <> "240,240,240" Then
|
||||
Dim _Parameters As String() = ColorTablereplacement(_DocumentBody, _RGB)
|
||||
_HeaderFillColor = Convert.ToInt32(_Parameters(0))
|
||||
_DocumentBody = _Parameters(1)
|
||||
Else
|
||||
'Dim _ColorTable As String = (_DocumentBody.Remove(0, (InStr(_DocumentBody, "{\colortbl")) + "{\colortbl".Length - 1))
|
||||
'_ColorTable = _ColorTable.Remove(InStr(_ColorTable, "}") - 1) '--Act Color table
|
||||
'Dim _ColorArray As String() = _ColorTable.Split(New [Char]() {";"c})
|
||||
'For _ik = 0 To _ColorArray.Length - 1
|
||||
' If _ColorArray(_ik) = "\red240\green240\blue240 " Then
|
||||
' _HeaderFillColor = _ik
|
||||
' Exit For
|
||||
' End If
|
||||
'Next
|
||||
_HeaderFillColor = 2
|
||||
End If
|
||||
|
||||
If _Grid.DataRowCount > 0 Then
|
||||
Dim _FontSizeNUM As Int32 = (Convert.ToInt32(_FontSize) * 2) ' -- Font size in half-points (the default is 16). => Size 8!!!
|
||||
Dim _RTFtext As New StringBuilder
|
||||
Dim _RowNumFull As Integer = _Grid.RowCount
|
||||
Dim _RowNum As Integer = _Grid.DataRowCount
|
||||
Dim _ColumnsNum As Integer = _Grid.Columns.Count
|
||||
Dim irowIndex As Int32 = 0
|
||||
Dim _LastCellIndex As Int32 = 0
|
||||
|
||||
'--Header to RTF format--
|
||||
'=================================================================================
|
||||
_RTFtext.Append("\pard\plain\ql\par\trowd\irow" & irowIndex & "\irowband" & irowIndex & "\trbrdrt\brdrs\brdrw10\trbrdrl\brdrs\brdrw10" & _
|
||||
"\trbrdrb\brdrs\brdrw10\trbrdrr\brdrs\brdrw10\trleft-108\trautofit1\trpaddfl3\trpaddl108\trpaddfr3\trpaddr108")
|
||||
|
||||
For _ik As Integer = 0 To _Grid.Columns.View.VisibleColumns.Count - 1
|
||||
_RTFtext.Append("\clvertalt\clcbpat2\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10" &
|
||||
"\cltxlrtb\clftsWidth3\clwWidth3302\clpadfr3\clpadr108\clpadft3\clpadt108\cellx" & _ik)
|
||||
If _LastCellIndex < _ik Then
|
||||
_LastCellIndex = _ik
|
||||
End If
|
||||
Next
|
||||
For _ik As Integer = 0 To _Grid.Columns.View.VisibleColumns.Count - 1
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\b\fs" & _FontSizeNUM & "\cf0 " & _Grid.Columns.View.VisibleColumns(_ik).Caption & "}\b\cell")
|
||||
Next
|
||||
|
||||
_RTFtext.Append("\trowd\irow" & irowIndex & "\irowband" & irowIndex & "\trbrdrt\brdrs\brdrw10\trbrdrl\brdrs\brdrw10" & _
|
||||
"\trbrdrb\brdrs\brdrw10\trbrdrr\brdrs\brdrw10\trleft-108\trautofit1\trpaddfl3\trpaddl108\trpaddfr3\trpaddr108")
|
||||
For _ik As Integer = 0 To _Grid.Columns.View.VisibleColumns.Count - 1
|
||||
_RTFtext.Append("\clvertalt\clcbpat" & _HeaderFillColor & "\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10" &
|
||||
"\cltxlrtb\clftsWidth3\clwWidth3302\clpadfr3\clpadr108\clpadft3\clpadt108\cellx" & _ik)
|
||||
Next
|
||||
irowIndex += 1
|
||||
'' --Data to RTF format--
|
||||
'=================================================================================
|
||||
For _ik As Int16 = 0 To _RowNumFull - 2
|
||||
If _Grid.IsGroupRow(_Grid.Columns.View.GetVisibleRowHandle(_ik)) = True Then
|
||||
_RTFtext.Append("\row")
|
||||
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\fs" & _FontSizeNUM & "\cf0 " & (_Grid.GetGroupRowDisplayText(_Grid.Columns.View.GetVisibleRowHandle(_ik)).ToString) & "}\cell")
|
||||
|
||||
|
||||
_RTFtext.Append("\trowd\irow" & irowIndex & "\irowband" & irowIndex & "\trbrdrt\brdrs\brdrw10\trbrdrl\brdrs\brdrw10\trbrdrb\brdrs\brdrw10\trbrdrr\brdrs\brdrw10" & _
|
||||
"\trleft-108\trftsWidth1\trautofit1\trpaddfl3\trpaddl108\trpaddfr3\trpaddr108\tblindtype3\tblind0")
|
||||
|
||||
_RTFtext.Append("\clvertalt\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10\cltxlrtb\clftsWidth3\clwWidth9619" & _
|
||||
"\clpadfr3\clpadr108\clpadft3\clpadt108\cellx" & _LastCellIndex)
|
||||
|
||||
irowIndex += 1
|
||||
Else
|
||||
_RTFtext.Append("\row")
|
||||
|
||||
For _jk As Integer = 0 To _Grid.Columns.View.VisibleColumns.Count - 1
|
||||
If _Grid.Columns.View.VisibleColumns(_jk).ColumnType.FullName <> "System.Double" And _Grid.Columns.View.VisibleColumns(_jk).ColumnType.FullName <> "System.Boolean" Then
|
||||
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\fs" & _FontSizeNUM & "\cf0 " & (_Grid.GetRowCellDisplayText(_Grid.Columns.View.GetVisibleRowHandle(_ik), _Grid.Columns.View.VisibleColumns(_jk))) & "}\cell")
|
||||
ElseIf _Grid.Columns.View.VisibleColumns(_jk).ColumnType.FullName = "System.Boolean" Then
|
||||
If _Grid.GetRowCellValue(_Grid.Columns.View.GetVisibleRowHandle(_ik), _Grid.Columns.View.VisibleColumns(_jk)) = True Then
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\fs" & _FontSizeNUM & "\cf0 " & "Van" & "}\cell")
|
||||
Else
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\fs" & _FontSizeNUM & "\cf0 " & "Nincs" & "}\cell")
|
||||
End If
|
||||
Else
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\fs" & _FontSizeNUM & "\cf0\qr " & LTrim(RTrim(Format(_Grid.Columns.View.GetRowCellValue(_Grid.Columns.View.GetVisibleRowHandle(_ik), _Grid.Columns.View.VisibleColumns(_jk)), "#,##0.00"))) & "}\qr\cell")
|
||||
|
||||
End If
|
||||
Next
|
||||
|
||||
_RTFtext.Append("\trowd\irow" & irowIndex & "\irowband" & irowIndex & "\trbrdrt\brdrs\brdrw10\trbrdrl\brdrs\brdrw10\trbrdrb\brdrs\brdrw10\trbrdrr\brdrs\brdrw10" & _
|
||||
"\trleft-108\trautofit1\trpaddfl3\trpaddl108\trpaddfr3\trpaddr108")
|
||||
|
||||
For _jk As Integer = 0 To _Grid.Columns.View.VisibleColumns.Count - 1
|
||||
|
||||
_RTFtext.Append("\clvertalt\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10\cltxlrtb\clftsWidth3\clwWidth3302" & _
|
||||
"\clpadfr3\clpadr108\clpadft3\clpadt108\cellx" & _jk)
|
||||
Next
|
||||
irowIndex += 1
|
||||
End If
|
||||
Next
|
||||
'--Last row --
|
||||
'=================================================================================
|
||||
If _Grid.IsGroupRow(_Grid.Columns.View.GetVisibleRowHandle(_RowNumFull - 1)) = True Then
|
||||
_RTFtext.Append("\row")
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\fs" & _FontSizeNUM & "\cf0 " & (_Grid.GetGroupRowDisplayText(_Grid.Columns.View.GetVisibleRowHandle(_RowNumFull - 1)).ToString) & "}\cell")
|
||||
|
||||
_RTFtext.Append("\trowd\irow" & irowIndex & "\irowband" & irowIndex & "\trbrdrt\brdrs\brdrw10\trbrdrl\brdrs\brdrw10\trbrdrb\brdrs\brdrw10\trbrdrr\brdrs\brdrw10" & _
|
||||
"\trleft-108\trftsWidth1\trautofit1\trpaddfl3\trpaddl108\trpaddfr3\trpaddr108\tblindtype3\tblind0")
|
||||
|
||||
_RTFtext.Append("\clvertalt\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10\cltxlrtb\clftsWidth3\clwWidth9619" & _
|
||||
"\clpadfr3\clpadr108\clpadft3\clpadt108\cellx" & _LastCellIndex)
|
||||
Else
|
||||
_RTFtext.Append("\row")
|
||||
For _jk As Integer = 0 To _Grid.Columns.View.VisibleColumns.Count - 1
|
||||
If _Grid.Columns.View.VisibleColumns(_jk).ColumnType.FullName <> "System.Double" And _Grid.Columns.View.VisibleColumns(_jk).ColumnType.FullName <> "System.Boolean" Then
|
||||
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\fs" & _FontSizeNUM & "\cf0 " & (_Grid.Columns.View.GetRowCellDisplayText(_RowNum - 1, _Grid.Columns.View.VisibleColumns(_jk))) & "}\cell")
|
||||
ElseIf _Grid.Columns.View.VisibleColumns(_jk).ColumnType.FullName = "System.Boolean" Then
|
||||
If _Grid.IsGroupRow(_Grid.Columns.View.GetVisibleRowHandle(_RowNumFull - 1)) = True Then
|
||||
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\fs" & _FontSizeNUM & "\cf0 " & "Van" & "}\cell")
|
||||
Else
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\fs" & _FontSizeNUM & "\cf0 " & "Nincs" & "}\cell")
|
||||
End If
|
||||
Else
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\fs" & _FontSizeNUM & "\cf0\qr " & LTrim(RTrim(Format(_Grid.Columns.View.GetRowCellValue(_Grid.Columns.View.GetVisibleRowHandle(_RowNumFull - 1), _Grid.Columns.View.VisibleColumns(_jk)), "#,##0.00"))) & "}\qr\cell")
|
||||
End If
|
||||
Next
|
||||
|
||||
_RTFtext.Append("\trowd\irow" & irowIndex & "\irowband" & irowIndex & "\lastrow\trbrdrt\brdrs\brdrw10\trbrdrl\brdrs\brdrw10\trbrdrb\brdrs\brdrw10\trbrdrr\brdrs\brdrw10" & _
|
||||
"\trleft-108\trautofit1\trpaddfl3\trpaddl108\trpaddfr3\trpaddr108")
|
||||
''---
|
||||
For _jk As Integer = 0 To _Grid.Columns.View.VisibleColumns.Count - 1
|
||||
|
||||
_RTFtext.Append("\clvertalt\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10\cltxlrtb\clftsWidth3\clwWidth3302" & _
|
||||
"\clpadfr3\clpadr108\clpadft3\clpadt108\cellx" & _jk)
|
||||
Next
|
||||
End If
|
||||
|
||||
_RTFtext.Append("\row\pard\plain\ql")
|
||||
_DocumentBody_NEW = _DocumentBody.Replace(_Tag, _RTFtext.ToString())
|
||||
If _DocumentBody_NEW.Contains("\fonttbl{\f0 Times New Roman;") Then
|
||||
_DocumentBody_NEW = _DocumentBody_NEW.Replace("\fonttbl{\f0 Times New Roman;", "\fonttbl{\f0 " & _FontType & ";") 'Font table remake
|
||||
End If
|
||||
Else
|
||||
_DocumentBody_NEW = _DocumentBody.Replace(_Tag, " ")
|
||||
End If
|
||||
|
||||
Return _DocumentBody_NEW
|
||||
End Function
|
||||
Function ColorTablereplacement(_DocumentBody As String, _RGB As String) As String()
|
||||
Dim _Parameters(1) As String
|
||||
Dim _RGBArray As String() = _RGB.Split(New [Char]() {","c})
|
||||
|
||||
Dim _actColorNum As Int32 = -1
|
||||
Dim _ColorTable As String = (_DocumentBody.Remove(0, (InStr(_DocumentBody, "{\colortbl")) + "{\colortbl".Length - 1))
|
||||
_ColorTable = _ColorTable.Remove(InStr(_ColorTable, "}") - 1) '--Act Color table
|
||||
Dim _ColorArray As String() = _ColorTable.Split(New [Char]() {";"c})
|
||||
|
||||
For _ik As Int32 = 0 To _ColorArray.Length - 1
|
||||
If _ColorArray(_ik) = "\red" & _RGBArray(0) & "\green" & _RGBArray(1) & "\blue" & _RGBArray(2) & " " Then
|
||||
_actColorNum = _ik
|
||||
End If
|
||||
Next
|
||||
If _actColorNum = -1 Then
|
||||
Dim _CTable As New StringBuilder()
|
||||
_CTable.Append("{\colortbl")
|
||||
For _ik As Int32 = 0 To _ColorArray.Length - 2
|
||||
_CTable.Append(_ColorArray(_ik) & ";")
|
||||
Next
|
||||
_CTable.Append("\red" & _RGBArray(0) & "\green" & _RGBArray(1) & "\blue" & _RGBArray(2) & " ;}")
|
||||
Dim _OrigColorTable As String = "{\colortbl" & _ColorTable & "}"
|
||||
_DocumentBody = _DocumentBody.Replace(_OrigColorTable, _CTable.ToString())
|
||||
_Parameters(0) = _ColorArray.Length - 1
|
||||
_Parameters(1) = _DocumentBody
|
||||
Else
|
||||
_Parameters(0) = _actColorNum
|
||||
_Parameters(1) = _DocumentBody
|
||||
End If
|
||||
Return _Parameters
|
||||
End Function
|
||||
End Class
|
||||
Generated
+69
@@ -0,0 +1,69 @@
|
||||
Partial Class SendMailVC
|
||||
|
||||
<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.aSendMailCRMEstate_Leads = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aSendEMailLawyerDocument = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
'
|
||||
'aSendMailCRMEstate_Leads
|
||||
'
|
||||
Me.aSendMailCRMEstate_Leads.Caption = "Send mail"
|
||||
Me.aSendMailCRMEstate_Leads.Category = "aSendMailCRMEstate_Leads"
|
||||
Me.aSendMailCRMEstate_Leads.ConfirmationMessage = Nothing
|
||||
Me.aSendMailCRMEstate_Leads.Id = "aSendMailCRMEstate_Leads"
|
||||
Me.aSendMailCRMEstate_Leads.ImageName = "mail2"
|
||||
Me.aSendMailCRMEstate_Leads.Shortcut = Nothing
|
||||
Me.aSendMailCRMEstate_Leads.Tag = Nothing
|
||||
Me.aSendMailCRMEstate_Leads.TargetObjectsCriteria = Nothing
|
||||
Me.aSendMailCRMEstate_Leads.TargetObjectType = GetType(Nuvolar.[Module].CRMEstate_Leads)
|
||||
Me.aSendMailCRMEstate_Leads.TargetViewId = ""
|
||||
Me.aSendMailCRMEstate_Leads.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
|
||||
Me.aSendMailCRMEstate_Leads.ToolTip = Nothing
|
||||
Me.aSendMailCRMEstate_Leads.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
|
||||
'
|
||||
'aSendEMailLawyerDocument
|
||||
'
|
||||
Me.aSendEMailLawyerDocument.Caption = "Send EMail Lawyer Document"
|
||||
Me.aSendEMailLawyerDocument.Category = ""
|
||||
Me.aSendEMailLawyerDocument.ConfirmationMessage = Nothing
|
||||
Me.aSendEMailLawyerDocument.Id = "aSendEMailLawyerDocument"
|
||||
Me.aSendEMailLawyerDocument.ImageName = Nothing
|
||||
Me.aSendEMailLawyerDocument.Shortcut = Nothing
|
||||
Me.aSendEMailLawyerDocument.Tag = Nothing
|
||||
Me.aSendEMailLawyerDocument.TargetObjectsCriteria = Nothing
|
||||
Me.aSendEMailLawyerDocument.TargetObjectType = GetType(Nuvolar.[Module].CRMEstate_Opportunity)
|
||||
Me.aSendEMailLawyerDocument.TargetViewId = Nothing
|
||||
Me.aSendEMailLawyerDocument.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
|
||||
Me.aSendEMailLawyerDocument.ToolTip = Nothing
|
||||
Me.aSendEMailLawyerDocument.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
|
||||
|
||||
End Sub
|
||||
Friend WithEvents aSendMailCRMEstate_Leads As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aSendEMailLawyerDocument As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
|
||||
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="aSendMailCRMEstate_Leads.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 56</value>
|
||||
</metadata>
|
||||
<metadata name="aSendEMailLawyerDocument.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 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>
|
||||
+164
@@ -0,0 +1,164 @@
|
||||
Imports System
|
||||
Imports System.ComponentModel
|
||||
Imports System.Collections.Generic
|
||||
Imports System.Diagnostics
|
||||
Imports System.Text
|
||||
|
||||
Imports DevExpress.ExpressApp
|
||||
Imports DevExpress.ExpressApp.Actions
|
||||
Imports DevExpress.Persistent.Base
|
||||
Imports DevExpress.Data.Filtering
|
||||
Imports DevExpress.ExpressApp.Reports.Win
|
||||
Imports DevExpress.XtraPrinting
|
||||
Imports System.IO
|
||||
Imports DevExpress.Persistent.BaseImpl
|
||||
Imports DevExpress.Xpo
|
||||
Imports Microsoft.Office.Interop
|
||||
Imports DevExpress.ExpressApp.Win.SystemModule
|
||||
Imports DevExpress.ExpressApp.Editors
|
||||
Imports DevExpress.ExpressApp.Utils
|
||||
|
||||
Public Class SendMailVC
|
||||
Inherits DevExpress.ExpressApp.ViewController
|
||||
Private reportService As WinReportServiceController
|
||||
Private printingService As PrintingController
|
||||
Private _MemoryStream As New MemoryStream
|
||||
Private _StreamReader As New StreamReader(_MemoryStream)
|
||||
Private _RichEditControl As RichEditControl
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
|
||||
'This call is required by the Component Designer.
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
|
||||
End Sub
|
||||
Protected Overrides Sub OnViewControlsCreated()
|
||||
MyBase.OnViewControlsCreated()
|
||||
If View.Id = "CRMEstate_Leads_DetailView" Then
|
||||
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
|
||||
Protected Overrides Sub OnActivated()
|
||||
MyBase.OnActivated()
|
||||
reportService = Frame.GetController(Of WinReportServiceController)()
|
||||
printingService = Frame.GetController(Of PrintingController)()
|
||||
End Sub
|
||||
|
||||
Private Sub aSendMailReportCRMEstate_Leads_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs)
|
||||
|
||||
End Sub
|
||||
Private Sub reportService_CustomShowPreview(ByVal sender As Object, ByVal e As CustomShowPreviewEventArgs)
|
||||
e.Report.CreateDocument()
|
||||
e.Report.ExportToHtml(_MemoryStream)
|
||||
e.Handled = True
|
||||
End Sub
|
||||
Private Sub aSendMailCRMEstate_Leads_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aSendMailCRMEstate_Leads.Execute
|
||||
Try
|
||||
Dim _OutlookEMail As OutlookEMail
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
|
||||
Dim _CRMEstate_Leads As CRMEstate_Leads = TryCast(View.SelectedObjects(0), CRMEstate_Leads)
|
||||
|
||||
Dim _FileName As String = Path.GetTempPath & "Ajánlat.pdf"
|
||||
Dim _StreamFile As New FileStream(_FileName, FileMode.Create)
|
||||
|
||||
_RichEditControl.ExportToPdf(_StreamFile)
|
||||
_StreamFile.Close()
|
||||
|
||||
_StreamFile = New FileStream(_FileName, FileMode.Open, FileAccess.Read)
|
||||
Dim _StreamReader As New StreamReader(_StreamFile)
|
||||
_StreamFile.Seek(0, SeekOrigin.Begin)
|
||||
|
||||
Dim _OutlookEMailAttachments As OutlookEMailAttachments = _onew.CreateObject(Of OutlookEMailAttachments)()
|
||||
Dim _DocumentFileData As DocumentFileData = _onew.CreateObject(Of DocumentFileData)()
|
||||
_DocumentFileData.File = New FileData(_onew.Session)
|
||||
_DocumentFileData.File.LoadFromStream("Ajánlat.pdf", _StreamFile) '_FileData
|
||||
_DocumentFileData.File.FileName = "Ajánlat.pdf"
|
||||
_OutlookEMailAttachments.DocumentFileData = _onew.GetObject(_DocumentFileData)
|
||||
|
||||
_StreamReader.Close()
|
||||
_StreamFile.Close()
|
||||
|
||||
'-- Most jön az új outlook !
|
||||
_MemoryStream.Position = 0
|
||||
_OutlookEMail = _onew.CreateObject(Of OutlookEMail)()
|
||||
_OutlookEMail.HTMLBody = ""
|
||||
_OutlookEMail.eCRMEstate_Leads = eCRMEstate_Leads.eCRMEstate
|
||||
_OutlookEMail.CRMEstate_Leads = _onew.GetObjectByKey(Of CRMEstate_Leads)(_CRMEstate_Leads.Oid)
|
||||
If _CRMEstate_Leads.EMail = "" Or _CRMEstate_Leads.EMail Is Nothing Then
|
||||
_OutlookEMail.Recipients = "< = Nincs beállítva e-mail cím az ügyfélhez! = >"
|
||||
Else
|
||||
_OutlookEMail.Recipients = _CRMEstate_Leads.EMail
|
||||
End If
|
||||
_OutlookEMail.OutlookEMailAttachments.Add(_OutlookEMailAttachments)
|
||||
e.ShowViewParameters.CreatedView = Application.CreateDetailView(_onew, "OutlookEMail_DetailView", True, _OutlookEMail)
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, String.Format(CaptionHelper.GetLocalizedText("Exceptions\NuvolarExceptions", "MsgBoxCheckItAgain")))
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub RichEditContolViewItem_ControlCreated(sender As Object, e As EventArgs)
|
||||
Dim _ItemControl As Object = TryCast(sender, ViewItem).Control
|
||||
_RichEditControl = TryCast(_ItemControl, RichEditUserControl).RichEditControl
|
||||
End Sub
|
||||
Private Sub aSendEMailLawyerDocument_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aSendEMailLawyerDocument.Execute
|
||||
Try
|
||||
Dim _OutlookEMail As OutlookEMail
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
|
||||
Dim _CRMEstate_Opportunity As CRMEstate_Opportunity = TryCast(View.SelectedObjects(0), CRMEstate_Opportunity)
|
||||
If _CRMEstate_Opportunity Is Nothing Then Throw New Exception("*Váratlan hiba történt, a folyamat megszakadt!")
|
||||
Dim _ImmovablesGroupsParameters As ImmovablesGroupsParameters = _onew.FindObject(Of ImmovablesGroupsParameters)(CriteriaOperator.Parse("ImmovablesGroups.Oid=?", _
|
||||
_CRMEstate_Opportunity.CRMEstate_Leads.ImmovablesPriceListHeader.ImmovablesGroups.Oid))
|
||||
|
||||
If _ImmovablesGroupsParameters Is Nothing Then Throw New Exception("*Nincsenek beállítva a(z) " + _
|
||||
_CRMEstate_Opportunity.CRMEstate_Leads.ImmovablesPriceListHeader.ImmovablesGroups.ShortName + " paraméterei!")
|
||||
Dim _ReportData As ReportData = _ImmovablesGroupsParameters.ReportData_Contract_Temp
|
||||
If _ReportData Is Nothing Then Throw New Exception("*Nincs beállítva az ügyvédi segédanyag nyomtatvány!" + vbNewLine + "Kérem, ellenõrizze!")
|
||||
|
||||
Dim _XafReport As Reports.XafReport = _ReportData.LoadReport(_onew)
|
||||
Dim _FilterString As String = "[CRMEstate_Opportunity.Oid]='" & _CRMEstate_Opportunity.Oid.ToString & "'"
|
||||
_XafReport.FilterString = _FilterString
|
||||
Dim _FileName As String = Path.GetTempPath & "Ügyvédi segédlet.pdf"
|
||||
Dim _StreamFile As New FileStream(_FileName, FileMode.Create)
|
||||
|
||||
_XafReport.ExportToPdf(_StreamFile)
|
||||
_StreamFile.Close()
|
||||
|
||||
_StreamFile = New FileStream(_FileName, FileMode.Open, FileAccess.Read)
|
||||
Dim _StreamReader As New StreamReader(_StreamFile)
|
||||
_StreamFile.Seek(0, SeekOrigin.Begin)
|
||||
|
||||
Dim _OutlookEMailAttachments As OutlookEMailAttachments = _onew.CreateObject(Of OutlookEMailAttachments)()
|
||||
Dim _DocumentFileData As DocumentFileData = _onew.CreateObject(Of DocumentFileData)()
|
||||
_DocumentFileData.File = New FileData(_ocur.Session)
|
||||
_DocumentFileData.File.LoadFromStream("Ügyvédi segédlet.pdf", _StreamFile) '_FileData
|
||||
_DocumentFileData.File.FileName = "Ügyvédi segédlet.pdf"
|
||||
_OutlookEMailAttachments.DocumentFileData = _DocumentFileData
|
||||
|
||||
_StreamReader.Close()
|
||||
_StreamFile.Close()
|
||||
|
||||
'-- Most jön az új outlook !
|
||||
_MemoryStream.Position = 0
|
||||
_OutlookEMail = _onew.CreateObject(Of OutlookEMail)()
|
||||
_OutlookEMail.Subject = _CRMEstate_Opportunity.CRMEstate_Leads.DisplayName + " - Ügyvédi segédlet"
|
||||
_OutlookEMail.HTMLBody = "Tisztelt Németh és Herrmann Ügyvédi Iroda!"
|
||||
_OutlookEMail.eCRMEstate_Leads = eCRMEstate_Leads.eCRMEstate
|
||||
_OutlookEMail.Recipients = "< = Nincs beállítva e-mail = >"
|
||||
|
||||
_OutlookEMail.OutlookEMailAttachments.Add(_OutlookEMailAttachments)
|
||||
e.ShowViewParameters.CreatedView = Application.CreateDetailView(_onew, "OutlookEMail_DetailView", True, _OutlookEMail)
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly)
|
||||
End Try
|
||||
End Sub
|
||||
End Class
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
Partial Class ImmovablesPriceListVCWIN
|
||||
|
||||
<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.aInsertAPriceListToDocument = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aRestorePriceListTemplate = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
'
|
||||
'aInsertAPriceListToDocument
|
||||
'
|
||||
Me.aInsertAPriceListToDocument.Caption = "Insert to document"
|
||||
Me.aInsertAPriceListToDocument.ConfirmationMessage = "Do you want to execute command ?"
|
||||
Me.aInsertAPriceListToDocument.Id = "aInsertAPriceListToDocument"
|
||||
Me.aInsertAPriceListToDocument.ImageName = "BO_Person"
|
||||
Me.aInsertAPriceListToDocument.Shortcut = Nothing
|
||||
Me.aInsertAPriceListToDocument.Tag = Nothing
|
||||
Me.aInsertAPriceListToDocument.TargetObjectsCriteria = Nothing
|
||||
Me.aInsertAPriceListToDocument.TargetViewId = "ImmovablesPriceListHeader_DetailView"
|
||||
Me.aInsertAPriceListToDocument.ToolTip = Nothing
|
||||
Me.aInsertAPriceListToDocument.TypeOfView = Nothing
|
||||
'
|
||||
'aRestorePriceListTemplate
|
||||
'
|
||||
Me.aRestorePriceListTemplate.Caption = "aRestore Price List Template"
|
||||
Me.aRestorePriceListTemplate.ConfirmationMessage = Nothing
|
||||
Me.aRestorePriceListTemplate.Id = "aRestorePriceListTemplate"
|
||||
Me.aRestorePriceListTemplate.ImageName = Nothing
|
||||
Me.aRestorePriceListTemplate.Shortcut = Nothing
|
||||
Me.aRestorePriceListTemplate.Tag = Nothing
|
||||
Me.aRestorePriceListTemplate.TargetObjectsCriteria = Nothing
|
||||
Me.aRestorePriceListTemplate.TargetViewId = "ImmovablesPriceListHeader_DetailView"
|
||||
Me.aRestorePriceListTemplate.ToolTip = Nothing
|
||||
Me.aRestorePriceListTemplate.TypeOfView = Nothing
|
||||
|
||||
End Sub
|
||||
Friend WithEvents aInsertAPriceListToDocument As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aRestorePriceListTemplate As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
|
||||
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="aInsertAPriceListToDocument.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="aRestorePriceListTemplate.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>228, 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>
|
||||
+476
@@ -0,0 +1,476 @@
|
||||
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
|
||||
Imports DevExpress.Data.Filtering
|
||||
Imports DevExpress.XtraGrid.Views.Grid
|
||||
Imports DevExpress.XtraRichEdit.Commands
|
||||
Imports DevExpress.XtraRichEdit.API.Native
|
||||
Imports DevExpress.ExpressApp.SystemModule
|
||||
|
||||
Public Class ImmovablesPriceListVCWIN
|
||||
Inherits DevExpress.ExpressApp.ViewController
|
||||
Private _RichEditControl As RichEditControl
|
||||
Private _GridListEditor As GridListEditor
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
|
||||
'This call is required by the Component Designer.
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
|
||||
End Sub
|
||||
Protected Overrides Sub OnViewControlsCreated()
|
||||
MyBase.OnViewControlsCreated()
|
||||
If View.Id = "ImmovablesPriceListHeader_DetailView" Then
|
||||
Dim _DetailView As DetailView = TryCast(View, DetailView)
|
||||
Dim _RichEditControlViewItem As ViewItem
|
||||
|
||||
If _DetailView IsNot Nothing Then
|
||||
_RichEditControlViewItem = _DetailView.GetItems(Of RichEditPropertyEditor)(0)
|
||||
If _RichEditControlViewItem IsNot Nothing Then
|
||||
AddHandler _RichEditControlViewItem.ControlCreated, AddressOf RichEditControlViewItem_ControlCreated
|
||||
End If
|
||||
|
||||
|
||||
|
||||
'_RichEditControl.Document.Variables.Add("DOCUMENTVARIABLE Created", "nnnnna")
|
||||
'AddHandler _RichEditControl.CalculateDocumentVariable, AddressOf _CalculateDocumentVariable
|
||||
End If
|
||||
End If
|
||||
|
||||
'If View.Id = "CRMEstate_Offer_Template_DetailView" Then
|
||||
' _RichEditControl = TryCast(View, DetailView).GetItems(Of RichEditPropertyEditor)(0).RichEditUserControl.RichEditControl
|
||||
' _RichEditControl.Document.Fields.Add(_RichEditControl.Document.Range.End, "DOCVARIABLE Count")
|
||||
'End If
|
||||
|
||||
'If View.Id = "ImmovablesPriceListHeader_ImmovablesPriceListRowsA_ListView" Or _
|
||||
' View.Id = "ImmovablesPriceListHeader_ImmovablesPriceListRowsO_ListView" Or _
|
||||
' View.Id = "ImmovablesPriceListHeader_ImmovablesPriceListRowsG_ListView" Or _
|
||||
' View.Id = "ImmovablesPriceListHeader_ImmovablesPriceListRowsC_ListView" Then
|
||||
' Dim _ListView As ListView = CType(View, ListView)
|
||||
' _GridListEditor = TryCast(_ListView.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 <> "ListPriceBruttoDEV" And _
|
||||
' _GridListEditor.GridView.Columns(i).FieldName <> "ListPriceBruttoHUF" And _
|
||||
' _GridListEditor.GridView.Columns(i).FieldName <> "ListPriceBruttoDEVRent" And _
|
||||
' _GridListEditor.GridView.Columns(i).FieldName <> "ListPriceBruttoHUFRent" And _
|
||||
' _GridListEditor.GridView.Columns(i).FieldName <> "NoteRow" Then
|
||||
|
||||
' _GridListEditor.GridView.Columns(i).OptionsColumn.ReadOnly = True
|
||||
' _GridListEditor.GridView.Columns(i).OptionsColumn.AllowEdit = False
|
||||
' _GridListEditor.GridView.Columns(i).OptionsColumn.TabStop = False
|
||||
|
||||
' '_GridListEditor.GridView.Columns(i).FieldName = "AreaListPriceNettoHUF" Then _
|
||||
' ' Or Not _GridListEditor.GridView.Columns(i).FieldName = "AreaListPriceNettoDEV" _
|
||||
' ' Or Not _GridListEditor.GridView.Columns(i).FieldName = "ListPriceNettoHUF" _
|
||||
' ' Or Not _GridListEditor.GridView.Columns(i).FieldName = "ListPriceNettoDEV" _
|
||||
' ' Or Not _GridListEditor.GridView.Columns(i).FieldName = "ListPriceBruttoDEV" _
|
||||
' ' Or Not _GridListEditor.GridView.Columns(i).FieldName = "ListPriceBruttoHUF" _
|
||||
' ' Or Not _GridListEditor.GridView.Columns(i).FieldName = "AreaListPriceNettoHUFRent" _
|
||||
' ' Or Not _GridListEditor.GridView.Columns(i).FieldName = "AreaListPriceNettoDEVRent" _
|
||||
' ' Or Not _GridListEditor.GridView.Columns(i).FieldName = "ListPriceNettoHUFRent" _
|
||||
' ' Or Not _GridListEditor.GridView.Columns(i).FieldName = "AreaListPriceBruttoDEV" _
|
||||
' ' Or Not _GridListEditor.GridView.Columns(i).FieldName = "AreaListPriceBruttoHUF" _
|
||||
' 'Or Not _GridListEditor.GridView.Columns(i).FieldName = "AreaListPriceBruttoDEVRent" _
|
||||
' 'Or Not _GridListEditor.GridView.Columns(i).FieldName = "AreaListPriceBruttoHUFRent" _
|
||||
' ' Or Not _GridListEditor.GridView.Columns(i).FieldName = "ListPriceNettoDEVRent" _
|
||||
' ' Or Not _GridListEditor.GridView.Columns(i).FieldName = "ListPriceBruttoDEVRent" _
|
||||
' ' Or Not _GridListEditor.GridView.Columns(i).FieldName = "ListPriceBruttoHUFRent" Then
|
||||
' End If
|
||||
' Next i
|
||||
' End If
|
||||
'End If
|
||||
End Sub
|
||||
Protected Overrides Sub OnActivated()
|
||||
MyBase.OnActivated()
|
||||
If View.Id = "ImmovablesPriceListHeader_ImmovablesPriceListRowsA_ListView" Or _
|
||||
View.Id = "ImmovablesPriceListHeader_ImmovablesPriceListRowsO_ListView" Or _
|
||||
View.Id = "ImmovablesPriceListHeader_ImmovablesPriceListRowsG_ListView" Or _
|
||||
View.Id = "ImmovablesPriceListHeader_ImmovablesPriceListRowsC_ListView" Then
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.ListViewProcessCurrentObjectController)().Active.SetItemValue("", False)
|
||||
Frame.GetController(Of DevExpress.ExpressApp.Win.SystemModule.WinModificationsController).ModificationsHandlingMode = ModificationsHandlingMode.AutoCommit
|
||||
End If
|
||||
End Sub
|
||||
Protected Overrides Sub OnDeactivated()
|
||||
MyBase.OnDeactivated()
|
||||
If View.Id = "ImmovablesPriceListHeader_ImmovablesPriceListRowsA_ListView" Or _
|
||||
View.Id = "ImmovablesPriceListHeader_ImmovablesPriceListRowsO_ListView" Or _
|
||||
View.Id = "ImmovablesPriceListHeader_ImmovablesPriceListRowsG_ListView" Or _
|
||||
View.Id = "ImmovablesPriceListHeader_ImmovablesPriceListRowsC_ListView" Then
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.ListViewProcessCurrentObjectController)().Active.SetItemValue("", True)
|
||||
Frame.GetController(Of DevExpress.ExpressApp.Win.SystemModule.WinModificationsController).ModificationsHandlingMode = ModificationsHandlingMode.Confirmation
|
||||
End If
|
||||
End Sub
|
||||
Private Sub aInsertAPriceListToDocument_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aInsertAPriceListToDocument.Execute
|
||||
Dim _DetailView As DetailView = CType(View, DetailView)
|
||||
Dim _ImmovablesPriceListHeader As ImmovablesPriceListHeader = TryCast(e.CurrentObject, ImmovablesPriceListHeader)
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
|
||||
'Ha sablon alapján akarod készíteni akkor kell egy paraméter és a sablon amit be akarsz tölteni
|
||||
'_ImmovablesPriceListHeader.DocumentBody = _ImmovablesPriceListHeader.DocumentBody
|
||||
|
||||
'_CRMEstate_Leads.DocumentBody = _CRMEstate_Leads.DocumentBody.Replace("{\cf0 im}{\cf0 apartments}{\cf0 im}", "{\cf0 imapartmentsim}")
|
||||
'_CRMEstate_Leads.DocumentBody = _CRMEstate_Leads.DocumentBody.Replace("{\cf0 im}{\cf0 garages}{\cf0 im}", "{\cf0 imgaragesim}")
|
||||
'_CRMEstate_Leads.DocumentBody = _CRMEstate_Leads.DocumentBody.Replace("{\cf0 im}{\cf0 offices}{\cf0 im}", "{\cf0 imofficesim}")
|
||||
'_CRMEstate_Leads.DocumentBody = _CRMEstate_Leads.DocumentBody.Replace("{\cf0 im}{\cf0 container}{\cf0 im}", "{\cf0 imcontainerim}")
|
||||
|
||||
'=========================== ColorTable =======================================
|
||||
Dim _actColorNum As Int32 = 0
|
||||
Dim _OrigColorTable As String
|
||||
If _ImmovablesPriceListHeader.DocumentBody Is Nothing Then
|
||||
_ImmovablesPriceListHeader.DocumentBody = "{\rtf1\deff0{\fonttbl{\f0 Times New Roman;}}" & _
|
||||
"{\colortbl\red0\green0\blue0 ;\red0\green0\blue255 ;}{\*\listoverridetable}{\stylesheet {\ql\cf0 Normal;}" & _
|
||||
"{\*\cs1\cf0 Default Paragraph Font;}{\*\cs2\sbasedon1\cf0 Line Number;}{\*\cs3\ul\cf1 Hyperlink;}}\sectd\pard\plain\ql{\cf0 }\par\pard\plain\ql\par\pard\plain\ql\par}"
|
||||
End If
|
||||
Dim _ColorTable As String = (_ImmovablesPriceListHeader.DocumentBody.Remove(0, (InStr(_ImmovablesPriceListHeader.DocumentBody, "{\colortbl")) + "{\colortbl".Length - 1))
|
||||
_ColorTable = _ColorTable.Remove(InStr(_ColorTable, "}") - 1) '--Act Color table
|
||||
Dim _ColorArray As String() = _ColorTable.Split(New [Char]() {";"c})
|
||||
Dim _CTable As New StringBuilder()
|
||||
_CTable.Append("{\colortbl")
|
||||
For _ik As Int32 = 0 To _ColorArray.Length - 2
|
||||
_CTable.Append(_ColorArray(_ik) & ";")
|
||||
Next
|
||||
_CTable.Append("\red240\green240\blue240 ;}")
|
||||
_OrigColorTable = "{\colortbl" & _ColorTable & "}"
|
||||
_ImmovablesPriceListHeader.DocumentBody = _ImmovablesPriceListHeader.DocumentBody.Replace(_OrigColorTable, _CTable.ToString())
|
||||
|
||||
_ImmovablesPriceListHeader.DocumentBody = _ImmovablesPriceListHeader.DocumentBody.Replace("improjectim", _ImmovablesPriceListHeader.ImmovablesGroups.ShortName)
|
||||
|
||||
'=================================================================================
|
||||
|
||||
'=========================== Apartments =======================================
|
||||
Dim ImmovablesPriceListRowsA As ListPropertyEditor
|
||||
ImmovablesPriceListRowsA = TryCast(View, DetailView).FindItem("ImmovablesPriceListRowsA")
|
||||
If CType(ImmovablesPriceListRowsA.ListView, ListView) IsNot Nothing Then
|
||||
Dim _ListView_Apartments As ListView = CType(ImmovablesPriceListRowsA.ListView, ListView)
|
||||
Dim _GridListEditor_Apartments As GridListEditor = TryCast(_ListView_Apartments.Editor, GridListEditor)
|
||||
Dim _Grid_Apartments As GridView = TryCast(_GridListEditor_Apartments.GridView, GridView)
|
||||
|
||||
If _Grid_Apartments IsNot Nothing Then
|
||||
_ImmovablesPriceListHeader.DocumentBody = RTFTableCreator(_Grid_Apartments, "imapartmentsim", _ImmovablesPriceListHeader.DocumentBody)
|
||||
End If
|
||||
End If
|
||||
'=================================================================================
|
||||
|
||||
'=========================== Offices ==========================================
|
||||
Dim ImmovablesPriceListRowsO As ListPropertyEditor
|
||||
ImmovablesPriceListRowsO = TryCast(View, DetailView).FindItem("ImmovablesPriceListRowsO")
|
||||
If CType(ImmovablesPriceListRowsO.ListView, ListView) IsNot Nothing Then
|
||||
Dim _ListView_Offices As ListView = CType(ImmovablesPriceListRowsO.ListView, ListView)
|
||||
Dim _GridListEditor_Offices As GridListEditor = TryCast(_ListView_Offices.Editor, GridListEditor)
|
||||
Dim _Grid_Offices As GridView = TryCast(_GridListEditor_Offices.GridView, GridView)
|
||||
|
||||
If _Grid_Offices IsNot Nothing Then
|
||||
_ImmovablesPriceListHeader.DocumentBody = RTFTableCreator(_Grid_Offices, "imofficesim", _ImmovablesPriceListHeader.DocumentBody)
|
||||
End If
|
||||
End If
|
||||
'=================================================================================
|
||||
|
||||
'=========================== Garages ==========================================
|
||||
Dim ImmovablesPriceListRowsG As ListPropertyEditor
|
||||
ImmovablesPriceListRowsG = TryCast(View, DetailView).FindItem("ImmovablesPriceListRowsG")
|
||||
If CType(ImmovablesPriceListRowsG.ListView, ListView) IsNot Nothing Then
|
||||
Dim _ListView_Garages As ListView = CType(ImmovablesPriceListRowsG.ListView, ListView)
|
||||
Dim _GridListEditor_Garages As GridListEditor = TryCast(_ListView_Garages.Editor, GridListEditor)
|
||||
Dim _Grid_Garages As GridView = TryCast(_GridListEditor_Garages.GridView, GridView)
|
||||
|
||||
If _Grid_Garages IsNot Nothing Then
|
||||
_ImmovablesPriceListHeader.DocumentBody = RTFTableCreator(_Grid_Garages, "imgaragesim", _ImmovablesPriceListHeader.DocumentBody)
|
||||
End If
|
||||
End If
|
||||
'=================================================================================
|
||||
|
||||
'=========================== Container ==========================================
|
||||
Dim ImmovablesPriceListRowsC As ListPropertyEditor
|
||||
ImmovablesPriceListRowsC = TryCast(View, DetailView).FindItem("ImmovablesPriceListRowsC")
|
||||
|
||||
If CType(ImmovablesPriceListRowsC.ListView, ListView) IsNot Nothing Then
|
||||
Dim _ListView_Container As ListView = CType(ImmovablesPriceListRowsC.ListView, ListView)
|
||||
Dim _GridListEditor_Container As GridListEditor = TryCast(_ListView_Container.Editor, GridListEditor)
|
||||
Dim _Grid_Container As GridView = TryCast(_GridListEditor_Container.GridView, GridView)
|
||||
|
||||
If _Grid_Container IsNot Nothing Then
|
||||
_ImmovablesPriceListHeader.DocumentBody = RTFTableCreator(_Grid_Container, "imcontainerim", _ImmovablesPriceListHeader.DocumentBody)
|
||||
End If
|
||||
End If
|
||||
|
||||
'=================================================================================
|
||||
End Sub
|
||||
Function RTFTableCreator(_Grid As GridView, _Tag As String, _DocumentBody As String, Optional _FontSize As String = "8", _
|
||||
Optional _FontType As String = "Tahoma", Optional _RGB As String = "240,240,240") As String
|
||||
Dim _DocumentBody_NEW As String
|
||||
Dim _HeaderFillColor As Int32 ' -- Current table header fill color index in colot table
|
||||
|
||||
If _RGB <> "240,240,240" Then
|
||||
Dim _Parameters As String() = ColorTablereplacement(_DocumentBody, _RGB)
|
||||
_HeaderFillColor = Convert.ToInt32(_Parameters(0))
|
||||
_DocumentBody = _Parameters(1)
|
||||
Else
|
||||
_HeaderFillColor = 2
|
||||
End If
|
||||
|
||||
If _Grid.DataRowCount > 0 Then
|
||||
Dim _FontSizeNUM As Int32 = (Convert.ToInt32(_FontSize) * 2) ' -- Font size in half-points (the default is 16). => Size 8!!!
|
||||
Dim _RTFtext As New StringBuilder
|
||||
Dim _RowNumFull As Integer = _Grid.RowCount
|
||||
Dim _RowNum As Integer = _Grid.DataRowCount
|
||||
Dim _ColumnsNum As Integer = _Grid.Columns.Count
|
||||
Dim irowIndex As Int32 = 0
|
||||
Dim _LastCellIndex As Int32 = 0
|
||||
|
||||
'--Header to RTF format--
|
||||
'=================================================================================
|
||||
_RTFtext.Append("\pard\plain\ql\par\trowd\irow" & irowIndex & "\irowband" & irowIndex & "\trbrdrt\brdrs\brdrw10\trbrdrl\brdrs\brdrw10" & _
|
||||
"\trbrdrb\brdrs\brdrw10\trbrdrr\brdrs\brdrw10\trleft-108\trautofit1\trpaddfl3\trpaddl108\trpaddfr3\trpaddr108")
|
||||
|
||||
For _ik As Integer = 0 To _Grid.Columns.View.VisibleColumns.Count - 1
|
||||
_RTFtext.Append("\clvertalt\clcbpat2\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10" &
|
||||
"\cltxlrtb\clftsWidth3\clwWidth3302\clpadfr3\clpadr108\clpadft3\clpadt108\cellx" & _ik)
|
||||
If _LastCellIndex < _ik Then
|
||||
_LastCellIndex = _ik
|
||||
End If
|
||||
Next
|
||||
For _ik As Integer = 0 To _Grid.Columns.View.VisibleColumns.Count - 1
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\b\fs" & _FontSizeNUM & "\cf0 " & _Grid.Columns.View.VisibleColumns(_ik).Caption & "}\b\cell")
|
||||
Next
|
||||
|
||||
_RTFtext.Append("\trowd\irow" & irowIndex & "\irowband" & irowIndex & "\trbrdrt\brdrs\brdrw10\trbrdrl\brdrs\brdrw10" & _
|
||||
"\trbrdrb\brdrs\brdrw10\trbrdrr\brdrs\brdrw10\trleft-108\trautofit1\trpaddfl3\trpaddl108\trpaddfr3\trpaddr108")
|
||||
For _ik As Integer = 0 To _Grid.Columns.View.VisibleColumns.Count - 1
|
||||
_RTFtext.Append("\clvertalt\clcbpat" & _HeaderFillColor & "\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10" &
|
||||
"\cltxlrtb\clftsWidth3\clwWidth3302\clpadfr3\clpadr108\clpadft3\clpadt108\cellx" & _ik)
|
||||
Next
|
||||
irowIndex += 1
|
||||
'' --Data to RTF format--
|
||||
'=================================================================================
|
||||
For _ik As Int16 = 0 To _RowNumFull - 2
|
||||
If _Grid.IsGroupRow(_Grid.Columns.View.GetVisibleRowHandle(_ik)) = True Then
|
||||
_RTFtext.Append("\row")
|
||||
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\fs" & _FontSizeNUM & "\cf0 " & (_Grid.GetGroupRowDisplayText(_Grid.Columns.View.GetVisibleRowHandle(_ik)).ToString) & "}\cell")
|
||||
|
||||
|
||||
_RTFtext.Append("\trowd\irow" & irowIndex & "\irowband" & irowIndex & "\trbrdrt\brdrs\brdrw10\trbrdrl\brdrs\brdrw10\trbrdrb\brdrs\brdrw10\trbrdrr\brdrs\brdrw10" & _
|
||||
"\trleft-108\trftsWidth1\trautofit1\trpaddfl3\trpaddl108\trpaddfr3\trpaddr108\tblindtype3\tblind0")
|
||||
|
||||
_RTFtext.Append("\clvertalt\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10\cltxlrtb\clftsWidth3\clwWidth9619" & _
|
||||
"\clpadfr3\clpadr108\clpadft3\clpadt108\cellx" & _LastCellIndex)
|
||||
|
||||
irowIndex += 1
|
||||
Else
|
||||
_RTFtext.Append("\row")
|
||||
|
||||
For _jk As Integer = 0 To _Grid.Columns.View.VisibleColumns.Count - 1
|
||||
If _Grid.Columns.View.VisibleColumns(_jk).ColumnType.FullName <> "System.Double" And _Grid.Columns.View.VisibleColumns(_jk).ColumnType.FullName <> "System.Boolean" Then
|
||||
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\fs" & _FontSizeNUM & "\cf0 " & (_Grid.GetRowCellDisplayText(_Grid.Columns.View.GetVisibleRowHandle(_ik), _Grid.Columns.View.VisibleColumns(_jk))) & "}\cell")
|
||||
ElseIf _Grid.Columns.View.VisibleColumns(_jk).ColumnType.FullName = "System.Boolean" Then
|
||||
If _Grid.GetRowCellValue(_Grid.Columns.View.GetVisibleRowHandle(_ik), _Grid.Columns.View.VisibleColumns(_jk)) = True Then
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\fs" & _FontSizeNUM & "\cf0 " & "Van" & "}\cell")
|
||||
Else
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\fs" & _FontSizeNUM & "\cf0 " & "Nincs" & "}\cell")
|
||||
End If
|
||||
Else
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\fs" & _FontSizeNUM & "\cf0\qr " & LTrim(RTrim(Format(_Grid.Columns.View.GetRowCellValue(_Grid.Columns.View.GetVisibleRowHandle(_ik), _Grid.Columns.View.VisibleColumns(_jk)), "#,##0.00"))) & "}\qr\cell")
|
||||
|
||||
End If
|
||||
Next
|
||||
|
||||
_RTFtext.Append("\trowd\irow" & irowIndex & "\irowband" & irowIndex & "\trbrdrt\brdrs\brdrw10\trbrdrl\brdrs\brdrw10\trbrdrb\brdrs\brdrw10\trbrdrr\brdrs\brdrw10" & _
|
||||
"\trleft-108\trautofit1\trpaddfl3\trpaddl108\trpaddfr3\trpaddr108")
|
||||
|
||||
For _jk As Integer = 0 To _Grid.Columns.View.VisibleColumns.Count - 1
|
||||
|
||||
_RTFtext.Append("\clvertalt\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10\cltxlrtb\clftsWidth3\clwWidth3302" & _
|
||||
"\clpadfr3\clpadr108\clpadft3\clpadt108\cellx" & _jk)
|
||||
Next
|
||||
irowIndex += 1
|
||||
End If
|
||||
Next
|
||||
'--Last row --
|
||||
'=================================================================================
|
||||
If _Grid.IsGroupRow(_Grid.Columns.View.GetVisibleRowHandle(_RowNum - 1)) = True Then
|
||||
_RTFtext.Append("\row")
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\fs" & _FontSizeNUM & "\cf0 " & (_Grid.GetGroupRowDisplayText(_Grid.Columns.View.GetVisibleRowHandle(_RowNum - 1)).ToString) & "}\cell")
|
||||
|
||||
_RTFtext.Append("\trowd\irow" & irowIndex & "\irowband" & irowIndex & "\trbrdrt\brdrs\brdrw10\trbrdrl\brdrs\brdrw10\trbrdrb\brdrs\brdrw10\trbrdrr\brdrs\brdrw10" & _
|
||||
"\trleft-108\trftsWidth1\trautofit1\trpaddfl3\trpaddl108\trpaddfr3\trpaddr108\tblindtype3\tblind0")
|
||||
|
||||
_RTFtext.Append("\clvertalt\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10\cltxlrtb\clftsWidth3\clwWidth9619" & _
|
||||
"\clpadfr3\clpadr108\clpadft3\clpadt108\cellx" & _LastCellIndex)
|
||||
Else
|
||||
_RTFtext.Append("\row")
|
||||
For _jk As Integer = 0 To _Grid.Columns.View.VisibleColumns.Count - 1
|
||||
If _Grid.Columns.View.VisibleColumns(_jk).ColumnType.FullName <> "System.Double" And _Grid.Columns.View.VisibleColumns(_jk).ColumnType.FullName <> "System.Boolean" Then
|
||||
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\fs" & _FontSizeNUM & "\cf0 " & (_Grid.Columns.View.GetRowCellDisplayText(_RowNum - 1, _Grid.Columns.View.VisibleColumns(_jk))) & "}\cell")
|
||||
ElseIf _Grid.Columns.View.VisibleColumns(_jk).ColumnType.FullName = "System.Boolean" Then
|
||||
If _Grid.IsGroupRow(_Grid.Columns.View.GetVisibleRowHandle(_RowNum - 1)) = True Then
|
||||
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\fs" & _FontSizeNUM & "\cf0 " & "Van" & "}\cell")
|
||||
Else
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\fs" & _FontSizeNUM & "\cf0 " & "Nincs" & "}\cell")
|
||||
End If
|
||||
Else
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\fs" & _FontSizeNUM & "\cf0\qr " & LTrim(RTrim(Format(_Grid.Columns.View.GetRowCellValue(_Grid.Columns.View.GetVisibleRowHandle(_RowNum - 1), _Grid.Columns.View.VisibleColumns(_jk)), "#,##0.00"))) & "}\qr\cell")
|
||||
End If
|
||||
Next
|
||||
|
||||
_RTFtext.Append("\trowd\irow" & irowIndex & "\irowband" & irowIndex & "\lastrow\trbrdrt\brdrs\brdrw10\trbrdrl\brdrs\brdrw10\trbrdrb\brdrs\brdrw10\trbrdrr\brdrs\brdrw10" & _
|
||||
"\trleft-108\trautofit1\trpaddfl3\trpaddl108\trpaddfr3\trpaddr108")
|
||||
''---
|
||||
For _jk As Integer = 0 To _Grid.Columns.View.VisibleColumns.Count - 1
|
||||
|
||||
_RTFtext.Append("\clvertalt\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10\cltxlrtb\clftsWidth3\clwWidth3302" & _
|
||||
"\clpadfr3\clpadr108\clpadft3\clpadt108\cellx" & _jk)
|
||||
Next
|
||||
End If
|
||||
|
||||
_RTFtext.Append("\row\pard\plain\ql")
|
||||
_DocumentBody_NEW = _DocumentBody.Replace(_Tag, _RTFtext.ToString())
|
||||
If _DocumentBody_NEW.Contains("\fonttbl{\f0 Times New Roman;") Then
|
||||
_DocumentBody_NEW = _DocumentBody_NEW.Replace("\fonttbl{\f0 Times New Roman;", "\fonttbl{\f0 " & _FontType & ";") 'Font table remake
|
||||
End If
|
||||
Else
|
||||
_DocumentBody_NEW = _DocumentBody.Replace(_Tag, " ")
|
||||
End If
|
||||
|
||||
Return _DocumentBody_NEW
|
||||
End Function
|
||||
Function ColorTablereplacement(_DocumentBody As String, _RGB As String) As String()
|
||||
Dim _Parameters(1) As String
|
||||
Dim _RGBArray As String() = _RGB.Split(New [Char]() {","c})
|
||||
|
||||
Dim _actColorNum As Int32 = -1
|
||||
Dim _ColorTable As String = (_DocumentBody.Remove(0, (InStr(_DocumentBody, "{\colortbl")) + "{\colortbl".Length - 1))
|
||||
_ColorTable = _ColorTable.Remove(InStr(_ColorTable, "}") - 1) '--Act Color table
|
||||
Dim _ColorArray As String() = _ColorTable.Split(New [Char]() {";"c})
|
||||
|
||||
For _ik As Int32 = 0 To _ColorArray.Length - 1
|
||||
If _ColorArray(_ik) = "\red" & _RGBArray(0) & "\green" & _RGBArray(1) & "\blue" & _RGBArray(2) & " " Then
|
||||
_actColorNum = _ik
|
||||
End If
|
||||
Next
|
||||
If _actColorNum = -1 Then
|
||||
Dim _CTable As New StringBuilder()
|
||||
_CTable.Append("{\colortbl")
|
||||
For _ik As Int32 = 0 To _ColorArray.Length - 2
|
||||
_CTable.Append(_ColorArray(_ik) & ";")
|
||||
Next
|
||||
_CTable.Append("\red" & _RGBArray(0) & "\green" & _RGBArray(1) & "\blue" & _RGBArray(2) & " ;}")
|
||||
Dim _OrigColorTable As String = "{\colortbl" & _ColorTable & "}"
|
||||
_DocumentBody = _DocumentBody.Replace(_OrigColorTable, _CTable.ToString())
|
||||
_Parameters(0) = _ColorArray.Length - 1
|
||||
_Parameters(1) = _DocumentBody
|
||||
Else
|
||||
_Parameters(0) = _actColorNum
|
||||
_Parameters(1) = _DocumentBody
|
||||
End If
|
||||
Return _Parameters
|
||||
End Function
|
||||
Private Function RTFTableCreatorCurrentPos(_Grid As GridView) ', _DocumentBody As String) As String
|
||||
Dim _RTFtext As New StringBuilder
|
||||
Dim _RowNum As Integer = _Grid.RowCount
|
||||
Dim _ColumnsNum As Integer = _Grid.Columns.Count
|
||||
Dim irowIndex As Integer = 0
|
||||
'--Fejléc kiírása RTFként--
|
||||
|
||||
_RTFtext.Append("\par\pard\plain\ql\par\trowd\irow" & irowIndex & "\irowband" & irowIndex & "\trbrdrt\brdrs\brdrw10\trbrdrl\brdrs\brdrw10" & _
|
||||
"\trbrdrb\brdrs\brdrw10\trbrdrr\brdrs\brdrw10\trleft-108\trautofit1\trpaddfl3\trpaddl108\trpaddfr3\trpaddr108")
|
||||
For _ik As Integer = 0 To _ColumnsNum - 1
|
||||
If _Grid.Columns(_ik).Visible = True Then
|
||||
_RTFtext.Append("\clvertalt\clcbpat2\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10" &
|
||||
"\cltxlrtb\clftsWidth3\clwWidth3302\clpadfr3\clpadr108\clpadft3\clpadt108\cellx" & _ik)
|
||||
End If
|
||||
Next
|
||||
For _ik As Integer = 0 To _ColumnsNum - 1
|
||||
If _Grid.Columns(_ik).Visible = True Then
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\b\cf0" & _Grid.Columns(_ik).Caption & "}\b\cell")
|
||||
End If
|
||||
Next
|
||||
|
||||
_RTFtext.Append("\trowd\irow" & irowIndex & "\irowband" & irowIndex & "\trbrdrt\brdrs\brdrw10\trbrdrl\brdrs\brdrw10" & _
|
||||
"\trbrdrb\brdrs\brdrw10\trbrdrr\brdrs\brdrw10\trleft-108\trautofit1\trpaddfl3\trpaddl108\trpaddfr3\trpaddr108")
|
||||
For _ik As Integer = 0 To _ColumnsNum - 1
|
||||
If _Grid.Columns(_ik).Visible = True Then
|
||||
_RTFtext.Append("\clvertalt\clcbpat2\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10" &
|
||||
"\cltxlrtb\clftsWidth3\clwWidth3302\clpadfr3\clpadr108\clpadft3\clpadt108\cellx" & _ik)
|
||||
End If
|
||||
Next
|
||||
irowIndex += 1
|
||||
|
||||
'' --Adatsorok kiírása RTFként--
|
||||
For _ik As Integer = 0 To _RowNum - 2
|
||||
|
||||
_RTFtext.Append("\row")
|
||||
For _jk As Integer = 0 To _ColumnsNum - 2
|
||||
If _Grid.Columns(_jk).Visible = True Then
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\cf0" & (_Grid.GetRowCellValue(_ik, _Grid.Columns(_jk)).ToString()) & "}\cell")
|
||||
End If
|
||||
Next
|
||||
|
||||
_RTFtext.Append("\trowd\irow" & irowIndex & "\irowband" & irowIndex & "\trbrdrt\brdrs\brdrw10\trbrdrl\brdrs\brdrw10\trbrdrb\brdrs\brdrw10\trbrdrr\brdrs\brdrw10" & _
|
||||
"\trleft-108\trautofit1\trpaddfl3\trpaddl108\trpaddfr3\trpaddr108")
|
||||
|
||||
For _jk As Integer = 0 To _ColumnsNum - 1
|
||||
If _Grid.Columns(_jk).Visible = True Then
|
||||
_RTFtext.Append("\clvertalt\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10\cltxlrtb\clftsWidth3\clwWidth3302" & _
|
||||
"\clpadfr3\clpadr108\clpadft3\clpadt108\cellx" & _jk)
|
||||
End If
|
||||
Next
|
||||
irowIndex += 1
|
||||
Next
|
||||
|
||||
''--Utolsó sor --
|
||||
_RTFtext.Append("\row")
|
||||
For _jk As Integer = 0 To _ColumnsNum - 2
|
||||
If _Grid.Columns(_jk).Visible = True Then
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\cf0" & (_Grid.GetRowCellValue(_RowNum - 1, _Grid.Columns(_jk)).ToString()) & "}\cell")
|
||||
End If
|
||||
Next
|
||||
|
||||
_RTFtext.Append("\trowd\irow" & irowIndex & "\irowband" & irowIndex & "\lastrow\trbrdrt\brdrs\brdrw10\trbrdrl\brdrs\brdrw10\trbrdrb\brdrs\brdrw10\trbrdrr\brdrs\brdrw10" & _
|
||||
"\trleft-108\trautofit1\trpaddfl3\trpaddl108\trpaddfr3\trpaddr108")
|
||||
|
||||
For _jk As Integer = 0 To _ColumnsNum - 1
|
||||
If _Grid.Columns(_jk).Visible = True Then
|
||||
_RTFtext.Append("\clvertalt\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10\cltxlrtb\clftsWidth3\clwWidth3302" & _
|
||||
"\clpadfr3\clpadr108\clpadft3\clpadt108\cellx" & _jk)
|
||||
End If
|
||||
Next
|
||||
_RTFtext.Append("\row\pard\plain\ql\par")
|
||||
|
||||
'_DocumentBody_NEW = _DocumentBody.Replace(_Tag, _RTFtext.ToString())
|
||||
'_DocumentBody_NEW = _DocumentBody_NEW.Replace("{\colortbl\red0\green0\blue0 ;\red0\green0\blue255 ;}", "{\colortbl\red0\green0\blue0 ;\red0\green0\blue255 ;\red192\green192\blue192 ;}")
|
||||
|
||||
Return _RTFtext.ToString()
|
||||
End Function
|
||||
Private Sub aRestorePriceListTemplate_Execute(ByVal sender As System.Object, ByVal e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aRestorePriceListTemplate.Execute
|
||||
Try
|
||||
Dim _ocur As Xpo.XPObjectSpace = View.ObjectSpace
|
||||
Dim _ImmovablesPriceListHeader As ImmovablesPriceListHeader = TryCast(e.SelectedObjects(0), ImmovablesPriceListHeader)
|
||||
Dim _ImmovablesGroupsParameters As ImmovablesGroupsParameters = _ocur.FindObject(Of ImmovablesGroupsParameters)(CriteriaOperator.Parse("ImmovablesGroups=?", _ImmovablesPriceListHeader.ImmovablesGroups))
|
||||
|
||||
If _ImmovablesGroupsParameters Is Nothing Then Throw New Exception("*Nincsen beállítva az adott ingatlancsoporthoz a paraméterek!")
|
||||
_ImmovablesPriceListHeader.DocumentBody = _ImmovablesGroupsParameters.DocumentBodyPriceList
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly)
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub RichEditControlViewItem_ControlCreated(sender As Object, e As EventArgs)
|
||||
Dim itemControl As Object = (CType(sender, ViewItem)).Control
|
||||
_RichEditControl = TryCast(itemControl, RichEditUserControl).RichEditControl
|
||||
End Sub
|
||||
End Class
|
||||
+112
@@ -0,0 +1,112 @@
|
||||
Partial Class ImmovablesCostRecordExcelVC
|
||||
|
||||
<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.aInsertCostRecords = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aFinalizeCostRecords = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aImportCostRecords = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aTempLikor = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aSetUnitPrice = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
|
||||
'
|
||||
'aInsertCostRecords
|
||||
'
|
||||
Me.aInsertCostRecords.Caption = "aInsert Cost Records"
|
||||
Me.aInsertCostRecords.ConfirmationMessage = "Do you want to execute ?"
|
||||
Me.aInsertCostRecords.Id = "aInsertCostRecords"
|
||||
Me.aInsertCostRecords.ImageName = Nothing
|
||||
Me.aInsertCostRecords.Shortcut = Nothing
|
||||
Me.aInsertCostRecords.Tag = Nothing
|
||||
Me.aInsertCostRecords.TargetObjectsCriteria = Nothing
|
||||
Me.aInsertCostRecords.TargetViewId = "ImmovablesCostRecordExcel_DetailView"
|
||||
Me.aInsertCostRecords.ToolTip = Nothing
|
||||
Me.aInsertCostRecords.TypeOfView = Nothing
|
||||
'
|
||||
'aFinalizeCostRecords
|
||||
'
|
||||
Me.aFinalizeCostRecords.Caption = "aFinalize Cost Records"
|
||||
Me.aFinalizeCostRecords.Category = "Save"
|
||||
Me.aFinalizeCostRecords.ConfirmationMessage = "Do you want to execute ?"
|
||||
Me.aFinalizeCostRecords.Id = "aFinalizeCostRecords"
|
||||
Me.aFinalizeCostRecords.ImageName = "disk_red"
|
||||
Me.aFinalizeCostRecords.Shortcut = Nothing
|
||||
Me.aFinalizeCostRecords.Tag = Nothing
|
||||
Me.aFinalizeCostRecords.TargetObjectsCriteria = Nothing
|
||||
Me.aFinalizeCostRecords.TargetViewId = "ImmovablesCostRecordExcel_DetailView"
|
||||
Me.aFinalizeCostRecords.ToolTip = Nothing
|
||||
Me.aFinalizeCostRecords.TypeOfView = Nothing
|
||||
'
|
||||
'aImportCostRecords
|
||||
'
|
||||
Me.aImportCostRecords.Caption = "aImport Cost Records"
|
||||
Me.aImportCostRecords.ConfirmationMessage = "Do you want to execute ?"
|
||||
Me.aImportCostRecords.Id = "aImportCostRecords"
|
||||
Me.aImportCostRecords.ImageName = Nothing
|
||||
Me.aImportCostRecords.Shortcut = Nothing
|
||||
Me.aImportCostRecords.Tag = Nothing
|
||||
Me.aImportCostRecords.TargetObjectsCriteria = Nothing
|
||||
Me.aImportCostRecords.TargetViewId = "ImmovablesCostRecordExcel_DetailView"
|
||||
Me.aImportCostRecords.ToolTip = Nothing
|
||||
Me.aImportCostRecords.TypeOfView = Nothing
|
||||
'
|
||||
'aTempLikor
|
||||
'
|
||||
Me.aTempLikor.Caption = "TEMP Import"
|
||||
Me.aTempLikor.ConfirmationMessage = Nothing
|
||||
Me.aTempLikor.Id = "aTempLikor"
|
||||
Me.aTempLikor.ImageName = Nothing
|
||||
Me.aTempLikor.Shortcut = Nothing
|
||||
Me.aTempLikor.Tag = Nothing
|
||||
Me.aTempLikor.TargetObjectsCriteria = Nothing
|
||||
Me.aTempLikor.TargetViewId = "ImmovablesCostRecordExcel_DetailView"
|
||||
Me.aTempLikor.ToolTip = Nothing
|
||||
Me.aTempLikor.TypeOfView = Nothing
|
||||
'
|
||||
'aSetUnitPrice
|
||||
'
|
||||
Me.aSetUnitPrice.AcceptButtonCaption = Nothing
|
||||
Me.aSetUnitPrice.CancelButtonCaption = Nothing
|
||||
Me.aSetUnitPrice.Caption = "aSet Unit Price"
|
||||
Me.aSetUnitPrice.Category = "View"
|
||||
Me.aSetUnitPrice.ConfirmationMessage = Nothing
|
||||
Me.aSetUnitPrice.Id = "aSetUnitPrice"
|
||||
Me.aSetUnitPrice.ImageName = Nothing
|
||||
Me.aSetUnitPrice.Shortcut = Nothing
|
||||
Me.aSetUnitPrice.Tag = Nothing
|
||||
Me.aSetUnitPrice.TargetObjectsCriteria = Nothing
|
||||
Me.aSetUnitPrice.TargetViewId = "ImmovablesCostRecordExcel_DetailView"
|
||||
Me.aSetUnitPrice.ToolTip = Nothing
|
||||
Me.aSetUnitPrice.TypeOfView = Nothing
|
||||
|
||||
End Sub
|
||||
Friend WithEvents aInsertCostRecords As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aFinalizeCostRecords As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aImportCostRecords As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aTempLikor As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aSetUnitPrice As DevExpress.ExpressApp.Actions.PopupWindowShowAction
|
||||
|
||||
End Class
|
||||
+138
@@ -0,0 +1,138 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="aInsertCostRecords.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 173</value>
|
||||
</metadata>
|
||||
<metadata name="aFinalizeCostRecords.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 134</value>
|
||||
</metadata>
|
||||
<metadata name="aImportCostRecords.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 95</value>
|
||||
</metadata>
|
||||
<metadata name="aTempLikor.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 56</value>
|
||||
</metadata>
|
||||
<metadata name="aSetUnitPrice.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>
|
||||
+648
@@ -0,0 +1,648 @@
|
||||
Imports System
|
||||
Imports System.ComponentModel
|
||||
Imports System.Collections.Generic
|
||||
Imports System.Diagnostics
|
||||
Imports System.Text
|
||||
|
||||
Imports DevExpress.ExpressApp
|
||||
Imports DevExpress.ExpressApp.Actions
|
||||
Imports DevExpress.Persistent.Base
|
||||
Imports DevExpress.ExpressApp.SystemModule
|
||||
Imports FarPoint.Win.Spread
|
||||
Imports System.IO
|
||||
Imports DevExpress.Persistent.BaseImpl
|
||||
Imports DevExpress.Data.Filtering
|
||||
Imports DevExpress.Xpo
|
||||
Imports System.Windows.Forms
|
||||
Imports System.Data.OleDb
|
||||
Imports DevExpress.ExpressApp.Editors
|
||||
Imports System.Drawing
|
||||
Imports System.Globalization
|
||||
|
||||
Public Class ImmovablesCostRecordExcelVC
|
||||
Inherits DevExpress.ExpressApp.ViewController
|
||||
|
||||
Private _FpSpread As FpSpread
|
||||
Dim _WaitFormClass As New WaitFormClass
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
|
||||
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
|
||||
End Sub
|
||||
Protected Overrides Sub OnActivated()
|
||||
MyBase.OnActivated()
|
||||
|
||||
If View.Id = "ImmovablesCostRecordExcel_ListView" Then
|
||||
Dim _ocur As Xpo.XPObjectSpace = View.ObjectSpace
|
||||
Dim _ImmovablesCostRecordExcel As ImmovablesCostRecordExcel = _ocur.FindObject(Of ImmovablesCostRecordExcel)(CriteriaOperator.Parse("IsEditable=?", True))
|
||||
|
||||
'If _ImmovablesCostRecordExcel IsNot Nothing Then
|
||||
' Frame.GetController(Of DevExpress.ExpressApp.SystemModule.NewObjectViewController)().Active.SetItemValue("", False)
|
||||
'End If
|
||||
End If
|
||||
|
||||
If View.Id = "ImmovablesCostRecordExcel_DetailView" Then
|
||||
AddHandler Frame.GetController(Of ModificationsController)().SaveAction.Executing, AddressOf SaveAction_Executing
|
||||
AddHandler Frame.GetController(Of ModificationsController)().SaveAndCloseAction.Executing, AddressOf SaveAction_Executing
|
||||
AddHandler Frame.GetController(Of ModificationsController)().SaveAndNewAction.Executing, AddressOf SaveAction_Executing
|
||||
|
||||
Frame.GetController(Of ImmovablesCostRecordExcelVC)().aTempLikor.Active.SetItemValue("", False)
|
||||
|
||||
Dim _ocur As Xpo.XPObjectSpace = View.ObjectSpace
|
||||
Dim _ImmovablesCostRecordExcel As ImmovablesCostRecordExcel = _ocur.FindObject(Of ImmovablesCostRecordExcel)(CriteriaOperator.Parse("IsEditable=?", True))
|
||||
|
||||
If _ImmovablesCostRecordExcel IsNot Nothing Then
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.NewObjectViewController)().Active.SetItemValue("", False)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Protected Overrides Sub OnDeactivated()
|
||||
MyBase.OnDeactivated()
|
||||
If View.Id = "ImmovablesCostRecordExcel_DetailView" Then
|
||||
RemoveHandler Frame.GetController(Of ModificationsController)().SaveAction.Executing, AddressOf SaveAction_Executing
|
||||
RemoveHandler Frame.GetController(Of ModificationsController)().SaveAndCloseAction.Executing, AddressOf SaveAction_Executing
|
||||
RemoveHandler Frame.GetController(Of ModificationsController)().SaveAndNewAction.Executing, AddressOf SaveAction_Executing
|
||||
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.NewObjectViewController)().Active.SetItemValue("", True)
|
||||
End If
|
||||
|
||||
If View.Id = "ImmovablesCostRecordExcel_ListView" Then
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.NewObjectViewController)().Active.SetItemValue("", True)
|
||||
End If
|
||||
End Sub
|
||||
Protected Overrides Sub OnViewControlsCreated()
|
||||
MyBase.OnViewControlsCreated()
|
||||
If View.Id = "ImmovablesCostRecordExcel_DetailView" Then
|
||||
|
||||
Dim _ExcelControlViewItem As ViewItem
|
||||
_ExcelControlViewItem = TryCast(View, DetailView).GetItems(Of ExcelPropertyEditor)(0)
|
||||
If _ExcelControlViewItem IsNot Nothing Then
|
||||
AddHandler _ExcelControlViewItem.ControlCreated, AddressOf ExcelControlViewItem_ControlCreated
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
Private Sub ExcelControlViewItem_ControlCreated(ByVal sender As Object, ByVal e As EventArgs)
|
||||
Dim itemControl As Object = (CType(sender, ViewItem)).Control
|
||||
|
||||
_FpSpread = TryCast(itemControl, ExcelUserControl).FpSpreadControl
|
||||
|
||||
If _FpSpread IsNot Nothing Then
|
||||
_FpSpread.EditModeReplace = True
|
||||
Dim _FileName As String = Path.GetTempPath & "OutSpread.xml"
|
||||
Dim _StreamFile As New FileStream(_FileName, FileMode.Create)
|
||||
Dim _ImmovablesCostRecordExcel As ImmovablesCostRecordExcel = TryCast(View.SelectedObjects(0), ImmovablesCostRecordExcel)
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
If _ocur.Session.IsNewObject(_ImmovablesCostRecordExcel) = False Then
|
||||
If _ImmovablesCostRecordExcel IsNot Nothing Then
|
||||
If _ImmovablesCostRecordExcel.ExcelFile IsNot Nothing Then
|
||||
_ImmovablesCostRecordExcel.ExcelFile.SaveToStream(_StreamFile)
|
||||
_StreamFile.Close()
|
||||
_FpSpread.Open(_FileName)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
Sub SaveAction_Executing(sender As Object, e As System.ComponentModel.CancelEventArgs)
|
||||
Dim _FileName As String = Path.GetTempPath & "InSpread.xml"
|
||||
Dim _StreamFile As New FileStream(_FileName, FileMode.Create)
|
||||
Dim _ImmovablesCostRecordExcel As ImmovablesCostRecordExcel = TryCast(View.SelectedObjects(0), ImmovablesCostRecordExcel)
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
If _ImmovablesCostRecordExcel IsNot Nothing Then
|
||||
If _FpSpread IsNot Nothing Then
|
||||
_FpSpread.Save(_StreamFile, False)
|
||||
_StreamFile.Close()
|
||||
Dim _StreamFile2 As New FileStream(_FileName, FileMode.Open)
|
||||
_ImmovablesCostRecordExcel.ExcelFile = New FileData(_ocur.Session)
|
||||
_ImmovablesCostRecordExcel.ExcelFile.LoadFromStream("Excel worksheet", _StreamFile2)
|
||||
_ImmovablesCostRecordExcel.Save()
|
||||
_StreamFile2.Close()
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Private Sub aInsertCostRecords_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aInsertCostRecords.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _Sort As New SortProperty("Immovables.UniqueObjects.Name", DB.SortingDirection.Ascending)
|
||||
Dim _SortRecordGroup As New SortProperty("ShortName", DB.SortingDirection.Ascending)
|
||||
Dim _SortRecordMainGroup As New SortProperty("ImmovablesCostRecordMainGroup.GroupName", DB.SortingDirection.Ascending)
|
||||
Dim _ImmovablesCostRecordExcel As ImmovablesCostRecordExcel = TryCast(View.SelectedObjects(0), ImmovablesCostRecordExcel)
|
||||
_ImmovablesCostRecordExcel.ImmovablesCostRecordExcelImmovables.Sorting.Add(_Sort)
|
||||
_ImmovablesCostRecordExcel.ImmovablesCostRecordExcelMainGroup.Sorting.Add(_SortRecordMainGroup)
|
||||
Dim _ImmovablesCostRecordGroup As XPCollection = _ocur.CreateCollection(GetType(ImmovablesCostRecordGroup), CriteriaOperator.Parse("1=2"))
|
||||
Dim _ImmovablesCostRecordMainGroup_Collection As XPCollection = _ocur.CreateCollection(GetType(ImmovablesCostRecordMainGroup), CriteriaOperator.Parse("1=2"))
|
||||
|
||||
For Each _ImmovablesCostRecordExcelMainGroup As ImmovablesCostRecordExcelMainGroup In _ImmovablesCostRecordExcel.ImmovablesCostRecordExcelMainGroup
|
||||
If _ImmovablesCostRecordExcelMainGroup.IsUseInExcel = True Then
|
||||
If _ImmovablesCostRecordExcelMainGroup.ImmovablesCostRecordMainGroup.ImmovablesCostRecordGroup.Count > 0 Then
|
||||
_ImmovablesCostRecordMainGroup_Collection.Add(_ImmovablesCostRecordExcelMainGroup.ImmovablesCostRecordMainGroup)
|
||||
|
||||
For Each _ImmovablesCostRecordGroup_Act As ImmovablesCostRecordGroup In _ImmovablesCostRecordExcelMainGroup.ImmovablesCostRecordMainGroup.ImmovablesCostRecordGroup
|
||||
_ImmovablesCostRecordGroup.Add(_ImmovablesCostRecordGroup_Act)
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
_ImmovablesCostRecordGroup.Sorting.Add(_SortRecordGroup)
|
||||
Dim _ik As Int16 = 0
|
||||
Dim _ColumnHeaderName As New ArrayList
|
||||
Dim _BackColor As Drawing.Color = Drawing.ColorTranslator.FromHtml("&Hfff0f0f0")
|
||||
Dim _Average As Double = 0
|
||||
|
||||
_FpSpread.Save(Path.GetTempPath + "SaveSp.xml", False)
|
||||
Dim _FpSpread_Orig As FpSpread = New FpSpread()
|
||||
_FpSpread_Orig.Open(Path.GetTempPath + "SaveSp.xml")
|
||||
|
||||
|
||||
_FpSpread.Reset()
|
||||
|
||||
_FpSpread.EditModeReplace = True
|
||||
|
||||
_FpSpread.ActiveSheet.ColumnHeader.RowCount = 5
|
||||
_FpSpread.ActiveSheet.RowHeader.ColumnCount = 3
|
||||
_FpSpread.ActiveSheet.ColumnCount = 5 * _ImmovablesCostRecordGroup.Count
|
||||
_FpSpread.ActiveSheet.RowCount = _ImmovablesCostRecordExcel.ImmovablesCostRecordExcelImmovables.Count
|
||||
|
||||
'Oszlop fejléc
|
||||
_FpSpread.ActiveSheet.AddColumnHeaderSpanCell(0, 0, 1, (5 * _ImmovablesCostRecordGroup.Count))
|
||||
_FpSpread.ActiveSheet.ColumnHeader.Cells(0, 0).Text = "Leolvasások"
|
||||
|
||||
'---------------------------Oszlofejléc felépítése----------------------------
|
||||
Dim _MainGroupIndex As Int16 = 0
|
||||
Dim _RecordGroupIndex As Int16 = 0
|
||||
For Each _ImmovablesCostRecordMainGroup As ImmovablesCostRecordMainGroup In _ImmovablesCostRecordMainGroup_Collection
|
||||
Dim _ImmovablesCostRecordGroup_Collection As XPCollection = _ocur.CreateCollection(GetType(ImmovablesCostRecordGroup), _
|
||||
CriteriaOperator.Parse("ImmovablesCostRecordMainGroup.Oid=?", _ImmovablesCostRecordMainGroup.Oid))
|
||||
|
||||
_FpSpread.ActiveSheet.AddColumnHeaderSpanCell(1, _MainGroupIndex, 1, _ImmovablesCostRecordGroup_Collection.Count * 5)
|
||||
_FpSpread.ActiveSheet.ColumnHeader.Cells(1, _MainGroupIndex).Text = _ImmovablesCostRecordMainGroup.GroupName
|
||||
|
||||
_ImmovablesCostRecordGroup_Collection.Sorting.Add(_SortRecordGroup)
|
||||
For Each _ImmovablesCostRecordGroup_ACT As ImmovablesCostRecordGroup In _ImmovablesCostRecordGroup_Collection
|
||||
_FpSpread.ActiveSheet.AddColumnHeaderSpanCell(2, _MainGroupIndex + _RecordGroupIndex, 1, 5)
|
||||
_FpSpread.ActiveSheet.ColumnHeader.Cells(2, _MainGroupIndex + _RecordGroupIndex).Text = _ImmovablesCostRecordGroup_ACT.Oid.ToString
|
||||
_FpSpread.ActiveSheet.ColumnHeader.Rows(2).Visible = False
|
||||
|
||||
_FpSpread.ActiveSheet.AddColumnHeaderSpanCell(3, _MainGroupIndex + _RecordGroupIndex, 1, 5)
|
||||
_FpSpread.ActiveSheet.ColumnHeader.Cells(3, _MainGroupIndex + _RecordGroupIndex).Text = _ImmovablesCostRecordGroup_ACT.ShortName
|
||||
|
||||
_FpSpread.ActiveSheet.ColumnHeader.Cells(4, _MainGroupIndex + _RecordGroupIndex).Text = "Elõzõ" 'Fix érték 1
|
||||
_FpSpread.ActiveSheet.ColumnHeader.Cells(4, _MainGroupIndex + _RecordGroupIndex + 1).Text = "Aktuális" 'Fix érték 2
|
||||
_FpSpread.ActiveSheet.ColumnHeader.Cells(4, _MainGroupIndex + _RecordGroupIndex + 2).Text = "Különbség" 'Fix érték 3
|
||||
_FpSpread.ActiveSheet.ColumnHeader.Cells(4, _MainGroupIndex + _RecordGroupIndex + 3).Text = "Egységár" 'Fix érték 4
|
||||
_FpSpread.ActiveSheet.ColumnHeader.Cells(4, _MainGroupIndex + _RecordGroupIndex + 4).Text = "Érték" 'Fix érték 5
|
||||
|
||||
If _ImmovablesCostRecordGroup_ACT.CostRecordBaseMode = eCostRecordBaseMode.eFix Then
|
||||
_FpSpread.ActiveSheet.Columns(_MainGroupIndex + _RecordGroupIndex).Visible = False
|
||||
_FpSpread.ActiveSheet.Columns(_MainGroupIndex + _RecordGroupIndex + 1).Visible = False
|
||||
_FpSpread.ActiveSheet.Columns(_MainGroupIndex + _RecordGroupIndex + 2).Visible = False
|
||||
End If
|
||||
|
||||
_RecordGroupIndex += 5
|
||||
Next
|
||||
_RecordGroupIndex = 0
|
||||
_MainGroupIndex += _ImmovablesCostRecordGroup_Collection.Count * 5
|
||||
Next
|
||||
|
||||
|
||||
'---------------------------Sor fejléc------------------------------------
|
||||
_FpSpread.ActiveSheet.AddRowHeaderSpanCell(0, 0, _ImmovablesCostRecordExcel.ImmovablesCostRecordExcelImmovables.Count, 1)
|
||||
_FpSpread.ActiveSheet.RowHeader.Cells(0, 0).Column.Width = 60
|
||||
_FpSpread.ActiveSheet.RowHeader.Cells(0, 0).Text = "Ingatlanok"
|
||||
|
||||
'----------------------------Sorfejléc felépítése--------------------------------
|
||||
For Each _ImmovablesCostRecordExcelImmovables As ImmovablesCostRecordExcelImmovables In _ImmovablesCostRecordExcel.ImmovablesCostRecordExcelImmovables
|
||||
Dim _Immovables As Immovables = TryCast(_ImmovablesCostRecordExcelImmovables.Immovables, Immovables)
|
||||
_FpSpread.ActiveSheet.RowHeader.Cells(_ik, 2).Column.Width = 100
|
||||
_FpSpread.ActiveSheet.RowHeader.Cells(_ik, 2).Row.Height = 30
|
||||
_FpSpread.ActiveSheet.RowHeader.Cells(_ik, 1).Text = _Immovables.Oid.ToString
|
||||
_FpSpread.ActiveSheet.RowHeader.Columns(1).Visible = False 'Oid elrejtése
|
||||
_FpSpread.ActiveSheet.RowHeader.Cells(_ik, 2).Text = _Immovables.UniqueObjects.Name
|
||||
_ik += 1
|
||||
Next
|
||||
|
||||
For _ik = 0 To _ImmovablesCostRecordExcel.ImmovablesCostRecordExcelImmovables.Count - 1
|
||||
Dim _Immovables As Immovables = _ocur.FindObject(Of Immovables)(CriteriaOperator.Parse("UniqueObjects.Name=?", _FpSpread.ActiveSheet.RowHeader.Cells(_ik, 2).Text))
|
||||
If _Immovables IsNot Nothing Then
|
||||
For _jk = 0 To _FpSpread.ActiveSheet.ColumnCount - 1 Step 5
|
||||
Dim _ImmovablesCostRecordGroupOID As String = _FpSpread.ActiveSheet.ColumnHeader.Cells(2, _jk).Text
|
||||
If _ImmovablesCostRecordGroupOID <> "" Then
|
||||
Dim _ActImmovablesCostRecordGroup As ImmovablesCostRecordGroup = _ocur.FindObject(Of ImmovablesCostRecordGroup) _
|
||||
(CriteriaOperator.Parse("Oid=?", _ImmovablesCostRecordGroupOID))
|
||||
Dim _NumCellsType As New CellType.NumberCellType
|
||||
Dim nfi As NumberFormatInfo = New CultureInfo("hu-HU", False).NumberFormat
|
||||
_NumCellsType.DecimalSeparator = nfi.NumberDecimalSeparator
|
||||
_NumCellsType.Separator = nfi.NumberGroupSeparator
|
||||
_NumCellsType.DecimalPlaces = _ActImmovablesCostRecordGroup.DecimalPlace
|
||||
_NumCellsType.NegativeRed = True
|
||||
|
||||
Select Case _ActImmovablesCostRecordGroup.CostRecordBaseMode
|
||||
Case eCostRecordBaseMode.eFix
|
||||
Select Case _ActImmovablesCostRecordGroup.eCostRecordMode
|
||||
Case eCostRecordMode.eNormal
|
||||
|
||||
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 1).CellType = _NumCellsType
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 2).CellType = _NumCellsType
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 3).CellType = _NumCellsType
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 3).Value = _FpSpread_Orig.ActiveSheet.Cells(_ik, _jk + 3).Value
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 3).BackColor = _BackColor
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 4).CellType = _NumCellsType
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 4).Formula = (_FpSpread.ActiveSheet.Cells(_ik, _jk + 3).ToString)
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 4).Locked = True
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 4).TabStop = False
|
||||
|
||||
|
||||
Case eCostRecordMode.eQuarter
|
||||
Dim _ImmovablesQuater As Double = 0
|
||||
Select Case _Immovables.ImmovablesTypes
|
||||
Case eImmovablesTypes.eApartment
|
||||
_ImmovablesQuater = TryCast(_Immovables, Apartments).AreaNettoForCostRecord
|
||||
Case eImmovablesTypes.eContainer
|
||||
_ImmovablesQuater = TryCast(_Immovables, Container).AreaNettoForCostRecord
|
||||
Case eImmovablesTypes.eGarage
|
||||
_ImmovablesQuater = TryCast(_Immovables, Garages).AreaNettoForCostRecord
|
||||
Case eImmovablesTypes.eOffice
|
||||
_ImmovablesQuater = TryCast(_Immovables, Offices).AreaNettoForCostRecord
|
||||
Case eImmovablesTypes.eStudentHostel
|
||||
_ImmovablesQuater = 1 'TryCast(_ImmovablesCR.Immovables, StudentHostel).????
|
||||
End Select
|
||||
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 1).Value = _ImmovablesQuater
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 1).CellType = _NumCellsType
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 2).CellType = _NumCellsType
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 3).CellType = _NumCellsType
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 3).Value = _FpSpread_Orig.ActiveSheet.Cells(_ik, _jk + 3).Value
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 3).BackColor = _BackColor
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 4).CellType = _NumCellsType
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 4).Formula = (_FpSpread.ActiveSheet.Cells(_ik, _jk + 1).ToString) & _
|
||||
"*" & (_FpSpread.ActiveSheet.Cells(_ik, _jk + 3).ToString)
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 4).Locked = True
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 4).TabStop = False
|
||||
|
||||
End Select
|
||||
Case eCostRecordBaseMode.eCosuption
|
||||
Select Case _ActImmovablesCostRecordGroup.eCostRecordMode
|
||||
Case eCostRecordMode.eNormal
|
||||
Dim _ActImmovablesCostRecord As ImmovablesCostRecord = _ocur.FindObject(Of ImmovablesCostRecord) _
|
||||
(CriteriaOperator.Parse("ImmovablesCostRecordGroup=? AND Immovables=?", _ActImmovablesCostRecordGroup, _Immovables))
|
||||
|
||||
If _ActImmovablesCostRecord IsNot Nothing Then
|
||||
Dim _PrevEvents As ImmovablesCostRecordEvents
|
||||
If _ActImmovablesCostRecord.ImmovablesCostRecordEvents.Count > 0 Then
|
||||
Dim _SortEvents As New SortProperty("ReadDate", DB.SortingDirection.Descending)
|
||||
_ActImmovablesCostRecord.ImmovablesCostRecordEvents.Sorting.Add(_SortEvents)
|
||||
_PrevEvents = _ActImmovablesCostRecord.ImmovablesCostRecordEvents(0)
|
||||
|
||||
If _PrevEvents.IsReader = True Then
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk).Value = 0
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk).Tag = _PrevEvents.ImmovablesCostRecord.Oid.ToString
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 1).Value = _PrevEvents.ReadedValue
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 1).Tag = _PrevEvents.Oid.ToString
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 1).CellType = _NumCellsType
|
||||
Else
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk).Value = _PrevEvents.ReadedValue
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk).Tag = _PrevEvents.ImmovablesCostRecord.Oid.ToString
|
||||
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 1).Value = 0
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 1).CellType = _NumCellsType
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 1).BackColor = _BackColor
|
||||
End If
|
||||
|
||||
Else
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk).Value = 0
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk).Tag = _ActImmovablesCostRecord.Oid.ToString
|
||||
|
||||
End If
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk).Locked = True
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk).TabStop = False
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk).CellType = _NumCellsType
|
||||
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 1).CellType = _NumCellsType
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 2).CellType = _NumCellsType
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 2).Formula = (_FpSpread.ActiveSheet.Cells(_ik, _jk + 1).ToString) & _
|
||||
"-" & (_FpSpread.ActiveSheet.Cells(_ik, _jk).ToString)
|
||||
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 2).Locked = True
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 2).TabStop = False
|
||||
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 3).Value = _FpSpread_Orig.ActiveSheet.Cells(_ik, _jk + 3).Value
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 4).CellType = _NumCellsType
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 4).Formula = (_FpSpread.ActiveSheet.Cells(_ik, _jk + 3).ToString) & _
|
||||
"*" & (_FpSpread.ActiveSheet.Cells(_ik, _jk + 2).ToString)
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 4).Locked = True
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _jk + 4).TabStop = False
|
||||
|
||||
End If
|
||||
Case eCostRecordMode.eQuarter
|
||||
'Beep()
|
||||
MsgBox("---===>>> W T F <<<===---")
|
||||
End Select
|
||||
End Select
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
Next
|
||||
|
||||
If File.Exists(Path.GetTempPath + "SaveSp.xml") Then
|
||||
File.Delete(Path.GetTempPath + "SaveSp.xml")
|
||||
End If
|
||||
_FpSpread.Refresh()
|
||||
End Sub
|
||||
Private Sub aFinalizeCostRecords_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aFinalizeCostRecords.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
|
||||
Dim _ImmovablesCostRecordExcel As ImmovablesCostRecordExcel = TryCast(View.SelectedObjects(0), ImmovablesCostRecordExcel)
|
||||
Dim _ColumnCount As Int16 = _FpSpread.ActiveSheet.ColumnCount
|
||||
Dim _RowCount As Int16 = _FpSpread.ActiveSheet.RowCount
|
||||
Dim _DelImmovablesCostRecordEvents_Collection As New ArrayList
|
||||
_WaitFormClass.Initwork(1, 1, _RowCount)
|
||||
For _ik = 0 To _RowCount - 1
|
||||
Dim _Immovables As Immovables = _ocur.FindObject(Of Immovables)(CriteriaOperator.Parse("UniqueObjects.Name=?", _FpSpread.ActiveSheet.RowHeader.Cells(_ik, 2).Text))
|
||||
For _jk = 0 To _ColumnCount - 1 Step 5
|
||||
Dim _ImmovablesCostRecordGroupOID As String = _FpSpread.ActiveSheet.ColumnHeader.Cells(2, _jk).Text
|
||||
If _ImmovablesCostRecordGroupOID <> "" Then
|
||||
Dim _ActImmovablesCostRecordGroup As ImmovablesCostRecordGroup = _ocur.FindObject(Of ImmovablesCostRecordGroup) _
|
||||
(CriteriaOperator.Parse("Oid=?", _ImmovablesCostRecordGroupOID))
|
||||
Dim _ActImmovablesCostRecord As ImmovablesCostRecord = _ocur.FindObject(Of ImmovablesCostRecord) _
|
||||
(CriteriaOperator.Parse("ImmovablesCostRecordGroup=? AND Immovables=?", _ActImmovablesCostRecordGroup, _Immovables))
|
||||
If _ActImmovablesCostRecord IsNot Nothing Then
|
||||
Dim _NewImmovablesCostRecordEvents As ImmovablesCostRecordEvents = _ocur.CreateObject(Of ImmovablesCostRecordEvents)()
|
||||
_NewImmovablesCostRecordEvents.ReadedValue = _FpSpread.ActiveSheet.Cells(_ik, _jk + 1).Value
|
||||
If _FpSpread.ActiveSheet.Cells(_ik, _jk + 1).Tag IsNot Nothing Then
|
||||
Dim _DelImmovablesCostRecordEvents As ImmovablesCostRecordEvents = _ocur.FindObject(Of ImmovablesCostRecordEvents)(CriteriaOperator.Parse("Oid=?", _FpSpread.ActiveSheet.Cells(_ik, _jk + 1).Tag.ToString))
|
||||
|
||||
_NewImmovablesCostRecordEvents.ReadDate = _ImmovablesCostRecordExcel.DateExecution '_DelImmovablesCostRecordEvents.ReadDate
|
||||
|
||||
_DelImmovablesCostRecordEvents_Collection.Add(_DelImmovablesCostRecordEvents)
|
||||
Else
|
||||
_NewImmovablesCostRecordEvents.ReadDate = _ImmovablesCostRecordExcel.DateExecution 'GetSQLTime(_ocur.Session)
|
||||
End If
|
||||
|
||||
_NewImmovablesCostRecordEvents.ImmovablesCostRecordExcel = _ImmovablesCostRecordExcel
|
||||
_NewImmovablesCostRecordEvents.ImmovablesCostRecord = _ActImmovablesCostRecord
|
||||
_NewImmovablesCostRecordEvents.ReadedValuePrev = _FpSpread.ActiveSheet.Cells(_ik, _jk).Value
|
||||
_NewImmovablesCostRecordEvents.ReadedValueDiff = _FpSpread.ActiveSheet.Cells(_ik, _jk + 2).Value
|
||||
_NewImmovablesCostRecordEvents.ReadedValuePrice = _FpSpread.ActiveSheet.Cells(_ik, _jk + 3).Value
|
||||
_NewImmovablesCostRecordEvents.ReadedValueSumPrice = _FpSpread.ActiveSheet.Cells(_ik, _jk + 4).Value
|
||||
_NewImmovablesCostRecordEvents.ReadIndex += 1
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
_WaitFormClass.DoWork()
|
||||
System.Windows.Forms.Application.DoEvents()
|
||||
Next
|
||||
_ocur.Delete(_DelImmovablesCostRecordEvents_Collection)
|
||||
_ocur.CommitChanges()
|
||||
|
||||
_Waitformclass.FinalWork()
|
||||
_FpSpread.Refresh()
|
||||
_FpSpread.Enabled = False
|
||||
End Sub
|
||||
Private Sub aImportCostRecords_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aImportCostRecords.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _uow As UnitOfWork = New UnitOfWork(_ocur.Session.DataLayer)
|
||||
Dim _cs As String
|
||||
Dim _ik As Int16 = 0
|
||||
Dim _Count As Long = 0
|
||||
Dim _Rtime As New ArrayList
|
||||
Dim _SID As New ArrayList
|
||||
Dim _WH As New ArrayList
|
||||
Dim _QM1 As New ArrayList
|
||||
Dim _QM2 As New ArrayList
|
||||
Dim _ARAM As New ArrayList
|
||||
Dim _ColumnHeaderName As New ArrayList
|
||||
Dim _BackColor As Drawing.Color = Drawing.ColorTranslator.FromHtml("&Hfff0f0f0")
|
||||
'Dim _NumCellsType As New CellType.NumberCellType
|
||||
|
||||
'Dim nfi As NumberFormatInfo = New CultureInfo("hu-HU", False).NumberFormat
|
||||
'_NumCellsType.DecimalSeparator = nfi.NumberDecimalSeparator
|
||||
'_NumCellsType.Separator = nfi.NumberGroupSeparator
|
||||
'_NumCellsType.DecimalPlaces = 2
|
||||
'_NumCellsType.NegativeRed = True
|
||||
|
||||
Dim _ActImmovables As XPCollection = _ocur.CreateCollection(GetType(Immovables), CriteriaOperator.Parse("1=2"))
|
||||
Dim _ImmovablesCostRecordGroup As XPCollection = _ocur.CreateCollection(GetType(ImmovablesCostRecordGroup), CriteriaOperator.Parse("1=1"))
|
||||
Dim _OpenFileDialog As New OpenFileDialog
|
||||
If _OpenFileDialog.ShowDialog() = Windows.Forms.DialogResult.OK Then
|
||||
Dim _xlsFile As String = _OpenFileDialog.FileName
|
||||
_cs = "Provider=Microsoft.ACE.OLEDB.12.0;"
|
||||
_cs += "Data Source=" & _xlsFile.ToString & ";"
|
||||
_cs += "Extended Properties=""Excel 12.0 Xml;HDR=YES;"""
|
||||
Dim conn As New OleDbConnection(_cs)
|
||||
Dim cmd As New OleDbCommand
|
||||
Dim dr As OleDbDataReader
|
||||
Dim dr1 As OleDbDataReader
|
||||
Dim mSQL As String
|
||||
Dim _UpdatedCount As Long = 0
|
||||
|
||||
|
||||
Try
|
||||
|
||||
mSQL = "select * from [Munka1$]"
|
||||
cmd.CommandTimeout = 60
|
||||
cmd.Connection = conn
|
||||
cmd.CommandType = CommandType.Text
|
||||
cmd.CommandText = mSQL
|
||||
conn.Open()
|
||||
|
||||
If conn.State = ConnectionState.Open Then
|
||||
dr1 = cmd.ExecuteReader(CommandBehavior.SingleResult)
|
||||
|
||||
While dr1.Read
|
||||
If dr1(0).ToString <> "" And dr1(0).ToString <> "RTIME" Then
|
||||
_Count += 1
|
||||
End If
|
||||
End While
|
||||
dr1.Close()
|
||||
|
||||
dr = cmd.ExecuteReader(CommandBehavior.SingleResult)
|
||||
_WaitFormClass.Initwork(1, 1, _Count)
|
||||
While dr.Read
|
||||
If dr(0).ToString <> "" And dr(0).ToString <> "RTIME" Then
|
||||
|
||||
_Rtime.Add(dr(0).ToString) '"RTIME"
|
||||
_SID.Add(dr(1).ToString) '"SID"
|
||||
_WH.Add(dr(4).ToString) '"WH"
|
||||
_QM1.Add(dr(2).ToString) '"QH[1]"
|
||||
_QM2.Add(dr(3).ToString) '"QH[2]"
|
||||
_ARAM.Add(dr(5).ToString) '"ARAM"
|
||||
_WaitFormClass.DoWork()
|
||||
System.Windows.Forms.Application.DoEvents()
|
||||
End If
|
||||
End While
|
||||
|
||||
dr.Close()
|
||||
End If
|
||||
conn.Close()
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message)
|
||||
conn.Close()
|
||||
Finally
|
||||
_Waitformclass.FinalWork()
|
||||
End Try
|
||||
End If
|
||||
|
||||
|
||||
Try
|
||||
|
||||
If _FpSpread.ActiveSheet.RowCount = 1 And _FpSpread.ActiveSheet.ColumnCount = 1 Then Throw New Exception("*Üres az Excel file, nem lehet adatokat importálni!")
|
||||
Dim _ImmovablesCostRecordExcel As ImmovablesCostRecordExcel = TryCast(View.SelectedObjects(0), ImmovablesCostRecordExcel)
|
||||
Dim _ImmovablesCostRecordExcelImmovables As ImmovablesCostRecordExcelImmovables
|
||||
For _ik = 0 To _SID.Count - 1
|
||||
Dim _ImmovablesCostRecord_Collection As XPCollection = _ocur.CreateCollection(GetType(ImmovablesCostRecord), _
|
||||
CriteriaOperator.Parse("SID=?", _SID(_ik)))
|
||||
_WaitFormClass.Initwork(1, 1, _ImmovablesCostRecord_Collection.Count)
|
||||
For Each _ImmovablesCostRecord As ImmovablesCostRecord In _ImmovablesCostRecord_Collection
|
||||
|
||||
_ImmovablesCostRecordExcelImmovables = _ocur.FindObject(Of ImmovablesCostRecordExcelImmovables)(CriteriaOperator.Parse("Immovables=? AND ImmovablesCostRecordExcel=?", _
|
||||
_ImmovablesCostRecord.Immovables, _ImmovablesCostRecordExcel))
|
||||
If _ImmovablesCostRecordExcelImmovables IsNot Nothing Then
|
||||
For _jk = 0 To _FpSpread.ActiveSheet.RowCount - 1
|
||||
If _FpSpread.ActiveSheet.RowHeader.Cells(_jk, 1).Text = _ImmovablesCostRecordExcelImmovables.Immovables.Oid.ToString Then
|
||||
|
||||
For _lk = 0 To _FpSpread.ActiveSheet.ColumnCount - 1 Step 5
|
||||
If _FpSpread.ActiveSheet.ColumnHeader.Cells(2, _lk).Text = _ImmovablesCostRecord.ImmovablesCostRecordGroup.Oid.ToString Then
|
||||
Dim _NumCellsType As New CellType.NumberCellType
|
||||
Dim nfi As NumberFormatInfo = New CultureInfo("hu-HU", False).NumberFormat
|
||||
_NumCellsType.DecimalSeparator = nfi.NumberDecimalSeparator
|
||||
_NumCellsType.Separator = nfi.NumberGroupSeparator
|
||||
_NumCellsType.DecimalPlaces = _ImmovablesCostRecord.ImmovablesCostRecordGroup.DecimalPlace
|
||||
_NumCellsType.NegativeRed = True
|
||||
|
||||
_FpSpread.ActiveSheet.Cells(_jk, _lk + 1).CellType = _NumCellsType
|
||||
_FpSpread.ActiveSheet.Cells(_jk, _lk + 2).CellType = _NumCellsType
|
||||
Select Case _ImmovablesCostRecord.SIDChild
|
||||
Case eSIDChild.SID_QM1
|
||||
_FpSpread.ActiveSheet.Cells(_jk, _lk + 1).Value = Convert.ToDouble(_QM1(_ik))
|
||||
Case eSIDChild.SID_QM2
|
||||
_FpSpread.ActiveSheet.Cells(_jk, _lk + 1).Value = Convert.ToDouble(_QM2(_ik))
|
||||
Case eSIDChild.SID_WH
|
||||
_FpSpread.ActiveSheet.Cells(_jk, _lk + 1).Value = Convert.ToDouble(_WH(_ik))
|
||||
Case eSIDChild.SID_ARAM
|
||||
_FpSpread.ActiveSheet.Cells(_jk, _lk + 1).Value = Convert.ToDouble(_ARAM(_ik))
|
||||
Case eSIDChild.SID_NONE
|
||||
End Select
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
Next
|
||||
_WaitFormClass.DoWork()
|
||||
System.Windows.Forms.Application.DoEvents()
|
||||
Next
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly)
|
||||
Finally
|
||||
_Waitformclass.FinalWork()
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub aTempLikor_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aTempLikor.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _uow As UnitOfWork = New UnitOfWork(_ocur.Session.DataLayer)
|
||||
Dim _cs As String
|
||||
Dim _ImmovablesName As New ArrayList
|
||||
Dim _SID As New ArrayList
|
||||
Dim _OpenFileDialog As New OpenFileDialog
|
||||
If _OpenFileDialog.ShowDialog() = Windows.Forms.DialogResult.OK Then
|
||||
|
||||
Dim _xlsFile As String = _OpenFileDialog.FileName
|
||||
|
||||
_cs = "Provider=Microsoft.ACE.OLEDB.12.0;"
|
||||
_cs += "Data Source=" & _xlsFile.ToString & ";"
|
||||
_cs += "Extended Properties=""Excel 12.0 Xml;HDR=YES;"""
|
||||
Dim conn As New OleDbConnection(_cs)
|
||||
Dim cmd As New OleDbCommand
|
||||
Dim dr As OleDbDataReader
|
||||
Dim mSQL As String
|
||||
Dim _Count As Long = 0
|
||||
Dim _UpdatedCount As Long = 0
|
||||
Try
|
||||
|
||||
mSQL = "select * from [Sheet$]"
|
||||
cmd.CommandTimeout = 60
|
||||
cmd.Connection = conn
|
||||
cmd.CommandType = CommandType.Text
|
||||
cmd.CommandText = mSQL
|
||||
conn.Open()
|
||||
|
||||
If conn.State = ConnectionState.Open Then
|
||||
|
||||
dr = cmd.ExecuteReader(CommandBehavior.SingleResult)
|
||||
|
||||
While dr.Read
|
||||
If dr(0).ToString <> "" Or dr(0).ToString <> "RTIME" Then
|
||||
'_form.ProgressBarControl1.Properties.Maximum = _Count
|
||||
|
||||
_ImmovablesName.Add(dr(0).ToString)
|
||||
_SID.Add(dr(1).ToString)
|
||||
|
||||
'_WaitFormClass.DoWork
|
||||
'System.Windows.Forms.Application.DoEvents()
|
||||
End If
|
||||
End While
|
||||
dr.Close()
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message)
|
||||
End Try
|
||||
End If
|
||||
|
||||
Dim _ImmovablesCostRecordGroup As XPCollection = _ocur.CreateCollection(GetType(ImmovablesCostRecordGroup), CriteriaOperator.Parse("1=1"))
|
||||
Dim _ik As Int16 = 0
|
||||
For Each _ActImmo In _ImmovablesName
|
||||
Dim _Immo As Immovables = _ocur.FindObject(Of Immovables)(CriteriaOperator.Parse("UniqueObjects.Name=?", _ActImmo))
|
||||
If _Immo IsNot Nothing Then
|
||||
For Each _ActImmovablesCostRecordGroup In _ImmovablesCostRecordGroup
|
||||
Dim _ImmovablesCostRecord As ImmovablesCostRecord = _ocur.CreateObject(Of ImmovablesCostRecord)()
|
||||
_ImmovablesCostRecord.Immovables = _ocur.GetObjectByKey(Of Immovables)(_Immo.Oid)
|
||||
_ImmovablesCostRecord.SID = _SID(_ik)
|
||||
_ImmovablesCostRecord.ImmovablesCostRecordGroup = _ActImmovablesCostRecordGroup
|
||||
_ImmovablesCostRecord.ShortName = TryCast(_ActImmovablesCostRecordGroup, ImmovablesCostRecordGroup).ShortName
|
||||
|
||||
_ImmovablesCostRecord.Save()
|
||||
Next
|
||||
End If
|
||||
_ik += 1
|
||||
Next
|
||||
_ocur.CommitChanges()
|
||||
End Sub
|
||||
Private Sub aSetUnitPrice_CustomizePopupWindowParams(sender As System.Object, e As DevExpress.ExpressApp.Actions.CustomizePopupWindowParamsEventArgs) Handles aSetUnitPrice.CustomizePopupWindowParams
|
||||
Dim _ocur As Xpo.XPObjectSpace = View.ObjectSpace
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _SetUnitPrice_PopUp As SetUnitPrice_PopUp = _onew.CreateObject(Of SetUnitPrice_PopUp)()
|
||||
_SetUnitPrice_PopUp.UnitPrice = 1
|
||||
|
||||
e.View = Application.CreateDetailView(_onew, "SetUnitPrice_PopUp_DetailView", False, _SetUnitPrice_PopUp)
|
||||
End Sub
|
||||
Private Sub aSetUnitPrice_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.PopupWindowShowActionExecuteEventArgs) Handles aSetUnitPrice.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _SetUnitPrice_PopUp As SetUnitPrice_PopUp = TryCast(e.PopupWindow.View.SelectedObjects(0), SetUnitPrice_PopUp)
|
||||
Dim _Unitprice As Double = _SetUnitPrice_PopUp.UnitPrice
|
||||
Dim _ImmovablesCostRecordGroup As ImmovablesCostRecordGroup = _ocur.GetObjectByKey(Of ImmovablesCostRecordGroup)(_SetUnitPrice_PopUp.ImmovablesCostRecordGroup.Oid)
|
||||
Dim _ColumnIndex As Int16 = 0
|
||||
For _ik As Int16 = 0 To _FpSpread.ActiveSheet.ColumnHeader.Columns.Count / 5 - 1
|
||||
If _FpSpread.ActiveSheet.ColumnHeader.Cells(2, _ik * 5).Text = _ImmovablesCostRecordGroup.Oid.ToString Then
|
||||
_ColumnIndex = _ik * 5 + 3
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If _ColumnIndex <> 0 Then
|
||||
For _ik As Int16 = 0 To _FpSpread.ActiveSheet.RowCount - 1
|
||||
_FpSpread.ActiveSheet.Cells(_ik, _ColumnIndex).Value = _Unitprice
|
||||
Next
|
||||
|
||||
Else
|
||||
Throw New Exception("*Nem lehet beazonosítani a mérőórát!")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
Partial Class ImmovablesVC
|
||||
|
||||
<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.aImmovables_ImportLotNumber = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
'
|
||||
'aImmovables_ImportLotNumber
|
||||
'
|
||||
Me.aImmovables_ImportLotNumber.Caption = "aImmovables_ImportLotNumber"
|
||||
Me.aImmovables_ImportLotNumber.ConfirmationMessage = Nothing
|
||||
Me.aImmovables_ImportLotNumber.Id = "aImmovables_ImportLotNumber"
|
||||
Me.aImmovables_ImportLotNumber.ImageName = Nothing
|
||||
Me.aImmovables_ImportLotNumber.Shortcut = Nothing
|
||||
Me.aImmovables_ImportLotNumber.Tag = Nothing
|
||||
Me.aImmovables_ImportLotNumber.TargetObjectsCriteria = Nothing
|
||||
Me.aImmovables_ImportLotNumber.TargetObjectType = GetType(Nuvolar.[Module].Immovables)
|
||||
Me.aImmovables_ImportLotNumber.TargetViewId = Nothing
|
||||
Me.aImmovables_ImportLotNumber.TargetViewType = DevExpress.ExpressApp.ViewType.ListView
|
||||
Me.aImmovables_ImportLotNumber.ToolTip = Nothing
|
||||
Me.aImmovables_ImportLotNumber.TypeOfView = GetType(DevExpress.ExpressApp.ListView)
|
||||
|
||||
End Sub
|
||||
Friend WithEvents aImmovables_ImportLotNumber As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
|
||||
End Class
|
||||
+126
@@ -0,0 +1,126 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="aImmovables_ImportLotNumber.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>224, 135</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
</root>
|
||||
+137
@@ -0,0 +1,137 @@
|
||||
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 System.Data.OleDb
|
||||
Imports DevExpress.Data.Filtering
|
||||
|
||||
Public Class ImmovablesVC
|
||||
Inherits Nuvolar.Module.ImmovablesVC
|
||||
|
||||
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
|
||||
Private Sub aImmovables_ImportLotNumber_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aImmovables_ImportLotNumber.Execute
|
||||
Frame.GetController(Of Validation.PersistenceValidationController).Active.SetItemValue("", False)
|
||||
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
|
||||
Dim _Array_UniqueObjects As New ArrayList
|
||||
Dim _Array_ImmovablesGroups As New ArrayList
|
||||
Dim _Array_ImmovablesType As New ArrayList
|
||||
Dim _Array_LotNumber As New ArrayList
|
||||
Dim _Array_ZIP As New ArrayList
|
||||
Dim _Array_City As New ArrayList
|
||||
Dim _Array_Street As New ArrayList
|
||||
Dim _MissingImmovable As Long = 0
|
||||
Dim _MissingImmovablesUO As New ArrayList
|
||||
|
||||
Dim _OpenFileDialog As New OpenFileDialog
|
||||
_OpenFileDialog.Filter = "Xls Files (.xls)|*.xls|Xlsx Files (.xlsx)|*.xlsx|All Files (*.*)|*.*"
|
||||
|
||||
If _OpenFileDialog.ShowDialog() = Windows.Forms.DialogResult.OK Then
|
||||
If Not String.IsNullOrEmpty(_OpenFileDialog.FileName) Then
|
||||
Dim _xlsFile As String = _OpenFileDialog.FileName
|
||||
|
||||
Dim _ConnectionString As String = "Provider=Microsoft.ACE.OLEDB.12.0;"
|
||||
_ConnectionString += "Data Source=" & _xlsFile.ToString & ";"
|
||||
_ConnectionString += "Extended Properties=""Excel 12.0 Xml;HDR=YES;"""
|
||||
Dim _OleDbConnection As New OleDbConnection(_ConnectionString)
|
||||
Dim _OleDbCommand As New OleDbCommand
|
||||
Dim _OleDbDataReader As OleDbDataReader
|
||||
Dim _mSQL As String
|
||||
Dim _UpdatedCount As Long = 0
|
||||
|
||||
'_WaitFormClass.InitWork
|
||||
Try
|
||||
|
||||
_mSQL = "select * from [Sheet$]"
|
||||
_OleDbCommand.CommandTimeout = 60
|
||||
_OleDbCommand.Connection = _OleDbConnection
|
||||
_OleDbCommand.CommandType = CommandType.Text
|
||||
_OleDbCommand.CommandText = _mSQL
|
||||
_OleDbConnection.Open()
|
||||
|
||||
If _OleDbConnection.State = ConnectionState.Open Then
|
||||
_OleDbDataReader = _OleDbCommand.ExecuteReader(CommandBehavior.SingleResult)
|
||||
While _OleDbDataReader.Read
|
||||
If Not String.IsNullOrEmpty(_OleDbDataReader(0).ToString) Then
|
||||
_Array_UniqueObjects.Add(_OleDbDataReader(0).ToString)
|
||||
_Array_ImmovablesGroups.Add(_OleDbDataReader(1).ToString)
|
||||
_Array_ImmovablesType.Add(_OleDbDataReader(2).ToString)
|
||||
_Array_LotNumber.Add(_OleDbDataReader(3).ToString)
|
||||
_Array_ZIP.Add(_OleDbDataReader(4).ToString)
|
||||
_Array_City.Add(_OleDbDataReader(5).ToString)
|
||||
_Array_Street.Add(_OleDbDataReader(6).ToString)
|
||||
End If
|
||||
End While
|
||||
|
||||
_OleDbDataReader.Close()
|
||||
End If
|
||||
_OleDbConnection.Close()
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message)
|
||||
_OleDbConnection.Close()
|
||||
End Try
|
||||
|
||||
|
||||
_WaitFormClass.InitWork(0, 1, _Array_UniqueObjects.Count)
|
||||
For ik = 0 To _Array_UniqueObjects.Count - 1 Step 1
|
||||
Dim _UniqueObjects As UniqueObjects = _ocur.FindObject(Of UniqueObjects)(CriteriaOperator.Parse("Name=?", _Array_UniqueObjects(ik)))
|
||||
If _UniqueObjects IsNot Nothing Then
|
||||
Dim _Immovables As Immovables = _ocur.FindObject(Of Immovables)(CriteriaOperator.Parse("UniqueObjects=?", _UniqueObjects))
|
||||
If _Immovables IsNot Nothing Then
|
||||
_Immovables.LotNumber = _Array_LotNumber(ik)
|
||||
|
||||
If _Immovables.Address Is Nothing Then
|
||||
Dim _Address As New DevExpress.Persistent.BaseImpl.Address(_ocur.Session)
|
||||
_Address.ZipPostal = _Array_ZIP(ik)
|
||||
_Address.City = _Array_City(ik)
|
||||
_Address.Street = _Array_Street(ik)
|
||||
|
||||
_Immovables.Address = _Address
|
||||
End If
|
||||
Else
|
||||
_MissingImmovable += 1
|
||||
_MissingImmovablesUO.Add(_Array_UniqueObjects(ik))
|
||||
End If
|
||||
End If
|
||||
_WaitFormClass.DoWork()
|
||||
Next
|
||||
End If
|
||||
_ocur.CommitChanges()
|
||||
_Waitformclass.FinalWork()
|
||||
If _MissingImmovable > 0 Then
|
||||
Dim _UOList As String = ""
|
||||
For Each _UO As String In _MissingImmovablesUO
|
||||
_UOList += _UO + vbNewLine + vbNewLine
|
||||
Next
|
||||
_UOList += vbNewLine
|
||||
MsgBox(String.Format("{0} db ingatlant nem lehet beazonosítani az egyedi azonosító alapján! {1}", _MissingImmovable, _UOList))
|
||||
End If
|
||||
End If
|
||||
Frame.GetController(Of Validation.PersistenceValidationController).Active.SetItemValue("", True)
|
||||
End Sub
|
||||
End Class
|
||||
+53
@@ -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()> _
|
||||
<NonPersistent()> _
|
||||
<NavigationItem(False), CreatableItem(False)> _
|
||||
Public Class SetUnitPrice_PopUp
|
||||
Inherits BaseObject
|
||||
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
End Sub
|
||||
Private _ImmovablesCostRecordMainGroup As ImmovablesCostRecordMainGroup
|
||||
Private _ImmovablesCostRecordGroup As ImmovablesCostRecordGroup
|
||||
Private _UnitPrice As Double
|
||||
|
||||
Property ImmovablesCostRecordExcelMainGroup As ImmovablesCostRecordMainGroup
|
||||
Get
|
||||
Return _ImmovablesCostRecordMainGroup
|
||||
End Get
|
||||
Set(value As ImmovablesCostRecordMainGroup)
|
||||
SetPropertyValue("ImmovablesCostRecordMainGroup", _ImmovablesCostRecordMainGroup, value)
|
||||
End Set
|
||||
End Property
|
||||
<ImmediatePostData(True), DataSourceCriteria("ImmovablesCostRecordMainGroup='@This.ImmovablesCostRecordExcelMainGroup'")>
|
||||
Property ImmovablesCostRecordGroup As ImmovablesCostRecordGroup
|
||||
Get
|
||||
Return _ImmovablesCostRecordGroup
|
||||
End Get
|
||||
Set(value As ImmovablesCostRecordGroup)
|
||||
SetPropertyValue("ImmovablesCostRecordGroup", _ImmovablesCostRecordGroup, value)
|
||||
End Set
|
||||
End Property
|
||||
Property UnitPrice As Double
|
||||
Get
|
||||
Return _UnitPrice
|
||||
End Get
|
||||
Set(value As Double)
|
||||
SetPropertyValue("UnitPrice", _UnitPrice, value)
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
Imports DevExpress.Spreadsheet.Functions
|
||||
Imports DevExpress.Spreadsheet
|
||||
Imports DevExpress.XtraSpreadsheet
|
||||
Imports DevExpress.ExpressApp
|
||||
Imports DevExpress.Data.Filtering
|
||||
|
||||
Public Class FactoringSpreadCustomFunction
|
||||
Inherits Object
|
||||
Implements ICustomFunction
|
||||
|
||||
|
||||
Private Const functionName As String = "GETFACTORINFO"
|
||||
Private ReadOnly functionParameters() As ParameterInfo
|
||||
Public Sub New()
|
||||
Me.functionParameters = New ParameterInfo() {New ParameterInfo(ParameterType.Value, ParameterAttributes.Required), New ParameterInfo(ParameterType.Value, ParameterAttributes.Optional)}
|
||||
End Sub
|
||||
Public Function Evaluate(parameters As IList(Of ParameterValue), context As EvaluationContext) As ParameterValue Implements IFunction.Evaluate
|
||||
Return "NINCS BEÁLLÍTVA"
|
||||
End Function
|
||||
|
||||
#Region "BASE"
|
||||
Public Function GetName(culture As Globalization.CultureInfo) As String Implements IFunction.GetName
|
||||
Return functionName
|
||||
End Function
|
||||
|
||||
Public ReadOnly Property Name As String Implements IFunction.Name
|
||||
Get
|
||||
Return functionName
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Parameters As ParameterInfo() Implements IFunction.Parameters
|
||||
Get
|
||||
Return functionParameters
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property ReturnType As ParameterType Implements IFunction.ReturnType
|
||||
Get
|
||||
Return ParameterType.Value
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Volatile As Boolean Implements IFunction.Volatile
|
||||
Get
|
||||
Return False
|
||||
End Get
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
Partial Class InvoiceFactoringVC
|
||||
|
||||
<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
|
||||
+105
@@ -0,0 +1,105 @@
|
||||
Imports Microsoft.VisualBasic
|
||||
Imports System
|
||||
Imports System.Linq
|
||||
Imports System.Text
|
||||
Imports DevExpress.ExpressApp
|
||||
Imports DevExpress.Data.Filtering
|
||||
Imports System.Collections.Generic
|
||||
Imports DevExpress.Persistent.Base
|
||||
Imports DevExpress.ExpressApp.Utils
|
||||
Imports DevExpress.ExpressApp.Layout
|
||||
Imports DevExpress.ExpressApp.Actions
|
||||
Imports DevExpress.ExpressApp.Editors
|
||||
Imports DevExpress.ExpressApp.Templates
|
||||
Imports DevExpress.Persistent.Validation
|
||||
Imports DevExpress.ExpressApp.SystemModule
|
||||
Imports DevExpress.ExpressApp.Model.NodeGenerators
|
||||
Imports DevExpress.XtraSpreadsheet
|
||||
Imports DevExpress.Persistent.BaseImpl
|
||||
Imports System.ComponentModel
|
||||
|
||||
' For more typical usage scenarios, be sure to check out http://documentation.devexpress.com/#Xaf/clsDevExpressExpressAppViewControllertopic.
|
||||
Partial Public Class InvoiceFactoringVC
|
||||
Inherits ViewController
|
||||
Private _SpreadsheetControl As SpreadsheetControl
|
||||
Public Sub New()
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
' Target required Views (via the TargetXXX properties) and create their Actions.
|
||||
End Sub
|
||||
Protected Overrides Sub OnActivated()
|
||||
MyBase.OnActivated()
|
||||
' Perform various tasks depending on the target View.
|
||||
If View.Id = "InvoiceFactoringHeader_DetailView" Then
|
||||
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
|
||||
|
||||
AddHandler Frame.GetController(Of ModificationsController).SaveAction.Executing, AddressOf SaveAction_Executing
|
||||
AddHandler Frame.GetController(Of ModificationsController).SaveAndCloseAction.Executing, AddressOf SaveAction_Executing
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Protected Overrides Sub OnViewControlsCreated()
|
||||
MyBase.OnViewControlsCreated()
|
||||
' Access and customize the target View control.
|
||||
End Sub
|
||||
Protected Overrides Sub OnDeactivated()
|
||||
' Unsubscribe from previously subscribed events and release other references and resources.
|
||||
MyBase.OnDeactivated()
|
||||
End Sub
|
||||
Private Sub _SpreadXML_ViewItem_ControlCreated(sender As Object, e As EventArgs)
|
||||
'Dim _InvoiceFactoringBank As InvoiceFactoringBank = TryCast(View.SelectedObjects(0), InvoiceFactoringBank)
|
||||
'Dim _ItemControl As Object = TryCast(sender, ViewItem).Control
|
||||
'Dim _SpreadUserControl As SpreadUserControl = TryCast(_ItemControl, SpreadUserControl)
|
||||
|
||||
'_SpreadsheetControl = TryCast(_ItemControl, SpreadUserControl).SpreadsheetControl1
|
||||
|
||||
'If _InvoiceFactoringBank IsNot Nothing Then
|
||||
' If _InvoiceFactoringBank.SpreadFile IsNot Nothing Then
|
||||
' Dim _FilePath As String = System.IO.Path.Combine(System.IO.Path.GetTempPath(), _InvoiceFactoringBank.SpreadFile.FileName)
|
||||
' Dim _Stream As System.IO.Stream = New System.IO.FileStream(_FilePath, System.IO.FileMode.Create)
|
||||
' _InvoiceFactoringBank.SpreadFile.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
|
||||
'Dim _FactoringSpreadCustomFunction As New FactoringSpreadCustomFunction
|
||||
'Dim _workbook As DevExpress.Spreadsheet.IWorkbook = _SpreadsheetControl.Document
|
||||
|
||||
'If (Not _workbook.CustomFunctions.Contains(_FactoringSpreadCustomFunction.Name)) Then
|
||||
' _workbook.CustomFunctions.Add(_FactoringSpreadCustomFunction)
|
||||
'End If
|
||||
|
||||
End Sub
|
||||
Private Sub SaveAction_Executing(sender As Object, e As CancelEventArgs)
|
||||
'Dim _InvoiceFactoringBank As InvoiceFactoringBank = TryCast(View.SelectedObjects(0), InvoiceFactoringBank)
|
||||
'Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
|
||||
'If _SpreadsheetControl IsNot Nothing Then
|
||||
|
||||
' Dim _FilePath As String = System.IO.Path.Combine(System.IO.Path.GetTempPath(), "FACTORING.XML")
|
||||
' Dim _Stream As System.IO.Stream = New System.IO.FileStream(_FilePath, System.IO.FileMode.Create)
|
||||
' _SpreadsheetControl.Document.SaveDocument(_Stream, DevExpress.Spreadsheet.DocumentFormat.OpenXml)
|
||||
' _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)
|
||||
' _StreamFile.Seek(0, System.IO.SeekOrigin.Begin)
|
||||
|
||||
' Dim _FileData As FileData
|
||||
' _FileData = _ocur.CreateObject(Of FileData)()
|
||||
|
||||
' _FileData.LoadFromStream("FACTORING.XML", _StreamFile)
|
||||
|
||||
' _InvoiceFactoringBank.SpreadFile = _FileData
|
||||
'End If
|
||||
End Sub
|
||||
End Class
|
||||
Generated
+32
@@ -0,0 +1,32 @@
|
||||
Partial Class InvoiceRowVC
|
||||
|
||||
<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
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
Imports System
|
||||
Imports System.ComponentModel
|
||||
Imports System.Collections.Generic
|
||||
Imports System.Diagnostics
|
||||
Imports System.Text
|
||||
|
||||
Imports DevExpress.ExpressApp
|
||||
Imports DevExpress.ExpressApp.Actions
|
||||
Imports DevExpress.Persistent.Base
|
||||
|
||||
Public Class InvoiceRowVC
|
||||
Inherits Nuvolar.Module.InvoiceRowVC
|
||||
Dim _WaitFormClass As New WaitFormClass
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
|
||||
'This call is required by the Component Designer.
|
||||
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
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
Partial Class InvoiceRowsPivotVC
|
||||
|
||||
<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()
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
+123
@@ -0,0 +1,123 @@
|
||||
<?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="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
</root>
|
||||
+104
@@ -0,0 +1,104 @@
|
||||
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 DevExpress.XtraGrid.Views.Grid
|
||||
Imports DevExpress.XtraPivotGrid
|
||||
Imports DevExpress.ExpressApp.Win.Editors
|
||||
Imports DevExpress.ExpressApp.PivotGrid.Win
|
||||
Imports DevExpress.ExpressApp.SystemModule
|
||||
Imports DevExpress.ExpressApp.Editors
|
||||
Imports DevExpress.Persistent.BaseImpl
|
||||
Imports DevExpress.ExpressApp.Model
|
||||
Public Class InvoiceRowsPivotVC
|
||||
Inherits Nuvolar.Module.InvoiceRowsPivotVC
|
||||
Dim _FileNameGrid = Path.GetTempPath & "ReportGrid.xml"
|
||||
Dim _FileNamePivotGrid = Path.GetTempPath & "ReportPivotGrid.xml"
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
|
||||
'This call is required by the Component Designer.
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
|
||||
End Sub
|
||||
Protected Overrides Sub OnActivated()
|
||||
MyBase.OnActivated()
|
||||
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _User As User = _ocur.GetObjectByKey(Of User)(_ocur.GetKeyValue(SecuritySystem.CurrentUser))
|
||||
|
||||
If View.Id = "InvoiceRowsPivot_InvoiceRows_Table_ListView" Then
|
||||
If _User.Oid <> SecuritySystem.CurrentUserId Then
|
||||
Frame.GetController(Of CentralListViewVC).aSaveCentralListViewSettings.Active.SetItemValue("", False)
|
||||
End If
|
||||
End If
|
||||
If View.Id = "InvoiceRowsPivot_InvoiceRows_Pivot_ListView" Then
|
||||
AddHandler View.ControlsCreated, AddressOf View_ControlCreated
|
||||
End If
|
||||
End Sub
|
||||
Protected Overrides Sub OnDeactivated()
|
||||
MyBase.OnDeactivated()
|
||||
If View.Id = "InvoiceRowsPivot_InvoiceRows_Table_ListView" Then
|
||||
Frame.GetController(Of CentralListViewVC).aSaveCentralListViewSettings.Active.SetItemValue("", True)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub View_ControlCreated(sender As Object, e As EventArgs)
|
||||
If View.Id = "InvoiceRowsPivot_InvoiceRows_Pivot_ListView" Then
|
||||
TryCast(TryCast(View, ListView).Editor, PivotGridListEditor).PivotGridControl.OptionsData.DataFieldUnboundExpressionMode = DataFieldUnboundExpressionMode.UseSummaryValues
|
||||
AddHandler TryCast(TryCast(View, ListView).Editor, PivotGridListEditor).PivotGridControl.CustomSummary, AddressOf PivotGridControl_CustomSummary
|
||||
'AddHandler TryCast(TryCast(View, ListView).Editor, PivotGridListEditor).PivotGridControl., AddressOf PivotGridControl_CustomSummary
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub PivotGridControl_CustomSummary(sender As Object, e As PivotGridCustomSummaryEventArgs)
|
||||
'If Not e.DataField Is Then Return
|
||||
'' A variable which counts the number of orders whose sum exceeds $500.
|
||||
'Dim order500Count As Integer = 0
|
||||
'' Get the record set corresponding to the current cell.
|
||||
'Dim ds As PivotDrillDownDataSource = e.CreateDrillDownDataSource()
|
||||
'' Iterate through the records and count the orders.
|
||||
'Dim i As Integer
|
||||
'For i = 0 To ds.RowCount - 1
|
||||
' Dim row As PivotDrillDownDataRow = ds(i)
|
||||
' ' Get the order's total sum.
|
||||
' Dim orderSum As Decimal = row(fieldExtendedPrice)
|
||||
' If orderSum >= minSum Then order500Count = order500Count + 1
|
||||
'Next
|
||||
'' Calculate the percentage.
|
||||
'If ds.RowCount > 0 Then
|
||||
' e.CustomValue = order500Count / ds.RowCount
|
||||
'End If
|
||||
'Beep()
|
||||
'e.CustomValue = -1000
|
||||
'Dim ds As PivotDrillDownDataSource = e.CreateDrillDownDataSource()
|
||||
''If ds.RowCount > 0 Then
|
||||
'' e.CustomValue = -200
|
||||
''End If
|
||||
'If e.DataField.FieldName = "GrossMarginPercent" Then
|
||||
' For i = 0 To ds.RowCount - 1
|
||||
' Dim row As PivotDrillDownDataRow = ds(i)
|
||||
|
||||
' Next
|
||||
'End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
Generated
+35
@@ -0,0 +1,35 @@
|
||||
Partial Class InvoiceVC
|
||||
|
||||
<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()
|
||||
'
|
||||
'aGeneratePDFandSendDefaultMailClient_Invoice
|
||||
'
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
+126
@@ -0,0 +1,126 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="aGeneratePDFandSendDefaultMailClient_Invoice.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>
|
||||
+148
@@ -0,0 +1,148 @@
|
||||
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.XtraGrid.Views.Grid
|
||||
Imports DevExpress.ExpressApp.Editors
|
||||
Imports DevExpress.ExpressApp.Win.Editors
|
||||
Imports DevExpress.Persistent.BaseImpl
|
||||
Imports Microsoft.Office.Interop
|
||||
Imports DevExpress.ExpressApp.Reports
|
||||
Imports System.IO
|
||||
Imports System.Runtime.InteropServices
|
||||
Imports DevExpress.Data.Filtering
|
||||
Imports DevExpress.XtraReports.UI
|
||||
Imports DevExpress.ExpressApp.ReportsV2
|
||||
Imports DevExpress.Persistent.Base.ReportsV2
|
||||
|
||||
Public Class InvoiceVC
|
||||
Inherits Nuvolar.Module.InvoiceVC
|
||||
Dim _WaitFormClass As New WaitFormClass
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
'This call is required by the Component Designer.
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
End Sub
|
||||
Protected Overrides Sub OnActivated()
|
||||
MyBase.OnActivated()
|
||||
Frame.GetController(Of Nuvolar.Module.InvoiceVC)().Actions.Item("aStornoInvoice").Active.SetItemValue("", False)
|
||||
If View.Id = "InvoiceHeader_ListView" Then
|
||||
AddHandler DoWork, AddressOf _WaitFormClass.DoWork
|
||||
AddHandler InitWork, AddressOf _WaitFormClass.Initwork
|
||||
AddHandler FinalWork, AddressOf _WaitFormClass.FinalWork
|
||||
End If
|
||||
End Sub
|
||||
Protected Overrides Sub OnDeactivated()
|
||||
If View.Id = "InvoiceHeader_ListView" Then
|
||||
RemoveHandler DoWork, AddressOf _WaitFormClass.DoWork
|
||||
RemoveHandler InitWork, AddressOf _WaitFormClass.Initwork
|
||||
RemoveHandler FinalWork, AddressOf _WaitFormClass.FinalWork
|
||||
End If
|
||||
MyBase.OnDeactivated()
|
||||
End Sub
|
||||
Protected Overrides Sub OnViewControlsCreated()
|
||||
MyBase.OnViewControlsCreated()
|
||||
If View.Id = "InvoiceHeader_ListView" Then
|
||||
Dim _editor As ListEditor = (CType(View, ListView)).Editor
|
||||
Dim _gridView As GridView = (CType(_editor, GridListEditor)).GridView
|
||||
AddHandler _gridView.SelectionChanged, AddressOf GridView_SelectionChanged
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Public Sub GridView_SelectionChanged(ByVal sender As Object, ByVal e As DevExpress.Data.SelectionChangedEventArgs)
|
||||
Dim _GridView As GridView = TryCast(sender, GridView)
|
||||
Dim _InvoiceHeader As InvoiceHeader
|
||||
If View Is Nothing Then Exit Sub
|
||||
If View.SelectedObjects.Count = 1 Then
|
||||
_InvoiceHeader = TryCast(View.SelectedObjects(0), InvoiceHeader)
|
||||
If Not _InvoiceHeader Is Nothing Then
|
||||
If View.Id = "InvoiceHeader_ListView" Then
|
||||
If _InvoiceHeader.IsStorno = False Then
|
||||
Frame.GetController(Of Nuvolar.Module.InvoiceVC)().Actions.Item("aStornoInvoice").Active.SetItemValue("", True)
|
||||
Else
|
||||
Frame.GetController(Of Nuvolar.Module.InvoiceVC)().Actions.Item("aStornoInvoice").Active.SetItemValue("", False)
|
||||
End If
|
||||
If _InvoiceHeader.IsEditable = False Then
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.DeleteObjectsViewController)().Active.SetItemValue("", False)
|
||||
Else
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.DeleteObjectsViewController)().Active.SetItemValue("", True)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
Frame.GetController(Of Nuvolar.Module.InvoiceVC)().Actions.Item("aStornoInvoice").Active.SetItemValue("", False)
|
||||
End If
|
||||
End Sub
|
||||
Private Sub CreatePDFAndSendToDefaultMailClient()
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _InvoiceHeader As InvoiceHeader = TryCast(View.SelectedObjects(0), InvoiceHeader)
|
||||
|
||||
Dim _OutlookApp As New Microsoft.Office.Interop.Outlook.Application()
|
||||
Dim _OutlookNameSpace As Microsoft.Office.Interop.Outlook.NameSpace
|
||||
Dim _mail As Outlook.MailItem = Nothing
|
||||
Dim _mailRecipients As Outlook.Recipients = Nothing
|
||||
Dim _mailRecipient As Outlook.Recipient = Nothing
|
||||
Dim _mailAttachments As Outlook.Attachments = Nothing
|
||||
Dim _mailAttachment As Outlook.Attachment = Nothing
|
||||
_OutlookNameSpace = _OutlookApp.GetNamespace("MAPI")
|
||||
_OutlookNameSpace.Logon(, , False, True)
|
||||
|
||||
If _InvoiceHeader IsNot Nothing Then
|
||||
If _InvoiceHeader.InvoiceType.ReportDataV2 IsNot Nothing Then
|
||||
Dim _XtraReport As XtraReport = ReportDataProvider.ReportsStorage.LoadReport(_InvoiceHeader.InvoiceType.ReportDataV2)
|
||||
Dim dataSource As Object = TryCast(_XtraReport.DataSource, ISupportCriteria)
|
||||
dataSource.Criteria = CriteriaOperator.Parse("InvoiceHeader.Oid=?", _InvoiceHeader.Oid)
|
||||
|
||||
Frame.GetController(Of ReportsV2.ReportServiceController).SetupBeforePrint(_XtraReport, Nothing, Nothing, False, Nothing, False)
|
||||
Dim _FileName As String = Path.GetTempPath & CorrectFileName(_InvoiceHeader.DocumentNumber) & ".pdf"
|
||||
Dim _StreamFile As New FileStream(_FileName, FileMode.Create)
|
||||
|
||||
_XtraReport.ExportToPdf(_StreamFile)
|
||||
_StreamFile.Close()
|
||||
|
||||
Try
|
||||
_mail = _OutlookApp.CreateItem(Outlook.OlItemType.olMailItem)
|
||||
_mail.Subject = "SZÁMLA"
|
||||
|
||||
_mailAttachments = _mail.Attachments
|
||||
_mailAttachment = _mailAttachments.Add(_FileName)
|
||||
|
||||
_mailRecipients = _mail.Recipients
|
||||
|
||||
For Each _Address As String In _InvoiceHeader.Customers.EMail_Invoice.Split(";")
|
||||
If LTrim(RTrim(_Address)) <> "" Then
|
||||
_mailRecipient = _mailRecipients.Add(_Address)
|
||||
End If
|
||||
Next
|
||||
|
||||
_mailRecipient.Resolve()
|
||||
|
||||
If (_mailRecipient.Resolved) Then
|
||||
'_mail.Send()
|
||||
_mail.Display(True)
|
||||
Else
|
||||
System.Windows.Forms.MessageBox.Show(
|
||||
"There is no such record in your address book.")
|
||||
End If
|
||||
Catch ex As Exception
|
||||
System.Windows.Forms.MessageBox.Show(ex.Message,
|
||||
"An exception is occured in the code of add-in.")
|
||||
Finally
|
||||
If Not IsNothing(_mailRecipient) Then Marshal.ReleaseComObject(_mailRecipient)
|
||||
If Not IsNothing(_mailRecipients) Then Marshal.ReleaseComObject(_mailRecipients)
|
||||
If Not IsNothing(_mail) Then Marshal.ReleaseComObject(_mail)
|
||||
End Try
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub aGeneratePDFandSendDefaultMailClient_Invoice_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aGeneratePDFandSendDefaultMailClient_Invoice.Execute
|
||||
Me.CreatePDFAndSendToDefaultMailClient()
|
||||
End Sub
|
||||
End Class
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
Partial Class OfferInHeaderVC
|
||||
|
||||
<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
|
||||
+101
@@ -0,0 +1,101 @@
|
||||
Imports System
|
||||
Imports System.ComponentModel
|
||||
Imports System.Collections.Generic
|
||||
Imports System.Diagnostics
|
||||
Imports System.Text
|
||||
|
||||
Imports DevExpress.ExpressApp
|
||||
Imports DevExpress.ExpressApp.Actions
|
||||
Imports DevExpress.Persistent.Base
|
||||
Imports DevExpress.ExpressApp.SystemModule
|
||||
Imports System.IO
|
||||
Imports FarPoint.Win.Spread
|
||||
Imports DevExpress.Persistent.BaseImpl
|
||||
Imports DevExpress.ExpressApp.Reports
|
||||
Imports DevExpress.Data.Filtering
|
||||
Imports DevExpress.ExpressApp.Editors
|
||||
|
||||
Public Class OfferInHeaderVC
|
||||
Inherits DevExpress.ExpressApp.ViewController
|
||||
Private _FpSpread As FpSpread
|
||||
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 = "OfferInHeader_DetailView" Then
|
||||
AddHandler Frame.GetController(Of ModificationsController)().SaveAction.Executing, AddressOf SaveAction_Executing
|
||||
AddHandler Frame.GetController(Of ModificationsController)().SaveAndCloseAction.Executing, AddressOf SaveAction_Executing
|
||||
AddHandler Frame.GetController(Of ModificationsController)().SaveAndNewAction.Executing, AddressOf SaveAction_Executing
|
||||
|
||||
End If
|
||||
End Sub
|
||||
Protected Overrides Sub OnDeactivated()
|
||||
MyBase.OnDeactivated()
|
||||
If View.Id = "OffersInHeader_DetailView" Then
|
||||
RemoveHandler Frame.GetController(Of ModificationsController)().SaveAction.Executing, AddressOf SaveAction_Executing
|
||||
RemoveHandler Frame.GetController(Of ModificationsController)().SaveAndCloseAction.Executing, AddressOf SaveAction_Executing
|
||||
RemoveHandler Frame.GetController(Of ModificationsController)().SaveAndNewAction.Executing, AddressOf SaveAction_Executing
|
||||
|
||||
End If
|
||||
End Sub
|
||||
Private Sub ExcelControlViewItem_ControlCreated(ByVal sender As Object, ByVal e As EventArgs)
|
||||
Dim itemControl As Object = (CType(sender, ViewItem)).Control
|
||||
|
||||
_FpSpread = TryCast(itemControl, ExcelUserControl).FpSpreadControl
|
||||
|
||||
Dim _FileName As String = Path.GetTempPath & "Out.xls"
|
||||
Dim _StreamFile As New FileStream(_FileName, FileMode.Create)
|
||||
Dim _OfferInHeader As OfferInHeader = TryCast(View.SelectedObjects(0), OfferInHeader)
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
If _ocur.Session.IsNewObject(_OfferInHeader) = False Then
|
||||
If _OfferInHeader IsNot Nothing Then
|
||||
If _OfferInHeader.ExcelFile IsNot Nothing Then
|
||||
_OfferInHeader.ExcelFile.SaveToStream(_StreamFile)
|
||||
_StreamFile.Close()
|
||||
_FpSpread.OpenExcel(_FileName)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Protected Overrides Sub OnViewControlsCreated()
|
||||
MyBase.OnViewControlsCreated()
|
||||
If View.Id = "OfferInHeader_DetailView" Then
|
||||
Dim _DetailView As DetailView = TryCast(View, DetailView)
|
||||
Dim _ExcelControlViewItem As ViewItem
|
||||
If _DetailView IsNot Nothing Then
|
||||
If _DetailView.GetItems(Of ExcelPropertyEditor).Count > 0 Then
|
||||
_ExcelControlViewItem = _DetailView.GetItems(Of ExcelPropertyEditor)(0)
|
||||
If _ExcelControlViewItem IsNot Nothing Then
|
||||
AddHandler _ExcelControlViewItem.ControlCreated, AddressOf ExcelControlViewItem_ControlCreated
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Sub SaveAction_Executing(sender As Object, e As System.ComponentModel.CancelEventArgs)
|
||||
Dim _FileName As String = Path.GetTempPath & "In.xls"
|
||||
Dim _StreamFile As New FileStream(_FileName, FileMode.Create)
|
||||
Dim _OfferInHeader As OfferInHeader = TryCast(View.SelectedObjects(0), OfferInHeader)
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
If _OfferInHeader IsNot Nothing Then
|
||||
If _FpSpread IsNot Nothing Then
|
||||
_FpSpread.SaveExcel(_StreamFile)
|
||||
_StreamFile.Close()
|
||||
Dim _StreamFile2 As New FileStream(_FileName, FileMode.Open)
|
||||
_OfferInHeader.ExcelFile = New FileData(_ocur.Session)
|
||||
_OfferInHeader.ExcelFile.LoadFromStream("Excel worksheet", _StreamFile2)
|
||||
_OfferInHeader.Save()
|
||||
_StreamFile2.Close()
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
Partial Class OfferInRowsVC
|
||||
|
||||
<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
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
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.Win.Editors
|
||||
|
||||
Public Class OfferInRowsVC
|
||||
Inherits DevExpress.ExpressApp.ViewController(Of ListView)
|
||||
Private _GridListEditor As GridListEditor
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
|
||||
'This call is required by the Component Designer.
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Overrides Sub OnViewControlsCreated()
|
||||
MyBase.OnViewControlsCreated()
|
||||
|
||||
'If View.Id = "OfferInHeader_OfferInRows_ListView" Then
|
||||
' Dim _ListView As ListView = CType(View, ListView)
|
||||
' Dim _PropertyCollectionSource As PropertyCollectionSource = CType(_ListView.CollectionSource, PropertyCollectionSource)
|
||||
' Dim _OfferInHeader As OfferInHeader = CType(_PropertyCollectionSource.MasterObject, OfferInHeader)
|
||||
' If _OfferInHeader.IsEditable = True Then
|
||||
' _GridListEditor = TryCast(View.Editor, GridListEditor)
|
||||
' If _GridListEditor IsNot Nothing Then
|
||||
' _GridListEditor.AllowEdit = True
|
||||
' For i As Integer = 0 To _GridListEditor.Columns.Count - 1
|
||||
' If _OfferInHeader.CurrencyName.ShortName = "HUF" Then
|
||||
' If _GridListEditor.GridView.Columns(i).FieldName <> "QTT" And _
|
||||
' _GridListEditor.GridView.Columns(i).FieldName <> "FinalPriceHUF" Then
|
||||
|
||||
' _GridListEditor.GridView.Columns(i).OptionsColumn.ReadOnly = True
|
||||
' _GridListEditor.GridView.Columns(i).OptionsColumn.AllowEdit = False
|
||||
' _GridListEditor.GridView.Columns(i).OptionsColumn.TabStop = False
|
||||
' End If
|
||||
' Else
|
||||
' If _GridListEditor.GridView.Columns(i).FieldName <> "QTT" And _
|
||||
' _GridListEditor.GridView.Columns(i).FieldName <> "FinalPriceDEV" Then
|
||||
|
||||
' _GridListEditor.GridView.Columns(i).OptionsColumn.ReadOnly = True
|
||||
' _GridListEditor.GridView.Columns(i).OptionsColumn.AllowEdit = False
|
||||
' _GridListEditor.GridView.Columns(i).OptionsColumn.TabStop = False
|
||||
' End If
|
||||
' End If
|
||||
' Next i
|
||||
' End If
|
||||
' End If
|
||||
'End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
Partial Class OfferOutHeaderVC
|
||||
|
||||
<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()
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
+123
@@ -0,0 +1,123 @@
|
||||
<?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="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
</root>
|
||||
+99
@@ -0,0 +1,99 @@
|
||||
Imports System
|
||||
Imports System.ComponentModel
|
||||
Imports System.Collections.Generic
|
||||
Imports System.Diagnostics
|
||||
Imports System.Text
|
||||
|
||||
Imports DevExpress.ExpressApp
|
||||
Imports DevExpress.ExpressApp.Actions
|
||||
Imports DevExpress.Persistent.Base
|
||||
Imports DevExpress.ExpressApp.SystemModule
|
||||
Imports System.IO
|
||||
Imports FarPoint.Win.Spread
|
||||
Imports DevExpress.Persistent.BaseImpl
|
||||
Imports DevExpress.ExpressApp.Reports
|
||||
Imports DevExpress.Data.Filtering
|
||||
Imports DevExpress.ExpressApp.Editors
|
||||
|
||||
Public Class OfferOutHeaderVC
|
||||
Inherits DevExpress.ExpressApp.ViewController
|
||||
Private _FpSpread As FpSpread
|
||||
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 = "OfferOutHeader_DetailView" Then
|
||||
AddHandler Frame.GetController(Of ModificationsController)().SaveAction.Executing, AddressOf SaveAction_Executing
|
||||
AddHandler Frame.GetController(Of ModificationsController)().SaveAndCloseAction.Executing, AddressOf SaveAction_Executing
|
||||
AddHandler Frame.GetController(Of ModificationsController)().SaveAndNewAction.Executing, AddressOf SaveAction_Executing
|
||||
|
||||
End If
|
||||
End Sub
|
||||
Protected Overrides Sub OnDeactivated()
|
||||
MyBase.OnDeactivated()
|
||||
If View.Id = "OffersOutHeader_DetailView" Then
|
||||
RemoveHandler Frame.GetController(Of ModificationsController)().SaveAction.Executing, AddressOf SaveAction_Executing
|
||||
RemoveHandler Frame.GetController(Of ModificationsController)().SaveAndCloseAction.Executing, AddressOf SaveAction_Executing
|
||||
RemoveHandler Frame.GetController(Of ModificationsController)().SaveAndNewAction.Executing, AddressOf SaveAction_Executing
|
||||
|
||||
End If
|
||||
End Sub
|
||||
Private Sub ExcelControlViewItem_ControlCreated(ByVal sender As Object, ByVal e As EventArgs)
|
||||
Dim itemControl As Object = (CType(sender, ViewItem)).Control
|
||||
|
||||
_FpSpread = TryCast(itemControl, ExcelUserControl).FpSpreadControl
|
||||
|
||||
Dim _FileName As String = Path.GetTempPath & "Out.xls"
|
||||
Dim _StreamFile As New FileStream(_FileName, FileMode.Create)
|
||||
Dim _OfferOutHeader As OfferOutHeader = TryCast(View.SelectedObjects(0), OfferOutHeader)
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
If _ocur.Session.IsNewObject(_OfferOutHeader) = False Then
|
||||
If _OfferOutHeader IsNot Nothing Then
|
||||
If _OfferOutHeader.ExcelFile IsNot Nothing Then
|
||||
_OfferOutHeader.ExcelFile.SaveToStream(_StreamFile)
|
||||
_StreamFile.Close()
|
||||
_FpSpread.OpenExcel(_FileName)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Protected Overrides Sub OnViewControlsCreated()
|
||||
MyBase.OnViewControlsCreated()
|
||||
If View.Id = "OfferOutHeader_DetailView" Then
|
||||
Dim _DetailView As DetailView = TryCast(View, DetailView)
|
||||
Dim _ExcelControlViewItem As ViewItem
|
||||
If _DetailView IsNot Nothing Then
|
||||
If _DetailView.GetItems(Of ExcelPropertyEditor).Count > 0 Then
|
||||
_ExcelControlViewItem = _DetailView.GetItems(Of ExcelPropertyEditor)(0)
|
||||
If _ExcelControlViewItem IsNot Nothing Then
|
||||
AddHandler _ExcelControlViewItem.ControlCreated, AddressOf ExcelControlViewItem_ControlCreated
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Sub SaveAction_Executing(sender As Object, e As System.ComponentModel.CancelEventArgs)
|
||||
Dim _FileName As String = Path.GetTempPath & "In.xls"
|
||||
Dim _StreamFile As New FileStream(_FileName, FileMode.Create)
|
||||
Dim _OfferOutHeader As OfferOutHeader = TryCast(View.SelectedObjects(0), OfferOutHeader)
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
If _OfferOutHeader IsNot Nothing Then
|
||||
If _FpSpread IsNot Nothing Then
|
||||
_FpSpread.SaveExcel(_StreamFile)
|
||||
_StreamFile.Close()
|
||||
Dim _StreamFile2 As New FileStream(_FileName, FileMode.Open)
|
||||
_OfferOutHeader.ExcelFile = New FileData(_ocur.Session)
|
||||
_OfferOutHeader.ExcelFile.LoadFromStream("Excel worksheet", _StreamFile2)
|
||||
_OfferOutHeader.Save()
|
||||
_StreamFile2.Close()
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
Partial Class OfferOutRowsVC
|
||||
|
||||
<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
|
||||
+71
@@ -0,0 +1,71 @@
|
||||
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.Win.Editors
|
||||
|
||||
Public Class OfferOutRowsVC
|
||||
Inherits DevExpress.ExpressApp.ViewController(Of ListView)
|
||||
Private _GridListEditor As GridListEditor
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
|
||||
'This call is required by the Component Designer.
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
|
||||
End Sub
|
||||
Protected Overrides Sub OnViewControlsCreated()
|
||||
MyBase.OnViewControlsCreated()
|
||||
|
||||
'If View.Id = "OfferOutHeader_OfferOutRows_ListView" Then
|
||||
' Dim _ListView As ListView = CType(View, ListView)
|
||||
' Dim _PropertyCollectionSource As PropertyCollectionSource = CType(_ListView.CollectionSource, PropertyCollectionSource)
|
||||
' Dim _OfferOutHeader As OfferOutHeader = CType(_PropertyCollectionSource.MasterObject, OfferOutHeader)
|
||||
' If _OfferOutHeader.IsEditable = True Then
|
||||
' _GridListEditor = TryCast(View.Editor, GridListEditor)
|
||||
' If _GridListEditor IsNot Nothing Then
|
||||
' _GridListEditor.AllowEdit = True
|
||||
|
||||
' For i As Integer = 0 To _GridListEditor.Columns.Count - 1
|
||||
' If _OfferOutHeader.CurrencyName.ShortName = "HUF" Then
|
||||
' If _GridListEditor.GridView.Columns(i).FieldName <> "QTT" And _
|
||||
' _GridListEditor.GridView.Columns(i).FieldName <> "Description" And _
|
||||
' _GridListEditor.GridView.Columns(i).FieldName <> "RowGroup1" And _
|
||||
' _GridListEditor.GridView.Columns(i).FieldName <> "RowGroup2" And _
|
||||
' _GridListEditor.GridView.Columns(i).FieldName <> "DescriptionPrivate" And _
|
||||
' _GridListEditor.GridView.Columns(i).FieldName <> "FinalPriceHUF" Then
|
||||
|
||||
' _GridListEditor.GridView.Columns(i).OptionsColumn.ReadOnly = True
|
||||
' _GridListEditor.GridView.Columns(i).OptionsColumn.AllowEdit = False
|
||||
' _GridListEditor.GridView.Columns(i).OptionsColumn.TabStop = False
|
||||
|
||||
' '_GridListEditor.GridView.Columns(i).FieldName <> " DiscountPercent" And _
|
||||
' End If
|
||||
' Else
|
||||
' If _GridListEditor.GridView.Columns(i).FieldName <> "QTT" And _
|
||||
' _GridListEditor.GridView.Columns(i).FieldName <> "Description" And _
|
||||
' _GridListEditor.GridView.Columns(i).FieldName <> "RowGroup1" And _
|
||||
' _GridListEditor.GridView.Columns(i).FieldName <> "RowGroup2" And _
|
||||
' _GridListEditor.GridView.Columns(i).FieldName <> "DescriptionPrivate" And _
|
||||
' _GridListEditor.GridView.Columns(i).FieldName <> "FinalPriceDEV" Then
|
||||
|
||||
' _GridListEditor.GridView.Columns(i).OptionsColumn.ReadOnly = True
|
||||
' _GridListEditor.GridView.Columns(i).OptionsColumn.AllowEdit = False
|
||||
' _GridListEditor.GridView.Columns(i).OptionsColumn.TabStop = False
|
||||
' End If
|
||||
' End If
|
||||
|
||||
' Next i
|
||||
|
||||
' End If
|
||||
' End If
|
||||
'End If
|
||||
End Sub
|
||||
End Class
|
||||
+74
@@ -0,0 +1,74 @@
|
||||
Partial Class OfferOutVC
|
||||
|
||||
<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.aInsertGridToRTFCurrentPos_OfferOut = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aRestoreDocumentTemplate_OfferOut = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aReplaceValueDocumentTemplate_OfferOut = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
'
|
||||
'aGeneratePDFandSendDefaultMailClient
|
||||
'
|
||||
'
|
||||
'aInsertGridToRTFCurrentPos_OfferOut
|
||||
'
|
||||
Me.aInsertGridToRTFCurrentPos_OfferOut.Caption = "Insert grid Current position"
|
||||
Me.aInsertGridToRTFCurrentPos_OfferOut.Category = ""
|
||||
Me.aInsertGridToRTFCurrentPos_OfferOut.ConfirmationMessage = Nothing
|
||||
Me.aInsertGridToRTFCurrentPos_OfferOut.Id = "aInsertGridToRTFCurrentPos_OfferOut"
|
||||
Me.aInsertGridToRTFCurrentPos_OfferOut.ImageName = "paste"
|
||||
Me.aInsertGridToRTFCurrentPos_OfferOut.TargetViewId = "OfferOutHeader_DetailView"
|
||||
Me.aInsertGridToRTFCurrentPos_OfferOut.ToolTip = Nothing
|
||||
'
|
||||
'aRestoreDocumentTemplate_OfferOut
|
||||
'
|
||||
Me.aRestoreDocumentTemplate_OfferOut.Caption = "aRestoreDocumentTemplate_OfferOut"
|
||||
Me.aRestoreDocumentTemplate_OfferOut.Category = "aRestoreDocumentTemplate_OfferOut"
|
||||
Me.aRestoreDocumentTemplate_OfferOut.ConfirmationMessage = Nothing
|
||||
Me.aRestoreDocumentTemplate_OfferOut.Id = "aRestoreDocumentTemplate_OfferOut"
|
||||
Me.aRestoreDocumentTemplate_OfferOut.TargetObjectType = GetType(Nuvolar.[Module].OfferOutHeader)
|
||||
Me.aRestoreDocumentTemplate_OfferOut.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
|
||||
Me.aRestoreDocumentTemplate_OfferOut.ToolTip = Nothing
|
||||
Me.aRestoreDocumentTemplate_OfferOut.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
|
||||
'
|
||||
'aReplaceValueDocumentTemplate_OfferOut
|
||||
'
|
||||
Me.aReplaceValueDocumentTemplate_OfferOut.Caption = "aReplaceValueDocumentTemplate_OfferOut"
|
||||
Me.aReplaceValueDocumentTemplate_OfferOut.Category = "aReplaceValueDocumentTemplate_OfferOut"
|
||||
Me.aReplaceValueDocumentTemplate_OfferOut.ConfirmationMessage = Nothing
|
||||
Me.aReplaceValueDocumentTemplate_OfferOut.Id = "aReplaceValueDocumentTemplate_OfferOut"
|
||||
Me.aReplaceValueDocumentTemplate_OfferOut.TargetObjectType = GetType(Nuvolar.[Module].OfferOutHeader)
|
||||
Me.aReplaceValueDocumentTemplate_OfferOut.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
|
||||
Me.aReplaceValueDocumentTemplate_OfferOut.ToolTip = Nothing
|
||||
Me.aReplaceValueDocumentTemplate_OfferOut.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
|
||||
|
||||
End Sub
|
||||
Friend WithEvents aInsertGridToRTFCurrentPos_OfferOut As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aRestoreDocumentTemplate_OfferOut As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aReplaceValueDocumentTemplate_OfferOut As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
|
||||
End Class
|
||||
+135
@@ -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="aGeneratePDFandSendDefaultMailClient.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>277, 56</value>
|
||||
</metadata>
|
||||
<metadata name="aInsertGridToRTFCurrentPos_OfferOut.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>548, 56</value>
|
||||
</metadata>
|
||||
<metadata name="aRestoreDocumentTemplate_OfferOut.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 56</value>
|
||||
</metadata>
|
||||
<metadata name="aReplaceValueDocumentTemplate_OfferOut.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>536, 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>
|
||||
+474
@@ -0,0 +1,474 @@
|
||||
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.Win.Editors
|
||||
Imports DevExpress.ExpressApp.Editors
|
||||
Imports DevExpress.XtraGrid.Views.Grid
|
||||
Imports DevExpress.XtraBars
|
||||
Imports DevExpress.Persistent.BaseImpl
|
||||
Imports DevExpress.ExpressApp.Reports
|
||||
Imports System.IO
|
||||
Imports DevExpress.XtraPrinting
|
||||
Imports DevExpress.XtraReports.UI
|
||||
Imports Microsoft.Office.Interop
|
||||
Imports System.Runtime.InteropServices
|
||||
|
||||
|
||||
Public Class OfferOutVC
|
||||
Inherits Nuvolar.Module.OffersOutVC
|
||||
Dim _RichEditControl As RichEditControl
|
||||
Dim _GridListEditor As GridListEditor
|
||||
Dim _Grid As GridView
|
||||
Dim _OfferOutHeader As OfferOutHeader
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
End Sub
|
||||
Protected Overrides Sub OnActivated()
|
||||
MyBase.OnActivated()
|
||||
|
||||
Frame.GetController(Of OfferOutVC).aReplaceValueDocumentTemplate_OfferOut.Active.SetItemValue("", False)
|
||||
|
||||
If View.Id = "OfferOutHeader_OfferOutRows_ListView" Then
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.ListViewProcessCurrentObjectController)().Active.SetItemValue("", False)
|
||||
Frame.GetController(Of DevExpress.ExpressApp.Win.SystemModule.OpenObjectController)().Active.SetItemValue("", False)
|
||||
End If
|
||||
If View.Id Like "OrderInHeaderFromOfferOutRowsHeader_OrderInHeaderFromOfferOutRowsRows_ListView" Then
|
||||
Frame.GetController(Of DevExpress.ExpressApp.Win.SystemModule.OpenObjectController)().Active.SetItemValue("", False)
|
||||
End If
|
||||
If View.Id = "OfferOutHeader_DetailView" Then
|
||||
_OfferOutHeader = TryCast(View.SelectedObjects(0), OfferOutHeader)
|
||||
End If
|
||||
If View.Id = "OffersOutParameters_DetailView" Then
|
||||
|
||||
End If
|
||||
End Sub
|
||||
Protected Overrides Sub OnDeactivated()
|
||||
MyBase.OnDeactivated()
|
||||
If View.Id = "OfferOutHeader_OfferOutRows_ListView" Then
|
||||
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.ListViewProcessCurrentObjectController)().Active.SetItemValue("", True)
|
||||
Frame.GetController(Of DevExpress.ExpressApp.Win.SystemModule.OpenObjectController)().Active.SetItemValue("", True)
|
||||
End If
|
||||
If View.Id Like "OrderInHeaderFromOfferOutRowsHeader_OrderInHeaderFromOfferOutRowsRows_ListView" Then
|
||||
Frame.GetController(Of DevExpress.ExpressApp.Win.SystemModule.OpenObjectController)().Active.SetItemValue("", True)
|
||||
End If
|
||||
End Sub
|
||||
Protected Overrides Sub OnViewControlsCreated()
|
||||
MyBase.OnViewControlsCreated()
|
||||
If View.Id = "OfferOutHeader_DetailView" Then
|
||||
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
|
||||
If View.Id = "OfferOutParameters_DetailView" Then
|
||||
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
|
||||
If View.Id Like "OrderInHeaderFromOfferOutRowsHeader_OrderInHeaderFromOfferOutRowsRows_ListView" Then
|
||||
Dim _ListView As DevExpress.ExpressApp.ListView = CType(View, DevExpress.ExpressApp.ListView)
|
||||
_GridListEditor = TryCast(_ListView.Editor, GridListEditor)
|
||||
_Grid = TryCast(_GridListEditor.GridView, GridView)
|
||||
|
||||
AddHandler _Grid.GridControl.HandleCreated, AddressOf Grid_HandleCreated
|
||||
End If
|
||||
End Sub
|
||||
Private Sub CreatePDFAndSendToDefaultMailClient()
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _OfferOutHeader As OfferOutHeader = TryCast(View.SelectedObjects(0), OfferOutHeader)
|
||||
Dim _ReportData As ReportData = Nothing
|
||||
|
||||
Dim _OutlookApp As New Microsoft.Office.Interop.Outlook.Application()
|
||||
Dim _OutlookNameSpace As Microsoft.Office.Interop.Outlook.NameSpace
|
||||
Dim _mail As Outlook.MailItem = Nothing
|
||||
Dim _mailRecipients As Outlook.Recipients = Nothing
|
||||
Dim _mailRecipient As Outlook.Recipient = Nothing
|
||||
Dim _mailAttachments As Outlook.Attachments = Nothing
|
||||
Dim _mailAttachment As Outlook.Attachment = Nothing
|
||||
_OutlookNameSpace = _OutlookApp.GetNamespace("MAPI")
|
||||
_OutlookNameSpace.Logon(, , False, True)
|
||||
|
||||
If _OfferOutHeader IsNot Nothing Then
|
||||
If Frame.GetController(Of OffersOutPrintVC).aOfferOutPrintChoice.SelectedItem IsNot Nothing Then
|
||||
If _OfferOutHeader.IsEditable = True Then
|
||||
_OfferOutHeader.RecalculateOfferOut(_OfferOutHeader, _ocur)
|
||||
_ocur.CommitChanges()
|
||||
End If
|
||||
If Frame.GetController(Of OffersOutPrintVC).aOfferOutPrintChoice.SelectedItem.Data = "0" Then
|
||||
_ReportData = _OfferOutHeader.OfferOutParameters.ReportData
|
||||
End If
|
||||
If Frame.GetController(Of OffersOutPrintVC).aOfferOutPrintChoice.SelectedItem.Data = "1" Then
|
||||
_ReportData = _OfferOutHeader.OfferOutParameters.ReportData1
|
||||
End If
|
||||
Else
|
||||
Throw New Exception("*Nincs nyomtatvány típus kiválasztva!")
|
||||
End If
|
||||
|
||||
If _ReportData IsNot Nothing Then
|
||||
Dim _XafReport As XafReport = _ReportData.LoadReport(_ocur)
|
||||
Dim _FilterString As String = "[OfferOutHeader.Oid]='" & _OfferOutHeader.Oid.ToString & "'"
|
||||
_XafReport.FilterString = _FilterString
|
||||
Dim _FileName As String = Path.GetTempPath & CorrectFileName(_OfferOutHeader.DocumentNumber) & ".pdf"
|
||||
Dim _StreamFile As New FileStream(_FileName, FileMode.Create)
|
||||
|
||||
_XafReport.ExportToPdf(_StreamFile)
|
||||
_StreamFile.Close()
|
||||
|
||||
Try
|
||||
_mail = _OutlookApp.CreateItem(Outlook.OlItemType.olMailItem)
|
||||
_mail.Subject = "ÁRAJÁNLAT"
|
||||
|
||||
_mailAttachments = _mail.Attachments
|
||||
_mailAttachment = _mailAttachments.Add(_FileName)
|
||||
|
||||
_mailRecipients = _mail.Recipients
|
||||
_mailRecipient = _mailRecipients.Add(_OfferOutHeader.Contact.Email)
|
||||
_mailRecipient.Resolve()
|
||||
|
||||
If (_mailRecipient.Resolved) Then
|
||||
'_mail.Send()
|
||||
_mail.Display(True)
|
||||
Else
|
||||
System.Windows.Forms.MessageBox.Show(
|
||||
"There is no such record in your address book.")
|
||||
End If
|
||||
Catch ex As Exception
|
||||
System.Windows.Forms.MessageBox.Show(ex.Message,
|
||||
"An exception is occured in the code of add-in.")
|
||||
Finally
|
||||
If Not IsNothing(_mailRecipient) Then Marshal.ReleaseComObject(_mailRecipient)
|
||||
If Not IsNothing(_mailRecipients) Then Marshal.ReleaseComObject(_mailRecipients)
|
||||
If Not IsNothing(_mail) Then Marshal.ReleaseComObject(_mail)
|
||||
End Try
|
||||
End If
|
||||
End If
|
||||
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)
|
||||
Dim _BarItem As BarItemLink
|
||||
|
||||
_RichEditControl = TryCast(_ItemControl, RichEditUserControl).RichEditControl
|
||||
_RichEditControl.BeginUpdate()
|
||||
|
||||
Dim _OfferOutHeader_IList As IList(Of OfferOutRTF) = New List(Of OfferOutRTF)
|
||||
Dim _OfferOutRTF As New OfferOutRTF
|
||||
|
||||
If _OfferOutHeader IsNot Nothing Then
|
||||
_OfferOutRTF.Sajátcég_Adószám = _OfferOutHeader.CustomersFrom.VATNumber
|
||||
_OfferOutRTF.Sajátcég_Adószám_EU = _OfferOutHeader.CustomersFrom.VATNumberEU
|
||||
If _OfferOutHeader.CustomersFrom.Address1 IsNot Nothing Then
|
||||
_OfferOutRTF.Sajátcég_Irányítószám = _OfferOutHeader.CustomersFrom.Address1.ZipPostal
|
||||
_OfferOutRTF.Sajátcég_Ország = _OfferOutHeader.CustomersFrom.Address1.Country.Name
|
||||
_OfferOutRTF.Sajátcég_Utca = _OfferOutHeader.CustomersFrom.Address1.Street
|
||||
_OfferOutRTF.Sajátcég_Város = _OfferOutHeader.CustomersFrom.Address1.City
|
||||
Else
|
||||
_OfferOutRTF.Sajátcég_Irányítószám = "Nincs beállítva"
|
||||
_OfferOutRTF.Sajátcég_Ország = "Nincs beállítva"
|
||||
_OfferOutRTF.Sajátcég_Utca = "Nincs beállítva"
|
||||
_OfferOutRTF.Sajátcég_Város = "Nincs beállítva"
|
||||
End If
|
||||
_OfferOutRTF.Sajátcég_Teljesnév = _OfferOutHeader.CustomersFrom.FullName
|
||||
|
||||
|
||||
_OfferOutRTF.Partner_Adószám = _OfferOutHeader.Customers.VATNumber
|
||||
_OfferOutRTF.Partner_Adószám_EU = _OfferOutHeader.Customers.VATNumberEU
|
||||
If _OfferOutHeader.Customers.Address1 IsNot Nothing Then
|
||||
_OfferOutRTF.Partner_Irányítószám = _OfferOutHeader.Customers.Address1.ZipPostal
|
||||
_OfferOutRTF.Partner_Ország = _OfferOutHeader.Customers.Address1.Country.Name
|
||||
_OfferOutRTF.Partner_Utca = _OfferOutHeader.Customers.Address1.Street
|
||||
_OfferOutRTF.Partner_Város = _OfferOutHeader.Customers.Address1.City
|
||||
Else
|
||||
_OfferOutRTF.Partner_Irányítószám = "Nincs beállítva"
|
||||
_OfferOutRTF.Partner_Ország = "Nincs beállítva"
|
||||
_OfferOutRTF.Partner_Utca = "Nincs beállítva"
|
||||
_OfferOutRTF.Partner_Város = "Nincs beállítva"
|
||||
End If
|
||||
_OfferOutRTF.Partner_Teljesnév = _OfferOutHeader.Customers.FullName
|
||||
|
||||
If _OfferOutHeader.Contact IsNot Nothing Then
|
||||
_OfferOutRTF.Kapcsolat_Teljesnév = _OfferOutHeader.Contact.FullName
|
||||
If _OfferOutHeader.Contact.PhoneNumbers.Count > 0 Then
|
||||
_OfferOutRTF.Kapcsolat_Mobil = _OfferOutHeader.Contact.PhoneNumbers(0).Number
|
||||
End If
|
||||
_OfferOutRTF.Kapcsolat_Email = _OfferOutHeader.Contact.Email
|
||||
End If
|
||||
|
||||
_OfferOutRTF.Ajánlat_Dokumentum_Sorszám = _OfferOutHeader.DocumentNumber
|
||||
End If
|
||||
_OfferOutHeader_IList.Add(_OfferOutRTF)
|
||||
_RichEditControl.Options.MailMerge.DataSource = _OfferOutHeader_IList
|
||||
|
||||
_RichEditControl.Update()
|
||||
_RichEditControl.UpdateCommandUI()
|
||||
_RichEditControl.EndUpdate()
|
||||
|
||||
_RichEditControl.BeginUpdate()
|
||||
For Each _BarItem In _RichEditUserControl.MailingInsertItemLink.ItemLinks
|
||||
Select Case _BarItem.Item.Caption
|
||||
Case ""
|
||||
End Select
|
||||
_BarItem.Item.Caption = "Lófasz !"
|
||||
Next
|
||||
_RichEditControl.EndUpdate()
|
||||
|
||||
'AddHandler _RichEditUserControl.RichEditControl.Options.MailMerge.
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Grid_HandleCreated(sender As Object, e As System.EventArgs)
|
||||
RemoveHandler _Grid.GridControl.HandleCreated, AddressOf Grid_HandleCreated
|
||||
_GridListEditor.Grid.BeginInvoke(New Windows.Forms.MethodInvoker(AddressOf SelectAll))
|
||||
|
||||
End Sub
|
||||
Private Sub SelectAll()
|
||||
_Grid.SelectAll()
|
||||
End Sub
|
||||
Private Sub aInsertGridToRTFCurrentPos_OfferOut_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aInsertGridToRTFCurrentPos_OfferOut.Execute
|
||||
Dim _DetailView As DetailView = CType(View, DetailView)
|
||||
Dim _OfferOutHeader As OfferOutHeader = TryCast(e.SelectedObjects(0), OfferOutHeader)
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
|
||||
If _OfferOutHeader.DocumentBody Is Nothing Then
|
||||
_OfferOutHeader.DocumentBody = "{\rtf1\deff0{\fonttbl{\f0 Times New Roman;}}" & _
|
||||
"{\colortbl\red0\green0\blue0 ;\red0\green0\blue255 ;}{\*\listoverridetable}{\stylesheet {\ql\cf0 Normal;}" & _
|
||||
"{\*\cs1\cf0 Default Paragraph Font;}{\*\cs2\sbasedon1\cf0 Line Number;}{\*\cs3\ul\cf1 Hyperlink;}}\sectd\pard\plain" & _
|
||||
"\ql\f1\par\pard\plain\ql\f1\par\pard\plain\ql\f1\par\pard\plain\ql" & _
|
||||
"\f2\fs18\cf0\par\pard\plain\ql\f1\par}"
|
||||
End If
|
||||
_RichEditControl.BeginUpdate()
|
||||
|
||||
_RichEditControl.Document.InsertText(_RichEditControl.Document.CaretPosition, "orderrows")
|
||||
_RichEditControl.EndUpdate()
|
||||
'Dim _RTFMergeFieldCleaner As New RTFMergeFieldCleaner
|
||||
'_OfferOutHeader.DocumentBody = _RTFMergeFieldCleaner.CleanDocument(_RichEditControl.Document.RtfText)
|
||||
|
||||
Dim _a As String = _RichEditControl.Document.RtfText
|
||||
|
||||
_OfferOutHeader.DocumentBody = _a
|
||||
'=========================== ColorTable =======================================
|
||||
Dim _actColorNum As Int32 = 0
|
||||
Dim _OrigColorTable As String
|
||||
Dim _ColorTable As String = (_OfferOutHeader.DocumentBody.Remove(0, (InStr(_OfferOutHeader.DocumentBody, "{\colortbl")) + "{\colortbl".Length - 1))
|
||||
|
||||
_ColorTable = _ColorTable.Remove(InStr(_ColorTable, "}") - 1) '--Act Color table
|
||||
Dim _ColorArray As String() = _ColorTable.Split(New [Char]() {";"c})
|
||||
Dim _CTable As New StringBuilder()
|
||||
_CTable.Append("{\colortbl")
|
||||
For _ik As Int32 = 0 To _ColorArray.Length - 2
|
||||
_CTable.Append(_ColorArray(_ik) & ";")
|
||||
Next
|
||||
_CTable.Append("\red240\green240\blue240 ;}")
|
||||
_OrigColorTable = "{\colortbl" & _ColorTable & "}"
|
||||
_OfferOutHeader.DocumentBody = _OfferOutHeader.DocumentBody.Replace(_OrigColorTable, _CTable.ToString())
|
||||
|
||||
'=================================================================================
|
||||
|
||||
Dim _ListPropertyEditor As ListPropertyEditor = TryCast(View, DetailView).FindItem("OfferOutRows")
|
||||
Dim _ListView As DevExpress.ExpressApp.ListView = CType(_ListPropertyEditor.ListView, DevExpress.ExpressApp.ListView)
|
||||
If _ListView IsNot Nothing Then
|
||||
Dim _GridListEditor As GridListEditor = TryCast(_ListView.Editor, GridListEditor)
|
||||
Dim _Grid As GridView = TryCast(_GridListEditor.GridView, GridView)
|
||||
|
||||
If _Grid IsNot Nothing Then
|
||||
_OfferOutHeader.DocumentBody = RTFTableCreator(_Grid, "orderrows", _OfferOutHeader.DocumentBody, _RGB:="241,241,241")
|
||||
End If
|
||||
End If
|
||||
'=================================================================================
|
||||
End Sub
|
||||
Function RTFTableCreator(_Grid As GridView, _Tag As String, _DocumentBody As String, Optional _FontSize As String = "6", _
|
||||
Optional _FontType As String = "Tahoma", Optional _RGB As String = "240,240,240") As String
|
||||
Dim _DocumentBody_NEW As String
|
||||
Dim _HeaderFillColor As Int32 ' -- Current table header fill color index in colot table
|
||||
|
||||
If _RGB <> "240,240,240" Then
|
||||
Dim _Parameters As String() = ColorTablereplacement(_DocumentBody, _RGB)
|
||||
_HeaderFillColor = Convert.ToInt32(_Parameters(0))
|
||||
_DocumentBody = _Parameters(1)
|
||||
Else
|
||||
_HeaderFillColor = 2
|
||||
End If
|
||||
|
||||
If _Grid.DataRowCount > 0 Then
|
||||
Dim _FontSizeNUM As Int32 = (Convert.ToInt32(_FontSize) * 2) ' -- Font size in half-points (the default is 16). => Size 8!!!
|
||||
Dim _RTFtext As New StringBuilder
|
||||
Dim _RowNumFull As Integer = _Grid.RowCount
|
||||
Dim _RowNum As Integer = _Grid.DataRowCount
|
||||
Dim _ColumnsNum As Integer = _Grid.Columns.Count
|
||||
Dim irowIndex As Int32 = 0
|
||||
Dim _LastCellIndex As Int32 = 0
|
||||
|
||||
'--Header to RTF format--
|
||||
'=================================================================================
|
||||
_RTFtext.Append("\pard\plain\ql\par\trowd\irow" & irowIndex & "\irowband" & irowIndex & "\trbrdrt\brdrs\brdrw10\trbrdrl\brdrs\brdrw10" & _
|
||||
"\trbrdrb\brdrs\brdrw10\trbrdrr\brdrs\brdrw10\trleft-108\trautofit1\trpaddfl3\trpaddl108\trpaddfr3\trpaddr108")
|
||||
|
||||
For _ik As Integer = 0 To _Grid.Columns.View.VisibleColumns.Count - 1
|
||||
_RTFtext.Append("\clvertalt\clcbpat2\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10" &
|
||||
"\cltxlrtb\clftsWidth3\clwWidth3302\clpadfr3\clpadr108\clpadft3\clpadt108\cellx" & _ik)
|
||||
If _LastCellIndex < _ik Then
|
||||
_LastCellIndex = _ik
|
||||
End If
|
||||
Next
|
||||
For _ik As Integer = 0 To _Grid.Columns.View.VisibleColumns.Count - 1
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\b\fs" & _FontSizeNUM & "\cf0 " & _Grid.Columns.View.VisibleColumns(_ik).Caption & "}\b\cell")
|
||||
Next
|
||||
|
||||
_RTFtext.Append("\trowd\irow" & irowIndex & "\irowband" & irowIndex & "\trbrdrt\brdrs\brdrw10\trbrdrl\brdrs\brdrw10" & _
|
||||
"\trbrdrb\brdrs\brdrw10\trbrdrr\brdrs\brdrw10\trleft-108\trautofit1\trpaddfl3\trpaddl108\trpaddfr3\trpaddr108")
|
||||
For _ik As Integer = 0 To _Grid.Columns.View.VisibleColumns.Count - 1
|
||||
_RTFtext.Append("\clvertalt\clcbpat" & _HeaderFillColor & "\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10" &
|
||||
"\cltxlrtb\clftsWidth3\clwWidth3302\clpadfr3\clpadr108\clpadft3\clpadt108\cellx" & _ik)
|
||||
Next
|
||||
irowIndex += 1
|
||||
'' --Data to RTF format--
|
||||
'=================================================================================
|
||||
For _ik As Int16 = 0 To _RowNumFull - 2
|
||||
If _Grid.IsGroupRow(_Grid.Columns.View.GetVisibleRowHandle(_ik)) = True Then
|
||||
_RTFtext.Append("\row")
|
||||
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\fs" & _FontSizeNUM & "\cf0 " & (_Grid.GetGroupRowDisplayText(_Grid.Columns.View.GetVisibleRowHandle(_ik)).ToString) & "}\cell")
|
||||
|
||||
|
||||
_RTFtext.Append("\trowd\irow" & irowIndex & "\irowband" & irowIndex & "\trbrdrt\brdrs\brdrw10\trbrdrl\brdrs\brdrw10\trbrdrb\brdrs\brdrw10\trbrdrr\brdrs\brdrw10" & _
|
||||
"\trleft-108\trftsWidth1\trautofit1\trpaddfl3\trpaddl108\trpaddfr3\trpaddr108\tblindtype3\tblind0")
|
||||
|
||||
_RTFtext.Append("\clvertalt\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10\cltxlrtb\clftsWidth3\clwWidth9619" & _
|
||||
"\clpadfr3\clpadr108\clpadft3\clpadt108\cellx" & _LastCellIndex)
|
||||
|
||||
irowIndex += 1
|
||||
Else
|
||||
_RTFtext.Append("\row")
|
||||
|
||||
For _jk As Integer = 0 To _Grid.Columns.View.VisibleColumns.Count - 1
|
||||
If _Grid.Columns.View.VisibleColumns(_jk).ColumnType.FullName <> "System.Double" And _Grid.Columns.View.VisibleColumns(_jk).ColumnType.FullName <> "System.Boolean" Then
|
||||
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\fs" & _FontSizeNUM & "\cf0 " & (_Grid.GetRowCellDisplayText(_Grid.Columns.View.GetVisibleRowHandle(_ik), _Grid.Columns.View.VisibleColumns(_jk))) & "}\cell")
|
||||
ElseIf _Grid.Columns.View.VisibleColumns(_jk).ColumnType.FullName = "System.Boolean" Then
|
||||
If _Grid.GetRowCellValue(_Grid.Columns.View.GetVisibleRowHandle(_ik), _Grid.Columns.View.VisibleColumns(_jk)) = True Then
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\fs" & _FontSizeNUM & "\cf0 " & "Van" & "}\cell")
|
||||
Else
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\fs" & _FontSizeNUM & "\cf0 " & "Nincs" & "}\cell")
|
||||
End If
|
||||
Else
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\fs" & _FontSizeNUM & "\cf0\qr " & LTrim(RTrim(Format(_Grid.Columns.View.GetRowCellValue(_Grid.Columns.View.GetVisibleRowHandle(_ik), _Grid.Columns.View.VisibleColumns(_jk)), "#,##0.00"))) & "}\qr\cell")
|
||||
|
||||
End If
|
||||
Next
|
||||
|
||||
_RTFtext.Append("\trowd\irow" & irowIndex & "\irowband" & irowIndex & "\trbrdrt\brdrs\brdrw10\trbrdrl\brdrs\brdrw10\trbrdrb\brdrs\brdrw10\trbrdrr\brdrs\brdrw10" & _
|
||||
"\trleft-108\trautofit1\trpaddfl3\trpaddl108\trpaddfr3\trpaddr108")
|
||||
|
||||
For _jk As Integer = 0 To _Grid.Columns.View.VisibleColumns.Count - 1
|
||||
|
||||
_RTFtext.Append("\clvertalt\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10\cltxlrtb\clftsWidth3\clwWidth3302" & _
|
||||
"\clpadfr3\clpadr108\clpadft3\clpadt108\cellx" & _jk)
|
||||
Next
|
||||
irowIndex += 1
|
||||
End If
|
||||
Next
|
||||
'--Last row --
|
||||
'=================================================================================
|
||||
If _Grid.IsGroupRow(_Grid.Columns.View.GetVisibleRowHandle(_RowNumFull - 1)) = True Then
|
||||
_RTFtext.Append("\row")
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\fs" & _FontSizeNUM & "\cf0 " & (_Grid.GetGroupRowDisplayText(_Grid.Columns.View.GetVisibleRowHandle(_RowNumFull - 1)).ToString) & "}\cell")
|
||||
|
||||
_RTFtext.Append("\trowd\irow" & irowIndex & "\irowband" & irowIndex & "\trbrdrt\brdrs\brdrw10\trbrdrl\brdrs\brdrw10\trbrdrb\brdrs\brdrw10\trbrdrr\brdrs\brdrw10" & _
|
||||
"\trleft-108\trftsWidth1\trautofit1\trpaddfl3\trpaddl108\trpaddfr3\trpaddr108\tblindtype3\tblind0")
|
||||
|
||||
_RTFtext.Append("\clvertalt\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10\cltxlrtb\clftsWidth3\clwWidth9619" & _
|
||||
"\clpadfr3\clpadr108\clpadft3\clpadt108\cellx" & _LastCellIndex)
|
||||
Else
|
||||
_RTFtext.Append("\row")
|
||||
For _jk As Integer = 0 To _Grid.Columns.View.VisibleColumns.Count - 1
|
||||
If _Grid.Columns.View.VisibleColumns(_jk).ColumnType.FullName <> "System.Double" And _Grid.Columns.View.VisibleColumns(_jk).ColumnType.FullName <> "System.Boolean" Then
|
||||
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\fs" & _FontSizeNUM & "\cf0 " & (_Grid.Columns.View.GetRowCellDisplayText(_RowNum - 1, _Grid.Columns.View.VisibleColumns(_jk))) & "}\cell")
|
||||
ElseIf _Grid.Columns.View.VisibleColumns(_jk).ColumnType.FullName = "System.Boolean" Then
|
||||
If _Grid.IsGroupRow(_Grid.Columns.View.GetVisibleRowHandle(_RowNum - 1)) = True Then
|
||||
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\fs" & _FontSizeNUM & "\cf0 " & "Van" & "}\cell")
|
||||
Else
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\fs" & _FontSizeNUM & "\cf0 " & "Nincs" & "}\cell")
|
||||
End If
|
||||
Else
|
||||
_RTFtext.Append("\pard\plain\ql\intbl{\fs" & _FontSizeNUM & "\cf0\qr " & LTrim(RTrim(Format(_Grid.Columns.View.GetRowCellValue(_Grid.Columns.View.GetVisibleRowHandle(_RowNumFull - 1), _Grid.Columns.View.VisibleColumns(_jk)), "#,##0.00"))) & "}\qr\cell")
|
||||
End If
|
||||
Next
|
||||
|
||||
_RTFtext.Append("\trowd\irow" & irowIndex & "\irowband" & irowIndex & "\lastrow\trbrdrt\brdrs\brdrw10\trbrdrl\brdrs\brdrw10\trbrdrb\brdrs\brdrw10\trbrdrr\brdrs\brdrw10" & _
|
||||
"\trleft-108\trautofit1\trpaddfl3\trpaddl108\trpaddfr3\trpaddr108")
|
||||
''---
|
||||
For _jk As Integer = 0 To _Grid.Columns.View.VisibleColumns.Count - 1
|
||||
|
||||
_RTFtext.Append("\clvertalt\clbrdrt\brdrs\brdrw10\clbrdrl\brdrs\brdrw10\clbrdrb\brdrs\brdrw10\clbrdrr\brdrs\brdrw10\cltxlrtb\clftsWidth3\clwWidth3302" & _
|
||||
"\clpadfr3\clpadr108\clpadft3\clpadt108\cellx" & _jk)
|
||||
Next
|
||||
End If
|
||||
|
||||
_RTFtext.Append("\row\pard\plain\ql")
|
||||
_DocumentBody_NEW = _DocumentBody.Replace(_Tag, _RTFtext.ToString())
|
||||
If _DocumentBody_NEW.Contains("\fonttbl{\f0 Times New Roman;") Then
|
||||
_DocumentBody_NEW = _DocumentBody_NEW.Replace("\fonttbl{\f0 Times New Roman;", "\fonttbl{\f0 " & _FontType & ";") 'Font table remake
|
||||
End If
|
||||
Else
|
||||
_DocumentBody_NEW = _DocumentBody.Replace(_Tag, " ")
|
||||
End If
|
||||
|
||||
Return _DocumentBody_NEW
|
||||
End Function
|
||||
Function ColorTablereplacement(_DocumentBody As String, _RGB As String) As String()
|
||||
Dim _Parameters(1) As String
|
||||
Dim _RGBArray As String() = _RGB.Split(New [Char]() {","c})
|
||||
|
||||
Dim _actColorNum As Int32 = -1
|
||||
Dim _ColorTable As String = (_DocumentBody.Remove(0, (InStr(_DocumentBody, "{\colortbl")) + "{\colortbl".Length - 1))
|
||||
_ColorTable = _ColorTable.Remove(InStr(_ColorTable, "}") - 1) '--Act Color table
|
||||
Dim _ColorArray As String() = _ColorTable.Split(New [Char]() {";"c})
|
||||
|
||||
For _ik As Int32 = 0 To _ColorArray.Length - 1
|
||||
If _ColorArray(_ik) = "\red" & _RGBArray(0) & "\green" & _RGBArray(1) & "\blue" & _RGBArray(2) & " " Then
|
||||
_actColorNum = _ik
|
||||
End If
|
||||
Next
|
||||
If _actColorNum = -1 Then
|
||||
Dim _CTable As New StringBuilder()
|
||||
_CTable.Append("{\colortbl")
|
||||
For _ik As Int32 = 0 To _ColorArray.Length - 2
|
||||
_CTable.Append(_ColorArray(_ik) & ";")
|
||||
Next
|
||||
_CTable.Append("\red" & _RGBArray(0) & "\green" & _RGBArray(1) & "\blue" & _RGBArray(2) & " ;}")
|
||||
Dim _OrigColorTable As String = "{\colortbl" & _ColorTable & "}"
|
||||
_DocumentBody = _DocumentBody.Replace(_OrigColorTable, _CTable.ToString())
|
||||
_Parameters(0) = _ColorArray.Length - 1
|
||||
_Parameters(1) = _DocumentBody
|
||||
Else
|
||||
_Parameters(0) = _actColorNum
|
||||
_Parameters(1) = _DocumentBody
|
||||
End If
|
||||
Return _Parameters
|
||||
End Function
|
||||
|
||||
Private Sub aRestoreDocumentTemplate_OfferOut_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aRestoreDocumentTemplate_OfferOut.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _OfferOutHeader As OfferOutHeader = TryCast(View.SelectedObjects(0), OfferOutHeader)
|
||||
|
||||
_OfferOutHeader.DocumentBody = _OfferOutHeader.OfferOutParameters.DocumentBody
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub aGeneratePDFandSendDefaultMailClient_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aGeneratePDFandSendDefaultMailClient.Execute
|
||||
Me.CreatePDFAndSendToDefaultMailClient()
|
||||
End Sub
|
||||
End Class
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
Partial Class OffersOutPrintVC
|
||||
|
||||
<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.aOfferOutSendMailDeatil = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
'
|
||||
'aOfferOutPrintChoice
|
||||
'
|
||||
Me.aOfferOutPrintChoice.Caption = "Print documentWIN"
|
||||
'
|
||||
'aOffersOutPrintPDF
|
||||
'
|
||||
'
|
||||
'aOffersOutPrintPDF2
|
||||
'
|
||||
'
|
||||
'aOfferOutSendMailDeatil
|
||||
'
|
||||
Me.aOfferOutSendMailDeatil.Caption = "Send offer out header via outlook"
|
||||
Me.aOfferOutSendMailDeatil.Category = ""
|
||||
Me.aOfferOutSendMailDeatil.ConfirmationMessage = Nothing
|
||||
Me.aOfferOutSendMailDeatil.Id = "aOfferOutSendMailDeatil"
|
||||
Me.aOfferOutSendMailDeatil.ImageName = "mail2"
|
||||
Me.aOfferOutSendMailDeatil.Shortcut = Nothing
|
||||
Me.aOfferOutSendMailDeatil.Tag = Nothing
|
||||
Me.aOfferOutSendMailDeatil.TargetObjectsCriteria = Nothing
|
||||
Me.aOfferOutSendMailDeatil.TargetViewId = ""
|
||||
Me.aOfferOutSendMailDeatil.ToolTip = Nothing
|
||||
Me.aOfferOutSendMailDeatil.TypeOfView = Nothing
|
||||
|
||||
End Sub
|
||||
Friend WithEvents aOfferOutSendMailDeatil As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
|
||||
End Class
|
||||
+138
@@ -0,0 +1,138 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="aOffersOutPrint.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>866, 17</value>
|
||||
</metadata>
|
||||
<metadata name="aOfferOutPrintChoice.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>697, 17</value>
|
||||
</metadata>
|
||||
<metadata name="aOffersOutPrintPDF.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>539, 17</value>
|
||||
</metadata>
|
||||
<metadata name="aOffersOutPrintPDF2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>374, 17</value>
|
||||
</metadata>
|
||||
<metadata name="aOfferOutSendMailDeatil.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>186, 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>
|
||||
+209
@@ -0,0 +1,209 @@
|
||||
Imports System
|
||||
Imports System.ComponentModel
|
||||
Imports System.Collections.Generic
|
||||
Imports System.Diagnostics
|
||||
Imports System.Text
|
||||
|
||||
Imports DevExpress.ExpressApp
|
||||
Imports DevExpress.ExpressApp.Actions
|
||||
Imports DevExpress.Persistent.Base
|
||||
Imports DevExpress.Data.Filtering
|
||||
Imports DevExpress.XtraReports.UI
|
||||
Imports DevExpress.XtraReports.Parameters
|
||||
Imports DevExpress.ExpressApp.Reports
|
||||
Imports DevExpress.Persistent.BaseImpl
|
||||
Imports System.IO
|
||||
Imports DevExpress.ExpressApp.Editors
|
||||
Imports Gnostice.PDFOne
|
||||
Imports DevExpress.ExpressApp.Utils
|
||||
|
||||
Public Class OffersOutPrintVC
|
||||
Inherits Nuvolar.Module.OffersOutPrintVC
|
||||
Private _ReportServiceController As ReportServiceController
|
||||
Private _RichEditControl As RichEditControl
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
End Sub
|
||||
Protected Overrides Sub OnActivated()
|
||||
MyBase.OnActivated()
|
||||
Frame.GetController(Of OffersOutPrintVC).aOfferOutSendMailDeatil.Active.SetItemValue("", False)
|
||||
If View.Id = "OfferOutHeader_DetailView" Then
|
||||
Frame.GetController(Of OffersOutPrintVC).aOfferOutSendMailDeatil.Active.SetItemValue("", True)
|
||||
End If
|
||||
If View.Id = "CRM_Opportunities_OfferOutHeader_ListView" Then
|
||||
Frame.GetController(Of OffersOutPrintVC).aOfferOutSendMailDeatil.Active.SetItemValue("", True)
|
||||
End If
|
||||
End Sub
|
||||
Protected Overrides Sub OnDeactivated()
|
||||
MyBase.OnDeactivated()
|
||||
If View.Id = "OfferOutHeader_DetailView" Then
|
||||
Frame.GetController(Of OffersOutPrintVC).aOfferOutSendMailDeatil.Active.SetItemValue("", False)
|
||||
End If
|
||||
If View.Id = "CRM_Opportunities_OfferOutHeader_ListView" Then
|
||||
Frame.GetController(Of OffersOutPrintVC).aOfferOutSendMailDeatil.Active.SetItemValue("", True)
|
||||
End If
|
||||
End Sub
|
||||
Protected Overrides Sub OnViewControlsCreated()
|
||||
MyBase.OnViewControlsCreated()
|
||||
If View.Id = "OfferOutHeader_DetailView" Then
|
||||
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 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 aOfferOutSendMailDeatil_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aOfferOutSendMailDeatil.Execute
|
||||
Try
|
||||
Dim _ObjectSpace As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
If View.SelectedObjects.Count = 0 Then Throw New Exception("*Nincs kiválasztva egyetlen ajánlat sem!")
|
||||
Dim _OfferOutHeader As OfferOutHeader = TryCast(View.SelectedObjects(0), OfferOutHeader)
|
||||
If _OfferOutHeader.IsEditable = False Then
|
||||
Dim _ReportData As ReportData
|
||||
|
||||
If Frame.GetController(Of OffersOutPrintVC).aOfferOutPrintChoice.SelectedItem Is Nothing Then
|
||||
Throw New Exception("*Nincs nyomtatvány típus kiválasztva!")
|
||||
End If
|
||||
Select Case Frame.GetController(Of OffersOutPrintVC).aOfferOutPrintChoice.SelectedItem.Data
|
||||
Case "0" : _ReportData = _OfferOutHeader.OfferOutParameters.ReportData
|
||||
Case "1" : _ReportData = _OfferOutHeader.OfferOutParameters.ReportData1
|
||||
Case Else : Throw New Exception("*Nincs nyomtatvány típus kiválasztva!")
|
||||
Exit Sub
|
||||
End Select
|
||||
|
||||
If _ReportData IsNot Nothing Then
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _FileName As String = Path.GetTempPath & CorrectFileName(_OfferOutHeader.DocumentNumber & ".pdf")
|
||||
Dim _XafReport As XafReport = _ReportData.LoadReport(_ocur)
|
||||
Dim _FF As String = "[OfferOutHeader.Oid]='" & _OfferOutHeader.Oid.ToString & "'"
|
||||
_XafReport.FilterString = _FF
|
||||
Dim _StreamFile As New FileStream(_FileName, FileMode.Create)
|
||||
_XafReport.ExportToPdf(_StreamFile)
|
||||
|
||||
_StreamFile.Close()
|
||||
|
||||
Dim _OutlookEMail As OutlookEMail = _ocur.CreateObject(Of OutlookEMail)()
|
||||
Dim _OutlookEMailAttachments As OutlookEMailAttachments = _ocur.CreateObject(Of OutlookEMailAttachments)()
|
||||
Dim _DocumentFileData As DocumentFileData = _ocur.CreateObject(Of DocumentFileData)()
|
||||
|
||||
_StreamFile = New FileStream(_FileName, FileMode.Open)
|
||||
If _OfferOutHeader.CRM_Opportunities IsNot Nothing Then
|
||||
_OutlookEMail.CRM_Leads = _OfferOutHeader.CRM_Opportunities.CRM_Leads
|
||||
_OutlookEMail.CRM_Opportunities = _OfferOutHeader.CRM_Opportunities
|
||||
End If
|
||||
_OutlookEMail.Recipients = _OfferOutHeader.Contact.Email
|
||||
If _OutlookEMail.Recipients = "" Then
|
||||
_OutlookEMail.Recipients = "A kapcsolattartónak nincs e-mail címe."
|
||||
End If
|
||||
_OutlookEMail.Subject = "Árajánlat"
|
||||
Dim _s As String = _OfferOutHeader.DocumentNumber & ".pdf"
|
||||
|
||||
_DocumentFileData.File = New FileData(_ocur.Session)
|
||||
_DocumentFileData.File.LoadFromStream(_s, _StreamFile) '_FileData
|
||||
_DocumentFileData.File.FileName = CorrectFileName(_OfferOutHeader.DocumentNumber & ".pdf")
|
||||
_OutlookEMailAttachments.DocumentFileData = _DocumentFileData
|
||||
_OutlookEMail.OutlookEMailAttachments.Add(_OutlookEMailAttachments)
|
||||
|
||||
_StreamFile.Close()
|
||||
|
||||
If System.IO.File.Exists(_FileName) Then
|
||||
System.IO.File.Delete(_FileName)
|
||||
End If
|
||||
|
||||
e.ShowViewParameters.CreatedView = Application.CreateDetailView(_ocur, "OutlookEMail_DetailView", False, _OutlookEMail)
|
||||
View.Refresh()
|
||||
Else
|
||||
'____________________________ TESZT MIATT ________________________________________
|
||||
Throw New UserFriendlyException("Üres a ReportData1 property!")
|
||||
End If
|
||||
Else
|
||||
'____________________________ TESZT MIATT ________________________________________
|
||||
Throw New UserFriendlyException("Csak végleges kimenő árajánlatot lehet e-mailben pdf-ként elküldeni.")
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly)
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub aOffersOutPrintPDF2_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aOffersOutPrintPDF2.Execute
|
||||
Try
|
||||
If Frame.GetController(Of OffersOutPrintVC).aOfferOutPrintChoice.SelectedItem Is Nothing Then Throw New Exception("*Nincs nyomtatvány típus kiválasztva!")
|
||||
If _RichEditControl Is Nothing Then Throw New Exception("*A PDF elkészítéséhez aktiválni kell a ""Dokumentum"" fület a részletes nézetben!")
|
||||
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _OfferOutHeader As OfferOutHeader = TryCast(View.SelectedObjects(0), OfferOutHeader)
|
||||
If _OfferOutHeader.IsEditable = True Then
|
||||
_OfferOutHeader.RecalculateOfferOut(_OfferOutHeader, _ocur)
|
||||
_ocur.CommitChanges()
|
||||
End If
|
||||
Dim _FileName As String = CorrectFileName(_OfferOutHeader.DocumentNumber) & ".pdf"
|
||||
|
||||
Dim _FileName_Report As String = Path.GetTempPath & "Report.pdf"
|
||||
Dim _FileName_RTF As String = Path.GetTempPath & "RTF.pdf"
|
||||
Dim _FileName_Full As String = Path.GetTempPath & _FileName
|
||||
|
||||
Dim _ReportData As ReportData
|
||||
Dim _StreamFile As FileStream
|
||||
Dim DOCReport As New PDFDocument("2962-F2F8-23B1-5FD8-F4A3-55DB-7D94-28E9")
|
||||
Dim DOCRTF As New PDFDocument("2962-F2F8-23B1-5FD8-F4A3-55DB-7D94-28E9")
|
||||
Dim mergeDOC As New PDFDocument("2962-F2F8-23B1-5FD8-F4A3-55DB-7D94-28E9")
|
||||
|
||||
Select Case Frame.GetController(Of OffersOutPrintVC).aOfferOutPrintChoice.SelectedItem.Data
|
||||
Case "0" : _ReportData = _OfferOutHeader.OfferOutParameters.ReportData
|
||||
Case "1" : _ReportData = _OfferOutHeader.OfferOutParameters.ReportData1
|
||||
Case Else : Throw New Exception("*Nincs nyomtatvány típus kiválasztva!")
|
||||
Exit Sub
|
||||
End Select
|
||||
|
||||
If _ReportData IsNot Nothing Then
|
||||
Dim _XafReport As XafReport = _ReportData.LoadReport(_ocur)
|
||||
Dim _FF As String = "[OfferOutHeader.Oid]='" & _OfferOutHeader.Oid.ToString & "'"
|
||||
_StreamFile = New FileStream(_FileName_Report, FileMode.Create)
|
||||
_XafReport.FilterString = _FF
|
||||
_XafReport.ExportToPdf(_StreamFile)
|
||||
_StreamFile.Close()
|
||||
DOCReport.Load(_FileName_Report)
|
||||
End If
|
||||
|
||||
If _RichEditControl IsNot Nothing Then
|
||||
_StreamFile = New FileStream(_FileName_RTF, FileMode.Create)
|
||||
_RichEditControl.ExportToPdf(_StreamFile)
|
||||
_StreamFile.Close()
|
||||
DOCRTF.Load(_FileName_RTF)
|
||||
End If
|
||||
|
||||
'// Két PDF összefűzése
|
||||
mergeDOC.Merge(DOCRTF)
|
||||
mergeDOC.Merge(DOCReport)
|
||||
|
||||
mergeDOC.Save(_FileName_Full)
|
||||
mergeDOC.Close()
|
||||
|
||||
_StreamFile = New FileStream(_FileName_Full, FileMode.Open)
|
||||
Dim _FileData As New FileData(_ocur.Session)
|
||||
_FileData.LoadFromStream(_FileName_Full, _StreamFile)
|
||||
_OfferOutHeader.PDF_Original = _FileData
|
||||
_StreamFile.Close()
|
||||
_ocur.CommitChanges()
|
||||
|
||||
Process.Start(_FileName_Full)
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, String.Format(CaptionHelper.GetLocalizedText("Exceptions\NuvolarExceptions", "MsgBoxCheckItAgain")))
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
Generated
+32
@@ -0,0 +1,32 @@
|
||||
Partial Class OrderVC
|
||||
|
||||
<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()
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,123 @@
|
||||
<?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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -0,0 +1,90 @@
|
||||
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.XtraGrid.Columns
|
||||
Imports DevExpress.XtraGrid.Views.Grid
|
||||
Imports DevExpress.XtraEditors.Controls
|
||||
Imports DevExpress.XtraEditors.Repository
|
||||
Imports DevExpress.ExpressApp.Win.Editors
|
||||
Imports DevExpress.Data
|
||||
Imports DevExpress.ExpressApp.Editors
|
||||
Imports DevExpress.ExpressApp.Win.SystemModule
|
||||
Imports DevExpress.XtraGrid.Views.BandedGrid
|
||||
Imports DevExpress.XtraGrid
|
||||
|
||||
Public Class OrderVC
|
||||
Inherits DevExpress.ExpressApp.ViewController(Of ListView)
|
||||
Private _GridListEditor As GridListEditor
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
'This call is required by the Component Designer.
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
End Sub
|
||||
Protected Overrides Sub OnViewControlsCreated()
|
||||
Dim _GridControl As GridControl
|
||||
Dim _BandedGridView As BandedGridView = Nothing
|
||||
Dim _GridView As GridView
|
||||
MyBase.OnViewControlsCreated()
|
||||
If View.Id = "OrderInHeader_OrderInRows_ListView" Or _
|
||||
View.Id = "OrderInHeaderFromOfferOutRowsHeader_OrderInHeaderFromOfferOutRowsRows_ListView" Then
|
||||
_GridListEditor = TryCast(View.Editor, GridListEditor)
|
||||
If _GridListEditor IsNot Nothing Then
|
||||
InitGridView()
|
||||
InitQTT_ProcessColumn()
|
||||
_GridView = _GridListEditor.GridView
|
||||
_GridControl = _GridView.GridControl
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Sub InitGridView()
|
||||
For i As Integer = 0 To _GridListEditor.Columns.Count - 1
|
||||
If _GridListEditor.GridView.Columns(i).FieldName Like "QTT_Process" Then
|
||||
Else
|
||||
_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 Sub
|
||||
Sub InitQTT_ProcessColumn()
|
||||
For i As Integer = 0 To _GridListEditor.Columns.Count - 1
|
||||
Dim _ColumnWrapper As ColumnWrapper = _GridListEditor.Columns(i)
|
||||
If _ColumnWrapper.PropertyName = "QTT_Process" Then
|
||||
Dim QTT_ProcessColumn As GridColumn = _GridListEditor.GridView.Columns("QTT_Process")
|
||||
QTT_ProcessColumn.OptionsColumn.AllowEdit = True
|
||||
QTT_ProcessColumn.OptionsColumn.AllowFocus = True
|
||||
QTT_ProcessColumn.OptionsColumn.ReadOnly = False
|
||||
QTT_ProcessColumn.UnboundType = UnboundColumnType.Decimal
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub _row_Products_Editor_ControlValueChanged(sender As Object, e As EventArgs)
|
||||
Throw New NotImplementedException
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Public Class Order
|
||||
Inherits ViewController
|
||||
Protected Overrides Sub OnActivated()
|
||||
MyBase.OnActivated()
|
||||
If View.Id Like "Order*Header_DetailView" Then
|
||||
Frame.GetController(Of WinModificationsController).ModificationsHandlingMode = SystemModule.ModificationsHandlingMode.Confirmation
|
||||
End If
|
||||
If View.Id Like "Order*Header_OrderInRows_ListView" Then
|
||||
Frame.GetController(Of DevExpress.ExpressApp.Win.SystemModule.OpenObjectController)().Active.SetItemValue("", False)
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
Partial Class OrderInRowsOtherVC
|
||||
|
||||
<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
|
||||
+95
@@ -0,0 +1,95 @@
|
||||
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.Win.Editors
|
||||
Imports DevExpress.ExpressApp.SystemModule
|
||||
Imports DevExpress.XtraGrid.Columns
|
||||
|
||||
Public Class OrderInRowsOtherVC
|
||||
Inherits DevExpress.ExpressApp.ViewController(Of ListView)
|
||||
|
||||
Private _GridListEditor As GridListEditor
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
End Sub
|
||||
Protected Overrides Sub OnDeactivated()
|
||||
MyBase.OnDeactivated()
|
||||
If View.Id = "OrderInHeader_OrderInRows_ListView" Then
|
||||
If _GridListEditor IsNot Nothing Then
|
||||
If _GridListEditor.GridView IsNot Nothing Then
|
||||
RemoveHandler _GridListEditor.GridView.CellValueChanged, AddressOf OrderInHeader_OrderInRows_ListView_CellValueChanged
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Protected Overrides Sub OnViewControlsCreated()
|
||||
MyBase.OnViewControlsCreated()
|
||||
|
||||
'If View.Id = "OrderInHeader_OrderInRowsOther_ListView" Then
|
||||
' Dim _ListView As ListView = CType(View, ListView)
|
||||
' Dim _PropertyCollectionSource As PropertyCollectionSource = CType(_ListView.CollectionSource, PropertyCollectionSource)
|
||||
' Dim _OrderInHeader As OrderInHeader = CType(_PropertyCollectionSource.MasterObject, OrderInHeader)
|
||||
' If _OrderInHeader.IsEditable = True Then
|
||||
' _GridListEditor = TryCast(View.Editor, GridListEditor)
|
||||
' If _GridListEditor IsNot Nothing Then
|
||||
' _GridListEditor.AllowEdit = True
|
||||
|
||||
' If _OrderInHeader.OrderInParameters.CurrencyName IsNot Nothing Then
|
||||
' For i As Integer = 0 To _GridListEditor.Columns.Count - 1
|
||||
' If _OrderInHeader.OrderInParameters.CurrencyName.ShortName = "HUF" Then
|
||||
' If _GridListEditor.GridView.Columns(i).FieldName <> "QTT" _
|
||||
' And _GridListEditor.GridView.Columns(i).FieldName <> "Description" _
|
||||
' And _GridListEditor.GridView.Columns(i).FieldName <> "DiscountPriceHUF" Then
|
||||
' _GridListEditor.GridView.Columns(i).OptionsColumn.ReadOnly = True
|
||||
' _GridListEditor.GridView.Columns(i).OptionsColumn.AllowEdit = False
|
||||
' _GridListEditor.GridView.Columns(i).OptionsColumn.TabStop = False
|
||||
' End If
|
||||
' Else
|
||||
' If _GridListEditor.GridView.Columns(i).FieldName <> "QTT" _
|
||||
' And _GridListEditor.GridView.Columns(i).FieldName <> "Description" _
|
||||
' And _GridListEditor.GridView.Columns(i).FieldName <> "DiscountPriceDEV" Then
|
||||
|
||||
' _GridListEditor.GridView.Columns(i).OptionsColumn.ReadOnly = True
|
||||
' _GridListEditor.GridView.Columns(i).OptionsColumn.AllowEdit = False
|
||||
' _GridListEditor.GridView.Columns(i).OptionsColumn.TabStop = False
|
||||
' End If
|
||||
' End If
|
||||
|
||||
' Next i
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
'End If
|
||||
If View.Id = "OrderInHeader_OrderInRows_ListView" Then
|
||||
Dim _ListView As ListView = CType(View, ListView)
|
||||
Dim _PropertyCollectionSource As PropertyCollectionSource = CType(_ListView.CollectionSource, PropertyCollectionSource)
|
||||
Dim _OrderInHeader As OrderInHeader = CType(_PropertyCollectionSource.MasterObject, OrderInHeader)
|
||||
If _OrderInHeader.IsEditable = True Then
|
||||
_GridListEditor = TryCast(View.Editor, GridListEditor)
|
||||
If _GridListEditor IsNot Nothing Then
|
||||
AddHandler _GridListEditor.GridView.CellValueChanged, AddressOf OrderInHeader_OrderInRows_ListView_CellValueChanged
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub OrderInHeader_OrderInRows_ListView_CellValueChanged(sender As Object, e As DevExpress.XtraGrid.Views.Base.CellValueChangedEventArgs)
|
||||
If TryCast(e.Column, GridColumn).FieldName = "QTT_Process" Then
|
||||
Dim nestedFrame As NestedFrame = TryCast(Frame, NestedFrame)
|
||||
If nestedFrame IsNot Nothing Then
|
||||
Dim parentView As View = nestedFrame.View
|
||||
TryCast(parentView.ObjectSpace, Xpo.XPObjectSpace).CommitChanges()
|
||||
parentView.ObjectSpace.Refresh()
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
Partial Class OrderInRowsVC
|
||||
|
||||
<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
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
Imports System
|
||||
Imports System.ComponentModel
|
||||
Imports System.Collections.Generic
|
||||
Imports System.Diagnostics
|
||||
Imports System.Text
|
||||
|
||||
Imports DevExpress.ExpressApp
|
||||
Imports DevExpress.ExpressApp.Actions
|
||||
Imports DevExpress.Persistent.Base
|
||||
|
||||
Public Class OrderInRowsVC
|
||||
Inherits Nuvolar.Module.OrderInRowsVC
|
||||
Dim _WaitFormClass As New WaitFormClass
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
|
||||
'This call is required by the Component Designer.
|
||||
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
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
Partial Class OrderInVC
|
||||
|
||||
<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
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
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 OrderInVC
|
||||
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 = "OrderInHeader_DetailView" Then
|
||||
AddHandler View.ControlsCreated, AddressOf OrderInHeader_DetailView_ControlCreated
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub OrderInHeader_DetailView_ControlCreated(sender As Object, e As EventArgs)
|
||||
If View.Id = "OrderInHeader_DetailView" Then
|
||||
Dim _row_Products_Editor As DevExpress.ExpressApp.Win.Editors.LookupPropertyEditor
|
||||
_row_Products_Editor = TryCast(View, DetailView).FindItem("row_Products")
|
||||
|
||||
AddHandler _row_Products_Editor.ControlValueChanged, AddressOf _row_Products_Editor_ControlValueChanged
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub _row_Products_Editor_ControlValueChanged(sender As Object, e As EventArgs)
|
||||
Dim _row_QTT As DevExpress.ExpressApp.Win.Editors.DoublePropertyEditor
|
||||
Dim _OrderInHeader As OrderInHeader = TryCast(View.SelectedObjects(0), OrderInHeader)
|
||||
_row_QTT = TryCast(View, DetailView).FindItem("row_QTT")
|
||||
If _row_QTT IsNot Nothing Then
|
||||
Dim _row_Products_Editor As DevExpress.ExpressApp.Win.Editors.LookupPropertyEditor
|
||||
_row_Products_Editor = TryCast(View, DetailView).FindItem("row_Products")
|
||||
|
||||
If _row_Products_Editor IsNot Nothing Then
|
||||
Dim _ProductSelect As Nuvolar.Module.ProductSelect = TryCast(_row_Products_Editor.ControlValue, Nuvolar.Module.ProductSelect)
|
||||
If _ProductSelect IsNot Nothing Then
|
||||
If _ProductSelect.Products IsNot Nothing Then
|
||||
'row_qtt_ProductSelect.Products.DecimalOut
|
||||
Dim _SpinEdit As DevExpress.XtraEditors.SpinEdit
|
||||
_SpinEdit = TryCast(_row_QTT.Control, DevExpress.XtraEditors.SpinEdit)
|
||||
If _SpinEdit IsNot Nothing Then
|
||||
Select Case _ProductSelect.Products.DecimalOut
|
||||
Case 0
|
||||
_SpinEdit.Properties.Mask.EditMask = "#,##0"
|
||||
_SpinEdit.Properties.Mask.UseMaskAsDisplayFormat = True
|
||||
Case 1
|
||||
_SpinEdit.Properties.Mask.EditMask = "#,##0.0"
|
||||
_SpinEdit.Properties.Mask.UseMaskAsDisplayFormat = True
|
||||
Case 2
|
||||
_SpinEdit.Properties.Mask.EditMask = "#,##0.00"
|
||||
_SpinEdit.Properties.Mask.UseMaskAsDisplayFormat = True
|
||||
Case 3
|
||||
_SpinEdit.Properties.Mask.EditMask = "#,##0.000"
|
||||
_SpinEdit.Properties.Mask.UseMaskAsDisplayFormat = True
|
||||
Case 4
|
||||
_SpinEdit.Properties.Mask.EditMask = "#,##0.0000"
|
||||
_SpinEdit.Properties.Mask.UseMaskAsDisplayFormat = True
|
||||
Case Else
|
||||
_SpinEdit.Properties.Mask.EditMask = ""
|
||||
_SpinEdit.Properties.Mask.UseMaskAsDisplayFormat = False
|
||||
End Select
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
Partial Class OrderOutStockVC
|
||||
|
||||
<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
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
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 OrderOutStockVC
|
||||
Inherits Nuvolar.Module.OrderOutStockVC
|
||||
Dim _WaitFormClass As New WaitFormClass
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
|
||||
'This call is required by the Component Designer.
|
||||
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
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
Partial Class OrderOutVC
|
||||
|
||||
<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
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
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.ExpressApp.Win.Editors
|
||||
Imports DevExpress.XtraGrid.Columns
|
||||
Imports DevExpress.XtraGrid.Views.Grid
|
||||
Imports DevExpress.XtraEditors.Controls
|
||||
Imports DevExpress.XtraEditors.Repository
|
||||
Imports DevExpress.Data
|
||||
Imports DevExpress.ExpressApp.Editors
|
||||
|
||||
Public Class OrderOutVC
|
||||
Inherits Nuvolar.Module.OrderOutVC
|
||||
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
|
||||
+85
@@ -0,0 +1,85 @@
|
||||
Partial Class CRM_LeadsVC
|
||||
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Public Sub New(ByVal Container As System.ComponentModel.IContainer)
|
||||
MyClass.New()
|
||||
|
||||
'Required for Windows.Forms Class Composition Designer support
|
||||
Container.Add(Me)
|
||||
|
||||
End Sub
|
||||
|
||||
'Component overrides dispose to clean up the component list.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
MyBase.Dispose(disposing)
|
||||
End Sub
|
||||
|
||||
'Required by the Component Designer
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'NOTE: The following procedure is required by the Component Designer
|
||||
'It can be modified using the Component Designer.
|
||||
'Do not modify it using the code editor.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Me.aCRM_Leads_CreateMail = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aCRM_Leads_ReadMail = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aCRM_LeadsDocumentation_OpenBusinessDirectory = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
|
||||
'
|
||||
'aCRM_Leads_CreateMail
|
||||
'
|
||||
Me.aCRM_Leads_CreateMail.Caption = "Create mail"
|
||||
Me.aCRM_Leads_CreateMail.ConfirmationMessage = Nothing
|
||||
Me.aCRM_Leads_CreateMail.Id = "aCRM_Leads_CreateMail"
|
||||
Me.aCRM_Leads_CreateMail.ImageName = "mail_add"
|
||||
Me.aCRM_Leads_CreateMail.Shortcut = Nothing
|
||||
Me.aCRM_Leads_CreateMail.Tag = Nothing
|
||||
Me.aCRM_Leads_CreateMail.TargetObjectsCriteria = Nothing
|
||||
Me.aCRM_Leads_CreateMail.TargetViewId = "CRM_Leads_DetailView"
|
||||
Me.aCRM_Leads_CreateMail.ToolTip = Nothing
|
||||
Me.aCRM_Leads_CreateMail.TypeOfView = Nothing
|
||||
'
|
||||
'aCRM_Leads_ReadMail
|
||||
'
|
||||
Me.aCRM_Leads_ReadMail.Caption = "Read mail"
|
||||
Me.aCRM_Leads_ReadMail.ConfirmationMessage = Nothing
|
||||
Me.aCRM_Leads_ReadMail.Id = "aCRM_Leads_ReadMail"
|
||||
Me.aCRM_Leads_ReadMail.ImageName = "mail_view"
|
||||
Me.aCRM_Leads_ReadMail.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
|
||||
Me.aCRM_Leads_ReadMail.Shortcut = Nothing
|
||||
Me.aCRM_Leads_ReadMail.Tag = Nothing
|
||||
Me.aCRM_Leads_ReadMail.TargetObjectsCriteria = Nothing
|
||||
Me.aCRM_Leads_ReadMail.TargetObjectType = GetType(Nuvolar.[Module].CRM_Leads_Activity)
|
||||
Me.aCRM_Leads_ReadMail.TargetViewId = "CRM_Leads_CRM_Leads_Activity_ListView"
|
||||
Me.aCRM_Leads_ReadMail.ToolTip = Nothing
|
||||
Me.aCRM_Leads_ReadMail.TypeOfView = Nothing
|
||||
'
|
||||
'aCRM_LeadsDocumentation_OpenBusinessDirectory
|
||||
'
|
||||
Me.aCRM_LeadsDocumentation_OpenBusinessDirectory.AcceptButtonCaption = Nothing
|
||||
Me.aCRM_LeadsDocumentation_OpenBusinessDirectory.CancelButtonCaption = Nothing
|
||||
Me.aCRM_LeadsDocumentation_OpenBusinessDirectory.Caption = "aCRM_LeadsDocumentation_OpenBusinessDirectory"
|
||||
Me.aCRM_LeadsDocumentation_OpenBusinessDirectory.Category = "ObjectsCreation"
|
||||
Me.aCRM_LeadsDocumentation_OpenBusinessDirectory.ConfirmationMessage = Nothing
|
||||
Me.aCRM_LeadsDocumentation_OpenBusinessDirectory.Id = "aCRM_LeadsDocumentation_OpenBusinessDirectory"
|
||||
Me.aCRM_LeadsDocumentation_OpenBusinessDirectory.ImageName = Nothing
|
||||
Me.aCRM_LeadsDocumentation_OpenBusinessDirectory.Shortcut = Nothing
|
||||
Me.aCRM_LeadsDocumentation_OpenBusinessDirectory.Tag = Nothing
|
||||
Me.aCRM_LeadsDocumentation_OpenBusinessDirectory.TargetObjectsCriteria = Nothing
|
||||
Me.aCRM_LeadsDocumentation_OpenBusinessDirectory.TargetObjectType = GetType(Nuvolar.[Module].CRM_LeadsDocumentation)
|
||||
Me.aCRM_LeadsDocumentation_OpenBusinessDirectory.TargetViewId = "CRM_Leads_CRM_LeadsDocumentation_ListView"
|
||||
Me.aCRM_LeadsDocumentation_OpenBusinessDirectory.TargetViewType = DevExpress.ExpressApp.ViewType.ListView
|
||||
Me.aCRM_LeadsDocumentation_OpenBusinessDirectory.ToolTip = Nothing
|
||||
Me.aCRM_LeadsDocumentation_OpenBusinessDirectory.TypeOfView = GetType(DevExpress.ExpressApp.ListView)
|
||||
|
||||
End Sub
|
||||
Friend WithEvents aCRM_Leads_CreateMail As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aCRM_Leads_ReadMail As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aCRM_LeadsDocumentation_OpenBusinessDirectory As DevExpress.ExpressApp.Actions.PopupWindowShowAction
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,132 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="aCRM_Leads_CreateMail.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 56</value>
|
||||
</metadata>
|
||||
<metadata name="aCRM_Leads_ReadMail.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 95</value>
|
||||
</metadata>
|
||||
<metadata name="aCRM_LeadsDocumentation_OpenBusinessDirectory.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>711, 304</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -0,0 +1,152 @@
|
||||
Imports System
|
||||
Imports System.ComponentModel
|
||||
Imports System.Collections.Generic
|
||||
Imports System.Diagnostics
|
||||
Imports System.Text
|
||||
|
||||
Imports DevExpress.ExpressApp
|
||||
Imports DevExpress.ExpressApp.Actions
|
||||
Imports DevExpress.Persistent.Base
|
||||
Imports DevExpress.Data.Filtering
|
||||
Imports DevExpress.ExpressApp.Utils
|
||||
Imports DevExpress.Xpo
|
||||
|
||||
Public Class CRM_LeadsVC
|
||||
Inherits DevExpress.ExpressApp.ViewController
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
|
||||
End Sub
|
||||
Private Sub aCRM_Leads_CreateMail_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aCRM_Leads_CreateMail.Execute
|
||||
Try
|
||||
Dim _CRM_Leads As CRM_Leads = TryCast(e.CurrentObject, CRM_Leads)
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
If _CRM_Leads.EMail = "" Then Throw New UserFriendlyException("Nincs beállítva e-mail cím!")
|
||||
Dim _OutlookEMail As OutlookEMail = _ocur.CreateObject(Of OutlookEMail)()
|
||||
|
||||
_OutlookEMail.CRM_Leads = _CRM_Leads
|
||||
_OutlookEMail.Recipients = _CRM_Leads.EMail
|
||||
_OutlookEMail.Subject = _CRM_Leads.LeadSource
|
||||
_OutlookEMail.eCRMEstate_Leads = eCRMEstate_Leads.eCRM
|
||||
|
||||
e.ShowViewParameters.CreatedView = Application.CreateDetailView(_ocur, "OutlookEMail_DetailView", False, _OutlookEMail)
|
||||
View.Refresh()
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, String.Format(CaptionHelper.GetLocalizedText("Exceptions\NuvolarExceptions", "MsgBoxCheckItAgain")))
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub aCRM_Leads_ReadMail_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aCRM_Leads_ReadMail.Execute
|
||||
Dim _CRM_Leads_Activity As CRM_Leads_Activity = TryCast(e.SelectedObjects(0), CRM_Leads_Activity)
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
|
||||
If _CRM_Leads_Activity IsNot Nothing Then
|
||||
'--Email megkeresése és új benyitása
|
||||
If _CRM_Leads_Activity.Email_Oid = "" Then
|
||||
Throw New UserFriendlyException("Nincs kapcsolódó e-mail üzenet!")
|
||||
Else
|
||||
Dim _OutlookEMail As OutlookEMail = _ocur.FindObject(Of OutlookEMail)(CriteriaOperator.Parse("Oid=?", _CRM_Leads_Activity.Email_Oid))
|
||||
Dim _OutlookEMailIn As OutlookEMailIn = _ocur.FindObject(Of OutlookEMailIn)(CriteriaOperator.Parse("Oid=?", _CRM_Leads_Activity.Email_Oid))
|
||||
If _OutlookEMail IsNot Nothing Then
|
||||
e.ShowViewParameters.CreatedView = Application.CreateDetailView(_ocur, "OutlookEMail_DetailView", False, _OutlookEMail)
|
||||
Else
|
||||
e.ShowViewParameters.CreatedView = Application.CreateDetailView(_ocur, "OutlookEMailIn_DetailView", False, _OutlookEMailIn)
|
||||
End If
|
||||
View.Refresh()
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub aCRM_LeadsDocumentation_OpenBusinessDirectory_CustomizePopupWindowParams(sender As Object, e As CustomizePopupWindowParamsEventArgs) Handles aCRM_LeadsDocumentation_OpenBusinessDirectory.CustomizePopupWindowParams
|
||||
Try
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _CRM_Opportunities As CRM_Opportunities = TryCast(TryCast(TryCast(View, ListView).CollectionSource, PropertyCollectionSource).MasterObject, CRM_Opportunities)
|
||||
Dim _BusinessDirectoryList As New ArrayList
|
||||
Dim _BusinessDirectory_CollectionSource As New CollectionSource(_onew, GetType(BusinessDirectory))
|
||||
|
||||
If _CRM_Opportunities.MasterBusinessDirectory IsNot Nothing Then
|
||||
If _CRM_Opportunities.MasterBusinessDirectory.Children.Count > 0 Then
|
||||
_BusinessDirectoryList.Add(_CRM_Opportunities.MasterBusinessDirectory)
|
||||
RecursiveBusinessDirectory(_BusinessDirectoryList, _CRM_Opportunities.MasterBusinessDirectory.NestedBusinessDirectory)
|
||||
Else
|
||||
If _CRM_Opportunities.MasterBusinessDirectory.IsFolder Then _BusinessDirectoryList.Add(_CRM_Opportunities.MasterBusinessDirectory)
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim _Filter As String = "Oid in("
|
||||
For Each _BusinessDirectory As BusinessDirectory In _BusinessDirectoryList
|
||||
_Filter += "'" + _BusinessDirectory.Oid.ToString + "',"
|
||||
Next
|
||||
_Filter = _Filter.Remove(_Filter.Length - 1, 1)
|
||||
_Filter += ")"
|
||||
|
||||
_BusinessDirectory_CollectionSource.BeginUpdateCriteria()
|
||||
_BusinessDirectory_CollectionSource.Criteria.Clear()
|
||||
If _Filter.Length > 8 Then
|
||||
_BusinessDirectory_CollectionSource.Criteria.Add("1", CriteriaOperator.Parse(_Filter))
|
||||
Else
|
||||
_BusinessDirectory_CollectionSource.Criteria.Add("1", CriteriaOperator.Parse("1=2"))
|
||||
End If
|
||||
_BusinessDirectory_CollectionSource.EndUpdateCriteria()
|
||||
|
||||
e.View = Application.CreateListView("BusinessDirectory_ListView", _BusinessDirectory_CollectionSource, False)
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, String.Format(CaptionHelper.GetLocalizedText("Exceptions\NuvolarExceptions", "MsgBoxCheckItAgain")))
|
||||
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub aCRM_LeadsDocumentation_OpenBusinessDirectory_Execute(sender As Object, e As PopupWindowShowActionExecuteEventArgs) Handles aCRM_LeadsDocumentation_OpenBusinessDirectory.Execute
|
||||
Dim _BusinessDirectory As BusinessDirectory = TryCast(e.PopupWindow.View.SelectedObjects(0), BusinessDirectory)
|
||||
If Not _BusinessDirectory.IsFolder Then
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _RichEditControl_New As New RichEditControl
|
||||
|
||||
_RichEditControl_New.LoadDocument(GetFile(_BusinessDirectory.FileData))
|
||||
|
||||
Dim _OpenRTFDocument_PopUp As New OpenRTFDocument_PopUp(_onew.Session)
|
||||
_OpenRTFDocument_PopUp.BusinessDirectory = _onew.GetObject(_BusinessDirectory)
|
||||
_OpenRTFDocument_PopUp.RTFText = _RichEditControl_New.RtfText
|
||||
_OpenRTFDocument_PopUp.CRM_Opportunities = _onew.GetObject(TryCast(TryCast(TryCast(View, ListView).CollectionSource, PropertyCollectionSource).MasterObject, CRM_Opportunities))
|
||||
DeleteTempFile(_BusinessDirectory.FileData)
|
||||
|
||||
Dim _ShowViewParameters As New ShowViewParameters
|
||||
Dim _ShowViewSource As New ShowViewSource(Frame, Nothing)
|
||||
|
||||
_ShowViewParameters.CreatedView = Application.CreateDetailView(_onew, "OpenRTFDocument_PopUp_DetailView", True, _OpenRTFDocument_PopUp)
|
||||
_ShowViewParameters.NewWindowTarget = NewWindowTarget.MdiChild
|
||||
_ShowViewParameters.TargetWindow = TargetWindow.NewWindow
|
||||
Application.ShowViewStrategy.ShowView(_ShowViewParameters, _ShowViewSource)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region "Other Functions and Subs"
|
||||
Private Sub RecursiveBusinessDirectory(_BusinessDirectoryList As ArrayList, _NestedBusinessDirectory As XPCollection(Of BusinessDirectory))
|
||||
For Each _BusinessDirectory As BusinessDirectory In _NestedBusinessDirectory
|
||||
If _BusinessDirectory.Children.Count > 0 Then
|
||||
_BusinessDirectoryList.Add(_BusinessDirectory)
|
||||
RecursiveBusinessDirectory(_BusinessDirectoryList, _BusinessDirectory.NestedBusinessDirectory)
|
||||
Else
|
||||
_BusinessDirectoryList.Add(_BusinessDirectory)
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
Private Function GetFile(_DocumentFile As DevExpress.Persistent.BaseImpl.FileData) As String
|
||||
Dim _FilePath As String = System.IO.Path.Combine(System.IO.Path.GetTempPath(), _DocumentFile.FileName)
|
||||
Dim _Stream As System.IO.Stream = New System.IO.FileStream(_FilePath, System.IO.FileMode.Create)
|
||||
_DocumentFile.SaveToStream(_Stream)
|
||||
_Stream.Close()
|
||||
|
||||
Return _FilePath
|
||||
End Function
|
||||
Private Sub DeleteTempFile(_FileData As DevExpress.Persistent.BaseImpl.FileData)
|
||||
Dim _FilePath As String = System.IO.Path.Combine(System.IO.Path.GetTempPath(), _FileData.FileName)
|
||||
If IO.File.Exists(_FilePath) Then IO.File.Delete(_FilePath)
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
+80
@@ -0,0 +1,80 @@
|
||||
Partial Class CRM_OpportunitiesVC
|
||||
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Public Sub New(ByVal Container As System.ComponentModel.IContainer)
|
||||
MyClass.New()
|
||||
|
||||
'Required for Windows.Forms Class Composition Designer support
|
||||
Container.Add(Me)
|
||||
|
||||
End Sub
|
||||
|
||||
'Component overrides dispose to clean up the component list.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
MyBase.Dispose(disposing)
|
||||
End Sub
|
||||
|
||||
'Required by the Component Designer
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'NOTE: The following procedure is required by the Component Designer
|
||||
'It can be modified using the Component Designer.
|
||||
'Do not modify it using the code editor.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Me.aCRM_Opportunities_CreateMail = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aCRM_Opportunities_ReadMail = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aCRM_Opportunities_Contact_Role_CreateMail = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
'
|
||||
'aCRM_Opportunities_CreateMail
|
||||
'
|
||||
Me.aCRM_Opportunities_CreateMail.Caption = "Create mail"
|
||||
Me.aCRM_Opportunities_CreateMail.Category = "ObjectsCreation"
|
||||
Me.aCRM_Opportunities_CreateMail.ConfirmationMessage = Nothing
|
||||
Me.aCRM_Opportunities_CreateMail.Id = "aCRM_Opportunities_CreateMail"
|
||||
Me.aCRM_Opportunities_CreateMail.ImageName = "mail_add"
|
||||
Me.aCRM_Opportunities_CreateMail.Shortcut = Nothing
|
||||
Me.aCRM_Opportunities_CreateMail.Tag = Nothing
|
||||
Me.aCRM_Opportunities_CreateMail.TargetObjectsCriteria = Nothing
|
||||
Me.aCRM_Opportunities_CreateMail.TargetViewId = "CRM_Opportunities_DetailView"
|
||||
Me.aCRM_Opportunities_CreateMail.ToolTip = Nothing
|
||||
Me.aCRM_Opportunities_CreateMail.TypeOfView = Nothing
|
||||
'
|
||||
'aCRM_Opportunities_ReadMail
|
||||
'
|
||||
Me.aCRM_Opportunities_ReadMail.Caption = "Read mail"
|
||||
Me.aCRM_Opportunities_ReadMail.ConfirmationMessage = Nothing
|
||||
Me.aCRM_Opportunities_ReadMail.Id = "aCRM_Opportunities_ReadMail"
|
||||
Me.aCRM_Opportunities_ReadMail.ImageName = "mail_view"
|
||||
Me.aCRM_Opportunities_ReadMail.Shortcut = Nothing
|
||||
Me.aCRM_Opportunities_ReadMail.Tag = Nothing
|
||||
Me.aCRM_Opportunities_ReadMail.TargetObjectsCriteria = Nothing
|
||||
Me.aCRM_Opportunities_ReadMail.TargetViewId = "CRM_Opportunities_CRM_Leads_Activity_ListView"
|
||||
Me.aCRM_Opportunities_ReadMail.ToolTip = Nothing
|
||||
Me.aCRM_Opportunities_ReadMail.TypeOfView = Nothing
|
||||
'
|
||||
'aCRM_Opportunities_Contact_Role_CreateMail
|
||||
'
|
||||
Me.aCRM_Opportunities_Contact_Role_CreateMail.Caption = "Contact Role CreateMail"
|
||||
Me.aCRM_Opportunities_Contact_Role_CreateMail.ConfirmationMessage = Nothing
|
||||
Me.aCRM_Opportunities_Contact_Role_CreateMail.Id = "aCRM_Opportunities_Contact_Role_CreateMail"
|
||||
Me.aCRM_Opportunities_Contact_Role_CreateMail.ImageName = "mail_add"
|
||||
Me.aCRM_Opportunities_Contact_Role_CreateMail.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireMultipleObjects
|
||||
Me.aCRM_Opportunities_Contact_Role_CreateMail.Shortcut = Nothing
|
||||
Me.aCRM_Opportunities_Contact_Role_CreateMail.Tag = Nothing
|
||||
Me.aCRM_Opportunities_Contact_Role_CreateMail.TargetObjectsCriteria = Nothing
|
||||
Me.aCRM_Opportunities_Contact_Role_CreateMail.TargetViewId = ""
|
||||
Me.aCRM_Opportunities_Contact_Role_CreateMail.ToolTip = Nothing
|
||||
Me.aCRM_Opportunities_Contact_Role_CreateMail.TypeOfView = Nothing
|
||||
|
||||
End Sub
|
||||
Friend WithEvents aCRM_Opportunities_CreateMail As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aCRM_Opportunities_ReadMail As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aCRM_Opportunities_Contact_Role_CreateMail As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,132 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="aCRM_Opportunities_CreateMail.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 56</value>
|
||||
</metadata>
|
||||
<metadata name="aCRM_Opportunities_ReadMail.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 95</value>
|
||||
</metadata>
|
||||
<metadata name="aCRM_Opportunities_Contact_Role_CreateMail.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>465, 17</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -0,0 +1,130 @@
|
||||
Imports System
|
||||
Imports System.ComponentModel
|
||||
Imports System.Collections.Generic
|
||||
Imports System.Diagnostics
|
||||
Imports System.Text
|
||||
|
||||
Imports DevExpress.ExpressApp
|
||||
Imports DevExpress.ExpressApp.Actions
|
||||
Imports DevExpress.Persistent.Base
|
||||
Imports DevExpress.Data.Filtering
|
||||
Imports DevExpress.ExpressApp.Utils
|
||||
|
||||
Public Class CRM_OpportunitiesVC
|
||||
Inherits DevExpress.ExpressApp.ViewController
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
End Sub
|
||||
Protected Overrides Sub OnActivated()
|
||||
MyBase.OnActivated()
|
||||
Frame.GetController(Of CRM_OpportunitiesVC).aCRM_Opportunities_Contact_Role_CreateMail.Active.SetItemValue("", False)
|
||||
If View.Id = "CRM_Opportunities_OfferOutHeader_ListView" Then
|
||||
Frame.GetController(Of OffersOutPrintVC)().aOfferOutSendMailDeatil.Active.SetItemValue("", True)
|
||||
End If
|
||||
If View.Id = "CRM_Opportunities_CRM_Opportunities_Contacts_Roles_ListView" Then
|
||||
Frame.GetController(Of CRM_OpportunitiesVC).aCRM_Opportunities_Contact_Role_CreateMail.Active.SetItemValue("", True)
|
||||
End If
|
||||
End Sub
|
||||
Protected Overrides Sub OnDeactivated()
|
||||
MyBase.OnDeactivated()
|
||||
If View.Id = "CRM_Opportunities_OfferOutHeader_ListView" Then
|
||||
Frame.GetController(Of OffersOutPrintVC)().aOfferOutSendMailDeatil.Active.SetItemValue("", False)
|
||||
End If
|
||||
If View.Id = "CRM_Opportunities_CRM_Opportunities_Contacts_Roles_ListView" Then
|
||||
Frame.GetController(Of CRM_OpportunitiesVC).aCRM_Opportunities_Contact_Role_CreateMail.Active.SetItemValue("", False)
|
||||
End If
|
||||
End Sub
|
||||
Private Sub aCRM_Opportunities_CreateMail_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aCRM_Opportunities_CreateMail.Execute
|
||||
Try
|
||||
Dim _CRM_Opportunities As CRM_Opportunities = TryCast(e.CurrentObject, CRM_Opportunities)
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
|
||||
If _CRM_Opportunities.Contacts Is Nothing Then Throw New Exception("*Nincs kapcsolat ehhez az ügyfélhez!")
|
||||
If _CRM_Opportunities.Contacts.Email Is Nothing Then Throw New UserFriendlyException("Nincs beállítva e-mail cím!")
|
||||
If _CRM_Opportunities.Contacts.Email = "" Then Throw New UserFriendlyException("Nincs beállítva e-mail cím!")
|
||||
|
||||
Dim _OutlookEMail As OutlookEMail = _ocur.CreateObject(Of OutlookEMail)()
|
||||
|
||||
_OutlookEMail.CRM_Leads = _CRM_Opportunities.CRM_Leads
|
||||
_OutlookEMail.CRM_Opportunities = _CRM_Opportunities
|
||||
|
||||
_OutlookEMail.Recipients = _CRM_Opportunities.Contacts.Email
|
||||
_OutlookEMail.OwnerUser = _CRM_Opportunities.UserCreated
|
||||
_OutlookEMail.eCRMEstate_Leads = eCRMEstate_Leads.eCRM
|
||||
_OutlookEMail.Subject = _CRM_Opportunities.ShortName
|
||||
|
||||
_OutlookEMail.Save()
|
||||
|
||||
e.ShowViewParameters.CreatedView = Application.CreateDetailView(_ocur, "OutlookEMail_DetailView", False, _OutlookEMail)
|
||||
View.Refresh()
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly)
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
Private Sub aCRM_Opportunities_ReadMail_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aCRM_Opportunities_ReadMail.Execute
|
||||
Dim _CRM_Leads_Activity As CRM_Leads_Activity = TryCast(e.SelectedObjects(0), CRM_Leads_Activity)
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
|
||||
If _CRM_Leads_Activity IsNot Nothing Then
|
||||
'--Email megkeresése és új benyitása
|
||||
If _CRM_Leads_Activity.Email_Oid = "" Then
|
||||
Throw New UserFriendlyException("Nincs kapcsolódó e-mail üzenet!")
|
||||
Else
|
||||
Dim _OutlookEMail As OutlookEMail = _ocur.FindObject(Of OutlookEMail)(CriteriaOperator.Parse("Oid=?", _CRM_Leads_Activity.Email_Oid))
|
||||
Dim _OutlookEMailIn As OutlookEMailIn = _ocur.FindObject(Of OutlookEMailIn)(CriteriaOperator.Parse("Oid=?", _CRM_Leads_Activity.Email_Oid))
|
||||
If _OutlookEMail IsNot Nothing Then
|
||||
e.ShowViewParameters.CreatedView = Application.CreateDetailView(_ocur, "OutlookEMail_DetailView", False, _OutlookEMail)
|
||||
Else
|
||||
e.ShowViewParameters.CreatedView = Application.CreateDetailView(_ocur, "OutlookEMailIn_DetailView", False, _OutlookEMailIn)
|
||||
End If
|
||||
View.Refresh()
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Private Sub aCRM_Opportunities_Contact_Role_CreateMail_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aCRM_Opportunities_Contact_Role_CreateMail.Execute
|
||||
Try
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _OutlookEMail As OutlookEMail = _ocur.CreateObject(Of OutlookEMail)()
|
||||
Dim _Contacts As Contacts = TryCast(View.SelectedObjects(0), CRM_Opportunities_Contacts_Roles).Contacts
|
||||
Dim _CRM_Opportunities As CRM_Opportunities = TryCast(TryCast(View, ListView).CollectionSource, PropertyCollectionSource).MasterObject
|
||||
|
||||
Dim _Contacts_Collection As New ArrayList
|
||||
|
||||
For Each _CRM_Opportunities_Contacts_Roles As CRM_Opportunities_Contacts_Roles In View.SelectedObjects
|
||||
If String.IsNullOrEmpty(_CRM_Opportunities_Contacts_Roles.Contacts.Email) Then _
|
||||
_Contacts_Collection.Add(_CRM_Opportunities_Contacts_Roles.Contacts)
|
||||
Next
|
||||
|
||||
If _Contacts_Collection.Count > 0 Then
|
||||
Dim _ErrorMessage As String = "A következõ kapcsolatoknak nincs e-mail cím beállítva:" + vbNewLine
|
||||
|
||||
For Each _ContactsError As Contacts In _Contacts_Collection
|
||||
_ErrorMessage += _ContactsError.FirstName + " " + _ContactsError.LastName + vbNewLine
|
||||
Next
|
||||
_ErrorMessage += "Kérem, ellenõrizze!"
|
||||
Throw New Exception(_ErrorMessage)
|
||||
End If
|
||||
|
||||
|
||||
_OutlookEMail.CRM_Leads = _CRM_Opportunities.CRM_Leads
|
||||
_OutlookEMail.CRM_Opportunities = _CRM_Opportunities
|
||||
|
||||
_OutlookEMail.Recipients = ""
|
||||
For Each _CRM_Opportunities_Contacts_Roles As CRM_Opportunities_Contacts_Roles In View.SelectedObjects
|
||||
_OutlookEMail.Recipients += _CRM_Opportunities_Contacts_Roles.Contacts.Email + "; "
|
||||
Next
|
||||
|
||||
_OutlookEMail.OwnerUser = _CRM_Opportunities.UserCreated
|
||||
_OutlookEMail.eCRMEstate_Leads = eCRMEstate_Leads.eCRM
|
||||
|
||||
e.ShowViewParameters.CreatedView = Application.CreateDetailView(_ocur, "OutlookEMail_DetailView", False, _OutlookEMail)
|
||||
View.Refresh()
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, String.Format(CaptionHelper.GetLocalizedText("Exceptions\NuvolarExceptions", "MsgBoxCheckItAgain")))
|
||||
End Try
|
||||
End Sub
|
||||
End Class
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
Partial Class PricingActionVC
|
||||
|
||||
<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,36 @@
|
||||
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 PricingActionVC
|
||||
|
||||
Inherits Nuvolar.Module.PricingActionVC
|
||||
Dim _WaitFormClass As New WaitFormClass
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
|
||||
'This call is required by the Component Designer.
|
||||
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
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
Partial Class ProductFinderVC
|
||||
|
||||
<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,320 @@
|
||||
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.Win.Editors
|
||||
Imports DevExpress.XtraGrid
|
||||
Imports DevExpress.Xpo
|
||||
Imports DevExpress.Data.Filtering
|
||||
Imports DevExpress.XtraGrid.Views.Base
|
||||
Imports DevExpress.XtraGrid.Columns
|
||||
Imports DevExpress.ExpressApp.Editors
|
||||
Imports DevExpress.ExpressApp.Utils
|
||||
Imports DevExpress.ExpressApp.SystemModule
|
||||
|
||||
Public Class ProductFinderVC
|
||||
Inherits DevExpress.ExpressApp.ViewController(Of ListView)
|
||||
Private _GridListEditor_Selected As GridListEditor
|
||||
Private _GridListEditor_Select As GridListEditor
|
||||
Private gridView As ColumnView
|
||||
Private currentView As ListView
|
||||
Private falseCriteria As CriteriaOperator = CriteriaOperator.Parse("1=0")
|
||||
Private Edit_QTT_Will As RepositoryItemDoubleEdit
|
||||
Private Delegate Sub EditCellDelegate()
|
||||
|
||||
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 = "ProductFinder_ProductSelect_ListView" Then
|
||||
currentView = CType(View, ListView)
|
||||
AddHandler currentView.ControlsCreated, AddressOf AutoFilterRowController_ControlsCreated
|
||||
End If
|
||||
If View.Id = "ProductFinder_DetailView" Then
|
||||
Frame.GetController(Of RefreshController).Active.SetItemValue("", False)
|
||||
End If
|
||||
End Sub
|
||||
Protected Overrides Sub OnDeactivated()
|
||||
MyBase.OnDeactivated()
|
||||
If View.Id = "ProductFinder_ProductSelected_ListView" Then
|
||||
If _GridListEditor_Selected IsNot Nothing Then
|
||||
'RemoveHandler _GridListEditor_Selected.GridView.CellValueChanged, AddressOf ProductFinder_ProductSelected_ListView_CellValueChanged
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Protected Overrides Sub OnViewControlsCreated()
|
||||
MyBase.OnViewControlsCreated()
|
||||
|
||||
If View.Id = "ProductFinder_ProductSelected_ListView" Then
|
||||
_GridListEditor_Selected = TryCast(View.Editor, GridListEditor)
|
||||
|
||||
If _GridListEditor_Selected IsNot Nothing Then
|
||||
AddHandler _GridListEditor_Selected.GridView.CellValueChanged, AddressOf ProductFinder_ProductSelected_ListView_CellValueChanged
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
If View.Id = "ProductFinder_ProductSelect_ListView" Then
|
||||
_GridListEditor_Select = TryCast(TryCast(View, ListView).Editor, GridListEditor)
|
||||
|
||||
For Each column As DevExpress.XtraGrid.Columns.GridColumn In _GridListEditor_Select.GridView.Columns
|
||||
column.OptionsFilter.ImmediateUpdateAutoFilter = False
|
||||
If column.FieldName = "Products.ShortName" Then
|
||||
column.OptionsFilter.AutoFilterCondition = Columns.AutoFilterCondition.Contains
|
||||
End If
|
||||
Next
|
||||
If _GridListEditor_Select IsNot Nothing Then
|
||||
AddHandler _GridListEditor_Select.ColumnCreated, AddressOf Products_ListView_ColumnCreated
|
||||
AddHandler _GridListEditor_Select.GridView.ColumnFilterChanged, AddressOf GridView_ColumnFilterChanged
|
||||
AddHandler _GridListEditor_Select.GridView.CellValueChanged, AddressOf ProductFinder_ProductSelect_ListView_CellValueChanged
|
||||
AddHandler _GridListEditor_Select.GridView.RowClick, AddressOf ProductFinder_ProductSelect_RowClick
|
||||
End If
|
||||
End If
|
||||
If View.Id = "ProductFinder_ProductFinderInfo_ListView" Then
|
||||
Dim _GLE As GridListEditor = TryCast(View.Editor, GridListEditor)
|
||||
If _GLE IsNot Nothing Then
|
||||
If _GLE.GridView IsNot Nothing Then
|
||||
_GLE.GridView.OptionsView.RowAutoHeight = True
|
||||
'_GLE.GridView.OptionsView.ShowColumnHeaders = False
|
||||
'_GLE.GridView.OptionsView.ShowVerticalLines = False
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ProductFinder_ProductSelected_ListView_CellValueChanged(sender As Object, e As DevExpress.XtraGrid.Views.Base.CellValueChangedEventArgs)
|
||||
|
||||
Dim nestedFrame As NestedFrame = TryCast(Frame, NestedFrame)
|
||||
Dim parentView As View = nestedFrame.View
|
||||
parentView.ObjectSpace.CommitChanges()
|
||||
|
||||
End Sub
|
||||
Private Sub Products_ListView_ColumnCreated(sender As Object, e As ColumnCreatedEventArgs)
|
||||
e.Column.OptionsFilter.ImmediateUpdateAutoFilter = False
|
||||
End Sub
|
||||
|
||||
Private Sub Timer_Elapsed()
|
||||
_GridListEditor_Select.GridView.GridControl.Invoke(New EditCellDelegate(AddressOf Edit_QTT_Will_Cell))
|
||||
End Sub
|
||||
Private Sub Edit_QTT_Will_Cell()
|
||||
'e.KeyCode = Windows.Forms.Keys.Enter And
|
||||
If _GridListEditor_Select.GridView.FocusedRowHandle = GridControl.AutoFilterRowHandle And _GridListEditor_Select.GridView.RowCount >= 1 Then
|
||||
'_GridListEditor_Select.GridView.FocusedColumn = _GridListEditor_Select.GridView.GetVisibleColumn(_GridListEditor_Select.FindColumn("QTT_Will").VisibleIndex)
|
||||
_GridListEditor_Select.GridView.FocusedColumn = _GridListEditor_Select.GridView.Columns("QTT_Will")
|
||||
_GridListEditor_Select.GridView.HideEditor()
|
||||
_GridListEditor_Select.GridView.FocusedRowHandle = _GridListEditor_Select.GridView.GetVisibleRowHandle(0)
|
||||
_GridListEditor_Select.GridView.ShowEditor()
|
||||
If _GridListEditor_Select.GridView.ActiveEditor IsNot Nothing Then
|
||||
_GridListEditor_Select.GridView.ActiveEditor.Focus()
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Private Sub GridView_ColumnFilterChanged(sender As Object, e As EventArgs)
|
||||
Dim timer As System.Timers.Timer = New System.Timers.Timer(200)
|
||||
AddHandler timer.Elapsed, AddressOf Timer_Elapsed
|
||||
timer.Enabled = True
|
||||
timer.AutoReset = False
|
||||
End Sub
|
||||
|
||||
Private Sub ProductFinder_ProductSelect_ListView_CellValueChanged(sender As Object, e As Views.Base.CellValueChangedEventArgs)
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
|
||||
If e.Column.FieldName = "QTT_Will" Then
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
|
||||
Dim _ListView As ListView = TryCast(View, ListView)
|
||||
Dim _PropertyCollectionSource As PropertyCollectionSource = TryCast(_ListView.CollectionSource, PropertyCollectionSource)
|
||||
Dim _ProductFinder As ProductFinder = TryCast(_PropertyCollectionSource.MasterObject, ProductFinder)
|
||||
|
||||
|
||||
Dim _ProductNumber As String = _GridListEditor_Select.GridView.GetRowCellValue(e.RowHandle, "Products.ProductNumber")
|
||||
Dim _Products As Products = _onew.FindObject(Of Products)(CriteriaOperator.Parse("ProductNumber=?", _ProductNumber))
|
||||
|
||||
Dim _ProductSelected As ProductSelected = _onew.FindObject(Of ProductSelected)(CriteriaOperator.Parse("MasterKey=? AND Products=?", _ProductFinder.MasterKey, _Products))
|
||||
If _ProductSelected Is Nothing Then
|
||||
_ProductSelected = _onew.CreateObject(Of ProductSelected)()
|
||||
_ProductSelected.Products = _Products
|
||||
_ProductSelected.MasterKey = _ProductFinder.MasterKey
|
||||
_ProductSelected.QTT = _GridListEditor_Select.GridView.GetRowCellValue(e.RowHandle, "QTT_Will")
|
||||
Else
|
||||
_ProductSelected.QTT += _GridListEditor_Select.GridView.GetRowCellValue(e.RowHandle, "QTT_Will")
|
||||
End If
|
||||
|
||||
_onew.CommitChanges()
|
||||
|
||||
End If
|
||||
|
||||
If _GridListEditor_Select.GridView.FocusedColumn Is _GridListEditor_Select.GridView.Columns("QTT_Will") Then
|
||||
_GridListEditor_Select.GridView.FocusedColumn = _GridListEditor_Select.GridView.GetVisibleColumn(_GridListEditor_Select.FindColumn("Products.ProductNumber").VisibleIndex)
|
||||
_GridListEditor_Select.GridView.FocusedRowHandle = GridControl.AutoFilterRowHandle
|
||||
_GridListEditor_Select.GridView.ShowEditor()
|
||||
If _GridListEditor_Select.GridView.ActiveEditor IsNot Nothing Then
|
||||
_GridListEditor_Select.GridView.ActiveEditor.Focus()
|
||||
End If
|
||||
End If
|
||||
If e.Column.FieldName = "QTT_Will" Then
|
||||
Dim _DetailView As DetailView = TryCast(TryCast(Frame, NestedFrame).ViewItem.View, DetailView)
|
||||
If _DetailView IsNot Nothing Then
|
||||
Dim _ListPropertyEditor As ListPropertyEditor = _DetailView.FindItem("ProductSelected")
|
||||
If _ListPropertyEditor IsNot Nothing Then
|
||||
TryCast(_ListPropertyEditor.ListView, ListView).CollectionSource.Reload()
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Private Sub AutoFilterRowController_ControlsCreated(ByVal sender As Object, ByVal e As EventArgs)
|
||||
Dim grid As GridControl = TryCast(currentView.Control, GridControl)
|
||||
gridView = TryCast(grid.FocusedView, ColumnView)
|
||||
If gridView.ActiveFilter.IsEmpty Then
|
||||
currentView.CollectionSource.Criteria("FalseCriteria") = falseCriteria
|
||||
End If
|
||||
AddHandler gridView.ActiveFilter.Changed, AddressOf ActiveFilter_Changed
|
||||
End Sub
|
||||
Private Sub ActiveFilter_Changed(ByVal sender As Object, ByVal e As EventArgs)
|
||||
If (CType(sender, ViewFilter)).IsEmpty Then
|
||||
currentView.CollectionSource.Criteria("FalseCriteria") = falseCriteria
|
||||
Else
|
||||
If currentView.CollectionSource.Criteria.ContainsKey("FalseCriteria") Then
|
||||
currentView.CollectionSource.Criteria.Remove("FalseCriteria")
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Private Sub ProductFinder_ProductSelect_RowClick(sender As Object, e As Views.Grid.RowClickEventArgs)
|
||||
Dim _ProductFinder As ProductFinder
|
||||
Dim _Products As Products = _GridListEditor_Select.GridView.GetRowCellValue(e.RowHandle, "Products")
|
||||
Dim _PropertyCollectionSource As PropertyCollectionSource = TryCast(TryCast(View, ListView).CollectionSource, PropertyCollectionSource)
|
||||
Dim _ListPropertyEditor As ListPropertyEditor
|
||||
Dim _ProductFinderInfo As ProductFinderInfo
|
||||
|
||||
If _PropertyCollectionSource IsNot Nothing Then
|
||||
_ProductFinder = TryCast(_PropertyCollectionSource.MasterObject, ProductFinder)
|
||||
If _ProductFinder IsNot Nothing Then
|
||||
Dim _DetailView As DetailView = TryCast(TryCast(Frame, NestedFrame).ViewItem.View, DetailView)
|
||||
If _DetailView IsNot Nothing Then
|
||||
_ListPropertyEditor = _DetailView.FindItem("ProductFinderInfo")
|
||||
If _ListPropertyEditor IsNot Nothing Then
|
||||
|
||||
Dim _ListView As ListView = TryCast(_ListPropertyEditor.ListView, ListView)
|
||||
If _ListView IsNot Nothing Then
|
||||
Dim _onew As Xpo.XPObjectSpace = TryCast(_ListView.ObjectSpace, Xpo.XPObjectSpace) 'Application.CreateObjectSpace
|
||||
_ListView.CollectionSource.ResetCollection()
|
||||
If _Products IsNot Nothing Then
|
||||
_ProductFinderInfo = _onew.CreateObject(Of ProductFinderInfo)()
|
||||
_ProductFinderInfo.PropertyName = CaptionHelper.GetMemberCaption(GetType(Products), "ProductGroups")
|
||||
_ProductFinderInfo.InfoString = _Products.ProductGroups.ShortName
|
||||
_ListView.CollectionSource.Add(_ProductFinderInfo)
|
||||
|
||||
_ProductFinderInfo = _onew.CreateObject(Of ProductFinderInfo)()
|
||||
_ProductFinderInfo.PropertyName = CaptionHelper.GetMemberCaption(GetType(Products), "Description")
|
||||
_ProductFinderInfo.InfoString = _Products.Description
|
||||
_ListView.CollectionSource.Add(_ProductFinderInfo)
|
||||
|
||||
_ProductFinderInfo = _onew.CreateObject(Of ProductFinderInfo)()
|
||||
_ProductFinderInfo.PropertyName = CaptionHelper.GetMemberCaption(GetType(Products), "ProductNumber")
|
||||
_ProductFinderInfo.InfoString = _Products.ProductNumber
|
||||
_ListView.CollectionSource.Add(_ProductFinderInfo)
|
||||
|
||||
_ProductFinderInfo = _onew.CreateObject(Of ProductFinderInfo)()
|
||||
_ProductFinderInfo.PropertyName = CaptionHelper.GetMemberCaption(GetType(Products), "ShortName")
|
||||
_ProductFinderInfo.InfoString = _Products.ShortName
|
||||
_ListView.CollectionSource.Add(_ProductFinderInfo)
|
||||
|
||||
_ProductFinderInfo = _onew.CreateObject(Of ProductFinderInfo)()
|
||||
_ProductFinderInfo.PropertyName = CaptionHelper.GetMemberCaption(GetType(Products), "PacketUnitIn")
|
||||
_ProductFinderInfo.InfoString = _Products.PacketUnitIn.ToString
|
||||
_ListView.CollectionSource.Add(_ProductFinderInfo)
|
||||
|
||||
_ProductFinderInfo = _onew.CreateObject(Of ProductFinderInfo)()
|
||||
_ProductFinderInfo.PropertyName = CaptionHelper.GetMemberCaption(GetType(Products), "ProductStrategyCode")
|
||||
_ProductFinderInfo.InfoString = _Products.ProductStrategyCode
|
||||
_ListView.CollectionSource.Add(_ProductFinderInfo)
|
||||
|
||||
_ProductFinderInfo = _onew.CreateObject(Of ProductFinderInfo)()
|
||||
_ProductFinderInfo.PropertyName = CaptionHelper.GetMemberCaption(GetType(Products), "Units")
|
||||
_ProductFinderInfo.InfoString = _Products.Units.ShortName
|
||||
_ListView.CollectionSource.Add(_ProductFinderInfo)
|
||||
|
||||
_ProductFinderInfo = _onew.CreateObject(Of ProductFinderInfo)()
|
||||
_ProductFinderInfo.PropertyName = CaptionHelper.GetMemberCaption(GetType(Products), "CustomsTariff")
|
||||
If _Products.CustomsTariff IsNot Nothing Then
|
||||
_ProductFinderInfo.InfoString = _Products.CustomsTariff.CustomsTariffNumber
|
||||
Else
|
||||
_ProductFinderInfo.InfoString = "nincs beállítva"
|
||||
End If
|
||||
_ListView.CollectionSource.Add(_ProductFinderInfo)
|
||||
|
||||
|
||||
_ProductFinderInfo = _onew.CreateObject(Of ProductFinderInfo)()
|
||||
_ProductFinderInfo.PropertyName = CaptionHelper.GetMemberCaption(GetType(Products), "GrossWeight")
|
||||
_ProductFinderInfo.InfoString = _Products.GrossWeight
|
||||
_ListView.CollectionSource.Add(_ProductFinderInfo)
|
||||
|
||||
|
||||
_ProductFinderInfo = _onew.CreateObject(Of ProductFinderInfo)()
|
||||
_ProductFinderInfo.PropertyName = CaptionHelper.GetMemberCaption(GetType(Products), "ListPriceOutHUF")
|
||||
_ProductFinderInfo.InfoString = _Products.ListPriceOutHUF.ToString
|
||||
_ListView.CollectionSource.Add(_ProductFinderInfo)
|
||||
|
||||
_ProductFinderInfo = _onew.CreateObject(Of ProductFinderInfo)()
|
||||
_ProductFinderInfo.PropertyName = CaptionHelper.GetMemberCaption(GetType(Products), "VAT")
|
||||
_ProductFinderInfo.InfoString = _Products.VAT.ShortName
|
||||
_ListView.CollectionSource.Add(_ProductFinderInfo)
|
||||
|
||||
Dim _PricingActionRows As PricingActionRows = _onew.Session.FindObject(Of PricingActionRows) _
|
||||
(_onew.Session.ParseCriteria("Products=? and PricingActionHeader.IsActive=1 and PricingActionHeader.DateFrom<=Now() and PricingActionHeader.DateTo>=Now()", _Products))
|
||||
|
||||
If _PricingActionRows IsNot Nothing Then
|
||||
|
||||
_ProductFinderInfo = _onew.CreateObject(Of ProductFinderInfo)()
|
||||
_ProductFinderInfo.PropertyName = "Akció!"
|
||||
_ProductFinderInfo.InfoString = Format(_PricingActionRows.ListPriceHUF, "#,##0") & Chr(13) & Chr(10) & _
|
||||
_PricingActionRows.PricingActionHeader.ShortName & Chr(13) & Chr(10) & _PricingActionRows.PricingActionHeader.DateFrom.ToShortDateString & _
|
||||
" - " & _PricingActionRows.PricingActionHeader.DateTo.ToShortDateString
|
||||
_ListView.CollectionSource.Add(_ProductFinderInfo)
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
'_ListView.CollectionSource.Reload()
|
||||
End If
|
||||
|
||||
End If
|
||||
_ListPropertyEditor = _DetailView.FindItem("StorageOutCirculation")
|
||||
If _ListPropertyEditor IsNot Nothing Then
|
||||
Dim _ListView As ListView = TryCast(_ListPropertyEditor.ListView, ListView)
|
||||
If _ListView IsNot Nothing Then
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(_ListView.ObjectSpace, Xpo.XPObjectSpace) 'Application.CreateObjectSpace
|
||||
_ListView.CollectionSource.ResetCollection()
|
||||
If _Products IsNot Nothing Then
|
||||
Dim _StorageOutCirculation As StorageOutCirculation
|
||||
Dim _StorageOutCirculation_Collection As New XPCollection(Of StorageOutCirculation)(_ocur.Session, CriteriaOperator.Parse("Products.Oid=?", _Products.Oid))
|
||||
For Each _StorageOutCirculation In _StorageOutCirculation_Collection
|
||||
_ListView.CollectionSource.Add(_StorageOutCirculation)
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
Partial Class ProductSelect_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,121 @@
|
||||
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.Win.Editors
|
||||
|
||||
Imports DevExpress.XtraGrid
|
||||
Imports DevExpress.Xpo
|
||||
Imports DevExpress.Data.Filtering
|
||||
Imports DevExpress.XtraGrid.Views.Base
|
||||
Imports DevExpress.XtraGrid.Columns
|
||||
Imports DevExpress.ExpressApp.Editors
|
||||
Public Class ProductSelect_VC
|
||||
Inherits DevExpress.ExpressApp.ViewController
|
||||
Private _GridListEditor_Select As GridListEditor
|
||||
Private Delegate Sub EditCellDelegate()
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
|
||||
'This call is required by the Component Designer.
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
|
||||
End Sub
|
||||
Protected Overrides Sub OnViewControlsCreated()
|
||||
MyBase.OnViewControlsCreated()
|
||||
If View.Id = "ProductSelect_LookupListView" Then
|
||||
_GridListEditor_Select = TryCast(TryCast(View, ListView).Editor, GridListEditor)
|
||||
|
||||
For Each column As DevExpress.XtraGrid.Columns.GridColumn In _GridListEditor_Select.GridView.Columns
|
||||
column.OptionsFilter.ImmediateUpdateAutoFilter = False
|
||||
If column.FieldName = "Products.ShortName" Then
|
||||
column.OptionsFilter.AutoFilterCondition = Columns.AutoFilterCondition.Contains
|
||||
End If
|
||||
Next
|
||||
If _GridListEditor_Select IsNot Nothing Then
|
||||
AddHandler _GridListEditor_Select.ColumnCreated, AddressOf ProductSelect_LookupListView_ColumnCreated
|
||||
AddHandler _GridListEditor_Select.GridView.ColumnFilterChanged, AddressOf ProductSelect_LookupListView_ColumnFilterChanged
|
||||
AddHandler _GridListEditor_Select.GridView.CellValueChanged, AddressOf ProductSelect_LookupListView_ListView_CellValueChanged
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ProductSelect_LookupListView_ColumnCreated(sender As Object, e As ColumnCreatedEventArgs)
|
||||
e.Column.OptionsFilter.ImmediateUpdateAutoFilter = False
|
||||
End Sub
|
||||
|
||||
Private Sub ProductSelect_LookupListView_ColumnFilterChanged(sender As Object, e As EventArgs)
|
||||
Dim timer As System.Timers.Timer = New System.Timers.Timer(200)
|
||||
AddHandler timer.Elapsed, AddressOf Timer_Elapsed
|
||||
timer.Enabled = True
|
||||
timer.AutoReset = False
|
||||
End Sub
|
||||
|
||||
Private Sub ProductSelect_LookupListView_ListView_CellValueChanged(sender As Object, e As CellValueChangedEventArgs)
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
|
||||
If e.Column.FieldName = "QTT_Will" Then
|
||||
'Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
|
||||
'Dim _ListView As ListView = TryCast(View, ListView)
|
||||
'Dim _PropertyCollectionSource As PropertyCollectionSource = TryCast(_ListView.CollectionSource, PropertyCollectionSource)
|
||||
'Dim _ProductFinder As ProductFinder = TryCast(_PropertyCollectionSource.MasterObject, ProductFinder)
|
||||
|
||||
|
||||
'Dim _ProductNumber As String = _GridListEditor_Select.GridView.GetRowCellValue(e.RowHandle, "Products.ProductNumber")
|
||||
'Dim _Products As Products = _onew.FindObject(Of Products)(CriteriaOperator.Parse("ProductNumber=?", _ProductNumber))
|
||||
|
||||
'Dim _ProductSelected As ProductSelected = _onew.FindObject(Of ProductSelected)(CriteriaOperator.Parse("MasterKey=? AND Products=?", _ProductFinder.MasterKey, _Products))
|
||||
'If _ProductSelected Is Nothing Then
|
||||
' _ProductSelected = _onew.CreateObject(Of ProductSelected)()
|
||||
' _ProductSelected.Products = _Products
|
||||
' _ProductSelected.MasterKey = _ProductFinder.MasterKey
|
||||
' _ProductSelected.QTT = _GridListEditor_Select.GridView.GetRowCellValue(e.RowHandle, "QTT_Will")
|
||||
'Else
|
||||
' _ProductSelected.QTT += _GridListEditor_Select.GridView.GetRowCellValue(e.RowHandle, "QTT_Will")
|
||||
'End If
|
||||
|
||||
'_onew.CommitChanges()
|
||||
|
||||
End If
|
||||
|
||||
If _GridListEditor_Select.GridView.FocusedColumn Is _GridListEditor_Select.GridView.Columns("QTT_Will") Then
|
||||
_GridListEditor_Select.GridView.FocusedColumn = _GridListEditor_Select.GridView.GetVisibleColumn(_GridListEditor_Select.FindColumn("Products.ProductNumber").VisibleIndex)
|
||||
_GridListEditor_Select.GridView.FocusedRowHandle = GridControl.AutoFilterRowHandle
|
||||
_GridListEditor_Select.GridView.ShowEditor()
|
||||
If _GridListEditor_Select.GridView.ActiveEditor IsNot Nothing Then
|
||||
_GridListEditor_Select.GridView.ActiveEditor.Focus()
|
||||
End If
|
||||
End If
|
||||
If e.Column.FieldName = "QTT_Will" Then
|
||||
'Dim _DetailView As DetailView = TryCast(TryCast(Frame, NestedFrame).ViewItem.View, DetailView)
|
||||
'If _DetailView IsNot Nothing Then
|
||||
' Dim _ListPropertyEditor As ListPropertyEditor = _DetailView.FindItem("ProductSelected")
|
||||
' If _ListPropertyEditor IsNot Nothing Then
|
||||
' TryCast(_ListPropertyEditor.ListView, ListView).CollectionSource.Reload()
|
||||
' End If
|
||||
'End If
|
||||
End If
|
||||
End Sub
|
||||
Private Sub Timer_Elapsed()
|
||||
_GridListEditor_Select.GridView.GridControl.Invoke(New EditCellDelegate(AddressOf Edit_QTT_Will_Cell))
|
||||
End Sub
|
||||
Private Sub Edit_QTT_Will_Cell()
|
||||
'e.KeyCode = Windows.Forms.Keys.Enter And
|
||||
If _GridListEditor_Select.GridView.FocusedRowHandle = GridControl.AutoFilterRowHandle And _GridListEditor_Select.GridView.RowCount >= 1 Then
|
||||
_GridListEditor_Select.GridView.FocusedColumn = _GridListEditor_Select.GridView.Columns("QTT_Will")
|
||||
_GridListEditor_Select.GridView.HideEditor()
|
||||
_GridListEditor_Select.GridView.FocusedRowHandle = _GridListEditor_Select.GridView.GetVisibleRowHandle(0)
|
||||
_GridListEditor_Select.GridView.ShowEditor()
|
||||
If _GridListEditor_Select.GridView.ActiveEditor IsNot Nothing Then
|
||||
_GridListEditor_Select.GridView.ActiveEditor.Focus()
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
+107
@@ -0,0 +1,107 @@
|
||||
Partial Class ProductsGant_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.aProductsGant_Refresh = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aProductsGant_SetGantItemColumn = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
|
||||
Me.aProductsGant_CreateCustomersReport = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
|
||||
Me.aProductsGant_OpenProducts = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
'
|
||||
'aProductsGant_Refresh
|
||||
'
|
||||
Me.aProductsGant_Refresh.Caption = "aProductsGant_Refresh"
|
||||
Me.aProductsGant_Refresh.Category = "aProductsGant_Refresh"
|
||||
Me.aProductsGant_Refresh.ConfirmationMessage = Nothing
|
||||
Me.aProductsGant_Refresh.Id = "aProductsGant_Refresh"
|
||||
Me.aProductsGant_Refresh.ImageName = Nothing
|
||||
Me.aProductsGant_Refresh.Shortcut = Nothing
|
||||
Me.aProductsGant_Refresh.Tag = Nothing
|
||||
Me.aProductsGant_Refresh.TargetObjectsCriteria = Nothing
|
||||
Me.aProductsGant_Refresh.TargetObjectType = GetType(Nuvolar.[Module].ProductsGant)
|
||||
Me.aProductsGant_Refresh.TargetViewId = Nothing
|
||||
Me.aProductsGant_Refresh.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
|
||||
Me.aProductsGant_Refresh.ToolTip = Nothing
|
||||
Me.aProductsGant_Refresh.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
|
||||
'
|
||||
'aProductsGant_SetGantItemColumn
|
||||
'
|
||||
Me.aProductsGant_SetGantItemColumn.AcceptButtonCaption = Nothing
|
||||
Me.aProductsGant_SetGantItemColumn.CancelButtonCaption = Nothing
|
||||
Me.aProductsGant_SetGantItemColumn.Caption = "aProductsGant_SetGantItemColumn"
|
||||
Me.aProductsGant_SetGantItemColumn.Category = "aProductsGant_SetGantItemColumn"
|
||||
Me.aProductsGant_SetGantItemColumn.ConfirmationMessage = Nothing
|
||||
Me.aProductsGant_SetGantItemColumn.Id = "aProductsGant_SetGantItemColumn"
|
||||
Me.aProductsGant_SetGantItemColumn.ImageName = Nothing
|
||||
Me.aProductsGant_SetGantItemColumn.Shortcut = Nothing
|
||||
Me.aProductsGant_SetGantItemColumn.Tag = Nothing
|
||||
Me.aProductsGant_SetGantItemColumn.TargetObjectsCriteria = Nothing
|
||||
Me.aProductsGant_SetGantItemColumn.TargetObjectType = GetType(Nuvolar.[Module].ProductsGant)
|
||||
Me.aProductsGant_SetGantItemColumn.TargetViewId = Nothing
|
||||
Me.aProductsGant_SetGantItemColumn.ToolTip = Nothing
|
||||
Me.aProductsGant_SetGantItemColumn.TypeOfView = Nothing
|
||||
'
|
||||
'aProductsGant_CreateCustomersReport
|
||||
'
|
||||
Me.aProductsGant_CreateCustomersReport.AcceptButtonCaption = Nothing
|
||||
Me.aProductsGant_CreateCustomersReport.CancelButtonCaption = Nothing
|
||||
Me.aProductsGant_CreateCustomersReport.Caption = "aProductsGant_CreateCustomersReport"
|
||||
Me.aProductsGant_CreateCustomersReport.Category = "aProductsGant_CreateCustomersReport"
|
||||
Me.aProductsGant_CreateCustomersReport.ConfirmationMessage = Nothing
|
||||
Me.aProductsGant_CreateCustomersReport.Id = "aProductsGant_CreateCustomersReport"
|
||||
Me.aProductsGant_CreateCustomersReport.ImageName = Nothing
|
||||
Me.aProductsGant_CreateCustomersReport.Shortcut = Nothing
|
||||
Me.aProductsGant_CreateCustomersReport.Tag = Nothing
|
||||
Me.aProductsGant_CreateCustomersReport.TargetObjectsCriteria = Nothing
|
||||
Me.aProductsGant_CreateCustomersReport.TargetObjectType = GetType(Nuvolar.[Module].ProductsGant)
|
||||
Me.aProductsGant_CreateCustomersReport.TargetViewId = Nothing
|
||||
Me.aProductsGant_CreateCustomersReport.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
|
||||
Me.aProductsGant_CreateCustomersReport.ToolTip = Nothing
|
||||
Me.aProductsGant_CreateCustomersReport.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
|
||||
'
|
||||
'aProductsGant_OpenProducts
|
||||
'
|
||||
Me.aProductsGant_OpenProducts.Caption = "aProductsGant_OpenProducts"
|
||||
Me.aProductsGant_OpenProducts.Category = "aProductsGant_OpenProducts"
|
||||
Me.aProductsGant_OpenProducts.ConfirmationMessage = Nothing
|
||||
Me.aProductsGant_OpenProducts.Id = "aProductsGant_OpenProducts"
|
||||
Me.aProductsGant_OpenProducts.ImageName = Nothing
|
||||
Me.aProductsGant_OpenProducts.Shortcut = Nothing
|
||||
Me.aProductsGant_OpenProducts.Tag = Nothing
|
||||
Me.aProductsGant_OpenProducts.TargetObjectsCriteria = Nothing
|
||||
Me.aProductsGant_OpenProducts.TargetObjectType = GetType(Nuvolar.[Module].ProductsGant)
|
||||
Me.aProductsGant_OpenProducts.TargetViewId = Nothing
|
||||
Me.aProductsGant_OpenProducts.ToolTip = Nothing
|
||||
Me.aProductsGant_OpenProducts.TypeOfView = Nothing
|
||||
|
||||
End Sub
|
||||
Friend WithEvents aProductsGant_Refresh As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aProductsGant_SetGantItemColumn As DevExpress.ExpressApp.Actions.PopupWindowShowAction
|
||||
Friend WithEvents aProductsGant_CreateCustomersReport As DevExpress.ExpressApp.Actions.PopupWindowShowAction
|
||||
Friend WithEvents aProductsGant_OpenProducts As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,135 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="aProductsGant_Refresh.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="aProductsGant_SetGantItemColumn.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>338, 199</value>
|
||||
</metadata>
|
||||
<metadata name="aProductsGant_CreateCustomersReport.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>42, 200</value>
|
||||
</metadata>
|
||||
<metadata name="aProductsGant_OpenProducts.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>461, 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,756 @@
|
||||
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 exontrol.EXG2ANTTLib
|
||||
Imports DevExpress.Xpo
|
||||
Imports DevExpress.Data.Filtering
|
||||
Imports DevExpress.ExpressApp.SystemModule
|
||||
Imports DevExpress.Persistent.BaseImpl
|
||||
Imports System.Net.Mail
|
||||
Imports System.Reflection
|
||||
Imports DevExpress.ExpressApp.Utils
|
||||
Imports DevExpress.ExpressApp.Model
|
||||
Imports System.Linq
|
||||
|
||||
Public Class ProductsGant_VC
|
||||
Inherits Nuvolar.Module.ProductsGant_VC
|
||||
|
||||
Dim _GanttControl As exontrol.EXG2ANTTLib.exg2antt
|
||||
Dim _ProductGandRowsOidindex As Long = 0
|
||||
Dim _GantItemColumn_Array As New ArrayList
|
||||
Dim _WaitFormClass As New WaitFormClass
|
||||
Dim _GantChange As Boolean = False
|
||||
Dim _FocusedItem As String
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
End Sub
|
||||
Structure SISGantColumn
|
||||
Public IsGroupColumn As Boolean
|
||||
Public Index As Long
|
||||
Public ColumnID As String
|
||||
Public Caption As String
|
||||
Public Width As Long
|
||||
Public GantColumnIndex As Long
|
||||
End Structure
|
||||
|
||||
#Region "Overrides"
|
||||
Protected Overrides Sub OnActivated()
|
||||
MyBase.OnActivated()
|
||||
|
||||
AddHandler DoWork, AddressOf _WaitFormClass.DoWork
|
||||
AddHandler InitWork, AddressOf _WaitFormClass.InitWork
|
||||
AddHandler FinalWork, AddressOf _WaitFormClass.Finalwork
|
||||
|
||||
If View.Id = "ProductsGant_DetailView" Then
|
||||
|
||||
Frame.GetController(Of CloneObject.CloneObjectViewController).Active.SetItemValue("", False)
|
||||
|
||||
Dim _DetailView As DetailView = TryCast(View, DetailView)
|
||||
Dim _GanttContolViewItem As ViewItem = _DetailView.FindItem("G2antt")
|
||||
If _GanttContolViewItem IsNot Nothing Then
|
||||
AddHandler _GanttContolViewItem.ControlCreated, AddressOf GanttContolViewItem_ControlCreated
|
||||
AddHandler Frame.GetController(Of RefreshController).RefreshAction.Executing, AddressOf RefreshAction_Executing
|
||||
End If
|
||||
End If
|
||||
If View.Id = "ProductsGant_ProductsGantRows_ListView" Then
|
||||
Frame.GetController(Of DeleteObjectsViewController)().Active.SetItemValue("", False)
|
||||
Frame.GetController(Of LinkUnlinkController)().Active.SetItemValue("", False)
|
||||
Frame.GetController(Of NewObjectViewController)().Active.SetItemValue("", False)
|
||||
Frame.GetController(Of CloneObject.CloneObjectViewController)().Active.SetItemValue("", False)
|
||||
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
|
||||
|
||||
If View.Id = "ProductsGant_DetailView" Then
|
||||
Frame.GetController(Of CloneObject.CloneObjectViewController).Active.SetItemValue("", True)
|
||||
End If
|
||||
|
||||
If View.Id = "ProductsGant_ProductsGantRows_ListView" Then
|
||||
Frame.GetController(Of DeleteObjectsViewController)().Active.SetItemValue("", True)
|
||||
Frame.GetController(Of LinkUnlinkController)().Active.SetItemValue("", True)
|
||||
Frame.GetController(Of NewObjectViewController)().Active.SetItemValue("", True)
|
||||
Frame.GetController(Of CloneObject.CloneObjectViewController)().Active.SetItemValue("", True)
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
Private Sub GanttContolViewItem_ControlCreated(sender As Object, e As EventArgs)
|
||||
Dim _ItemControl As Object = TryCast(sender, ViewItem).Control
|
||||
_GanttControl = TryCast(_ItemControl, G2anttUserControl).Exg2antt
|
||||
|
||||
AddHandler _GanttControl.EditCloseEvent, AddressOf _GanttControl_EditCloseEvent
|
||||
AddHandler _GanttControl.SelectionChanged, AddressOf _GanttControl_SelectionChanged
|
||||
|
||||
Frame.GetController(Of ProductsGant_VC).aProductsGant_Refresh.DoExecute()
|
||||
End Sub
|
||||
Private Sub aProductsGant_Refresh_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aProductsGant_Refresh.Execute
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _ProductsGant As ProductsGant = TryCast(View.SelectedObjects(0), ProductsGant)
|
||||
If _ProductsGant Is Nothing Then
|
||||
_ProductsGant = TryCast(TryCast(TryCast(View, ListView).CollectionSource, PropertyCollectionSource).MasterObject, ProductsGant)
|
||||
End If
|
||||
|
||||
Dim _ProductsGantRowsBar_Collection As New XPCollection(Of ProductsGantRowsBar)(_onew.Session, CriteriaOperator.Parse("BarType=3"))
|
||||
|
||||
If _ProductsGantRowsBar_Collection.Count > 0 Then
|
||||
For Each _ProductsGantRowsBar As ProductsGantRowsBar In _ProductsGantRowsBar_Collection
|
||||
With _ProductsGantRowsBar
|
||||
.FromDate = GetSQLTime(_onew.Session).Date
|
||||
If .ProductsGantRows.Products.CustomersOrderPriority.Count > 0 Then
|
||||
.ProductsGantRows.Products.CustomersOrderPriority.Sorting.Add(New SortProperty("RowIndex", DB.SortingDirection.Ascending))
|
||||
|
||||
.ToDate = .FromDate.AddDays(.ProductsGantRows.Products.CustomersOrderPriority(0).DeadlineWeek * 7)
|
||||
Else
|
||||
.ToDate = .FromDate
|
||||
End If
|
||||
End With
|
||||
|
||||
Next
|
||||
End If
|
||||
_ProductsGantRowsBar_Collection = New XPCollection(Of ProductsGantRowsBar)(_onew.Session, CriteriaOperator.Parse("BarType=0"))
|
||||
|
||||
If _ProductsGantRowsBar_Collection.Count > 0 Then
|
||||
For Each _ProductsGantRowsBar As ProductsGantRowsBar In _ProductsGantRowsBar_Collection
|
||||
With _ProductsGantRowsBar
|
||||
If _ProductsGantRowsBar.ProductsGantRows.ManualRotation > 0 Then
|
||||
.ToDate = .FromDate.AddDays(_ProductsGantRowsBar.ProductsGantRows.ManualRotation)
|
||||
ElseIf _ProductsGantRowsBar.ProductsGantRows.CalculatedRotation > 0 Then
|
||||
.ToDate = .FromDate.AddDays(_ProductsGantRowsBar.ProductsGantRows.CalculatedRotation)
|
||||
Else
|
||||
.ToDate = .FromDate.AddDays(1)
|
||||
|
||||
End If
|
||||
End With
|
||||
Next
|
||||
End If
|
||||
_onew.CommitChanges()
|
||||
|
||||
Dim _DetailView As DetailView = TryCast(View, DetailView)
|
||||
Dim _ProductsGantRowsViewItem As ListPropertyEditor = _DetailView.FindItem("ProductsGantRows")
|
||||
Dim _IModelListView As IModelListView = Application.Model.Views.GetNode("ProductsGant_ProductsGantRows_ListView")
|
||||
If _GanttControl IsNot Nothing And _IModelListView IsNot Nothing Then
|
||||
|
||||
_GantChange = False
|
||||
|
||||
|
||||
AddHandler _GanttControl.Change, AddressOf GanttControl_Change
|
||||
AddHandler _GanttControl.LayoutChanged, AddressOf GanttControl_LayoutChanged
|
||||
|
||||
|
||||
With _GanttControl
|
||||
.BeginUpdate()
|
||||
.Columns.Clear()
|
||||
.DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exRowLines
|
||||
.LinesAtRoot = exontrol.EXG2ANTTLib.LinesAtRootEnum.exGroupLinesAtRoot
|
||||
.HasButtons = exontrol.EXG2ANTTLib.ExpandButtonEnum.exArrow
|
||||
.HasLines = HierarchyLineEnum.exSolidLine
|
||||
|
||||
With .Chart
|
||||
.MarkNowColor = Drawing.Color.Red
|
||||
.MarkNowWidth = 3
|
||||
.DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exAllLines
|
||||
.FirstVisibleDate = GetSQLTime(_onew.Session).ToString("yyyy.MM.dd")
|
||||
.PaneWidthRight = 500
|
||||
.FirstWeekDay = 1
|
||||
.UnitWidth = 36
|
||||
.LevelCount = 2
|
||||
.get_Level(0).ToolTip = _GanttControl.Chart.get_Level(0).Label
|
||||
.get_Level(0).Unit = 256
|
||||
.get_Level(1).ToolTip = _GanttControl.Chart.get_Level(1).Label
|
||||
.OverviewVisible = exontrol.EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowAll
|
||||
.AllowOverviewZoom = exontrol.EXG2ANTTLib.OverviewZoomEnum.exZoomOnRClick
|
||||
.AllowLinkBars = True
|
||||
.set_PaneWidth(True, 800)
|
||||
' .HistogramVisible = True
|
||||
'.HistogramHeight = 80
|
||||
'.OverviewZoomCaption = "Year|1/2Year|1/4Year|<img>3</img>Month|Third|<img>2</img>Week|<img>1</img>Day|Hour|Min|Sec"
|
||||
'.set_Label(exontrol.EXG2ANTTLib.UnitEnum.exYear, "")
|
||||
'.set_Label(exontrol.EXG2ANTTLib.UnitEnum.exHalfYear, "")
|
||||
'.set_Label(exontrol.EXG2ANTTLib.UnitEnum.exQuarterYear, "")
|
||||
'.set_Label(exontrol.EXG2ANTTLib.UnitEnum.exThirdMonth, "")
|
||||
'.set_Label(exontrol.EXG2ANTTLib.UnitEnum.exHour, "")
|
||||
'.set_Label(exontrol.EXG2ANTTLib.UnitEnum.exMinute, "")
|
||||
'.set_Label(exontrol.EXG2ANTTLib.UnitEnum.exSecond, "")
|
||||
'.OverviewZoomUnit = 64
|
||||
End With
|
||||
|
||||
'.SingleSel = False
|
||||
|
||||
With .Chart.Bars
|
||||
With .Copy("Task", "Accounted")
|
||||
.Color = Drawing.Color.Black
|
||||
.Shape = ShapeBarEnum.exShapeSolid
|
||||
.StartShape = ShapeCornerEnum.exShapeIconUp3
|
||||
.EndShape = ShapeCornerEnum.exShapeIconDown3
|
||||
.StartColor = Drawing.Color.LightYellow
|
||||
.EndColor = Drawing.Color.Yellow
|
||||
.Pattern = PatternEnum.exPatternBox + PatternEnum.exPatternDot + PatternEnum.exPatternShadow
|
||||
.Height = 18
|
||||
.HistogramPattern = PatternEnum.exPatternBox + PatternEnum.exPatternDot + PatternEnum.exPatternShadow
|
||||
.HistogramColor = Drawing.Color.Yellow
|
||||
.OverlaidType = OverlaidBarsTypeEnum.exOverlaidBarsStack
|
||||
End With
|
||||
With .Copy("Task", "Ordered")
|
||||
.Color = Drawing.Color.Black
|
||||
.Shape = ShapeBarEnum.exShapeSolid
|
||||
.StartColor = Drawing.Color.LightPink
|
||||
.EndColor = Drawing.Color.Pink
|
||||
.Pattern = PatternEnum.exPatternBox + PatternEnum.exPatternDot + PatternEnum.exPatternShadow
|
||||
.Height = 18
|
||||
.HistogramPattern = PatternEnum.exPatternBox + PatternEnum.exPatternDot + PatternEnum.exPatternShadow
|
||||
.HistogramColor = Drawing.Color.Pink
|
||||
.OverlaidType = OverlaidBarsTypeEnum.exOverlaidBarsStack
|
||||
End With
|
||||
With .Copy("Summary", "Reported")
|
||||
.Color = Drawing.Color.DarkGray
|
||||
.Shape = ShapeBarEnum.exShapeSolid
|
||||
.StartShape = ShapeCornerEnum.exShapeIconUp3
|
||||
.EndShape = ShapeCornerEnum.exShapeIconDown3
|
||||
.HistogramRulerLinesColor = Drawing.Color.Black
|
||||
.StartColor = Drawing.Color.DarkGreen
|
||||
.EndColor = Drawing.Color.LightGreen
|
||||
.Pattern = PatternEnum.exPatternBox + PatternEnum.exPatternDot + PatternEnum.exPatternShadow + PatternEnum.exPatternEmpty
|
||||
.Height = 18
|
||||
.HistogramPattern = PatternEnum.exPatternBox + PatternEnum.exPatternDot + PatternEnum.exPatternShadow + PatternEnum.exPatternEmpty
|
||||
.HistogramColor = Drawing.Color.Green
|
||||
.OverlaidType = OverlaidBarsTypeEnum.exOverlaidBarsStack
|
||||
End With
|
||||
With .Copy("Milestone", "OrderArrive")
|
||||
.StartShape = ShapeCornerEnum.exShapeIconVBar
|
||||
.StartColor = Drawing.Color.IndianRed
|
||||
.EndColor = Drawing.Color.DarkRed
|
||||
.Color = Drawing.Color.Black
|
||||
.Pattern = PatternEnum.exRectangularCurve + PatternEnum.exPatternDot + PatternEnum.exPatternShadow
|
||||
.Shape = ShapeBarEnum.exShapeSolidCenter
|
||||
.Height = 18
|
||||
.HistogramPattern = PatternEnum.exRectangularCurve + PatternEnum.exPatternDot + PatternEnum.exPatternShadow
|
||||
.HistogramColor = Drawing.Color.Red
|
||||
.OverlaidType = OverlaidBarsTypeEnum.exOverlaidBarsStack
|
||||
End With
|
||||
End With
|
||||
|
||||
For Each _Column In _IModelListView.Columns
|
||||
If _Column.Index <> -1 Then
|
||||
Dim _SISGantColumn As New SISGantColumn
|
||||
With _SISGantColumn
|
||||
.Caption = _Column.Caption
|
||||
.ColumnID = _Column.Id
|
||||
.Index = _Column.Index
|
||||
.Width = _Column.Width
|
||||
End With
|
||||
If _Column.GroupIndex = 0 Then
|
||||
_SISGantColumn.IsGroupColumn = True
|
||||
Else
|
||||
_SISGantColumn.IsGroupColumn = False
|
||||
End If
|
||||
|
||||
_GantItemColumn_Array.Add(_SISGantColumn)
|
||||
End If
|
||||
Next
|
||||
|
||||
Dim _GroupColumn As SISGantColumn = Nothing
|
||||
|
||||
For Each _SISGantColumn As SISGantColumn In _GantItemColumn_Array
|
||||
If _SISGantColumn.IsGroupColumn Then
|
||||
_GroupColumn = _SISGantColumn
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
Dim _GantColumnIndex As Integer = 0
|
||||
|
||||
.TreeColumnIndex = 1
|
||||
|
||||
.Columns.Add(_GantColumnIndex)
|
||||
.Columns(_GantColumnIndex).Caption = "ProductGandRowsOid"
|
||||
.Columns(_GantColumnIndex).Key = "ProductGandRowsOid"
|
||||
.Columns(_GantColumnIndex).Width = 100
|
||||
.Columns(_GantColumnIndex).Visible = False
|
||||
_ProductGandRowsOidindex = _GantColumnIndex
|
||||
_GantColumnIndex += 1
|
||||
|
||||
.Columns.Add(_GantColumnIndex)
|
||||
.Columns(_GantColumnIndex).Key = _GroupColumn.ColumnID
|
||||
.Columns(_GantColumnIndex).Caption = _GroupColumn.Caption
|
||||
.Columns(_GantColumnIndex).Width = _GroupColumn.Width
|
||||
_GroupColumn.GantColumnIndex = _GantColumnIndex
|
||||
_GantColumnIndex += 1
|
||||
|
||||
For _ik = 0 To _GantItemColumn_Array.Count
|
||||
For Each _SISGantColumn As SISGantColumn In _GantItemColumn_Array
|
||||
If Not _SISGantColumn.IsGroupColumn And _SISGantColumn.Index = _ik Then
|
||||
.Columns.Add(_GantColumnIndex)
|
||||
.Columns(_GantColumnIndex).Key = _SISGantColumn.ColumnID
|
||||
.Columns(_GantColumnIndex).Caption = _SISGantColumn.Caption
|
||||
.Columns(_GantColumnIndex).Width = _SISGantColumn.Width
|
||||
If _SISGantColumn.ColumnID <> "Customers" And _SISGantColumn.ColumnID <> "Products" Then
|
||||
.Columns(_GantColumnIndex).Editor.EditType = EditTypeEnum.EditType
|
||||
End If
|
||||
If _GroupColumn.ColumnID = "Customers" Or _GroupColumn.ColumnID = "Products" Then
|
||||
.Columns.Item(_GroupColumn.Caption).SortOrder = exontrol.EXG2ANTTLib.SortOrderEnum.SortAscending
|
||||
End If
|
||||
_SISGantColumn.GantColumnIndex = _GantColumnIndex
|
||||
|
||||
_GantColumnIndex += 1
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
|
||||
'Csoportsítás
|
||||
Dim _GroupObjects_Collection As New ArrayList
|
||||
If Not String.IsNullOrEmpty(_GroupColumn.ColumnID) Then
|
||||
Select Case _GroupColumn.ColumnID
|
||||
Case "Customers"
|
||||
For Each _ProductsGantRows As ProductsGantRows In _ProductsGant.ProductsGantRows
|
||||
If _GroupObjects_Collection.Count = 0 Then
|
||||
_GroupObjects_Collection.Add(_ProductsGantRows.Customers)
|
||||
Else
|
||||
Dim _Need As Boolean = True
|
||||
For Each _Customers As Customers In _GroupObjects_Collection
|
||||
If _ProductsGantRows.Customers.Oid = _Customers.Oid Then
|
||||
_Need = False
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
If _Need Then _GroupObjects_Collection.Add(_ProductsGantRows.Customers)
|
||||
End If
|
||||
Next
|
||||
|
||||
Dim _CustomerColumn As exontrol.EXG2ANTTLib.Column = Nothing
|
||||
For Each _G2Column As exontrol.EXG2ANTTLib.Column In _GanttControl.Columns
|
||||
If _G2Column.Key = _GroupColumn.ColumnID Then
|
||||
_CustomerColumn = _G2Column
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
If _CustomerColumn IsNot Nothing Then
|
||||
For Each _Customers As Customers In _GroupObjects_Collection
|
||||
Dim _GroupItem As Long = _GanttControl.Items.AddItem()
|
||||
|
||||
_GanttControl.Items.set_CellValue(_GroupItem, _CustomerColumn.Index, "<b><fgcolor=0000FF>" + _Customers.FullName + "</fgcolor></b>")
|
||||
_GanttControl.Items.set_CellValueFormat(_GroupItem, _CustomerColumn.Index, ValueFormatEnum.exHTML)
|
||||
Dim _GroupCollectionElement_Collection As New XPCollection(Of ProductsGantRows)(_onew.Session, CriteriaOperator.Parse("Customers=? AND ProductsGant=?", _onew.GetObject(_Customers), _onew.GetObject(_ProductsGant)))
|
||||
|
||||
For Each _ProductsGantRows As ProductsGantRows In _GroupCollectionElement_Collection
|
||||
Dim _Item As Long = _GanttControl.Items.get_FindItem(_ProductsGantRows.Oid.ToString, 0)
|
||||
If _Item = 0 Then
|
||||
_Item = .Items.InsertItem(_GroupItem, "")
|
||||
.Items.set_ExpandItem(_Item, True)
|
||||
SetItemsAndItemData(_Item, _ProductsGantRows)
|
||||
End If
|
||||
Next
|
||||
_GanttControl.Items.set_ExpandItem(_GroupItem, True)
|
||||
Next
|
||||
End If
|
||||
Case "Products"
|
||||
For Each _ProductsGantRows As ProductsGantRows In _ProductsGant.ProductsGantRows
|
||||
If _GroupObjects_Collection.Count = 0 Then
|
||||
_GroupObjects_Collection.Add(_ProductsGantRows.Products)
|
||||
Else
|
||||
Dim _Need As Boolean = True
|
||||
For Each _Products As Products In _GroupObjects_Collection
|
||||
If _ProductsGantRows.Products.Oid = _Products.Oid Then
|
||||
_Need = False
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
If _Need Then _GroupObjects_Collection.Add(_ProductsGantRows.Products)
|
||||
End If
|
||||
Next
|
||||
|
||||
Dim _ProductsColumn As exontrol.EXG2ANTTLib.Column = Nothing
|
||||
For Each _G2Column As exontrol.EXG2ANTTLib.Column In _GanttControl.Columns
|
||||
If _G2Column.Key = _GroupColumn.ColumnID Then
|
||||
_ProductsColumn = _G2Column
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
If _ProductsColumn IsNot Nothing Then
|
||||
For Each _Products As Products In _GroupObjects_Collection
|
||||
Dim _GroupItem As Long = _GanttControl.Items.AddItem()
|
||||
_GanttControl.Items.set_CellValue(_GroupItem, _ProductsColumn.Index, _Products.ShortName)
|
||||
|
||||
Dim _GroupCollectionElement_Collection As New XPCollection(Of ProductsGantRows)(_onew.Session, CriteriaOperator.Parse("Products=? AND ProductsGant=?", _onew.GetObject(_Products), _onew.GetObject(_ProductsGant)))
|
||||
|
||||
For Each _ProductsGantRows As ProductsGantRows In _GroupCollectionElement_Collection
|
||||
Dim _Item As Long = _GanttControl.Items.get_FindItem(_ProductsGantRows.Oid.ToString, 0)
|
||||
If _Item = 0 Then
|
||||
_Item = _GanttControl.Items.InsertItem(_GroupItem, "")
|
||||
|
||||
SetItemsAndItemData(_Item, _ProductsGantRows)
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
End If
|
||||
|
||||
End Select
|
||||
End If
|
||||
If Not String.IsNullOrEmpty(_FocusedItem) Then
|
||||
Dim _SelectedItem As Long = _GanttControl.Items.get_FindItem(_FocusedItem, 0)
|
||||
If _SelectedItem > 0 Then
|
||||
.Items.set_SelectItem(_SelectedItem, True)
|
||||
End If
|
||||
End If
|
||||
.EndUpdate()
|
||||
|
||||
_GantItemColumn_Array.Clear()
|
||||
_GantChange = True
|
||||
End With
|
||||
End If
|
||||
End Sub
|
||||
Private Sub SetItemBars(_item As Long, _ProductsGantRows As ProductsGantRows)
|
||||
For Each _ProductsGantRowsBar As ProductsGantRowsBar In _ProductsGantRows.ProductsGantRowsBar
|
||||
|
||||
|
||||
|
||||
|
||||
Next
|
||||
End Sub
|
||||
Private Sub aProductsGant_SetGantItemColumn_CustomizePopupWindowParams(sender As Object, e As CustomizePopupWindowParamsEventArgs) Handles aProductsGant_SetGantItemColumn.CustomizePopupWindowParams
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
|
||||
Dim _ProductsGant_SetGantItemColumn_PopUp_CollectionSource As New CollectionSource(_onew, GetType(ProductsGant_SetGantItemColumn_PopUp))
|
||||
Dim _IModelListView As IModelListView = Application.Model.Views.GetNode("ProductsGant_ProductsGantRows_ListView")
|
||||
|
||||
For Each _Column In _IModelListView.Columns
|
||||
Dim _ProductsGant_SetGantItemColumn_PopUp As New ProductsGant_SetGantItemColumn_PopUp(_onew.Session)
|
||||
With _ProductsGant_SetGantItemColumn_PopUp
|
||||
.ColumnCaption = _Column.Caption
|
||||
If _Column.Index <> -1 Then
|
||||
.IsVisable = True
|
||||
Else
|
||||
.IsVisable = False
|
||||
End If
|
||||
.Index = _Column.Index
|
||||
If _Column.GroupIndex <> -1 Then
|
||||
.IsGroupColumn = True
|
||||
Else
|
||||
.IsGroupColumn = False
|
||||
End If
|
||||
.Width = _Column.Width
|
||||
.GroupIndex = _Column.GroupIndex
|
||||
End With
|
||||
|
||||
_ProductsGant_SetGantItemColumn_PopUp_CollectionSource.Add(_ProductsGant_SetGantItemColumn_PopUp)
|
||||
Next
|
||||
|
||||
e.View = Application.CreateListView("ProductsGant_SetGantItemColumn_PopUp_ListView", _ProductsGant_SetGantItemColumn_PopUp_CollectionSource, False)
|
||||
End Sub
|
||||
Private Sub aProductsGant_SetGantItemColumn_Execute(sender As Object, e As PopupWindowShowActionExecuteEventArgs) Handles aProductsGant_SetGantItemColumn.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _IModelListView As IModelListView = Application.Model.Views.GetNode("ProductsGant_ProductsGantRows_ListView")
|
||||
|
||||
For Each _ProductsGant_SetGantItemColumn_PopUp As ProductsGant_SetGantItemColumn_PopUp In TryCast(e.PopupWindow.View, ListView).CollectionSource.Collection
|
||||
For Each _Column In _IModelListView.Columns
|
||||
If _Column.Caption = _ProductsGant_SetGantItemColumn_PopUp.ColumnCaption Then
|
||||
_Column.Index = _ProductsGant_SetGantItemColumn_PopUp.Index
|
||||
If _ProductsGant_SetGantItemColumn_PopUp.IsGroupColumn Then
|
||||
_Column.GroupIndex = _ProductsGant_SetGantItemColumn_PopUp.GroupIndex
|
||||
Else
|
||||
_Column.GroupIndex = -1
|
||||
End If
|
||||
_Column.Width = _ProductsGant_SetGantItemColumn_PopUp.Width
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
Application.SaveModelChanges()
|
||||
|
||||
_GanttControl.BeginUpdate()
|
||||
For Each _Column As exontrol.EXG2ANTTLib.Column In _GanttControl.Columns
|
||||
For Each _ColumnModel In _IModelListView.Columns
|
||||
If _ColumnModel.Caption = _Column.Caption Then
|
||||
_Column.Width = _ColumnModel.Width
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
_GanttControl.EndUpdate()
|
||||
|
||||
End Sub
|
||||
Private Sub _GanttControl_EditCloseEvent(sender As Object)
|
||||
Dim _Item As Long = _GanttControl.Items.get_SelectedItem(0)
|
||||
|
||||
Dim _Oid As String = _GanttControl.Items.get_CellValue(_GanttControl.Items.get_SelectedItem(0), 0)
|
||||
If String.IsNullOrEmpty(_Oid) Then
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
|
||||
Dim _ProductsGantRows As ProductsGantRows = _ocur.FindObject(Of ProductsGantRows)(CriteriaOperator.Parse("Oid=?", _Oid))
|
||||
|
||||
If _ProductsGantRows IsNot Nothing Then
|
||||
For Each _G2Column As exontrol.EXG2ANTTLib.Column In _GanttControl.Columns
|
||||
Select Case _G2Column.Key
|
||||
Case "ManualRotation"
|
||||
_ProductsGantRows.ManualRotation = _GanttControl.Items.get_CellValue(_GanttControl.Items.get_SelectedItem(0), _G2Column.Index)
|
||||
Case "CalculatedRotation"
|
||||
_ProductsGantRows.CalculatedRotation = _GanttControl.Items.get_CellValue(_GanttControl.Items.get_SelectedItem(0), _G2Column.Index)
|
||||
End Select
|
||||
Next
|
||||
|
||||
End If
|
||||
_ocur.CommitChanges()
|
||||
End If
|
||||
End Sub
|
||||
Private Sub aProductsGant_CreateCustomersReport_CustomizePopupWindowParams1(sender As Object, e As CustomizePopupWindowParamsEventArgs) Handles aProductsGant_CreateCustomersReport.CustomizePopupWindowParams
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _ReportDate As Date = GetSQLTime(_onew.Session).Date
|
||||
Dim _ProductsGantRows_Oid As String = _GanttControl.Items.get_CellValue(_GanttControl.Items.get_SelectedItem(0), 0)
|
||||
If String.IsNullOrEmpty(_ProductsGantRows_Oid) Then
|
||||
MsgBox("Nincs kiválasztva egyetlen sor sem, nem lehet azonosítani az Ügyfelet!", MsgBoxStyle.OkOnly, "Hiba!")
|
||||
Exit Sub
|
||||
End If
|
||||
Dim _ProductsGantRows_Selected As ProductsGantRows = _onew.FindObject(Of ProductsGantRows)(CriteriaOperator.Parse("Oid=?", _ProductsGantRows_Oid))
|
||||
|
||||
Dim _ProductsGantCustomersReport_CollectionSource As New CollectionSource(_onew, GetType(ProductsGantCustomersReport))
|
||||
_ProductsGantCustomersReport_CollectionSource.BeginUpdateCriteria()
|
||||
_ProductsGantCustomersReport_CollectionSource.Criteria.Clear()
|
||||
_ProductsGantCustomersReport_CollectionSource.Criteria("First") = CriteriaOperator.Parse("GetDate(DateExecution)=? AND Customers.Oid=?", _ReportDate.Date, _ProductsGantRows_Selected.Customers.Oid)
|
||||
_ProductsGantCustomersReport_CollectionSource.EndUpdateCriteria()
|
||||
|
||||
If _GanttControl.Items.get_SelectedItem(0) > 0 Then
|
||||
Dim _ProductsGantRows_Collection As New XPCollection(Of ProductsGantRows)(_onew.Session, CriteriaOperator.Parse("Customers=?", _ProductsGantRows_Selected.Customers))
|
||||
|
||||
If _ProductsGantRows_Collection.Count > 0 Then
|
||||
For Each _ProductsGantRows As ProductsGantRows In _ProductsGantRows_Collection
|
||||
Dim _ProductsGantCustomersReport As New ProductsGantCustomersReport(_onew.Session)
|
||||
With _ProductsGantCustomersReport
|
||||
.Customers = _ProductsGantRows_Selected.Customers
|
||||
.Products = _ProductsGantRows.Products
|
||||
.QTT = 0
|
||||
.DateExecution = _ReportDate
|
||||
End With
|
||||
|
||||
_ProductsGantCustomersReport_CollectionSource.Add(_ProductsGantCustomersReport)
|
||||
Next
|
||||
End If
|
||||
|
||||
End If
|
||||
e.View = Application.CreateListView("ProductsGantCustomersReport_ListView_PopUp", _ProductsGantCustomersReport_CollectionSource, False)
|
||||
End Sub
|
||||
Private Sub aProductsGant_CreateCustomersReport_Execute_1(sender As Object, e As PopupWindowShowActionExecuteEventArgs) Handles aProductsGant_CreateCustomersReport.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _ProductsGant As ProductsGant = TryCast(View.SelectedObjects(0), ProductsGant)
|
||||
Dim _Customers As Customers = Nothing
|
||||
Dim _Products As Products = Nothing
|
||||
Dim _QTT As Double = 0
|
||||
Dim _DateExecution As Date = Date.MinValue
|
||||
|
||||
|
||||
For Each _ProductsGantCustomersReport As ProductsGantCustomersReport In TryCast(e.PopupWindow.View, ListView).CollectionSource.Collection
|
||||
|
||||
If _ProductsGantCustomersReport.QTT > 0 Then
|
||||
|
||||
Dim _ProductsGantCustomersReport_New As ProductsGantCustomersReport = _ocur.FindObject(Of ProductsGantCustomersReport)(CriteriaOperator.Parse("Customers=? AND Products=? AND DateExecution=?", _
|
||||
_ocur.GetObject(_ProductsGantCustomersReport.Customers), _
|
||||
_ocur.GetObject(_ProductsGantCustomersReport.Products), _
|
||||
_ProductsGantCustomersReport.DateExecution))
|
||||
If _ProductsGantCustomersReport_New Is Nothing Then
|
||||
_ProductsGantCustomersReport_New = New ProductsGantCustomersReport(_ocur.Session)
|
||||
_ProductsGantCustomersReport_New.Customers = _ocur.GetObject(_ProductsGantCustomersReport.Customers)
|
||||
_ProductsGantCustomersReport_New.Products = _ocur.GetObject(_ProductsGantCustomersReport.Products)
|
||||
_ProductsGantCustomersReport_New.QTT = _ocur.GetObject(_ProductsGantCustomersReport.QTT)
|
||||
_ProductsGantCustomersReport_New.DateExecution = _ocur.GetObject(_ProductsGantCustomersReport.DateExecution)
|
||||
End If
|
||||
|
||||
|
||||
Dim _ProductsGantRows As ProductsGantRows = _ocur.FindObject(Of ProductsGantRows)(CriteriaOperator.Parse("ProductsGant=? AND Customers.Oid=? AND Products.Oid=?", _
|
||||
_ProductsGant, _ProductsGantCustomersReport_New.Customers.Oid, _ProductsGantCustomersReport_New.Products.Oid))
|
||||
If _ProductsGantRows IsNot Nothing Then
|
||||
Dim _ProductsGantRowsBar As ProductsGantRowsBar = _ocur.FindObject(Of ProductsGantRowsBar) _
|
||||
(CriteriaOperator.Parse("ProductsGantRows.Oid=? AND GetDate(FromDate)=? AND BarType=2", _
|
||||
_ProductsGantRows.Oid, _ProductsGantCustomersReport.DateExecution.Date))
|
||||
If _ProductsGantRowsBar Is Nothing Then
|
||||
_ProductsGantRowsBar = New ProductsGantRowsBar(_ocur.Session)
|
||||
With _ProductsGantRowsBar
|
||||
.ProductsGantRows = _ProductsGantRows
|
||||
.FromDate = _ProductsGantCustomersReport.DateExecution
|
||||
If _ProductsGantRowsBar.ProductsGantRows.Products.CustomersOrderPriority.Count > 0 Then
|
||||
.ProductsGantRows.Products.CustomersOrderPriority.Sorting.Add(New SortProperty("RowIndex", DB.SortingDirection.Ascending))
|
||||
.ToDate = .FromDate.AddDays(.ProductsGantRows.Products.CustomersOrderPriority(0).DeadlineWeek * 7)
|
||||
Else
|
||||
If _ProductsGantRowsBar.ProductsGantRows.CalculatedRotation > 0 Then
|
||||
.ToDate = .FromDate.AddDays(.ProductsGantRows.CalculatedRotation)
|
||||
ElseIf _ProductsGantRowsBar.ProductsGantRows.ManualRotation > 0 Then
|
||||
.ToDate = .FromDate.AddDays(.ProductsGantRows.ManualRotation)
|
||||
Else
|
||||
.ToDate = .FromDate.AddDays(1) 'temp
|
||||
End If
|
||||
End If
|
||||
.BarType = eBarType.eReported
|
||||
.Caption = _ProductsGantCustomersReport_New.QTT.ToString
|
||||
End With
|
||||
Else
|
||||
With _ProductsGantRowsBar
|
||||
.FromDate = _ProductsGantCustomersReport.DateExecution
|
||||
If _ProductsGantRowsBar.ProductsGantRows.Products.CustomersOrderPriority.Count > 0 Then
|
||||
.ProductsGantRows.Products.CustomersOrderPriority.Sorting.Add(New SortProperty("RowIndex", DB.SortingDirection.Ascending))
|
||||
.ToDate = .FromDate.AddDays(.ProductsGantRows.Products.CustomersOrderPriority(0).DeadlineWeek * 7)
|
||||
Else
|
||||
If _ProductsGantRowsBar.ProductsGantRows.CalculatedRotation > 0 Then
|
||||
.ToDate = .FromDate.AddDays(.ProductsGantRows.CalculatedRotation)
|
||||
ElseIf _ProductsGantRowsBar.ProductsGantRows.ManualRotation > 0 Then
|
||||
.ToDate = .FromDate.AddDays(.ProductsGantRows.ManualRotation)
|
||||
Else
|
||||
.ToDate = .FromDate.AddDays(1) 'temp
|
||||
End If
|
||||
End If
|
||||
.Caption = _ProductsGantCustomersReport_New.QTT.ToString
|
||||
End With
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
_ocur.CommitChanges()
|
||||
|
||||
Dim _ProductsGantCustomersReport_DEL_Collection As New XPCollection(Of ProductsGantCustomersReport)(_ocur.Session, CriteriaOperator.Parse("QTT='0'"))
|
||||
If _ProductsGantCustomersReport_DEL_Collection.Count > 0 Then
|
||||
_ocur.Delete(_ProductsGantCustomersReport_DEL_Collection)
|
||||
_ocur.CommitChanges()
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
Private Sub aProductsGant_OpenProducts_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aProductsGant_OpenProducts.Execute
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
|
||||
Dim _ProductsGant As ProductsGant = TryCast(View.SelectedObjects(0), ProductsGant)
|
||||
|
||||
If _GanttControl.Items.get_SelectedItem(0) > 0 Then
|
||||
|
||||
Dim _ProductsGantRows_Oid As String = _GanttControl.Items.get_CellValue(_GanttControl.Items.get_SelectedItem(0), 0)
|
||||
Dim _ProductsGantRows As ProductsGantRows = _onew.FindObject(Of ProductsGantRows)(CriteriaOperator.Parse("Oid=?", _ProductsGantRows_Oid))
|
||||
If _ProductsGantRows IsNot Nothing Then
|
||||
e.ShowViewParameters.CreatedView = Application.CreateDetailView(_onew, "Products_DetailView", True, _ProductsGantRows.Products)
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Private Sub GanttControl_Change(sender As Object, Item As Integer, ColIndex As Integer, ByRef NewValue As Object)
|
||||
If _GantChange Then
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _IModelListView As IModelListView = Application.Model.Views.GetNode("ProductsGant_ProductsGantRows_ListView")
|
||||
If _GanttControl IsNot Nothing And _IModelListView IsNot Nothing Then
|
||||
|
||||
Dim _ProductsGant As ProductsGant = TryCast(View.SelectedObjects(0), ProductsGant)
|
||||
Dim _ProductsGantRows_Oid As String = _GanttControl.Items.get_CellValue(Item, 0)
|
||||
Dim _ProductsGantRows As ProductsGantRows = _onew.FindObject(Of ProductsGantRows)(CriteriaOperator.Parse("Oid=?", _ProductsGantRows_Oid))
|
||||
Dim _ColumnID As String = ""
|
||||
If _ProductsGantRows IsNot Nothing Then
|
||||
|
||||
For Each _Column In _IModelListView.Columns
|
||||
If _Column.Caption = _GanttControl.Columns(ColIndex).Caption Then
|
||||
_ColumnID = _Column.Id
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
If Not String.IsNullOrEmpty(_ColumnID) Then
|
||||
Select Case _ColumnID
|
||||
Case "CalculatedRotation"
|
||||
_ProductsGantRows.CalculatedRotation = CType(NewValue, Double)
|
||||
Case "ManualRotation"
|
||||
_ProductsGantRows.ManualRotation = CType(NewValue, Double)
|
||||
End Select
|
||||
|
||||
_onew.CommitChanges()
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Private Sub RefreshAction_Executing(sender As Object, e As CancelEventArgs)
|
||||
If _GanttControl IsNot Nothing Then
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
With _GanttControl
|
||||
.BeginUpdate()
|
||||
.Chart.FirstVisibleDate = GetSQLTime(_ocur.Session).ToString("yyyy.MM.dd")
|
||||
.EndUpdate()
|
||||
End With
|
||||
End If
|
||||
End Sub
|
||||
Private Sub GanttControl_LayoutChanged(sender As Object)
|
||||
If _GantChange Then
|
||||
Dim _DetailView As DetailView = TryCast(View, DetailView)
|
||||
Dim _ProductsGantRowsViewItem As ListPropertyEditor = _DetailView.FindItem("ProductsGantRows")
|
||||
Dim _IModelListView As IModelListView = Application.Model.Views.GetNode("ProductsGant_ProductsGantRows_ListView")
|
||||
For Each _Column In _IModelListView.Columns
|
||||
For Each _G2Column As exontrol.EXG2ANTTLib.Column In _GanttControl.Columns
|
||||
If _Column.Id = _G2Column.Key Then
|
||||
_Column.Width = _G2Column.Width
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
Application.SaveModelChanges()
|
||||
End If
|
||||
End Sub
|
||||
Private Sub SetItemsAndItemData(_Item As Long, _ProductsGantRows As ProductsGantRows)
|
||||
For Each _G2Column As exontrol.EXG2ANTTLib.Column In _GanttControl.Columns
|
||||
Select Case _G2Column.Key
|
||||
Case "ProductGandRowsOid"
|
||||
_GanttControl.Items.set_CellValue(_Item, _G2Column.Index, _ProductsGantRows.Oid.ToString)
|
||||
Case "Customers"
|
||||
_GanttControl.Items.set_CellValue(_Item, _G2Column.Index, _ProductsGantRows.Customers.FullName)
|
||||
Case "Products"
|
||||
_GanttControl.Items.set_CellValue(_Item, _G2Column.Index, _ProductsGantRows.Products.ShortName)
|
||||
Case "CalculatedRotation"
|
||||
_GanttControl.Items.set_CellValue(_Item, _G2Column.Index, _ProductsGantRows.CalculatedRotation)
|
||||
Case "ManualRotation"
|
||||
_GanttControl.Items.set_CellValue(_Item, _G2Column.Index, _ProductsGantRows.ManualRotation)
|
||||
End Select
|
||||
|
||||
Next
|
||||
|
||||
For Each _ProductsGantRowsBar As ProductsGantRowsBar In _ProductsGantRows.ProductsGantRowsBar
|
||||
Dim _Key As String = Guid.NewGuid.ToString
|
||||
Select Case _ProductsGantRowsBar.BarType
|
||||
Case eBarType.eAccounted
|
||||
_GanttControl.Items.AddBar(CInt(_Item), "Accounted", _ProductsGantRowsBar.FromDate, _ProductsGantRowsBar.ToDate, _Key, _ProductsGantRowsBar.Caption)
|
||||
_GanttControl.Items.set_ItemBar(CInt(_Item), _Key, exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanResize, False)
|
||||
_GanttControl.Items.set_ItemBar(CInt(_Item), _Key, exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanMove, False)
|
||||
_GanttControl.Items.set_ItemBar(CInt(_Item), _Key, exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanStartLink, False)
|
||||
_GanttControl.Items.set_ItemBar(CInt(_Item), _Key, exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanBeLinked, False)
|
||||
Case eBarType.eOrdered
|
||||
_GanttControl.Items.AddBar(CInt(_Item), "Ordered", _ProductsGantRowsBar.FromDate, _ProductsGantRowsBar.ToDate, _Key, _ProductsGantRowsBar.Caption)
|
||||
_GanttControl.Items.set_ItemBar(CInt(_Item), _Key, exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanResize, False)
|
||||
_GanttControl.Items.set_ItemBar(CInt(_Item), _Key, exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanMove, False)
|
||||
_GanttControl.Items.set_ItemBar(CInt(_Item), _Key, exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanStartLink, False)
|
||||
_GanttControl.Items.set_ItemBar(CInt(_Item), _Key, exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanBeLinked, False)
|
||||
Case eBarType.eReported
|
||||
_GanttControl.Items.AddBar(CInt(_Item), "Reported", _ProductsGantRowsBar.FromDate, _ProductsGantRowsBar.ToDate, _Key, _ProductsGantRowsBar.Caption)
|
||||
_GanttControl.Items.set_ItemBar(CInt(_Item), _Key, exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanResize, False)
|
||||
_GanttControl.Items.set_ItemBar(CInt(_Item), _Key, exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanMove, False)
|
||||
_GanttControl.Items.set_ItemBar(CInt(_Item), _Key, exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanStartLink, False)
|
||||
_GanttControl.Items.set_ItemBar(CInt(_Item), _Key, exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanBeLinked, False)
|
||||
Case eBarType.eOrderArrive
|
||||
_GanttControl.Items.AddBar(CInt(_Item), "OrderArrive", _ProductsGantRowsBar.ToDate, _ProductsGantRowsBar.ToDate, _Key, _ProductsGantRowsBar.Caption)
|
||||
_GanttControl.Items.set_ItemBar(CInt(_Item), _Key, exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanResize, False)
|
||||
_GanttControl.Items.set_ItemBar(CInt(_Item), _Key, exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanMove, False)
|
||||
_GanttControl.Items.set_ItemBar(CInt(_Item), _Key, exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanStartLink, False)
|
||||
_GanttControl.Items.set_ItemBar(CInt(_Item), _Key, exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanBeLinked, False)
|
||||
End Select
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub _GanttControl_SelectionChanged(sender As Object)
|
||||
_FocusedItem = _GanttControl.Items.get_CellValue(_GanttControl.Items.FocusItem, 0).ToString
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,32 @@
|
||||
Partial Class Products_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,35 @@
|
||||
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 Products_VC
|
||||
Inherits Nuvolar.Module.ProductsVC
|
||||
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
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user