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,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
@@ -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
@@ -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
@@ -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
@@ -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 SISBusiness.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
@@ -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
@@ -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,108 @@
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 SISBusiness.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
If _ocur IsNot Nothing Then
_User = _ocur.GetObjectByKey(Of User)(_ocur.GetKeyValue(SecuritySystem.CurrentUser))
End If
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
@@ -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
@@ -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>
@@ -0,0 +1,153 @@
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
Public Class InvoiceVC
Inherits SISBusiness.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 SISBusiness.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 SISBusiness.Module.InvoiceVC)().Actions.Item("aStornoInvoice").Active.SetItemValue("", True)
Else
Frame.GetController(Of SISBusiness.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 SISBusiness.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 _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 _InvoiceHeader IsNot Nothing Then
If _InvoiceHeader IsNot Nothing Then
If _InvoiceHeader.CurrencyName.ShortName = "HUF" Then
_ReportData = _InvoiceHeader.InvoiceType.ReportData
Else
_ReportData = _InvoiceHeader.InvoiceType.ReportData_DEV
End If
End If
If _ReportData IsNot Nothing Then
Dim _XafReport As XafReport = _ReportData.LoadReport(_ocur)
Dim _FilterString As String = "[InvoiceHeader.Oid]='" & _InvoiceHeader.Oid.ToString & "'"
_XafReport.FilterString = _FilterString
Dim _FileName As String = Path.GetTempPath & CorrectFileName(_InvoiceHeader.DocumentNumber) & ".pdf"
Dim _StreamFile As New FileStream(_FileName, FileMode.Create)
_XafReport.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