First create solution
This commit is contained in:
+114
@@ -0,0 +1,114 @@
|
||||
Partial Class RateDiffVC
|
||||
|
||||
<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.aCreateRateDiffView = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
|
||||
Me.aViewPDCI_RateDiff = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aOpenObject_RateDiff = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aViewRegistry_RateDiff = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aViewAttachments_RateDiff = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
'
|
||||
'aCreateRateDiffView
|
||||
'
|
||||
Me.aCreateRateDiffView.AcceptButtonCaption = Nothing
|
||||
Me.aCreateRateDiffView.CancelButtonCaption = Nothing
|
||||
Me.aCreateRateDiffView.Caption = "Create Rate Diff"
|
||||
Me.aCreateRateDiffView.ConfirmationMessage = Nothing
|
||||
Me.aCreateRateDiffView.Id = "aCreateRateDiffView"
|
||||
Me.aCreateRateDiffView.ImageName = Nothing
|
||||
Me.aCreateRateDiffView.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireMultipleObjects
|
||||
Me.aCreateRateDiffView.Shortcut = Nothing
|
||||
Me.aCreateRateDiffView.Tag = Nothing
|
||||
Me.aCreateRateDiffView.TargetObjectsCriteria = Nothing
|
||||
Me.aCreateRateDiffView.TargetViewId = Nothing
|
||||
Me.aCreateRateDiffView.ToolTip = Nothing
|
||||
Me.aCreateRateDiffView.TypeOfView = Nothing
|
||||
'
|
||||
'aViewPDCI_RateDiff
|
||||
'
|
||||
Me.aViewPDCI_RateDiff.Caption = "aViewPDCI_RateDiff"
|
||||
Me.aViewPDCI_RateDiff.ConfirmationMessage = Nothing
|
||||
Me.aViewPDCI_RateDiff.Id = "aViewPDCI_RateDiff"
|
||||
Me.aViewPDCI_RateDiff.ImageName = Nothing
|
||||
Me.aViewPDCI_RateDiff.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
|
||||
Me.aViewPDCI_RateDiff.Shortcut = Nothing
|
||||
Me.aViewPDCI_RateDiff.Tag = Nothing
|
||||
Me.aViewPDCI_RateDiff.TargetObjectsCriteria = Nothing
|
||||
Me.aViewPDCI_RateDiff.TargetViewId = Nothing
|
||||
Me.aViewPDCI_RateDiff.ToolTip = Nothing
|
||||
Me.aViewPDCI_RateDiff.TypeOfView = Nothing
|
||||
'
|
||||
'aOpenObject_RateDiff
|
||||
'
|
||||
Me.aOpenObject_RateDiff.Caption = "aOpenObject_RateDiff"
|
||||
Me.aOpenObject_RateDiff.ConfirmationMessage = Nothing
|
||||
Me.aOpenObject_RateDiff.Id = "aOpenObject_RateDiff"
|
||||
Me.aOpenObject_RateDiff.ImageName = Nothing
|
||||
Me.aOpenObject_RateDiff.Shortcut = Nothing
|
||||
Me.aOpenObject_RateDiff.Tag = Nothing
|
||||
Me.aOpenObject_RateDiff.TargetObjectsCriteria = Nothing
|
||||
Me.aOpenObject_RateDiff.TargetViewId = Nothing
|
||||
Me.aOpenObject_RateDiff.ToolTip = Nothing
|
||||
Me.aOpenObject_RateDiff.TypeOfView = Nothing
|
||||
'
|
||||
'aViewRegistry_RateDiff
|
||||
'
|
||||
Me.aViewRegistry_RateDiff.Caption = "View registry"
|
||||
Me.aViewRegistry_RateDiff.ConfirmationMessage = Nothing
|
||||
Me.aViewRegistry_RateDiff.Id = "aViewRegistry_RateDiff"
|
||||
Me.aViewRegistry_RateDiff.ImageName = "document_pinned"
|
||||
Me.aViewRegistry_RateDiff.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
|
||||
Me.aViewRegistry_RateDiff.Shortcut = Nothing
|
||||
Me.aViewRegistry_RateDiff.Tag = Nothing
|
||||
Me.aViewRegistry_RateDiff.TargetObjectsCriteria = Nothing
|
||||
Me.aViewRegistry_RateDiff.TargetViewId = ""
|
||||
Me.aViewRegistry_RateDiff.ToolTip = Nothing
|
||||
Me.aViewRegistry_RateDiff.TypeOfView = Nothing
|
||||
'
|
||||
'aViewAttachments_RateDiff
|
||||
'
|
||||
Me.aViewAttachments_RateDiff.Caption = "View attachments"
|
||||
Me.aViewAttachments_RateDiff.ConfirmationMessage = Nothing
|
||||
Me.aViewAttachments_RateDiff.Id = "aViewAttachments_RateDiff"
|
||||
Me.aViewAttachments_RateDiff.ImageName = "printer_view"
|
||||
Me.aViewAttachments_RateDiff.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
|
||||
Me.aViewAttachments_RateDiff.Shortcut = Nothing
|
||||
Me.aViewAttachments_RateDiff.Tag = Nothing
|
||||
Me.aViewAttachments_RateDiff.TargetObjectsCriteria = Nothing
|
||||
Me.aViewAttachments_RateDiff.TargetViewId = ""
|
||||
Me.aViewAttachments_RateDiff.ToolTip = Nothing
|
||||
Me.aViewAttachments_RateDiff.TypeOfView = Nothing
|
||||
|
||||
End Sub
|
||||
Friend WithEvents aCreateRateDiffView As DevExpress.ExpressApp.Actions.PopupWindowShowAction
|
||||
Friend WithEvents aViewPDCI_RateDiff As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aOpenObject_RateDiff As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aViewRegistry_RateDiff As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aViewAttachments_RateDiff 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="aCreateRateDiffView.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>190, 17</value>
|
||||
</metadata>
|
||||
<metadata name="aViewPDCI_RateDiff.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>353, 17</value>
|
||||
</metadata>
|
||||
<metadata name="aOpenObject_RateDiff.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="aViewRegistry_RateDiff.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>512, 17</value>
|
||||
</metadata>
|
||||
<metadata name="aViewAttachments_RateDiff.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>689, 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>
|
||||
+257
@@ -0,0 +1,257 @@
|
||||
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 DevExpress.ExpressApp.CloneObject
|
||||
Imports DevExpress.Data.Filtering
|
||||
|
||||
Public Class RateDiffVC
|
||||
Inherits DevExpress.ExpressApp.ViewController
|
||||
Protected selection As ArrayList
|
||||
Protected noselect As Boolean = False
|
||||
Public Event InitWork(ByVal _Minimum As Long, ByVal _Step As Long, ByVal _Maximum As Long)
|
||||
Public Event DoWork()
|
||||
Public Event FinalWork
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
selection = New ArrayList()
|
||||
'This call is required by the Component Designer.
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
|
||||
End Sub
|
||||
Protected Overrides Sub OnActivated()
|
||||
MyBase.OnActivated()
|
||||
|
||||
Frame.GetController(Of RateDiffVC).aCreateRateDiffView.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of RateDiffVC).aViewPDCI_RateDiff.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of RateDiffVC).aOpenObject_RateDiff.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of RateDiffVC).aViewAttachments_RateDiff.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of RateDiffVC).aViewRegistry_RateDiff.Active.SetItemValue("", False)
|
||||
|
||||
If View.Id = "RateDiffView_ListView" Then
|
||||
AddHandler View.SelectionChanged, AddressOf view_SelectionChanged
|
||||
Frame.GetController(Of RateDiffVC).aCreateRateDiffView.Active.SetItemValue("", True)
|
||||
Frame.GetController(Of RateDiffVC).aViewPDCI_RateDiff.Active.SetItemValue("", True)
|
||||
Frame.GetController(Of RateDiffVC).aOpenObject_RateDiff.Active.SetItemValue("", True)
|
||||
Frame.GetController(Of RateDiffVC).aViewAttachments_RateDiff.Active.SetItemValue("", True)
|
||||
Frame.GetController(Of RateDiffVC).aViewRegistry_RateDiff.Active.SetItemValue("", True)
|
||||
|
||||
|
||||
Frame.GetController(Of NewObjectViewController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of ListViewProcessCurrentObjectController).Active.SetItemValue("", False)
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Overrides Sub OnDeactivated()
|
||||
MyBase.OnDeactivated()
|
||||
|
||||
If View.Id = "RateDiffView_ListView" Then
|
||||
RemoveHandler View.SelectionChanged, AddressOf view_SelectionChanged
|
||||
Frame.GetController(Of RateDiffVC).aCreateRateDiffView.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of NewObjectViewController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of ListViewProcessCurrentObjectController).Active.SetItemValue("", True)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Private Sub view_SelectionChanged(ByVal sender As Object, ByVal e As System.EventArgs)
|
||||
Dim _RateDiffView As RateDiffView
|
||||
|
||||
If View Is Nothing Then Exit Sub
|
||||
|
||||
If View.Id Like "RateDiffView_ListView*" And noselect = False Then
|
||||
selection.Clear()
|
||||
For Each _RateDiffView In View.SelectedObjects
|
||||
selection.Add(_RateDiffView)
|
||||
Next
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Private Sub aCreateRateDiffView_CustomizePopupWindowParams(sender As Object, e As DevExpress.ExpressApp.Actions.CustomizePopupWindowParamsEventArgs) Handles aCreateRateDiffView.CustomizePopupWindowParams
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _RateDiffPopUp As RateDiffPopUp = _onew.CreateObject(Of RateDiffPopUp)()
|
||||
|
||||
_RateDiffPopUp.DateExecution = Now
|
||||
|
||||
e.View = Application.CreateDetailView(_onew, "RateDiffPopUp_DetailView", False, _RateDiffPopUp)
|
||||
End Sub
|
||||
|
||||
Private Sub aCreateRateDiffView_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.PopupWindowShowActionExecuteEventArgs) Handles aCreateRateDiffView.Execute
|
||||
|
||||
'// Megcsinálja az árfolyam elszámoló vegyes bizonylatot
|
||||
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _RateDiffPopUp As RateDiffPopUp = TryCast(e.PopupWindow.View.SelectedObjects(0), RateDiffPopUp)
|
||||
Dim _RateDiffView As RateDiffView
|
||||
Dim _GLHeader_Ratediff As GLMixed = Nothing
|
||||
Dim _GLRows_RateDiff As GLRows
|
||||
Dim _DebitChartOfAccounts As ChartOfAccounts = Nothing
|
||||
Dim _CreditChartOfAccounts As ChartOfAccounts = Nothing
|
||||
Dim _Controlling As Controlling = Nothing
|
||||
Dim _GLMixedNG As GLMixedNG
|
||||
Dim _GLRows As GLRows
|
||||
|
||||
Dim _GLHeader_RateDiffParameter = _ocur.FindObject(Of GLHeader_RateDiffParameter)(CriteriaOperator.Parse("1=1"))
|
||||
If _GLHeader_RateDiffParameter Is Nothing Then Exit Sub
|
||||
|
||||
Dim _ChartOfAccounts_RateDiff_Win As ChartOfAccounts = _GLHeader_RateDiffParameter.GetChartOfAccounts(_RateDiffPopUp.DateExecution.Year, eWinLoss.eRateDiffWin)
|
||||
Dim _ChartOfAccounts_RateDiff_Loss As ChartOfAccounts = _GLHeader_RateDiffParameter.GetChartOfAccounts(_RateDiffPopUp.DateExecution.Year, eWinLoss.eRateDiffLoss)
|
||||
Dim _Controlling_RateDiff_Win As Controlling = _GLHeader_RateDiffParameter.Controlling_RateDiff_Win
|
||||
Dim _Controlling_RateDiff_Loss As Controlling = _GLHeader_RateDiffParameter.Controlling_RateDiff_Loss
|
||||
|
||||
Dim _CustomersFrom As CustomersFrom = Nothing
|
||||
Dim i As Long = 0
|
||||
Dim _InAmountHUF As Double = 0
|
||||
Dim _OutAmountHUF As Double = 0
|
||||
|
||||
If selection.Count <= 0 Then Exit Sub
|
||||
|
||||
For Each _RateDiffView In selection
|
||||
If i = 0 Then
|
||||
_CustomersFrom = _RateDiffView.CustomersFrom
|
||||
i = 1
|
||||
End If
|
||||
If _RateDiffView.CustomersFrom.Oid <> _CustomersFrom.Oid Then
|
||||
Throw New Exception("*Csak azonos saját cégű sorok jelölhető ki egyszerre !")
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
_GLHeader_Ratediff = _ocur.CreateObject(Of GLMixed)()
|
||||
_GLHeader_Ratediff.CustomersFrom = _CustomersFrom
|
||||
_GLMixedNG = _ocur.FindObject(Of GLMixedNG)(CriteriaOperator.Parse("CustomersFrom=?", _GLHeader_Ratediff.CustomersFrom), True)
|
||||
If _GLMixedNG IsNot Nothing Then
|
||||
If _GLHeader_Ratediff.DocumentNumber = "" Then
|
||||
_GLHeader_Ratediff.DocumentNumber = _GLMixedNG.NumberGenerator.GetNewNumber(_GLMixedNG.NumberGenerator_RateDiff)
|
||||
End If
|
||||
End If
|
||||
_GLHeader_Ratediff.DateExecution = _RateDiffPopUp.DateExecution
|
||||
_GLHeader_Ratediff.DateCreated = _RateDiffPopUp.DateExecution
|
||||
_GLHeader_Ratediff.NoteHeader = _RateDiffPopUp.Description
|
||||
_GLHeader_Ratediff.CurrencyRate = 1
|
||||
|
||||
_GLHeader_Ratediff.GLDocumentType = eGLDocumentType.eGLRateDiff
|
||||
_GLHeader_Ratediff.IsEditable = False
|
||||
_GLHeader_Ratediff.IsStorno = False
|
||||
_GLHeader_Ratediff.CurrencyName = _ocur.FindObject(Of CurrencyName)(CriteriaOperator.Parse("ShortName='HUF'"))
|
||||
|
||||
For Each _RateDiffView In selection
|
||||
Select Case _RateDiffView.PartnerType
|
||||
Case ePartnerType.ePayabels
|
||||
If _RateDiffView.RateDiffState = 1 Then
|
||||
_DebitChartOfAccounts = _RateDiffView.Customers.CustomersGLParameters.GetChartOfAccounts(_GLHeader_Ratediff.DateExecution.Year, eVATMode.eIn)
|
||||
_CreditChartOfAccounts = _ChartOfAccounts_RateDiff_Win
|
||||
_Controlling = _Controlling_RateDiff_Win
|
||||
_InAmountHUF = Math.Abs(_RateDiffView.OutAmountHUF_Diff)
|
||||
End If
|
||||
If _RateDiffView.RateDiffState = -1 Then
|
||||
_DebitChartOfAccounts = _ChartOfAccounts_RateDiff_Loss
|
||||
_CreditChartOfAccounts = _RateDiffView.Customers.CustomersGLParameters.GetChartOfAccounts(_GLHeader_Ratediff.DateExecution.Year, eVATMode.eIn)
|
||||
_Controlling = _Controlling_RateDiff_Loss
|
||||
_OutAmountHUF = Math.Abs(_RateDiffView.OutAmountHUF_Diff)
|
||||
End If
|
||||
|
||||
Case ePartnerType.eReceivables
|
||||
If _RateDiffView.RateDiffState = -1 Then
|
||||
_DebitChartOfAccounts = _ChartOfAccounts_RateDiff_Loss
|
||||
_CreditChartOfAccounts = _RateDiffView.Customers.CustomersGLParameters.GetChartOfAccounts(_GLHeader_Ratediff.DateExecution.Year, eVATMode.eOut)
|
||||
_Controlling = _Controlling_RateDiff_Loss
|
||||
_OutAmountHUF = Math.Abs(_RateDiffView.InAmountHUF_Diff)
|
||||
End If
|
||||
If _RateDiffView.RateDiffState = 1 Then
|
||||
_DebitChartOfAccounts = _RateDiffView.Customers.CustomersGLParameters.GetChartOfAccounts(_GLHeader_Ratediff.DateExecution.Year, eVATMode.eOut)
|
||||
_CreditChartOfAccounts = _ChartOfAccounts_RateDiff_Win
|
||||
_Controlling = _Controlling_RateDiff_Win
|
||||
_InAmountHUF = Math.Abs(_RateDiffView.InAmountHUF_Diff)
|
||||
End If
|
||||
End Select
|
||||
_GLRows = _ocur.FindObject(Of GLRows)(CriteriaOperator.Parse("Oid=?", _RateDiffView.Oid))
|
||||
|
||||
|
||||
_GLRows_RateDiff = _ocur.CreateObject(Of GLRows)()
|
||||
_GLRows.GLRowsRateDiff = _GLRows_RateDiff
|
||||
_GLRows_RateDiff.GLRowsRateDiff = _GLRows
|
||||
_GLRows_RateDiff.GLHeader = _GLHeader_Ratediff
|
||||
_GLRows_RateDiff.InAmountHUF = _InAmountHUF
|
||||
_GLRows_RateDiff.OutAmountHUF = _OutAmountHUF
|
||||
_GLRows_RateDiff.AddGLRows(_GLHeader_Ratediff, _DebitChartOfAccounts, _CreditChartOfAccounts, 0, Math.Abs(_RateDiffView.InAmountHUF_Diff - _RateDiffView.OutAmountHUF_Diff), Nothing, _
|
||||
_RateDiffView.Customers, Nothing, Nothing, "", Nothing, _Controlling, Nothing, Nothing, Nothing, _RateDiffView.ConnectInfo, _
|
||||
eGLRowsTypeVAT.eNettoRow, Guid.NewGuid, eTransactionType.eNotSet, eCashType.ePartner, _RateDiffView.PartnerType)
|
||||
Next
|
||||
|
||||
_ocur.CommitChanges()
|
||||
|
||||
Frame.GetController(Of RefreshController).RefreshAction.DoExecute()
|
||||
End Sub
|
||||
|
||||
Private Sub SimpleAction1_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aViewPDCI_RateDiff.Execute
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _RateDiffView As RateDiffView = TryCast(View.SelectedObjects(0), RateDiffView)
|
||||
|
||||
ViewPDCI.ViewPDCIDetail(_onew, Application, e, _RateDiffView.CustomersFrom, _
|
||||
_RateDiffView.Customers, _RateDiffView.PartnerType, _
|
||||
_RateDiffView.ConnectInfo)
|
||||
End Sub
|
||||
|
||||
Private Sub aOpenObject_RateDiff_Execute_1(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aOpenObject_RateDiff.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _RateDiffView As RateDiffView = TryCast(View.SelectedObjects(0), RateDiffView)
|
||||
Dim _GLCassa As GLCassa
|
||||
Dim _GLBank As GLBank
|
||||
Dim _GLCompensation As GLCompensation
|
||||
Dim _DetailView As DetailView
|
||||
Dim _GLRows As GLRows
|
||||
|
||||
_GLRows = _ocur.FindObject(Of GLRows)(CriteriaOperator.Parse("Oid=?", _RateDiffView.Oid), True)
|
||||
_GLCassa = _ocur.FindObject(Of GLCassa)(CriteriaOperator.Parse("Oid=?", _GLRows.GLHeader.Oid), True)
|
||||
If _GLCassa IsNot Nothing Then
|
||||
_DetailView = Application.CreateDetailView(_onew, _onew.GetObject(_GLCassa), True)
|
||||
e.ShowViewParameters.CreatedView = _DetailView
|
||||
Else
|
||||
_GLBank = _ocur.FindObject(Of GLBank)(CriteriaOperator.Parse("Oid=?", _GLRows.GLHeader.Oid), True)
|
||||
If _GLBank IsNot Nothing Then
|
||||
_DetailView = Application.CreateDetailView(_onew, _onew.GetObject(_GLBank), True)
|
||||
e.ShowViewParameters.CreatedView = _DetailView
|
||||
Else
|
||||
_GLCompensation = _ocur.FindObject(Of GLCompensation)(CriteriaOperator.Parse("Oid=?", _GLRows.GLHeader.Oid), True)
|
||||
If _GLBank IsNot Nothing Then
|
||||
_DetailView = Application.CreateDetailView(_onew, _onew.GetObject(_GLCompensation), True)
|
||||
e.ShowViewParameters.CreatedView = _DetailView
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub aViewRegistry_RateDiff_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aViewRegistry_RateDiff.Execute
|
||||
Dim _RateDiffView As RateDiffView = TryCast(View.SelectedObjects(0), RateDiffView)
|
||||
Dim _CustomersFrom As CustomersFrom = _RateDiffView.CustomersFrom
|
||||
Dim _Customers As Customers = _RateDiffView.Customers
|
||||
Dim _DocumentNumber As String = _RateDiffView.ConnectInfo
|
||||
|
||||
ViewRegistry.ViewRegistry(View.ObjectSpace, Application, e, _CustomersFrom, _Customers, _DocumentNumber)
|
||||
End Sub
|
||||
|
||||
Private Sub aViewAttachments_RateDiff_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aViewAttachments_RateDiff.Execute
|
||||
'-- Karton sorához tartozó eredeti dokumentum megnyitása
|
||||
Dim _RateDiffView As RateDiffView = TryCast(View.SelectedObjects(0), RateDiffView)
|
||||
Dim _CustomersFrom As CustomersFrom = _RateDiffView.CustomersFrom
|
||||
Dim _Customers As Customers = _RateDiffView.Customers
|
||||
Dim _DocumentNumber As String = _RateDiffView.ConnectInfo
|
||||
|
||||
ViewAttachments.ViewAttachments(View.ObjectSpace, Frame, _CustomersFrom, _Customers, _DocumentNumber, "")
|
||||
End Sub
|
||||
End Class
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
Imports System
|
||||
Imports System.ComponentModel
|
||||
|
||||
Imports DevExpress.Xpo
|
||||
Imports DevExpress.Data.Filtering
|
||||
|
||||
Imports DevExpress.ExpressApp
|
||||
Imports DevExpress.Persistent.Base
|
||||
Imports DevExpress.Persistent.BaseImpl
|
||||
Imports DevExpress.Persistent.Validation
|
||||
Imports System.Drawing
|
||||
Imports DevExpress.ExpressApp.Utils
|
||||
|
||||
<DefaultClassOptions()> _
|
||||
<Persistent("vv_WaitforRateDiff")> _
|
||||
<NavigationItem(False), CreatableItem(False)> _
|
||||
Public Class RateDiffView
|
||||
Inherits XPLiteObject
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
<Key(True), Persistent("Oid")> Public Oid As Guid
|
||||
<Persistent("CustomersFrom")> Public CustomersFrom As CustomersFrom
|
||||
<Persistent("PartnerType")> Public PartnerType As ePartnerType
|
||||
<Persistent("Customers")> Public Customers As Customers
|
||||
<Persistent("ConnectInfo")> Public ConnectInfo As String
|
||||
<Persistent("DateExecution_Account")> Public DateExecution_Account As Date
|
||||
<Persistent("CurrencyName_Account")> Public CurrencyName_Account As CurrencyName
|
||||
<Persistent("AmountDEV_Account")> Public AmountDEV_Account As Double
|
||||
<Persistent("BallanceDEV_Account")> Public BallanceDEV_Account As Double
|
||||
<Persistent("CurrencyRate_Account")> Public CurrencyRate_Account As Double
|
||||
<Persistent("LiquidAssets")> Public LiquidAssets As LiquidAssets
|
||||
<Persistent("DateExecution")> Public DateExecution As Date
|
||||
<Persistent("InAmountDEV")> Public InAmountDEV As Double
|
||||
<Persistent("OutAmountDEV")> Public OutAmountDEV As Double
|
||||
<Persistent("InAmountDEV2")> Public InAmountDEV2 As Double
|
||||
<Persistent("OutAmountDEV2")> Public OutAmountDEV2 As Double
|
||||
<Persistent("CurrencyRate")> Public CurrencyRate As Double
|
||||
<Persistent("InAmountHUF")> Public InAmountHUF As Double
|
||||
<Persistent("OutAmountHUF")> Public OutAmountHUF As Double
|
||||
<Persistent("InAmountHUF_Account")> Public InAmountHUF_Account As Double
|
||||
<Persistent("OutAmountHUF_Account")> Public OutAmountHUF_Account As Double
|
||||
<Persistent("InAmountHUF_Diff")> Public InAmountHUF_Diff As Double
|
||||
<Persistent("OutAmountHUF_Diff")> Public OutAmountHUF_Diff As Double
|
||||
<Persistent("GLRowsRatediff"), Browsable(False)> Public GLRowsRatediff As Double
|
||||
<Persistent("RateDiffState"), Browsable(False)> Public RateDiffState As Long
|
||||
<VisibleInDetailView(False)> _
|
||||
ReadOnly Property BallanceRateDiffImage As Image
|
||||
Get
|
||||
If PartnerType = ePartnerType.eReceivables Then
|
||||
If RateDiffState = -1 Then 'Árfolyam veszteség
|
||||
Return ImageLoader.Instance.GetImageInfo("nav_down_red").Image
|
||||
Else 'Árfolyam nyereség
|
||||
Return ImageLoader.Instance.GetImageInfo("nav_up_green").Image
|
||||
End If
|
||||
ElseIf PartnerType = ePartnerType.ePayabels Then
|
||||
If RateDiffState = 1 Then 'Árfolyam nyereség
|
||||
Return ImageLoader.Instance.GetImageInfo("nav_up_green").Image
|
||||
Else 'Árfolyam veszteség
|
||||
Return ImageLoader.Instance.GetImageInfo("nav_down_red").Image
|
||||
End If
|
||||
Else
|
||||
Return ImageLoader.Instance.GetImageInfo("bullet_ball_glass_blue").Image
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
Reference in New Issue
Block a user