Reconfigure for GIT

This commit is contained in:
2017-03-26 20:00:03 +02:00
commit 00637826ab
8056 changed files with 535977 additions and 0 deletions
@@ -0,0 +1,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
@@ -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 SISBusiness.Module
Public Class CertificateOfContractVC
Inherits SISBusiness.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
@@ -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
@@ -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
@@ -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(SISBusiness.[Module].ContractRows)
Me.TypeOfView = GetType(DevExpress.ExpressApp.View)
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=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>
@@ -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 SISBusiness.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
@@ -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(SISBusiness.[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(SISBusiness.[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
@@ -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>
@@ -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 SISBusiness.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
@@ -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(SISBusiness.[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(SISBusiness.[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(SISBusiness.[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(SISBusiness.[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
@@ -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>
@@ -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 SISBusiness.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) = "SISBusiness" 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