First create solution
This commit is contained in:
+144
@@ -0,0 +1,144 @@
|
||||
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()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Me.aFinalCOC = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aPrintCertificateOfContract = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aStornoCOC = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aMakeEditableCOC = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aViewRegistry_COC = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aViewAttachments_COC = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aRecalculateCOC = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
'
|
||||
'aFinalCOC
|
||||
'
|
||||
Me.aFinalCOC.Caption = "Final COC"
|
||||
Me.aFinalCOC.Category = "ObjectsCreation"
|
||||
Me.aFinalCOC.ConfirmationMessage = "Do you want to execute command ?"
|
||||
Me.aFinalCOC.Id = "aFinalCOC"
|
||||
Me.aFinalCOC.ImageName = "MenuBar_SaveAndClose"
|
||||
Me.aFinalCOC.Shortcut = Nothing
|
||||
Me.aFinalCOC.Tag = Nothing
|
||||
Me.aFinalCOC.TargetObjectsCriteria = Nothing
|
||||
Me.aFinalCOC.TargetViewId = Nothing
|
||||
Me.aFinalCOC.ToolTip = Nothing
|
||||
Me.aFinalCOC.TypeOfView = Nothing
|
||||
'
|
||||
'aPrintCertificateOfContract
|
||||
'
|
||||
Me.aPrintCertificateOfContract.Caption = "aPrint Certificate Of Contract"
|
||||
Me.aPrintCertificateOfContract.Category = "View"
|
||||
Me.aPrintCertificateOfContract.ConfirmationMessage = "Do you want to execute command?"
|
||||
Me.aPrintCertificateOfContract.Id = "aPrintCertificateOfContract"
|
||||
Me.aPrintCertificateOfContract.ImageName = Nothing
|
||||
Me.aPrintCertificateOfContract.Shortcut = Nothing
|
||||
Me.aPrintCertificateOfContract.Tag = Nothing
|
||||
Me.aPrintCertificateOfContract.TargetObjectsCriteria = Nothing
|
||||
Me.aPrintCertificateOfContract.TargetViewId = ""
|
||||
Me.aPrintCertificateOfContract.ToolTip = Nothing
|
||||
Me.aPrintCertificateOfContract.TypeOfView = Nothing
|
||||
'
|
||||
'aStornoCOC
|
||||
'
|
||||
Me.aStornoCOC.Caption = "Storno COC"
|
||||
Me.aStornoCOC.ConfirmationMessage = "Do you want to execute command ?"
|
||||
Me.aStornoCOC.Id = "aStornoCOC"
|
||||
Me.aStornoCOC.ImageName = Nothing
|
||||
Me.aStornoCOC.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
|
||||
Me.aStornoCOC.Shortcut = Nothing
|
||||
Me.aStornoCOC.Tag = Nothing
|
||||
Me.aStornoCOC.TargetObjectsCriteria = Nothing
|
||||
Me.aStornoCOC.TargetViewId = Nothing
|
||||
Me.aStornoCOC.ToolTip = Nothing
|
||||
Me.aStornoCOC.TypeOfView = Nothing
|
||||
'
|
||||
'aMakeEditableCOC
|
||||
'
|
||||
Me.aMakeEditableCOC.Caption = "Make editable COC"
|
||||
Me.aMakeEditableCOC.ConfirmationMessage = "Do you want to execute command ?"
|
||||
Me.aMakeEditableCOC.Id = "aMakeEditableCOC"
|
||||
Me.aMakeEditableCOC.ImageName = Nothing
|
||||
Me.aMakeEditableCOC.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
|
||||
Me.aMakeEditableCOC.Shortcut = Nothing
|
||||
Me.aMakeEditableCOC.Tag = Nothing
|
||||
Me.aMakeEditableCOC.TargetObjectsCriteria = Nothing
|
||||
Me.aMakeEditableCOC.TargetViewId = Nothing
|
||||
Me.aMakeEditableCOC.ToolTip = Nothing
|
||||
Me.aMakeEditableCOC.TypeOfView = Nothing
|
||||
'
|
||||
'aViewRegistry_COC
|
||||
'
|
||||
Me.aViewRegistry_COC.Caption = "View registry"
|
||||
Me.aViewRegistry_COC.ConfirmationMessage = Nothing
|
||||
Me.aViewRegistry_COC.Id = "aViewRegistry_COC"
|
||||
Me.aViewRegistry_COC.ImageName = "document_pinned"
|
||||
Me.aViewRegistry_COC.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
|
||||
Me.aViewRegistry_COC.Shortcut = Nothing
|
||||
Me.aViewRegistry_COC.Tag = Nothing
|
||||
Me.aViewRegistry_COC.TargetObjectsCriteria = Nothing
|
||||
Me.aViewRegistry_COC.TargetViewId = ""
|
||||
Me.aViewRegistry_COC.ToolTip = Nothing
|
||||
Me.aViewRegistry_COC.TypeOfView = Nothing
|
||||
'
|
||||
'aViewAttachments_COC
|
||||
'
|
||||
Me.aViewAttachments_COC.Caption = "View attachments"
|
||||
Me.aViewAttachments_COC.ConfirmationMessage = Nothing
|
||||
Me.aViewAttachments_COC.Id = "aViewAttachments_COC"
|
||||
Me.aViewAttachments_COC.ImageName = "printer_view"
|
||||
Me.aViewAttachments_COC.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
|
||||
Me.aViewAttachments_COC.Shortcut = Nothing
|
||||
Me.aViewAttachments_COC.Tag = Nothing
|
||||
Me.aViewAttachments_COC.TargetObjectsCriteria = Nothing
|
||||
Me.aViewAttachments_COC.TargetViewId = ""
|
||||
Me.aViewAttachments_COC.ToolTip = Nothing
|
||||
Me.aViewAttachments_COC.TypeOfView = Nothing
|
||||
'
|
||||
'aRecalculateCOC
|
||||
'
|
||||
Me.aRecalculateCOC.Caption = "Recalculate COC"
|
||||
Me.aRecalculateCOC.Category = "ObjectsCreation"
|
||||
Me.aRecalculateCOC.ConfirmationMessage = "Do you want to execute command ?"
|
||||
Me.aRecalculateCOC.Id = "aRecalculateCOC"
|
||||
Me.aRecalculateCOC.Shortcut = Nothing
|
||||
Me.aRecalculateCOC.Tag = Nothing
|
||||
Me.aRecalculateCOC.TargetObjectsCriteria = Nothing
|
||||
Me.aRecalculateCOC.TargetViewId = Nothing
|
||||
Me.aRecalculateCOC.ToolTip = Nothing
|
||||
Me.aRecalculateCOC.TypeOfView = Nothing
|
||||
|
||||
End Sub
|
||||
Friend WithEvents aFinalCOC As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aPrintCertificateOfContract As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aStornoCOC As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aMakeEditableCOC As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aViewRegistry_COC As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aViewAttachments_COC As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aRecalculateCOC As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
|
||||
End Class
|
||||
+144
@@ -0,0 +1,144 @@
|
||||
<?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="aFinalCOC.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 56</value>
|
||||
</metadata>
|
||||
<metadata name="aPrintCertificateOfContract.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 134</value>
|
||||
</metadata>
|
||||
<metadata name="aStornoCOC.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 173</value>
|
||||
</metadata>
|
||||
<metadata name="aMakeEditableCOC.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 95</value>
|
||||
</metadata>
|
||||
<metadata name="aViewRegistry_COC.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 251</value>
|
||||
</metadata>
|
||||
<metadata name="aViewAttachments_COC.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 212</value>
|
||||
</metadata>
|
||||
<metadata name="aRecalculateCOC.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>174, 212</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
</root>
|
||||
+227
@@ -0,0 +1,227 @@
|
||||
Imports System
|
||||
Imports System.ComponentModel
|
||||
Imports System.Collections.Generic
|
||||
Imports System.Diagnostics
|
||||
Imports System.Text
|
||||
|
||||
Imports DevExpress.ExpressApp
|
||||
Imports DevExpress.ExpressApp.Actions
|
||||
Imports DevExpress.Persistent.Base
|
||||
Imports DevExpress.Data.Filtering
|
||||
Imports DevExpress.ExpressApp.SystemModule
|
||||
Imports DevExpress.ExpressApp.CloneObject
|
||||
Imports DevExpress.Xpo
|
||||
Imports DevExpress.Persistent.BaseImpl
|
||||
|
||||
Public Class CertificateOfContractVC
|
||||
Inherits DevExpress.ExpressApp.ViewController
|
||||
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()
|
||||
|
||||
'This call is required by the Component Designer.
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
|
||||
End Sub
|
||||
Protected Overrides Sub OnActivated()
|
||||
Dim _CertificateofContractHeader As CertificateofContractHeader
|
||||
MyBase.OnActivated()
|
||||
'-- Általános letiltás --------------------------------------------------------------------------------------------------------------------------
|
||||
Frame.GetController(Of CertificateOfContractVC).aFinalCOC.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of CertificateOfContractVC).aPrintCertificateOfContract.Active.SetItemValue("", False) ' -- Teljesítési igazolás nyomtatása
|
||||
Frame.GetController(Of CertificateOfContractVC).aMakeEditableCOC.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of CertificateOfContractVC).aStornoCOC.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of CertificateOfContractVC).aViewAttachments_COC.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of CertificateOfContractVC).aViewRegistry_COC.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of CertificateOfContractVC).aRecalculateCOC.Active.SetItemValue("", False)
|
||||
'------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
If View.Id = "CertificateofContractHeader_ListView_NotEditable" Then
|
||||
Frame.GetController(Of CertificateOfContractVC).aPrintCertificateOfContract.Active.SetItemValue("", True)
|
||||
Frame.GetController(Of CertificateOfContractVC).aMakeEditableCOC.Active.SetItemValue("", True)
|
||||
Frame.GetController(Of CertificateOfContractVC).aStornoCOC.Active.SetItemValue("", True)
|
||||
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of CertificateOfContractVC).aRecalculateCOC.Active.SetItemValue("", True)
|
||||
End If
|
||||
If View.Id = "CertificateofContractHeader_DetailView" Then
|
||||
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", False)
|
||||
_CertificateofContractHeader = View.SelectedObjects(0)
|
||||
If _CertificateofContractHeader IsNot Nothing Then
|
||||
If _CertificateofContractHeader.IsEditable = True Then
|
||||
Frame.GetController(Of CertificateOfContractVC).aFinalCOC.Active.SetItemValue("", True)
|
||||
Frame.GetController(Of ModificationsController).SaveAction.Active.SetItemValue("", True)
|
||||
Frame.GetController(Of ModificationsController).SaveAndCloseAction.Active.SetItemValue("", True)
|
||||
Frame.GetController(Of ModificationsController).SaveAndNewAction.Active.SetItemValue("", True)
|
||||
Else
|
||||
Frame.GetController(Of ModificationsController).SaveAction.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of ModificationsController).SaveAndCloseAction.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of ModificationsController).SaveAndNewAction.Active.SetItemValue("", False)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
If View.Id = "CertificateofContractHeader_CertificateofContractRows_ListView" Then
|
||||
Frame.GetController(Of LinkUnlinkController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of CertificateOfContractVC).aViewAttachments_COC.Active.SetItemValue("", True)
|
||||
Frame.GetController(Of CertificateOfContractVC).aViewRegistry_COC.Active.SetItemValue("", True)
|
||||
|
||||
If TryCast(TryCast(View, ListView).CollectionSource, PropertyCollectionSource).MasterObject IsNot Nothing Then
|
||||
_CertificateofContractHeader = TryCast(TryCast(TryCast(View, ListView).CollectionSource, PropertyCollectionSource).MasterObject, CertificateofContractHeader)
|
||||
If _CertificateofContractHeader IsNot Nothing Then
|
||||
If _CertificateofContractHeader.IsEditable = False Then
|
||||
Frame.GetController(Of NewObjectViewController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of ModificationsController).Active.SetItemValue("", False)
|
||||
Else
|
||||
Frame.GetController(Of NewObjectViewController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of ModificationsController).Active.SetItemValue("", True)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
If View.Id = "Contracts_LookupListView" Then
|
||||
'Frame.GetController(Of NewObjectViewController).NewObjectAction.Active.SetItemValue("", False)
|
||||
End If
|
||||
If View.Id = "CertificateofContractRows_DetailView" Then
|
||||
Dim _CertificateofContractRows As CertificateofContractRows = TryCast(View.SelectedObjects(0), CertificateofContractRows)
|
||||
If _CertificateofContractRows.CertificateofContractHeader.IsEditable = False Then
|
||||
Frame.GetController(Of NewItemRowListViewController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of ModificationsController).Active.SetItemValue("", False)
|
||||
Else
|
||||
Frame.GetController(Of NewItemRowListViewController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of ModificationsController).Active.SetItemValue("", True)
|
||||
End If
|
||||
Frame.GetController(Of CertificateOfContractVC).aViewAttachments_COC.Active.SetItemValue("", True)
|
||||
Frame.GetController(Of CertificateOfContractVC).aViewRegistry_COC.Active.SetItemValue("", True)
|
||||
If _CertificateofContractRows.CertificateofContractHeader IsNot Nothing Then
|
||||
If _CertificateofContractRows.CertificateofContractHeader.IsEditable = False Then
|
||||
Frame.GetController(Of ModificationsController).SaveAction.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of ModificationsController).SaveAndCloseAction.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of ModificationsController).SaveAndNewAction.Active.SetItemValue("", False)
|
||||
Else
|
||||
Frame.GetController(Of ModificationsController).SaveAction.Active.SetItemValue("", True)
|
||||
Frame.GetController(Of ModificationsController).SaveAndCloseAction.Active.SetItemValue("", True)
|
||||
Frame.GetController(Of ModificationsController).SaveAndNewAction.Active.SetItemValue("", True)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Protected Overrides Sub OnDeactivated()
|
||||
MyBase.OnDeactivated()
|
||||
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of ModificationsController).SaveAction.Active.SetItemValue("", True)
|
||||
End Sub
|
||||
Private Sub aPrintCertificateOfContract_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aPrintCertificateOfContract.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _CertificateofContractHeader As CertificateofContractHeader
|
||||
|
||||
Dim _ReportData As ReportData
|
||||
If e.SelectedObjects.Count > 0 Then
|
||||
_CertificateofContractHeader = e.SelectedObjects.Item(0)
|
||||
_ReportData = _ocur.FindObject(Of ReportData)(CriteriaOperator.Parse("Oid=?", _CertificateofContractHeader.Contracts.ContractTemplate.COC_ReportData.Oid), True)
|
||||
If _ReportData Is Nothing Or _CertificateofContractHeader Is Nothing Then
|
||||
Else
|
||||
Frame.GetController(Of Reports.ReportServiceController).ShowPreview(_ReportData, CriteriaOperator.Parse("CertificateofContractHeader.DocumentNumber =?", _CertificateofContractHeader.DocumentNumber), True)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub aFinalCOC_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aFinalCOC.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _CertificateofContractHeader As CertificateofContractHeader = TryCast(View.SelectedObjects(0), CertificateofContractHeader)
|
||||
|
||||
If _CertificateofContractHeader IsNot Nothing Then
|
||||
_CertificateofContractHeader.IsEditable = False
|
||||
_CertificateofContractHeader.IsStorno = False
|
||||
_ocur.CommitChanges()
|
||||
View.Close()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub aMakeEditableCOC_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aMakeEditableCOC.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _CertificateofContractHeader As CertificateofContractHeader = TryCast(View.SelectedObjects(0), CertificateofContractHeader)
|
||||
|
||||
If _CertificateofContractHeader IsNot Nothing Then
|
||||
If _CertificateofContractHeader.IsEditable = False And _CertificateofContractHeader.IsStorno = False Then
|
||||
_CertificateofContractHeader.IsEditable = True
|
||||
_ocur.CommitChanges()
|
||||
View.Refresh()
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub aStornoCOC_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aStornoCOC.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _CertificateofContractHeader As CertificateofContractHeader = TryCast(View.SelectedObjects(0), CertificateofContractHeader)
|
||||
Dim _CertificateofContractRows As CertificateofContractRows
|
||||
|
||||
|
||||
If _CertificateofContractHeader IsNot Nothing Then
|
||||
If _CertificateofContractHeader.IsEditable = False And _CertificateofContractHeader.IsStorno = False Then
|
||||
For Each _CertificateofContractRows In _CertificateofContractHeader.CertificateofContractRows
|
||||
_CertificateofContractRows.ContractRows = Nothing
|
||||
Next
|
||||
_CertificateofContractHeader.IsStorno = True
|
||||
_CertificateofContractHeader.IsEditable = False
|
||||
End If
|
||||
_ocur.CommitChanges()
|
||||
View.Refresh()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub aViewRegistry_COC_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aViewRegistry_COC.Execute
|
||||
Dim _CertificateofContractRows As CertificateofContractRows = TryCast(View.SelectedObjects(0), CertificateofContractRows)
|
||||
|
||||
If _CertificateofContractRows IsNot Nothing Then
|
||||
If _CertificateofContractRows.ContractRows IsNot Nothing Then
|
||||
If _CertificateofContractRows.ContractRows.RegistryRowsFinancialControlling IsNot Nothing Then
|
||||
Dim _CustomersFrom As CustomersFrom = _CertificateofContractRows.ContractRows.RegistryRowsFinancialControlling.RegistryHeader.CustomersFrom
|
||||
Dim _Customers As Customers = _CertificateofContractRows.ContractRows.RegistryRowsFinancialControlling.RegistryHeader.Customers
|
||||
Dim _DocumentNumber As String = _CertificateofContractRows.ContractRows.RegistryRowsFinancialControlling.RegistryHeader.DocumentNumber
|
||||
ViewRegistry.ViewRegistry(View.ObjectSpace, Application, e, _CustomersFrom, _Customers, _DocumentNumber)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub aViewAttachments_COC_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aViewAttachments_COC.Execute
|
||||
Dim _CertificateofContractRows As CertificateofContractRows = TryCast(View.SelectedObjects(0), CertificateofContractRows)
|
||||
If _CertificateofContractRows IsNot Nothing Then
|
||||
If _CertificateofContractRows.ContractRows IsNot Nothing Then
|
||||
If _CertificateofContractRows.ContractRows.RegistryRowsFinancialControlling IsNot Nothing Then
|
||||
Dim _CustomersFrom As CustomersFrom = _CertificateofContractRows.ContractRows.RegistryRowsFinancialControlling.RegistryHeader.CustomersFrom
|
||||
Dim _Customers As Customers = _CertificateofContractRows.ContractRows.RegistryRowsFinancialControlling.RegistryHeader.Customers
|
||||
Dim _DocumentNumber As String = _CertificateofContractRows.ContractRows.RegistryRowsFinancialControlling.RegistryHeader.DocumentNumber
|
||||
ViewAttachments.ViewAttachments(View.ObjectSpace, Frame, _CustomersFrom, _Customers, _DocumentNumber, "")
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub aRecalculateCOC_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aRecalculateCOC.Execute
|
||||
Dim _CertificateofContractHeader As CertificateofContractHeader
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _uow As New UnitOfWork(_ocur.Session.DataLayer)
|
||||
|
||||
RaiseEvent InitWork(1, 1, View.SelectedObjects.Count)
|
||||
For Each _CertificateofContractHeader In View.SelectedObjects
|
||||
RaiseEvent DoWork()
|
||||
_CertificateofContractHeader.Recalculate(_uow, _CertificateofContractHeader, False)
|
||||
Next
|
||||
_uow.CommitChanges()
|
||||
RaiseEvent FinalWork
|
||||
View.Refresh()
|
||||
End Sub
|
||||
End Class
|
||||
+185
@@ -0,0 +1,185 @@
|
||||
Imports System
|
||||
Imports System.ComponentModel
|
||||
Imports DevExpress.Xpo
|
||||
Imports DevExpress.Data.Filtering
|
||||
Imports DevExpress.ExpressApp
|
||||
Imports DevExpress.Persistent.Base
|
||||
Imports DevExpress.Persistent.BaseImpl
|
||||
Imports DevExpress.Persistent.Validation
|
||||
Imports DevExpress.ExpressApp.SystemModule
|
||||
Imports DevExpress.Persistent.Base.Security
|
||||
Imports DevExpress.ExpressApp.ConditionalAppearance
|
||||
Imports DevExpress.ExpressApp.Filtering
|
||||
|
||||
<DefaultClassOptions()> _
|
||||
<NavigationItem("Contracts")> _
|
||||
<Appearance("Hide ReportHeader in COC when IsEditable=False", AppearanceItemType:="ViewItem", TargetItems:="ReportHeader;ReportFooter", Criteria:="IsEditable=False", Visibility:=DevExpress.ExpressApp.Editors.ViewItemVisibility.Hide)> _
|
||||
Public Class CertificateofContractHeader
|
||||
Inherits BaseObject
|
||||
Private _Contracts As Contracts
|
||||
Private _DateExecution As Date
|
||||
Private _DocumentNumber As String
|
||||
Private _IsStorno As Boolean = False
|
||||
Private _IsEditable As Boolean = True
|
||||
Private _DateCreated As Date
|
||||
Private _ReportHeader As String
|
||||
Private _ReportFooter As String
|
||||
Private _ObjectCreated As Date
|
||||
Private _UserCreated As User
|
||||
Private _AmountHUF As Double
|
||||
Private _AmountDEV As Double
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Protected Overrides Sub OnSaving()
|
||||
MyBase.OnSaving()
|
||||
If DocumentNumber Is Nothing Then
|
||||
If _Contracts IsNot Nothing Then
|
||||
If _Contracts.ContractTemplate.COC_NumberGenerator IsNot Nothing Then
|
||||
_DocumentNumber = _Contracts.ContractTemplate.COC_NumberGenerator.GetNewNumber(_Contracts.ContractTemplate.COC_NumberGenerator)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
If Session.IsNewObject(Me) Then
|
||||
ObjectCreated = GetSQLTime(Session)
|
||||
UserCreated = Session.GetObjectByKey(Of User)(Session.GetKeyValue(SecuritySystem.CurrentUser))
|
||||
End If
|
||||
End Sub
|
||||
<RuleRequiredField("CertificateofContractHeader-Contracts", DefaultContexts.Save)>
|
||||
<ImmediatePostData(True), DataSourceCriteria("ContractTemplate.PartnerType=1 AND ContractTemplate.IsTechnical=False AND (State = 1 OR State = 2)")>
|
||||
Property Contracts() As Contracts
|
||||
Get
|
||||
Return _Contracts
|
||||
|
||||
End Get
|
||||
Set(ByVal value As Contracts)
|
||||
SetPropertyValue("Contracts", _Contracts, value)
|
||||
End Set
|
||||
End Property
|
||||
<RuleRequiredField("CertificateofContractHeader-DateExecution", DefaultContexts.Save)> _
|
||||
Property DateExecution() As Date
|
||||
Get
|
||||
Return _DateExecution
|
||||
End Get
|
||||
Set(ByVal value As Date)
|
||||
SetPropertyValue("DateExecution", _DateExecution, value)
|
||||
End Set
|
||||
End Property
|
||||
<NonCloneable()> _
|
||||
Property DocumentNumber As String
|
||||
Get
|
||||
Return _DocumentNumber
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
SetPropertyValue("DocumentNumber", _DocumentNumber, value)
|
||||
End Set
|
||||
End Property
|
||||
Property IsStorno As Boolean
|
||||
Get
|
||||
Return _IsStorno
|
||||
End Get
|
||||
Set(ByVal value As Boolean)
|
||||
SetPropertyValue("IsStorno", _IsStorno, value)
|
||||
End Set
|
||||
End Property
|
||||
Property IsEditable As Boolean
|
||||
Get
|
||||
Return _IsEditable
|
||||
End Get
|
||||
Set(ByVal value As Boolean)
|
||||
SetPropertyValue("IsEditable", _IsEditable, value)
|
||||
End Set
|
||||
End Property
|
||||
<Size(-1)> _
|
||||
Property ReportHeader As String
|
||||
Get
|
||||
Return _ReportHeader
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
SetPropertyValue("ReportHeader", _ReportHeader, value)
|
||||
End Set
|
||||
End Property
|
||||
<Size(-1)> _
|
||||
Property ReportFooter As String
|
||||
Get
|
||||
Return _ReportFooter
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
SetPropertyValue("ReportFooter", _ReportFooter, value)
|
||||
End Set
|
||||
End Property
|
||||
<NonCloneable> _
|
||||
Property ObjectCreated As Date
|
||||
Get
|
||||
Return _ObjectCreated
|
||||
End Get
|
||||
Set(value As Date)
|
||||
SetPropertyValue("ObjectCreated", _ObjectCreated, value)
|
||||
End Set
|
||||
End Property
|
||||
<NonCloneable> _
|
||||
Property UserCreated As User
|
||||
Get
|
||||
Return _UserCreated
|
||||
End Get
|
||||
Set(value As User)
|
||||
SetPropertyValue("UserCreated", _UserCreated, value)
|
||||
End Set
|
||||
End Property
|
||||
Property AmountHUF As Double
|
||||
Get
|
||||
Return _AmountHUF
|
||||
End Get
|
||||
Set(value As Double)
|
||||
SetPropertyValue("AmountHUF", _AmountHUF, value)
|
||||
End Set
|
||||
End Property
|
||||
Property AmountDEV As Double
|
||||
Get
|
||||
Return _AmountDEV
|
||||
End Get
|
||||
Set(value As Double)
|
||||
SetPropertyValue("AmountDEV", _AmountDEV, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
ReadOnly Property DisplayName As String
|
||||
Get
|
||||
If Contracts IsNot Nothing Then
|
||||
Return DocumentNumber & ", " & Contracts.DisplayName
|
||||
Else
|
||||
Return "<>"
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
<Association("CertificateofContractHeader-CertificateofContractRows", GetType(CertificateofContractRows)), VisibleInListView(False)> _
|
||||
ReadOnly Property CertificateofContractRows As XPCollection(Of CertificateofContractRows)
|
||||
Get
|
||||
Return GetCollection(Of CertificateofContractRows)("CertificateofContractRows")
|
||||
End Get
|
||||
End Property
|
||||
Sub Recalculate(_uow As UnitOfWork, _CertificateofContractHeader As CertificateofContractHeader, Optional _WidthCommit As Boolean = False)
|
||||
Dim _CertificateofContractRows As CertificateofContractRows
|
||||
Dim _AmountHUF As Double = 0
|
||||
Dim _AmountDEV As Double = 0
|
||||
On Error GoTo CheckError
|
||||
|
||||
_CertificateofContractHeader.AmountHUF = 0
|
||||
_CertificateofContractHeader.AmountDEV = 0
|
||||
For Each _CertificateofContractRows In _CertificateofContractHeader.CertificateofContractRows
|
||||
_AmountHUF += _CertificateofContractRows.ContractRows.QTT * _CertificateofContractRows.ContractRows.NettoPriceHUF
|
||||
_AmountDEV += _CertificateofContractRows.ContractRows.QTT * _CertificateofContractRows.ContractRows.NettoPriceDEV
|
||||
Next
|
||||
_CertificateofContractHeader.AmountHUF = _AmountHUF
|
||||
_CertificateofContractHeader.AmountDEV = _AmountDEV
|
||||
|
||||
If _WidthCommit Then _uow.CommitChanges()
|
||||
Exit Sub
|
||||
|
||||
CheckError:
|
||||
|
||||
If Err.Number = 13 Then Resume Next
|
||||
If Err.Number = 91 Then Resume Next
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
Imports System
|
||||
Imports System.ComponentModel
|
||||
Imports DevExpress.Xpo
|
||||
Imports DevExpress.Data.Filtering
|
||||
Imports DevExpress.ExpressApp
|
||||
Imports DevExpress.Persistent.Base
|
||||
Imports DevExpress.Persistent.BaseImpl
|
||||
Imports DevExpress.Persistent.Validation
|
||||
Imports DevExpress.ExpressApp.SystemModule
|
||||
Imports DevExpress.Persistent.Base.Security
|
||||
Imports DevExpress.ExpressApp.ConditionalAppearance
|
||||
Imports DevExpress.ExpressApp.Filtering
|
||||
|
||||
<DefaultClassOptions()> _
|
||||
<NavigationItem(False), CreatableItem(False)> _
|
||||
<DefaultProperty("DisplayName")> _
|
||||
Public Class CertificateofContractRows
|
||||
Inherits BaseObject
|
||||
Private _CertificateofContractHeader As CertificateofContractHeader
|
||||
Private _ContractRows As ContractRows
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
<Association("CertificateofContractHeader-CertificateofContractRows", GetType(CertificateofContractHeader))> _
|
||||
Property CertificateofContractHeader() As CertificateofContractHeader
|
||||
Get
|
||||
Return _CertificateofContractHeader
|
||||
End Get
|
||||
Set(ByVal value As CertificateofContractHeader)
|
||||
SetPropertyValue("CertificateofContractHeader", _CertificateofContractHeader, value)
|
||||
End Set
|
||||
End Property
|
||||
<ImmediatePostData(True), DataSourceCriteria("Contracts='@This.CertificateofContractHeader.Contracts' and isnull(CertificateofContractRows)=True")>
|
||||
Property ContractRows As ContractRows
|
||||
Get
|
||||
Return _ContractRows
|
||||
End Get
|
||||
Set(ByVal value As ContractRows)
|
||||
SetPropertyValue("ContractRows", _ContractRows, value)
|
||||
|
||||
End Set
|
||||
End Property
|
||||
ReadOnly Property DisplayName
|
||||
Get
|
||||
If Session.IsObjectsLoading = False And Session.IsObjectsSaving = False Then
|
||||
Return _CertificateofContractHeader.Contracts.CustomersFrom.FullName & ", " & _CertificateofContractHeader.DateExecution
|
||||
Else
|
||||
Return ""
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
Reference in New Issue
Block a user