First create solution

This commit is contained in:
2017-03-08 11:21:27 +01:00
commit a2fb86bacf
5508 changed files with 1082238 additions and 0 deletions
@@ -0,0 +1,142 @@
Partial Class TakeOverProtocolVC
<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.aToTable_TPR = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aToTableD_TPR = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aFinalize_TPR = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aStorno_TPR = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aPrint_TPR = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aBakToEdit_TPR = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
'
'aToTable_TPR
'
Me.aToTable_TPR.Caption = "aToTable_TPR"
Me.aToTable_TPR.Category = "aToTable_TPR"
Me.aToTable_TPR.ConfirmationMessage = Nothing
Me.aToTable_TPR.Id = "aToTable_TPR"
Me.aToTable_TPR.ImageName = Nothing
Me.aToTable_TPR.Shortcut = Nothing
Me.aToTable_TPR.Tag = Nothing
Me.aToTable_TPR.TargetObjectsCriteria = Nothing
Me.aToTable_TPR.TargetObjectType = GetType(Nuvolar.[Module].TakeoverProtocolHeader)
Me.aToTable_TPR.TargetViewId = ""
Me.aToTable_TPR.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
Me.aToTable_TPR.ToolTip = Nothing
Me.aToTable_TPR.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
'
'aToTableD_TPR
'
Me.aToTableD_TPR.Caption = "aToTableD_TPR"
Me.aToTableD_TPR.Category = "aToTableD_TPR"
Me.aToTableD_TPR.ConfirmationMessage = Nothing
Me.aToTableD_TPR.Id = "aToTableD_TPR"
Me.aToTableD_TPR.ImageName = Nothing
Me.aToTableD_TPR.Shortcut = Nothing
Me.aToTableD_TPR.Tag = Nothing
Me.aToTableD_TPR.TargetObjectsCriteria = Nothing
Me.aToTableD_TPR.TargetObjectType = GetType(Nuvolar.[Module].TakeoverProtocolHeader)
Me.aToTableD_TPR.TargetViewId = ""
Me.aToTableD_TPR.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
Me.aToTableD_TPR.ToolTip = Nothing
Me.aToTableD_TPR.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
'
'aFinalize_TPR
'
Me.aFinalize_TPR.Caption = "aFinalize_TPR"
Me.aFinalize_TPR.Category = "ObjectsCreation"
Me.aFinalize_TPR.ConfirmationMessage = "Do you want to execute command?"
Me.aFinalize_TPR.Id = "aFinalize_TPR"
Me.aFinalize_TPR.ImageName = Nothing
Me.aFinalize_TPR.Shortcut = Nothing
Me.aFinalize_TPR.Tag = Nothing
Me.aFinalize_TPR.TargetObjectsCriteria = Nothing
Me.aFinalize_TPR.TargetObjectType = GetType(Nuvolar.[Module].TakeoverProtocolHeader)
Me.aFinalize_TPR.TargetViewId = ""
Me.aFinalize_TPR.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
Me.aFinalize_TPR.ToolTip = Nothing
Me.aFinalize_TPR.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
'
'aStorno_TPR
'
Me.aStorno_TPR.Caption = "aStorno_TPR"
Me.aStorno_TPR.Category = ""
Me.aStorno_TPR.ConfirmationMessage = "Do you want to execute command?"
Me.aStorno_TPR.Id = "aStorno_TPR"
Me.aStorno_TPR.ImageName = Nothing
Me.aStorno_TPR.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
Me.aStorno_TPR.Shortcut = Nothing
Me.aStorno_TPR.Tag = Nothing
Me.aStorno_TPR.TargetObjectsCriteria = "IsEditable=False AND IsStorno=False"
Me.aStorno_TPR.TargetObjectType = GetType(Nuvolar.[Module].TakeoverProtocolHeader)
Me.aStorno_TPR.TargetViewId = ""
Me.aStorno_TPR.TargetViewType = DevExpress.ExpressApp.ViewType.ListView
Me.aStorno_TPR.ToolTip = Nothing
Me.aStorno_TPR.TypeOfView = GetType(DevExpress.ExpressApp.ListView)
'
'aPrint_TPR
'
Me.aPrint_TPR.Caption = "aPrint_TPR"
Me.aPrint_TPR.Category = ""
Me.aPrint_TPR.ConfirmationMessage = Nothing
Me.aPrint_TPR.Id = "aPrint_TPR"
Me.aPrint_TPR.ImageName = Nothing
Me.aPrint_TPR.Shortcut = Nothing
Me.aPrint_TPR.Tag = Nothing
Me.aPrint_TPR.TargetObjectsCriteria = Nothing
Me.aPrint_TPR.TargetObjectType = GetType(Nuvolar.[Module].TakeoverProtocolHeader)
Me.aPrint_TPR.TargetViewId = Nothing
Me.aPrint_TPR.TargetViewType = DevExpress.ExpressApp.ViewType.ListView
Me.aPrint_TPR.ToolTip = Nothing
Me.aPrint_TPR.TypeOfView = GetType(DevExpress.ExpressApp.ListView)
'
'aBakToEdit_TPR
'
Me.aBakToEdit_TPR.Caption = "aBakToEdit_TPR"
Me.aBakToEdit_TPR.Category = "ObjectsCreation"
Me.aBakToEdit_TPR.ConfirmationMessage = "Do you want to execute command?"
Me.aBakToEdit_TPR.Id = "aBakToEdit_TPR"
Me.aBakToEdit_TPR.ImageName = Nothing
Me.aBakToEdit_TPR.Shortcut = Nothing
Me.aBakToEdit_TPR.Tag = Nothing
Me.aBakToEdit_TPR.TargetObjectsCriteria = Nothing
Me.aBakToEdit_TPR.TargetObjectType = GetType(Nuvolar.[Module].TakeoverProtocolHeader)
Me.aBakToEdit_TPR.TargetViewId = Nothing
Me.aBakToEdit_TPR.TargetViewType = DevExpress.ExpressApp.ViewType.ListView
Me.aBakToEdit_TPR.ToolTip = Nothing
Me.aBakToEdit_TPR.TypeOfView = GetType(DevExpress.ExpressApp.ListView)
End Sub
Friend WithEvents aToTable_TPR As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aToTableD_TPR As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aFinalize_TPR As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aStorno_TPR As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aPrint_TPR As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aBakToEdit_TPR As DevExpress.ExpressApp.Actions.SimpleAction
End Class
@@ -0,0 +1,141 @@
<?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="aToTable_TPR.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 56</value>
</metadata>
<metadata name="aToTableD_TPR.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 134</value>
</metadata>
<metadata name="aFinalize_TPR.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 212</value>
</metadata>
<metadata name="aStorno_TPR.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 95</value>
</metadata>
<metadata name="aPrint_TPR.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 173</value>
</metadata>
<metadata name="aBakToEdit_TPR.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>141, 173</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,213 @@
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.CloneObject
Imports DevExpress.ExpressApp.SystemModule
Imports DevExpress.ExpressApp.Editors
Imports DevExpress.Data.Filtering
Imports DevExpress.ExpressApp.Utils
Imports DevExpress.Persistent.BaseImpl
Public Class TakeOverProtocolVC
Inherits DevExpress.ExpressApp.ViewController
Public Sub New()
MyBase.New()
InitializeComponent()
RegisterActions(components)
End Sub
Protected Overrides Sub OnActivated()
MyBase.OnActivated()
If View.Id = "TakeoverProtocolHeader_ListView" Then
Frame.GetController(Of CloneObject.CloneObjectViewController).Active.SetItemValue("", False)
End If
If View.Id = "TakeoverProtocolHeader_TakeOverProtocolRows_ListView" Then
Frame.GetController(Of LinkUnlinkController)().Active.SetItemValue("", False)
Frame.GetController(Of NewObjectViewController)().Active.SetItemValue("", False)
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", False)
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", False)
End If
If View.Id = "TakeoverProtocolRows_ListView_Finalized" Then
Frame.GetController(Of NewObjectViewController)().Active.SetItemValue("", False)
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", False)
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", False)
AddHandler Frame.GetController(Of ListViewProcessCurrentObjectController).ProcessCurrentObjectAction.Executing, AddressOf TakeoverProtocolRows_ListView_Finalized_ProcessCurrentObjectAction_Executing
End If
'--------------------DetailView-----------------------
If View.Id = "TakeoverProtocolHeader_DetailView" Then
Frame.GetController(Of NewObjectViewController).Active.SetItemValue("", False)
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", False)
End If
End Sub
Protected Overrides Sub OnDeactivated()
MyBase.OnDeactivated()
If View.Id = "TakeoverProtocolHeader_ListView" Then
Frame.GetController(Of CloneObject.CloneObjectViewController).Active.SetItemValue("", True)
End If
If View.Id = "TakeoverProtocolHeader_TakeOverProtocolRows_ListView" Then
Frame.GetController(Of LinkUnlinkController)().Active.SetItemValue("", True)
Frame.GetController(Of NewObjectViewController)().Active.SetItemValue("", True)
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", True)
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", True)
End If
If View.Id = "TakeoverProtocolRows_ListView_Finalized" Then
Frame.GetController(Of NewObjectViewController)().Active.SetItemValue("", True)
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", True)
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", True)
RemoveHandler Frame.GetController(Of ListViewProcessCurrentObjectController).ProcessCurrentObjectAction.Executing, AddressOf TakeoverProtocolRows_ListView_Finalized_ProcessCurrentObjectAction_Executing
End If
'--------------------DetailView-----------------------
If View.Id = "TakeoverProtocolHeader_DetailView" Then
Frame.GetController(Of NewObjectViewController).Active.SetItemValue("", True)
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", True)
End If
End Sub
Private Sub aToTable_TPR_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aToTable_TPR.Execute
Try
Dim _ocur As Xpo.XPObjectSpace = View.ObjectSpace
Dim _TakeoverProtocolHeader As TakeoverProtocolHeader = TryCast(View.SelectedObjects(0), TakeoverProtocolHeader)
If _TakeoverProtocolHeader Is Nothing Then Throw New Exception("*Váratlan hiba történt, a folyamat megszakadt!")
Dim _TakeoverProtocolRows As TakeoverProtocolRows = _ocur.CreateObject(Of TakeoverProtocolRows)()
_TakeoverProtocolRows.TakeoverProtocolHeader = _TakeoverProtocolHeader
_TakeoverProtocolRows.Installation = _TakeoverProtocolHeader.row_Installation
_TakeoverProtocolRows.UniqueObjects = _TakeoverProtocolHeader.row_UniqueObjects
_TakeoverProtocolHeader.row_Installation.TakeoverProtocolRows = _TakeoverProtocolRows
_ocur.CommitChanges()
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, String.Format(CaptionHelper.GetLocalizedText("Exceptions\NuvolarExceptions", "MsgBoxCheckItAgain")))
Finally
Dim _TakeoverProtocolHeader As TakeoverProtocolHeader = TryCast(View.SelectedObjects(0), TakeoverProtocolHeader)
_TakeoverProtocolHeader.row_Installation = Nothing
_TakeoverProtocolHeader.row_UniqueObjects = Nothing
Dim ItemToFocus As ViewItem = TryCast(View, DetailView).FindItem("row_Installation")
If ItemToFocus IsNot Nothing Then
Dim ItemControl As Object
ItemControl = ItemToFocus.Control
ItemControl.Focus()
End If
End Try
End Sub
Private Sub aToTableD_TPR_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aToTableD_TPR.Execute
Try
Dim _ocur As Xpo.XPObjectSpace = View.ObjectSpace
Dim _TakeoverProtocolHeader As TakeoverProtocolHeader = TryCast(View.SelectedObjects(0), TakeoverProtocolHeader)
If _TakeoverProtocolHeader Is Nothing Then Throw New Exception("*Váratlan hiba történt, a folyamat megszakadt!")
Dim _TakeoverProtocolRows_ListEditor As ListPropertyEditor = TryCast(View, DetailView).FindItem("TakeOverProtocolRows")
If _TakeoverProtocolRows_ListEditor.ListView.SelectedObjects.Count = 0 Then Throw New Exception("*Nincs kiválasztva egy sor sem!")
Dim _TakeoverProtocolRows_DelList As New ArrayList
For Each _TakeoverProtocolRows As TakeoverProtocolRows In _TakeoverProtocolRows_ListEditor.ListView.SelectedObjects
_TakeoverProtocolRows.Installation.TakeoverProtocolRows = Nothing
_TakeoverProtocolRows_DelList.Add(_TakeoverProtocolRows)
Next
_ocur.Delete(_TakeoverProtocolRows_DelList)
_ocur.CommitChanges()
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, String.Format(CaptionHelper.GetLocalizedText("Exceptions\NuvolarExceptions", "MsgBoxCheckItAgain")))
Finally
Dim nestedFrame As NestedFrame = TryCast(Frame, NestedFrame)
If nestedFrame IsNot Nothing Then
Dim parentView As View = nestedFrame.View
parentView.ObjectSpace.Refresh()
End If
End Try
End Sub
Private Sub aFinalize_TPR_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aFinalize_TPR.Execute
Try
Dim _ocur As Xpo.XPObjectSpace = View.ObjectSpace
Dim _TakeoverProtocolHeader As TakeoverProtocolHeader = TryCast(View.SelectedObjects(0), TakeoverProtocolHeader)
If _TakeoverProtocolHeader Is Nothing Then Throw New Exception("*Váratlan hiba történt, a folyamat megszakadt!")
If _TakeoverProtocolHeader.TakeOverProtocolRows.Count = 0 Then Throw New Exception("*Legalább egy sornak lennie kell, üres átadást nem lehet véglegesíteni!")
_TakeoverProtocolHeader.IsEditable = False
_ocur.CommitChanges()
If _TakeoverProtocolHeader.TakeoverProtocolType.ReportData Is Nothing Then Throw New Exception("*Nincs beállítva nyomtatvány!" + vbNewLine + "Nem lehet bizonylatot nyomtatni. Kérem, ellenőrizze!")
Dim _ReportData As ReportData = _ocur.FindObject(Of ReportData)(CriteriaOperator.Parse("Oid=?", _TakeoverProtocolHeader.TakeoverProtocolType.ReportData.Oid), True)
If _ReportData IsNot Nothing Then
Frame.GetController(Of Reports.ReportServiceController).ShowPreview(_ReportData, CriteriaOperator.Parse("TakeoverProtocolHeader.DocumentNumber=?", _TakeoverProtocolHeader.DocumentNumber), True)
End If
View.Close()
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, String.Format(CaptionHelper.GetLocalizedText("Exceptions\NuvolarExceptions", "MsgBoxCheckItAgain")))
End Try
End Sub
Private Sub aStorno_TPR_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aStorno_TPR.Execute
Try
Dim _ocur As Xpo.XPObjectSpace = View.ObjectSpace
Dim _TakeoverProtocolHeader As TakeoverProtocolHeader = TryCast(View.SelectedObjects(0), TakeoverProtocolHeader)
If _TakeoverProtocolHeader Is Nothing Then Throw New Exception("*Váratlan hiba történt, a folyamat megszakadt!")
If _TakeoverProtocolHeader.IsEditable = True Then Throw New Exception("*Csak végleges átadást lehet sztornírozni!")
_TakeoverProtocolHeader.IsStorno = True
For Each _TakeoverProtocolRows As TakeoverProtocolRows In _TakeoverProtocolHeader.TakeOverProtocolRows
_TakeoverProtocolRows.Installation.TakeoverProtocolRows = Nothing
Next
_ocur.CommitChanges()
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, String.Format(CaptionHelper.GetLocalizedText("Exceptions\NuvolarExceptions", "MsgBoxCheckItAgain")))
End Try
End Sub
Private Sub aPrint_TPR_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aPrint_TPR.Execute
Try
Dim _ocur As Xpo.XPObjectSpace = View.ObjectSpace
Dim _TakeoverProtocolHeader As TakeoverProtocolHeader = TryCast(View.SelectedObjects(0), TakeoverProtocolHeader)
If _TakeoverProtocolHeader Is Nothing Then Throw New Exception("*Váratlan hiba történt, a folyamat megszakadt!")
If _TakeoverProtocolHeader.TakeoverProtocolType.ReportData Is Nothing Then Throw New Exception("*Nincs beállítva nyomtatvány!" + vbNewLine + "Nem lehet bizonylatot nyomtatni. Kérem, ellenőrizze!")
Dim _ReportData As ReportData = _ocur.FindObject(Of ReportData)(CriteriaOperator.Parse("Oid=?", _TakeoverProtocolHeader.TakeoverProtocolType.ReportData.Oid), True)
If _ReportData IsNot Nothing Then Throw New Exception("*Nincs beállítva nyomtatvány!")
Frame.GetController(Of Reports.ReportServiceController).ShowPreview(_ReportData, CriteriaOperator.Parse("TakeoverProtocolHeader.DocumentNumber=?", _TakeoverProtocolHeader.DocumentNumber), True)
View.Close()
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, String.Format(CaptionHelper.GetLocalizedText("Exceptions\NuvolarExceptions", "MsgBoxCheckItAgain")))
End Try
End Sub
Private Sub aBakToEdit_TPR_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aBakToEdit_TPR.Execute
Try
Dim _ocur As Xpo.XPObjectSpace = View.ObjectSpace
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
Dim _TakeoverProtocolHeader As TakeoverProtocolHeader = TryCast(View.SelectedObjects(0), TakeoverProtocolHeader)
If _TakeoverProtocolHeader Is Nothing Then Throw New Exception("*Váratlan hiba történt, a folyamat megszakadt!")
_TakeoverProtocolHeader.IsEditable = True
_ocur.CommitChanges()
e.ShowViewParameters.CreatedView = Application.CreateDetailView(_onew, "TakeoverProtocolHeader_DetailView", False, _onew.GetObject(_TakeoverProtocolHeader))
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, String.Format(CaptionHelper.GetLocalizedText("Exceptions\NuvolarExceptions", "MsgBoxCheckItAgain")))
End Try
End Sub
Private Sub TakeoverProtocolRows_ListView_Finalized_ProcessCurrentObjectAction_Executing(sender As Object, e As CancelEventArgs)
e.Cancel = True
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
Dim _TakeoverProtocolHeader As TakeoverProtocolHeader = TryCast(View.SelectedObjects(0), TakeoverProtocolRows).TakeoverProtocolHeader
Dim _ShowViewParameters As New ShowViewParameters
Dim _ShowViewSource As New ShowViewSource(Frame, Nothing)
_ShowViewParameters.CreatedView = Application.CreateDetailView(_onew, "TakeoverProtocolHeader_DetailView", False, _onew.GetObject(_TakeoverProtocolHeader))
_ShowViewParameters.NewWindowTarget = NewWindowTarget.MdiChild
_ShowViewParameters.TargetWindow = TargetWindow.NewWindow
Application.ShowViewStrategy.ShowView(_ShowViewParameters, _ShowViewSource)
End Sub
End Class
@@ -0,0 +1,182 @@
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.ConditionalAppearance
<DefaultClassOptions()> _
<NavigationItem("BusinessTransactions")> _
<Appearance("Disable ObjectCreated TakeoverProtocolHeader", AppearanceItemType.ViewItem, "1=1", TargetItems:="ObjectCreated", Enabled:=False)> _
<Appearance("Disable UserCreated TakeoverProtocolHeader", AppearanceItemType.ViewItem, "1=1", TargetItems:="UserCreated", Enabled:=False)> _
<Appearance("Disable IsEditable TakeoverProtocolHeader", AppearanceItemType.ViewItem, "1=1", TargetItems:="IsEditable", Enabled:=False)> _
<Appearance("Disable IsStorno TakeoverProtocolHeader", AppearanceItemType.ViewItem, "1=1", TargetItems:="IsStorno", Enabled:=False)> _
<Appearance("Disable DocumentNumber TakeoverProtocolHeader", AppearanceItemType.ViewItem, "1=1", TargetItems:="DocumentNumber", Enabled:=False)> _
<Appearance("Disable all property, when IsEditable=False TakeoverProtocolHeader", AppearanceItemType.ViewItem, "*", TargetItems:="IsEditable=False", Enabled:=False)> _
<Appearance("Disable all property, when IsStorno=False TakeoverProtocolHeader", AppearanceItemType.ViewItem, "*", TargetItems:="IsStorno=False", Enabled:=False)> _
<Appearance("Disable CustomersFrom, when not empty TakeoverProtocolHeader", AppearanceItemType.ViewItem, "IsNull(CustomersFrom)=False", TargetItems:="CustomersFrom", Enabled:=False)> _
<Appearance("Disable Customers, when not empty TakeoverProtocolHeader", AppearanceItemType.ViewItem, "IsNull(Customers)=False", TargetItems:="Customers", Enabled:=False)> _
<Appearance("Disable TakeoverProtocolType, when not empty TakeoverProtocolHeader", AppearanceItemType.ViewItem, "IsNull(TakeoverProtocolType)=False", TargetItems:="TakeoverProtocolType", Enabled:=False)> _
<Appearance("Hide TakeoverProtocolRowsTab TakeoverProtocolHeader", AppearanceItemType.LayoutItem, "IsNull(DocumentNumber) Or IsNull(CustomersFrom) Or IsNull(Customers) Or IsNull(TakeoverProtocolType)", TargetItems:="TakeoverProtocolRowsTab", visibility:=Editors.ViewItemVisibility.Hide)> _
<Appearance("Hide TakeoverProtocolHeader aToTable_TPR when IsEditable = False", AppearanceItemType.Action, "IsEditable = False", TargetItems:="aToTable_TPR", visibility:=Editors.ViewItemVisibility.Hide)> _
<Appearance("Hide TakeoverProtocolHeader aToTableD_TPR when IsEditable = False", AppearanceItemType.Action, "IsEditable = False", TargetItems:="aToTableD_TPR", visibility:=Editors.ViewItemVisibility.Hide)> _
<Appearance("Hide TakeoverProtocolHeader aToTable_TPR when IsStorno = True", AppearanceItemType.Action, "IsStorno = True", TargetItems:="aToTable_TPR", visibility:=Editors.ViewItemVisibility.Hide)> _
<Appearance("Hide TakeoverProtocolHeader aToTableD_TPR when IsStorno = True", AppearanceItemType.Action, "IsStorno = True", TargetItems:="aToTableD_TPR", visibility:=Editors.ViewItemVisibility.Hide)> _
<Appearance("Hide TakeoverProtocolHeader all row properties", AppearanceItemType.LayoutItem, "IsEditable = False OR IsStorno = True", TargetItems:="row_Installation;row_UniqueObjects", visibility:=Editors.ViewItemVisibility.Hide)> _
Public Class TakeoverProtocolHeader
Inherits BaseObject
Private _CustomersFrom As CustomersFrom
Private _DocumentNumber As String
Private _TakeoverProtocolType As TakeoverProtocolType
Private _DateExecution As Date
Private _Customers As Customers
Private _ObjectCreated As Date 'Objektum keletkezésének dátuma
Private _UserCreated As User
Private _IsEditable As Boolean = True
Private _IsStorno As Boolean = False
'--------------NonPersistent--------------
Private _row_Installation As Installation
Private _row_UniqueObjects As UniqueObjects
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
IsEditable = True
End Sub
Protected Overrides Sub OnSaving()
MyBase.OnSaving()
If String.IsNullOrEmpty(DocumentNumber) Then
DocumentNumber = TakeoverProtocolType.NumberGenerator.GetNewNumber(TakeoverProtocolType.NumberGenerator)
End If
If Session.IsNewObject(Me) Then
ObjectCreated = GetSQLTime(Session)
UserCreated = Session.GetObjectByKey(Of User)(Session.GetKeyValue(SecuritySystem.CurrentUser))
End If
End Sub
<RuleRequiredField("TakeoverProtocolHeader-Customers", DefaultContexts.Save)> _
Property Customers() As Customers
Get
Return _Customers
End Get
Set(ByVal value As Customers)
SetPropertyValue("Customers", _Customers, value)
End Set
End Property
Property DocumentNumber() As String
Get
Return _DocumentNumber
End Get
Set(ByVal value As String)
SetPropertyValue("DocumentNumber", _DocumentNumber, value)
End Set
End Property
<RuleRequiredField("TakeoverProtocolHeader-TakeoverProtocolType", DefaultContexts.Save)>
<ImmediatePostData(True), DataSourceCriteria("CustomersFrom='@This.CustomersFrom'")>
Property TakeoverProtocolType As TakeoverProtocolType
Get
Return _TakeoverProtocolType
End Get
Set(value As TakeoverProtocolType)
SetPropertyValue("TakeoverProtocolType", _TakeoverProtocolType, value)
End Set
End Property
<RuleRequiredField("TakeoverProtocolHeader-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
<RuleRequiredField("TakeoverProtocolHeader-CustomersFrom", DefaultContexts.Save)>
Property CustomersFrom() As CustomersFrom
Get
Return _CustomersFrom
End Get
Set(ByVal value As CustomersFrom)
SetPropertyValue("CustomersFrom", _CustomersFrom, 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 IsEditable As Boolean
Get
Return _IsEditable
End Get
Set(value As Boolean)
SetPropertyValue("IsEditable", _IsEditable, value)
End Set
End Property
Property IsStorno As Boolean
Get
Return _IsStorno
End Get
Set(value As Boolean)
SetPropertyValue("IsStorno", _IsStorno, value)
End Set
End Property
'--------------NonPersistent--------------
<NonPersistent()>
<VisibleInListView(False)>
<ImmediatePostData(True), DataSourceProperty("RowInstallationCollection")>
Property row_Installation() As Installation
Get
Return _row_Installation
End Get
Set(ByVal value As Installation)
SetPropertyValue("row_Installation", _row_Installation, value)
End Set
End Property
<NonPersistent()> _
<VisibleInListView(False)> _
Property row_UniqueObjects() As UniqueObjects
Get
Return _row_UniqueObjects
End Get
Set(ByVal value As UniqueObjects)
SetPropertyValue("row_UniqueObjects", _row_UniqueObjects, value)
End Set
End Property
'----------ReadOnly--------------------
<VisibleInListView(False)> _
<Association("TakeOverProtocol", GetType(TakeoverProtocolRows))> _
Public ReadOnly Property TakeOverProtocolRows() As XPCollection(Of TakeoverProtocolRows)
Get
Return GetCollection(Of TakeoverProtocolRows)("TakeOverProtocolRows")
End Get
End Property
<VisibleInListView(False)> _
<Browsable(False)> _
Private ReadOnly Property RowInstallationCollection As XPCollection(Of Installation)
Get
Dim _RowInstallationCollection_Collection As XPCollection(Of Installation)
_RowInstallationCollection_Collection = New XPCollection(Of Installation)(Session, CriteriaOperator.Parse("isnull(TakeoverProtocolRows)=True or (InstallationType.IsVirtual=True)"))
Return _RowInstallationCollection_Collection
End Get
End Property
End Class
@@ -0,0 +1,54 @@
Imports System
Imports System.ComponentModel
Imports DevExpress.Xpo
Imports DevExpress.Data.Filtering
Imports DevExpress.ExpressApp
Imports DevExpress.Persistent.Base
Imports DevExpress.Persistent.BaseImpl
Imports DevExpress.Persistent.Validation
<DefaultClassOptions()> _
<NavigationItem(False), CreatableItem(False)> _
Public Class TakeoverProtocolRows
Inherits BaseObject
Private _Installation As Installation
Private _UniqueObjects As UniqueObjects
Private _TakeOverProtocolHeader As TakeoverProtocolHeader
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Property Installation() As Installation
Get
Return _Installation
End Get
Set(ByVal value As Installation)
SetPropertyValue("Installation", _Installation, value)
End Set
End Property
Property UniqueObjects() As UniqueObjects
Get
Return _UniqueObjects
End Get
Set(ByVal value As UniqueObjects)
SetPropertyValue("UniqueObjects", _UniqueObjects, value)
End Set
End Property
<Association("TakeOverProtocol", GetType(TakeoverProtocolHeader))> _
Property TakeoverProtocolHeader() As TakeoverProtocolHeader
Get
Return _TakeOverProtocolHeader
End Get
Set(ByVal value As TakeoverProtocolHeader)
SetPropertyValue("TakeoverProtocolHeader", _TakeOverProtocolHeader, value)
End Set
End Property
Public Sub AddRows(ByVal _TakeoverProtocolHeader As TakeoverProtocolHeader)
TakeoverProtocolHeader = _TakeoverProtocolHeader
Installation = TakeoverProtocolHeader.Row_Installation
UniqueObjects = TakeoverProtocolHeader.Row_UniqueObjects
Save()
End Sub
End Class
@@ -0,0 +1,88 @@
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.ConditionalAppearance
<DefaultClassOptions()> _
<CreatableItem(False)> _
<NavigationItem("BusinessStocks")> _
<Appearance("Disable InstallationType-ObjectCreated", AppearanceItemType.ViewItem, "1=1", TargetItems:="ObjectCreated", Enabled:=False)> _
<Appearance("Disable InstallationType-UserCreated", AppearanceItemType.ViewItem, "1=1", TargetItems:="UserCreated", Enabled:=False)> _
Public Class TakeoverProtocolType
Inherits BaseObject
Private _CustomersFrom As CustomersFrom
Private _UserCreated As User
Private _ObjectCreated As Date
Private _ShortName As String
Private _NumberGenerator As NumberGenerator
Private _ReportData As ReportData
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Protected Overrides Sub OnSaving()
MyBase.OnSaving()
If Session.IsNewObject(Me) Then
ObjectCreated = GetSQLTime(Session)
UserCreated = Session.GetObjectByKey(Of User)(Session.GetKeyValue(SecuritySystem.CurrentUser))
End If
End Sub
Property CustomersFrom As CustomersFrom
Get
Return _CustomersFrom
End Get
Set(value As CustomersFrom)
SetPropertyValue("CustomersFrom", _CustomersFrom, 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
<NonCloneable> _
Property ObjectCreated As Date
Get
Return _ObjectCreated
End Get
Set(value As Date)
SetPropertyValue("ObjectCreated", _ObjectCreated, value)
End Set
End Property
Property ShortName As String
Get
Return _ShortName
End Get
Set(value As String)
SetPropertyValue("ShortName", _ShortName, value)
End Set
End Property
Property NumberGenerator As NumberGenerator
Get
Return _NumberGenerator
End Get
Set(value As NumberGenerator)
SetPropertyValue("NumberGenerator", _NumberGenerator, value)
End Set
End Property
Property ReportData As ReportData
Get
Return _ReportData
End Get
Set(value As ReportData)
SetPropertyValue("ReportData", _ReportData, value)
End Set
End Property
End Class