First create solution
This commit is contained in:
+45
@@ -0,0 +1,45 @@
|
||||
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()> _
|
||||
<NonPersistent()> _
|
||||
<NavigationItem(False)> _
|
||||
<CreatableItem(False)> _
|
||||
Public Class CopyChartOfAccounts_PopUp
|
||||
Inherits BaseObject
|
||||
|
||||
Private _ChartOfAccountsYear_From As Long
|
||||
Private _ChartOfAccountsYear_To As Long
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
End Sub
|
||||
|
||||
Property ChartOfAccountsYear_From As Long
|
||||
Get
|
||||
Return _ChartOfAccountsYear_From
|
||||
End Get
|
||||
Set(value As Long)
|
||||
SetPropertyValue("ChartOfAccountsYear_From", _ChartOfAccountsYear_From, value)
|
||||
End Set
|
||||
End Property
|
||||
Property ChartOfAccountsYear_To As Long
|
||||
Get
|
||||
Return _ChartOfAccountsYear_To
|
||||
End Get
|
||||
Set(value As Long)
|
||||
SetPropertyValue("ChartOfAccountsYear_To", _ChartOfAccountsYear_To, value)
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
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()> _
|
||||
<NonPersistent> _
|
||||
<CreatableItem(False)> _
|
||||
<NavigationItem(False)> _
|
||||
Public Class CopyWorkflowSystem_PopUp
|
||||
Inherits BaseObject
|
||||
|
||||
Private _NeedToCopy As Boolean
|
||||
Private _WorkflowSystem As WorkflowSystem
|
||||
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
End Sub
|
||||
|
||||
Property NeedToCopy As Boolean
|
||||
Get
|
||||
Return _NeedToCopy
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
SetPropertyValue("NeedToCopy", _NeedToCopy, value)
|
||||
End Set
|
||||
End Property
|
||||
Property WorkflowSystem As WorkflowSystem
|
||||
Get
|
||||
Return _WorkflowSystem
|
||||
End Get
|
||||
Set(value As WorkflowSystem)
|
||||
SetPropertyValue("WorkflowSystem", _WorkflowSystem, value)
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
@@ -0,0 +1,50 @@
|
||||
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
|
||||
|
||||
Public Enum eExportOidClass
|
||||
Controlling = 0
|
||||
CostHolder = 1
|
||||
VAT = 2
|
||||
End Enum
|
||||
<DefaultClassOptions()> _
|
||||
<NonPersistent> _
|
||||
<CreatableItem(False)> _
|
||||
<NavigationItem(False)> _
|
||||
Public Class ExportOids_PopUp
|
||||
Inherits BaseObject
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
OpenFileAfterExport = True
|
||||
End Sub
|
||||
|
||||
Private _ExportOidClass As eExportOidClass
|
||||
Private _OpenFileAfterExport As Boolean
|
||||
|
||||
Property ExportOidClass As eExportOidClass
|
||||
Get
|
||||
Return _ExportOidClass
|
||||
End Get
|
||||
Set(value As eExportOidClass)
|
||||
SetPropertyValue("ExportOidClass", _ExportOidClass, value)
|
||||
End Set
|
||||
End Property
|
||||
Property OpenFileAfterExport As Boolean
|
||||
Get
|
||||
Return _OpenFileAfterExport
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
SetPropertyValue("OpenFileAfterExport", _OpenFileAfterExport, value)
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
@@ -0,0 +1,148 @@
|
||||
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 SystemTool
|
||||
Inherits BaseObject
|
||||
|
||||
Private _SQLType_From As eSQLType
|
||||
Private _SQLServer_From As String
|
||||
Private _SQLUser_From As String
|
||||
Private _SQLPassword_From As String
|
||||
Private _SQLDatabase_From As String
|
||||
|
||||
Private _SQLType_To As eSQLType
|
||||
Private _SQLServer_To As String
|
||||
Private _SQLUser_To As String
|
||||
Private _SQLPassword_To As String
|
||||
Private _SQLDatabase_To As String
|
||||
|
||||
Private _UserCreated As User
|
||||
Private _ObjectCreated As Date
|
||||
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
SQLType_From = eSQLType.MSSQL
|
||||
SQLType_To = eSQLType.MSSQL
|
||||
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 SQLType_From As eSQLType
|
||||
Get
|
||||
Return _SQLType_From
|
||||
End Get
|
||||
Set(value As eSQLType)
|
||||
SetPropertyValue("SQLType_From", _SQLType_From, value)
|
||||
End Set
|
||||
End Property
|
||||
Property SQLServer_From As String
|
||||
Get
|
||||
Return _SQLServer_From
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("SQLServer_From", _SQLServer_From, value)
|
||||
End Set
|
||||
End Property
|
||||
Property SQLUser_From As String
|
||||
Get
|
||||
Return _SQLUser_From
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("SQLUser_From", _SQLUser_From, value)
|
||||
End Set
|
||||
End Property
|
||||
Property SQLPassword_From As String
|
||||
Get
|
||||
Return _SQLPassword_From
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("SQLPassword_From", _SQLPassword_From, value)
|
||||
End Set
|
||||
End Property
|
||||
Property SQLDatabase_From As String
|
||||
Get
|
||||
Return _SQLDatabase_From
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("SQLDatabase_From", _SQLDatabase_From, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property SQLType_To As eSQLType
|
||||
Get
|
||||
Return _SQLType_To
|
||||
End Get
|
||||
Set(value As eSQLType)
|
||||
SetPropertyValue("SQLType_To", _SQLType_To, value)
|
||||
End Set
|
||||
End Property
|
||||
Property SQLServer_To As String
|
||||
Get
|
||||
Return _SQLServer_To
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("SQLServer_To", _SQLServer_To, value)
|
||||
End Set
|
||||
End Property
|
||||
Property SQLUser_To As String
|
||||
Get
|
||||
Return _SQLUser_To
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("SQLUser_To", _SQLUser_To, value)
|
||||
End Set
|
||||
End Property
|
||||
Property SQLPassword_To As String
|
||||
Get
|
||||
Return _SQLPassword_To
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("SQLPassword_To", _SQLPassword_To, value)
|
||||
End Set
|
||||
End Property
|
||||
Property SQLDatabase_To As String
|
||||
Get
|
||||
Return _SQLDatabase_To
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("SQLDatabase_To", _SQLDatabase_To, 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
|
||||
End Class
|
||||
+198
@@ -0,0 +1,198 @@
|
||||
Partial Class SystemTool_VC
|
||||
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Public Sub New(ByVal Container As System.ComponentModel.IContainer)
|
||||
MyClass.New()
|
||||
|
||||
'Required for Windows.Forms Class Composition Designer support
|
||||
Container.Add(Me)
|
||||
|
||||
End Sub
|
||||
|
||||
'Component overrides dispose to clean up the component list.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
MyBase.Dispose(disposing)
|
||||
End Sub
|
||||
|
||||
'Required by the Component Designer
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'NOTE: The following procedure is required by the Component Designer
|
||||
'It can be modified using the Component Designer.
|
||||
'Do not modify it using the code editor.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Me.aSystemTool_CopyVAT = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aSystemTool_CopyCostHolder = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aSystemTool_CopyControlling = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aSystemTool_ExportOids = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
|
||||
Me.aSystemTool_CopyCustomersGLParameters = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aSystemTool_ConnectionValidator = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aSystemTool_CopyChartOfAccounts = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
|
||||
Me.aSystemTool_CopyUnits = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aSystemTool_CopyWorkflowSystem = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
|
||||
'
|
||||
'aSystemTool_CopyVAT
|
||||
'
|
||||
Me.aSystemTool_CopyVAT.Caption = "aSystemTool_CopyVAT"
|
||||
Me.aSystemTool_CopyVAT.Category = "aSystemTool_CopyVAT"
|
||||
Me.aSystemTool_CopyVAT.ConfirmationMessage = Nothing
|
||||
Me.aSystemTool_CopyVAT.Id = "aSystemTool_CopyVAT"
|
||||
Me.aSystemTool_CopyVAT.ImageName = Nothing
|
||||
Me.aSystemTool_CopyVAT.Shortcut = Nothing
|
||||
Me.aSystemTool_CopyVAT.Tag = Nothing
|
||||
Me.aSystemTool_CopyVAT.TargetObjectsCriteria = Nothing
|
||||
Me.aSystemTool_CopyVAT.TargetObjectType = GetType(Nuvolar.[Module].SystemTool)
|
||||
Me.aSystemTool_CopyVAT.TargetViewId = Nothing
|
||||
Me.aSystemTool_CopyVAT.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
|
||||
Me.aSystemTool_CopyVAT.ToolTip = Nothing
|
||||
Me.aSystemTool_CopyVAT.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
|
||||
'
|
||||
'aSystemTool_CopyCostHolder
|
||||
'
|
||||
Me.aSystemTool_CopyCostHolder.Caption = "aSystemTool_CopyCostHolder"
|
||||
Me.aSystemTool_CopyCostHolder.Category = "aSystemTool_CopyCostHolder"
|
||||
Me.aSystemTool_CopyCostHolder.ConfirmationMessage = Nothing
|
||||
Me.aSystemTool_CopyCostHolder.Id = "aSystemTool_CopyCostHolder"
|
||||
Me.aSystemTool_CopyCostHolder.ImageName = Nothing
|
||||
Me.aSystemTool_CopyCostHolder.Shortcut = Nothing
|
||||
Me.aSystemTool_CopyCostHolder.Tag = Nothing
|
||||
Me.aSystemTool_CopyCostHolder.TargetObjectsCriteria = Nothing
|
||||
Me.aSystemTool_CopyCostHolder.TargetObjectType = GetType(Nuvolar.[Module].SystemTool)
|
||||
Me.aSystemTool_CopyCostHolder.TargetViewId = Nothing
|
||||
Me.aSystemTool_CopyCostHolder.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
|
||||
Me.aSystemTool_CopyCostHolder.ToolTip = Nothing
|
||||
Me.aSystemTool_CopyCostHolder.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
|
||||
'
|
||||
'aSystemTool_CopyControlling
|
||||
'
|
||||
Me.aSystemTool_CopyControlling.Caption = "aSystemTool_CopyControlling"
|
||||
Me.aSystemTool_CopyControlling.Category = "aSystemTool_CopyControlling"
|
||||
Me.aSystemTool_CopyControlling.ConfirmationMessage = Nothing
|
||||
Me.aSystemTool_CopyControlling.Id = "aSystemTool_CopyControlling"
|
||||
Me.aSystemTool_CopyControlling.ImageName = Nothing
|
||||
Me.aSystemTool_CopyControlling.Shortcut = Nothing
|
||||
Me.aSystemTool_CopyControlling.Tag = Nothing
|
||||
Me.aSystemTool_CopyControlling.TargetObjectsCriteria = Nothing
|
||||
Me.aSystemTool_CopyControlling.TargetObjectType = GetType(Nuvolar.[Module].SystemTool)
|
||||
Me.aSystemTool_CopyControlling.TargetViewId = Nothing
|
||||
Me.aSystemTool_CopyControlling.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
|
||||
Me.aSystemTool_CopyControlling.ToolTip = Nothing
|
||||
Me.aSystemTool_CopyControlling.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
|
||||
'
|
||||
'aSystemTool_ExportOids
|
||||
'
|
||||
Me.aSystemTool_ExportOids.AcceptButtonCaption = Nothing
|
||||
Me.aSystemTool_ExportOids.CancelButtonCaption = Nothing
|
||||
Me.aSystemTool_ExportOids.Caption = "aSystemTool_ExportOids"
|
||||
Me.aSystemTool_ExportOids.Category = "aSystemTool_ExportOids"
|
||||
Me.aSystemTool_ExportOids.ConfirmationMessage = Nothing
|
||||
Me.aSystemTool_ExportOids.Id = "aSystemTool_ExportOids"
|
||||
Me.aSystemTool_ExportOids.ImageName = Nothing
|
||||
Me.aSystemTool_ExportOids.Shortcut = Nothing
|
||||
Me.aSystemTool_ExportOids.Tag = Nothing
|
||||
Me.aSystemTool_ExportOids.TargetObjectsCriteria = Nothing
|
||||
Me.aSystemTool_ExportOids.TargetObjectType = GetType(Nuvolar.[Module].SystemTool)
|
||||
Me.aSystemTool_ExportOids.TargetViewId = Nothing
|
||||
Me.aSystemTool_ExportOids.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
|
||||
Me.aSystemTool_ExportOids.ToolTip = Nothing
|
||||
Me.aSystemTool_ExportOids.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
|
||||
'
|
||||
'aSystemTool_CopyCustomersGLParameters
|
||||
'
|
||||
Me.aSystemTool_CopyCustomersGLParameters.Caption = "aSystemTool_CopyCustomersGLParameters"
|
||||
Me.aSystemTool_CopyCustomersGLParameters.Category = "aSystemTool_CopyCustomersGLParameters"
|
||||
Me.aSystemTool_CopyCustomersGLParameters.ConfirmationMessage = Nothing
|
||||
Me.aSystemTool_CopyCustomersGLParameters.Id = "aSystemTool_CopyCustomersGLParameters"
|
||||
Me.aSystemTool_CopyCustomersGLParameters.ImageName = Nothing
|
||||
Me.aSystemTool_CopyCustomersGLParameters.Shortcut = Nothing
|
||||
Me.aSystemTool_CopyCustomersGLParameters.Tag = Nothing
|
||||
Me.aSystemTool_CopyCustomersGLParameters.TargetObjectsCriteria = Nothing
|
||||
Me.aSystemTool_CopyCustomersGLParameters.TargetObjectType = GetType(Nuvolar.[Module].SystemTool)
|
||||
Me.aSystemTool_CopyCustomersGLParameters.TargetViewId = Nothing
|
||||
Me.aSystemTool_CopyCustomersGLParameters.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
|
||||
Me.aSystemTool_CopyCustomersGLParameters.ToolTip = Nothing
|
||||
Me.aSystemTool_CopyCustomersGLParameters.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
|
||||
'
|
||||
'aSystemTool_ConnectionValidator
|
||||
'
|
||||
Me.aSystemTool_ConnectionValidator.Caption = "aSystemTool_ConnectionValidator"
|
||||
Me.aSystemTool_ConnectionValidator.Category = "aSystemTool_ConnectionValidator"
|
||||
Me.aSystemTool_ConnectionValidator.ConfirmationMessage = Nothing
|
||||
Me.aSystemTool_ConnectionValidator.Id = "aSystemTool_ConnectionValidator"
|
||||
Me.aSystemTool_ConnectionValidator.ImageName = Nothing
|
||||
Me.aSystemTool_ConnectionValidator.Shortcut = Nothing
|
||||
Me.aSystemTool_ConnectionValidator.Tag = Nothing
|
||||
Me.aSystemTool_ConnectionValidator.TargetObjectsCriteria = Nothing
|
||||
Me.aSystemTool_ConnectionValidator.TargetObjectType = GetType(Nuvolar.[Module].SystemTool)
|
||||
Me.aSystemTool_ConnectionValidator.TargetViewId = Nothing
|
||||
Me.aSystemTool_ConnectionValidator.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
|
||||
Me.aSystemTool_ConnectionValidator.ToolTip = Nothing
|
||||
Me.aSystemTool_ConnectionValidator.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
|
||||
'
|
||||
'aSystemTool_CopyChartOfAccounts
|
||||
'
|
||||
Me.aSystemTool_CopyChartOfAccounts.AcceptButtonCaption = Nothing
|
||||
Me.aSystemTool_CopyChartOfAccounts.CancelButtonCaption = Nothing
|
||||
Me.aSystemTool_CopyChartOfAccounts.Caption = "aSystemTool_CopyChartOfAccounts"
|
||||
Me.aSystemTool_CopyChartOfAccounts.Category = "aSystemTool_CopyChartOfAccounts"
|
||||
Me.aSystemTool_CopyChartOfAccounts.ConfirmationMessage = Nothing
|
||||
Me.aSystemTool_CopyChartOfAccounts.Id = "aSystemTool_CopyChartOfAccounts"
|
||||
Me.aSystemTool_CopyChartOfAccounts.ImageName = Nothing
|
||||
Me.aSystemTool_CopyChartOfAccounts.Shortcut = Nothing
|
||||
Me.aSystemTool_CopyChartOfAccounts.Tag = Nothing
|
||||
Me.aSystemTool_CopyChartOfAccounts.TargetObjectsCriteria = Nothing
|
||||
Me.aSystemTool_CopyChartOfAccounts.TargetObjectType = GetType(Nuvolar.[Module].SystemTool)
|
||||
Me.aSystemTool_CopyChartOfAccounts.TargetViewId = Nothing
|
||||
Me.aSystemTool_CopyChartOfAccounts.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
|
||||
Me.aSystemTool_CopyChartOfAccounts.ToolTip = Nothing
|
||||
Me.aSystemTool_CopyChartOfAccounts.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
|
||||
'
|
||||
'aSystemTool_CopyUnits
|
||||
'
|
||||
Me.aSystemTool_CopyUnits.Caption = "aSystemTool_CopyUnits"
|
||||
Me.aSystemTool_CopyUnits.Category = "aSystemTool_CopyUnits"
|
||||
Me.aSystemTool_CopyUnits.ConfirmationMessage = Nothing
|
||||
Me.aSystemTool_CopyUnits.Id = "aSystemTool_CopyUnits"
|
||||
Me.aSystemTool_CopyUnits.ImageName = Nothing
|
||||
Me.aSystemTool_CopyUnits.Shortcut = Nothing
|
||||
Me.aSystemTool_CopyUnits.Tag = Nothing
|
||||
Me.aSystemTool_CopyUnits.TargetObjectsCriteria = Nothing
|
||||
Me.aSystemTool_CopyUnits.TargetObjectType = GetType(Nuvolar.[Module].SystemTool)
|
||||
Me.aSystemTool_CopyUnits.TargetViewId = Nothing
|
||||
Me.aSystemTool_CopyUnits.ToolTip = Nothing
|
||||
Me.aSystemTool_CopyUnits.TypeOfView = Nothing
|
||||
'
|
||||
'aSystemTool_CopyWorkflowSystem
|
||||
'
|
||||
Me.aSystemTool_CopyWorkflowSystem.AcceptButtonCaption = Nothing
|
||||
Me.aSystemTool_CopyWorkflowSystem.CancelButtonCaption = Nothing
|
||||
Me.aSystemTool_CopyWorkflowSystem.Caption = "aSystemTool_CopyWorkflowSystem"
|
||||
Me.aSystemTool_CopyWorkflowSystem.ConfirmationMessage = Nothing
|
||||
Me.aSystemTool_CopyWorkflowSystem.Id = "aSystemTool_CopyWorkflowSystem"
|
||||
Me.aSystemTool_CopyWorkflowSystem.ImageName = Nothing
|
||||
Me.aSystemTool_CopyWorkflowSystem.Shortcut = Nothing
|
||||
Me.aSystemTool_CopyWorkflowSystem.Tag = Nothing
|
||||
Me.aSystemTool_CopyWorkflowSystem.TargetObjectsCriteria = Nothing
|
||||
Me.aSystemTool_CopyWorkflowSystem.TargetObjectType = GetType(Nuvolar.[Module].SystemTool)
|
||||
Me.aSystemTool_CopyWorkflowSystem.TargetViewId = Nothing
|
||||
Me.aSystemTool_CopyWorkflowSystem.ToolTip = Nothing
|
||||
Me.aSystemTool_CopyWorkflowSystem.TypeOfView = Nothing
|
||||
|
||||
End Sub
|
||||
Friend WithEvents aSystemTool_ConnectionValidator As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aSystemTool_CopyChartOfAccounts As DevExpress.ExpressApp.Actions.PopupWindowShowAction
|
||||
Friend WithEvents aSystemTool_CopyVAT As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aSystemTool_CopyCostHolder As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aSystemTool_CopyControlling As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aSystemTool_ExportOids As DevExpress.ExpressApp.Actions.PopupWindowShowAction
|
||||
Friend WithEvents aSystemTool_CopyCustomersGLParameters As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aSystemTool_CopyUnits As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aSystemTool_CopyWorkflowSystem As DevExpress.ExpressApp.Actions.PopupWindowShowAction
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,150 @@
|
||||
<?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="aSystemTool_CopyVAT.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>763, 134</value>
|
||||
</metadata>
|
||||
<metadata name="aSystemTool_CopyCostHolder.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>548, 134</value>
|
||||
</metadata>
|
||||
<metadata name="aSystemTool_CopyControlling.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>333, 134</value>
|
||||
</metadata>
|
||||
<metadata name="aSystemTool_ExportOids.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 134</value>
|
||||
</metadata>
|
||||
<metadata name="aSystemTool_CopyCustomersGLParameters.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 95</value>
|
||||
</metadata>
|
||||
<metadata name="aSystemTool_ConnectionValidator.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 56</value>
|
||||
</metadata>
|
||||
<metadata name="aSystemTool_CopyChartOfAccounts.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="aSystemTool_CopyUnits.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>268, 278</value>
|
||||
</metadata>
|
||||
<metadata name="aSystemTool_CopyWorkflowSystem.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>450, 278</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,663 @@
|
||||
Imports System
|
||||
Imports System.ComponentModel
|
||||
Imports System.Collections.Generic
|
||||
Imports System.Diagnostics
|
||||
Imports System.Text
|
||||
|
||||
Imports DevExpress.ExpressApp
|
||||
Imports DevExpress.ExpressApp.Actions
|
||||
Imports DevExpress.Persistent.Base
|
||||
Imports DevExpress.Xpo
|
||||
Imports DevExpress.Data.Filtering
|
||||
|
||||
Public Class SystemTool_VC
|
||||
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()
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
End Sub
|
||||
Private Sub aSystemTool_ConnectionValidator_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aSystemTool_ConnectionValidator.Execute
|
||||
'Beep()
|
||||
|
||||
End Sub
|
||||
Private Sub aSystemTool_CopyChartOfAccounts_CustomizePopupWindowParams(sender As Object, e As CustomizePopupWindowParamsEventArgs) Handles aSystemTool_CopyChartOfAccounts.CustomizePopupWindowParams
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _CopyChartOfAccounts_PopUp As New CopyChartOfAccounts_PopUp(_onew.Session)
|
||||
|
||||
e.View = Application.CreateDetailView(_onew, "CopyChartOfAccounts_PopUp_DetailView", False, _CopyChartOfAccounts_PopUp)
|
||||
End Sub
|
||||
Private Sub aSystemTool_CopyChartOfAccounts_Execute(sender As Object, e As PopupWindowShowActionExecuteEventArgs) Handles aSystemTool_CopyChartOfAccounts.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _SystemTool As SystemTool = TryCast(View.SelectedObjects(0), SystemTool)
|
||||
Dim _CopyChartOfAccounts_PopUp As CopyChartOfAccounts_PopUp = _ocur.GetObject(e.PopupWindow.View.SelectedObjects(0))
|
||||
Dim _Session_From As New Session
|
||||
Dim _Session_To As New Session
|
||||
|
||||
_Session_From.ConnectionString = GetConnectionString(0, _SystemTool)
|
||||
_Session_To.ConnectionString = GetConnectionString(1, _SystemTool)
|
||||
Try
|
||||
_Session_From.Connect()
|
||||
If _Session_From.IsConnected Then
|
||||
_Session_To.Connect()
|
||||
If _Session_To.IsConnected Then
|
||||
Dim _uow_From As New UnitOfWork(_Session_From.DataLayer)
|
||||
Dim _uow_To As New UnitOfWork(_Session_To.DataLayer)
|
||||
Dim _ChartOfAccounts_Collection_From As New XPCollection(Of ChartOfAccounts)(_uow_From, CriteriaOperator.Parse("AccountYear=?", _CopyChartOfAccounts_PopUp.ChartOfAccountsYear_From))
|
||||
Dim _ChartOfAccountsYear_From As ChartOfAccountsYear = _uow_From.FindObject(Of ChartOfAccountsYear)(CriteriaOperator.Parse("AccountYear=?", _CopyChartOfAccounts_PopUp.ChartOfAccountsYear_From))
|
||||
|
||||
Dim _ChartOfAccountsYear_To As ChartOfAccountsYear = _uow_To.FindObject(Of ChartOfAccountsYear)(CriteriaOperator.Parse("AccountYear=?", _CopyChartOfAccounts_PopUp.ChartOfAccountsYear_To))
|
||||
If _ChartOfAccountsYear_To Is Nothing Then
|
||||
_ChartOfAccountsYear_To = New ChartOfAccountsYear(_uow_To)
|
||||
With _ChartOfAccountsYear_To
|
||||
.AccountYear = _CopyChartOfAccounts_PopUp.ChartOfAccountsYear_To
|
||||
End With
|
||||
_uow_To.CommitChanges()
|
||||
End If
|
||||
|
||||
Dim _ChartOfAccounts_Collection_To As New XPCollection(Of ChartOfAccounts)(_uow_To, CriteriaOperator.Parse("AccountYear=?", _ChartOfAccountsYear_To.AccountYear))
|
||||
'ChartOfAccounts.AccountNumber-re kell vizsgálni, ha van nem szabad bántani
|
||||
|
||||
RaiseEvent InitWork(1, 1, _ChartOfAccounts_Collection_From.Count)
|
||||
|
||||
If _ChartOfAccounts_Collection_To.Count = 0 Then
|
||||
'Új év nem kell vizsgálgatni a létezõket
|
||||
For Each _ChartOfAccounts As ChartOfAccounts In _ChartOfAccounts_Collection_From
|
||||
Dim _ChartOfAccounts_New_To As New ChartOfAccounts(_uow_To)
|
||||
With _ChartOfAccounts_New_To
|
||||
.Name = _ChartOfAccounts.Name
|
||||
.Parent = Nothing
|
||||
.AccountNumber = _ChartOfAccounts.AccountNumber
|
||||
.AccountYear = _ChartOfAccountsYear_To.AccountYear
|
||||
End With
|
||||
RaiseEvent DoWork()
|
||||
Next
|
||||
Else
|
||||
'Szívás, meglévõ évhez kell beszúrni dolgokat, vizsgálgatni kell az AccountNumber-eket
|
||||
For Each _ChartOfAccounts As ChartOfAccounts In _ChartOfAccounts_Collection_From
|
||||
If Not IsExistChartOfAccounts(_ChartOfAccounts.AccountNumber, _ChartOfAccounts_Collection_To) Then
|
||||
Dim _ChartOfAccounts_New_To As New ChartOfAccounts(_uow_To)
|
||||
With _ChartOfAccounts_New_To
|
||||
.Name = _ChartOfAccounts.Name
|
||||
.Parent = Nothing
|
||||
.AccountNumber = _ChartOfAccounts.AccountNumber
|
||||
.AccountYear = _ChartOfAccountsYear_To.AccountYear
|
||||
End With
|
||||
End If
|
||||
RaiseEvent DoWork()
|
||||
Next
|
||||
End If
|
||||
|
||||
_uow_To.CommitChanges()
|
||||
|
||||
RaiseEvent FinalWork
|
||||
|
||||
_ChartOfAccounts_Collection_To = New XPCollection(Of ChartOfAccounts)(_uow_To, CriteriaOperator.Parse("AccountYear=?", _ChartOfAccountsYear_To.AccountYear))
|
||||
|
||||
RaiseEvent InitWork(1, 1, _ChartOfAccounts_Collection_To.Count)
|
||||
For Each _ChartOfAccounts As ChartOfAccounts In _ChartOfAccounts_Collection_To
|
||||
RecursiveSetParent(_uow_To, _ChartOfAccountsYear_To.AccountYear, _ChartOfAccounts.AccountNumber, _ChartOfAccounts)
|
||||
RaiseEvent DoWork()
|
||||
Next
|
||||
_uow_To.CommitChanges()
|
||||
RaiseEvent FinalWork
|
||||
|
||||
|
||||
'Select Case _SystemTool.SQLType_To
|
||||
' Case eSQLType.MSSQL
|
||||
' _uow_To.ExecuteNonQuery("ALTER TABLE ChartOfAccountsYear NOCHECK CONSTRAINT ALL")
|
||||
' _uow_To.ExecuteNonQuery("UPDATE ChartOfAccountsYear SET Oid='" + _ChartOfAccountsYear_From.Oid.ToString + "' WHERE Oid='" + _ChartOfAccountsYear_New.Oid.ToString + "'")
|
||||
' _uow_To.ExecuteNonQuery("ALTER TABLE ChartOfAccountsYear CHECK CONSTRAINT ALL")
|
||||
' Case eSQLType.MySQL
|
||||
' '--==Oid regenerálás==--
|
||||
' _uow_To.ExecuteNonQuery("UPDATE ChartOfAccountsYear SET Oid='" + _ChartOfAccountsYear_From.Oid.ToString + "' WHERE Oid='" + _ChartOfAccountsYear_New.Oid.ToString + "'")
|
||||
' '--===================--
|
||||
' Case eSQLType.PostgreSQL
|
||||
' _uow_To.ExecuteNonQuery("UPDATE ""ChartOfAccountsYear"" SET ""Oid""='" + _ChartOfAccountsYear_From.Oid.ToString + "' WHERE ""Oid""='" + _ChartOfAccountsYear_New.Oid.ToString + "'")
|
||||
'End Select
|
||||
|
||||
|
||||
'RaiseEvent InitWork(1, 1, _ChartOfAccounts_Collection.Count)
|
||||
'For Each _ChartOfAccounts As ChartOfAccounts In _ChartOfAccounts_Collection
|
||||
' Dim _ChartOfAccounts_New As New ChartOfAccounts(_uow_To)
|
||||
' With _ChartOfAccounts_New
|
||||
' .Name = _ChartOfAccounts.Name
|
||||
' .Parent = Nothing
|
||||
' .AccountNumber = _ChartOfAccounts.AccountNumber
|
||||
' .AccountYear = _CopyChartOfAccounts_PopUp.TargetAccountYear
|
||||
|
||||
' End With
|
||||
' _uow_To.CommitChanges()
|
||||
|
||||
' Select _SystemTool.SQLType_To
|
||||
' Case eSQLType.MSSQL
|
||||
' _uow_To.ExecuteNonQuery("ALTER TABLE HCategory NOCHECK CONSTRAINT ALL")
|
||||
' _uow_To.ExecuteNonQuery("ALTER TABLE ChartOfAccounts NOCHECK CONSTRAINT ALL")
|
||||
' _uow_To.ExecuteNonQuery("UPDATE HCategory SET Oid='" + _ChartOfAccounts.Oid.ToString + "' WHERE Oid='" + _ChartOfAccounts_New.Oid.ToString + "'")
|
||||
' _uow_To.ExecuteNonQuery("UPDATE ChartOfAccounts SET Oid='" + _ChartOfAccounts.Oid.ToString + "' WHERE Oid='" + _ChartOfAccounts_New.Oid.ToString + "'")
|
||||
' _uow_To.ExecuteNonQuery("ALTER TABLE HCategory CHECK CONSTRAINT ALL")
|
||||
' _uow_To.ExecuteNonQuery("ALTER TABLE ChartOfAccounts CHECK CONSTRAINT ALL")
|
||||
' Case eSQLType.MySQL
|
||||
' '--==Oid regenerálás==--
|
||||
' _uow_To.ExecuteNonQuery("SET foreign_key_checks = 0")
|
||||
' _uow_To.ExecuteNonQuery("UPDATE HCategory SET Oid='" + _ChartOfAccounts.Oid.ToString + "' WHERE Oid='" + _ChartOfAccounts_New.Oid.ToString + "'")
|
||||
' _uow_To.ExecuteNonQuery("UPDATE ChartOfAccounts SET Oid='" + _ChartOfAccounts.Oid.ToString + "' WHERE Oid='" + _ChartOfAccounts_New.Oid.ToString + "'")
|
||||
' _uow_To.ExecuteNonQuery("SET foreign_key_checks = 1")
|
||||
' '--===================--
|
||||
' Case eSQLType.PostgreSQL
|
||||
' _uow_To.ExecuteNonQuery("ALTER TABLE ""HCategory"" DISABLE TRIGGER ALL")
|
||||
' _uow_To.ExecuteNonQuery("ALTER TABLE ""ChartOfAccounts"" DISABLE TRIGGER ALL")
|
||||
' _uow_To.ExecuteNonQuery("UPDATE ""HCategory"" SET ""Oid""='" + _ChartOfAccounts.Oid.ToString + "' WHERE ""Oid""='" + _ChartOfAccounts_New.Oid.ToString + "'")
|
||||
' _uow_To.ExecuteNonQuery("UPDATE ""ChartOfAccounts"" SET ""Oid""='" + _ChartOfAccounts.Oid.ToString + "' WHERE ""Oid""='" + _ChartOfAccounts_New.Oid.ToString + "'")
|
||||
' _uow_To.ExecuteNonQuery("ALTER TABLE ""HCategory"" ENABLE TRIGGER ALL")
|
||||
' _uow_To.ExecuteNonQuery("ALTER TABLE ""ChartOfAccounts"" ENABLE TRIGGER ALL")
|
||||
' End Select
|
||||
' RaiseEvent DoWork()
|
||||
'Next
|
||||
'RaiseEvent FinalWork
|
||||
|
||||
|
||||
'_ChartOfAccounts_Collection = New XPCollection(Of ChartOfAccounts)(_uow_To, CriteriaOperator.Parse("AccountYear=?", _CopyChartOfAccounts_PopUp.TargetAccountYear))
|
||||
'RaiseEvent InitWork(1, 1, _ChartOfAccounts_Collection.Count)
|
||||
|
||||
'For Each _ChartOfAccounts In _ChartOfAccounts_Collection
|
||||
' RecursiveSetParent(_uow_To, _CopyChartOfAccounts_PopUp.TargetAccountYear, _ChartOfAccounts.AccountNumber, _ChartOfAccounts)
|
||||
' RaiseEvent DoWork()
|
||||
'Next
|
||||
'_uow_To.CommitChanges()
|
||||
'RaiseEvent FinalWork
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message)
|
||||
Finally
|
||||
If _Session_From.IsConnected Then _Session_From.Disconnect()
|
||||
If _Session_To.IsConnected Then _Session_To.Disconnect()
|
||||
RaiseEvent FinalWork
|
||||
End Try
|
||||
End Sub
|
||||
Private Function GetConnectionString(_Type As Integer, _SystemTool As SystemTool) As String
|
||||
Dim _ConnectionString As String = ""
|
||||
If _Type = 0 Then
|
||||
Select Case _SystemTool.SQLType_From
|
||||
Case eSQLType.MSSQL
|
||||
_ConnectionString = DevExpress.Xpo.DB.MSSqlConnectionProvider.GetConnectionString(_SystemTool.SQLServer_From, _SystemTool.SQLUser_From, _SystemTool.SQLPassword_From, _SystemTool.SQLDatabase_From)
|
||||
Case eSQLType.MySQL
|
||||
_ConnectionString = DevExpress.Xpo.DB.MySqlConnectionProvider.GetConnectionString(_SystemTool.SQLServer_From, _SystemTool.SQLUser_From, _SystemTool.SQLPassword_From, _SystemTool.SQLDatabase_From)
|
||||
Case eSQLType.PostgreSQL
|
||||
_ConnectionString = DevExpress.Xpo.DB.PostgreSqlConnectionProvider.GetConnectionString(_SystemTool.SQLServer_From, _SystemTool.SQLUser_From, _SystemTool.SQLPassword_From, _SystemTool.SQLDatabase_From)
|
||||
End Select
|
||||
ElseIf _Type = 1 Then
|
||||
Select Case _SystemTool.SQLType_To
|
||||
Case eSQLType.MSSQL
|
||||
_ConnectionString = DevExpress.Xpo.DB.MSSqlConnectionProvider.GetConnectionString(_SystemTool.SQLServer_To, _SystemTool.SQLUser_To, _SystemTool.SQLPassword_To, _SystemTool.SQLDatabase_To)
|
||||
Case eSQLType.MySQL
|
||||
_ConnectionString = DevExpress.Xpo.DB.MySqlConnectionProvider.GetConnectionString(_SystemTool.SQLServer_To, _SystemTool.SQLUser_To, _SystemTool.SQLPassword_To, _SystemTool.SQLDatabase_To)
|
||||
Case eSQLType.PostgreSQL
|
||||
_ConnectionString = DevExpress.Xpo.DB.PostgreSqlConnectionProvider.GetConnectionString(_SystemTool.SQLServer_To, _SystemTool.SQLUser_To, _SystemTool.SQLPassword_To, _SystemTool.SQLDatabase_To)
|
||||
End Select
|
||||
End If
|
||||
|
||||
Return _ConnectionString
|
||||
End Function
|
||||
Private Sub RecursiveSetParent(_uow As UnitOfWork, _Year As Long, _AccountNumber As String, _ChartOfAccount_Set As ChartOfAccounts)
|
||||
Dim _AccountNumber_Parent As String = LTrim(RTrim(Mid(_AccountNumber, 1, Len(_AccountNumber) - 1)))
|
||||
Dim _ChartOfAccounts_Parent As ChartOfAccounts
|
||||
|
||||
If _AccountNumber_Parent = "" Then
|
||||
Else
|
||||
_ChartOfAccounts_Parent = _uow.FindObject(Of ChartOfAccounts)(CriteriaOperator.Parse("AccountYear=? and AccountNumber=?", _Year, _AccountNumber_Parent))
|
||||
If _ChartOfAccounts_Parent Is Nothing Then
|
||||
RecursiveSetParent(_uow, _Year, _AccountNumber_Parent, _ChartOfAccount_Set)
|
||||
Else
|
||||
_ChartOfAccount_Set.Parent = _ChartOfAccounts_Parent
|
||||
_uow.CommitChanges()
|
||||
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Private Sub aSystemTool_CopyVAT_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aSystemTool_CopyVAT.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _SystemTool As SystemTool = TryCast(View.SelectedObjects(0), SystemTool)
|
||||
Dim _VAT_Collection As XPCollection(Of VAT)
|
||||
Dim _Session_From As New Session
|
||||
Dim _Session_To As New Session
|
||||
_Session_From.ConnectionString = GetConnectionString(0, _SystemTool)
|
||||
_Session_To.ConnectionString = GetConnectionString(1, _SystemTool)
|
||||
Try
|
||||
_Session_From.Connect()
|
||||
If _Session_From.IsConnected Then
|
||||
_Session_To.Connect()
|
||||
If _Session_To.IsConnected Then
|
||||
|
||||
Dim _uow_From As New UnitOfWork(_Session_From.DataLayer)
|
||||
Dim _uow_To As New UnitOfWork(_Session_To.DataLayer)
|
||||
_VAT_Collection = New XPCollection(Of VAT)(_uow_From, CriteriaOperator.Parse("1=1"))
|
||||
|
||||
RaiseEvent InitWork(1, 1, _VAT_Collection.Count)
|
||||
For Each _VAT As VAT In _VAT_Collection
|
||||
Dim _VAT_New As New VAT(_uow_To)
|
||||
With _VAT_New
|
||||
.ShortName = _VAT.ShortName
|
||||
.Description = _VAT.Description
|
||||
.KeyValue = _VAT.KeyValue
|
||||
.ChartOfAccountsOut = _uow_To.GetObjectByKey(Of ChartOfAccounts)(_VAT.ChartOfAccountsOut.Oid)
|
||||
.ChartOfAccountsIn = _uow_To.GetObjectByKey(Of ChartOfAccounts)(_VAT.ChartOfAccountsIn.Oid)
|
||||
.ClaimState = _VAT.ClaimState
|
||||
.Active = _VAT.Active
|
||||
.InversState = _VAT.InversState
|
||||
.InversKeyValue = _VAT.InversKeyValue
|
||||
.DefaultForBusinnes = _VAT.DefaultForBusinnes
|
||||
.DefaultForExternalEUNoVAT = _VAT.DefaultForExternalEUNoVAT
|
||||
.DefaultForExternalOther = _VAT.DefaultForExternalOther
|
||||
.DefaultForInversVAT = _VAT.DefaultForInversVAT
|
||||
End With
|
||||
_uow_To.CommitChanges()
|
||||
Select Case _SystemTool.SQLType_To
|
||||
Case eSQLType.MSSQL
|
||||
'--==Oid regenerálás==--
|
||||
_uow_To.ExecuteNonQuery("UPDATE VAT SET Oid='" + _VAT.Oid.ToString + "' WHERE Oid='" + _VAT_New.Oid.ToString + "'")
|
||||
'--===================--
|
||||
Case eSQLType.MySQL
|
||||
'--==Oid regenerálás==--
|
||||
_uow_To.ExecuteNonQuery("UPDATE VAT SET Oid='" + _VAT.Oid.ToString + "' WHERE Oid='" + _VAT_New.Oid.ToString + "'")
|
||||
'--===================--
|
||||
Case eSQLType.PostgreSQL
|
||||
'--==Oid regenerálás==--
|
||||
_uow_To.ExecuteNonQuery("UPDATE ""VAT"" SET ""Oid""='" + _VAT.Oid.ToString + "' WHERE ""Oid""='" + _VAT_New.Oid.ToString + "'")
|
||||
'--===================--
|
||||
End Select
|
||||
|
||||
RaiseEvent DoWork()
|
||||
Next
|
||||
RaiseEvent FinalWork
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message)
|
||||
Finally
|
||||
If _Session_From.IsConnected Then _Session_From.Disconnect()
|
||||
If _Session_To.IsConnected Then _Session_To.Disconnect()
|
||||
RaiseEvent FinalWork
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub aSystemTool_CopyCostHolder_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aSystemTool_CopyCostHolder.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _SystemTool As SystemTool = TryCast(View.SelectedObjects(0), SystemTool)
|
||||
Dim _CostHolder_Collection As XPCollection(Of CostHolder)
|
||||
Dim _Session_From As New Session
|
||||
Dim _Session_To As New Session
|
||||
_Session_From.ConnectionString = GetConnectionString(0, _SystemTool)
|
||||
_Session_To.ConnectionString = GetConnectionString(1, _SystemTool)
|
||||
Try
|
||||
_Session_From.Connect()
|
||||
If _Session_From.IsConnected Then
|
||||
_Session_To.Connect()
|
||||
If _Session_To.IsConnected Then
|
||||
|
||||
Dim _uow_From As New UnitOfWork(_Session_From.DataLayer)
|
||||
Dim _uow_To As New UnitOfWork(_Session_To.DataLayer)
|
||||
_CostHolder_Collection = New XPCollection(Of CostHolder)(_uow_From, CriteriaOperator.Parse("1=1"))
|
||||
|
||||
RaiseEvent InitWork(1, 1, _CostHolder_Collection.Count)
|
||||
For Each _CostHolder As CostHolder In _CostHolder_Collection
|
||||
Dim _CostHolder_New As New CostHolder(_uow_To)
|
||||
With _CostHolder_New
|
||||
.Name = _CostHolder.Name
|
||||
If _CostHolder.Parent IsNot Nothing Then
|
||||
Dim _Parent As CostHolder = _uow_From.FindObject(Of CostHolder)(CriteriaOperator.Parse("Oid=?", _CostHolder.Parent.Oid))
|
||||
.Parent = _uow_To.GetObjectByKey(Of CostHolder)(_Parent.Oid)
|
||||
End If
|
||||
End With
|
||||
_uow_To.CommitChanges()
|
||||
|
||||
Select _SystemTool.SQLType_To
|
||||
Case eSQLType.MSSQL
|
||||
_uow_To.ExecuteNonQuery("ALTER TABLE HCategory NOCHECK CONSTRAINT ALL")
|
||||
_uow_To.ExecuteNonQuery("ALTER TABLE CostHolder NOCHECK CONSTRAINT ALL")
|
||||
_uow_To.ExecuteNonQuery("UPDATE HCategory SET Oid='" + _CostHolder.Oid.ToString + "' WHERE Oid='" + _CostHolder_New.Oid.ToString + "'")
|
||||
_uow_To.ExecuteNonQuery("UPDATE CostHolder SET Oid='" + _CostHolder.Oid.ToString + "' WHERE Oid='" + _CostHolder_New.Oid.ToString + "'")
|
||||
_uow_To.ExecuteNonQuery("ALTER TABLE HCategory CHECK CONSTRAINT ALL")
|
||||
_uow_To.ExecuteNonQuery("ALTER TABLE CostHolder CHECK CONSTRAINT ALL")
|
||||
Case eSQLType.MySQL
|
||||
'--==Oid regenerálás==--
|
||||
_uow_To.ExecuteNonQuery("SET foreign_key_checks = 0")
|
||||
_uow_To.ExecuteNonQuery("UPDATE HCategory SET Oid='" + _CostHolder.Oid.ToString + "' WHERE Oid='" + _CostHolder_New.Oid.ToString + "'")
|
||||
_uow_To.ExecuteNonQuery("UPDATE CostHolder SET Oid='" + _CostHolder.Oid.ToString + "' WHERE Oid='" + _CostHolder_New.Oid.ToString + "'")
|
||||
_uow_To.ExecuteNonQuery("SET foreign_key_checks = 1")
|
||||
'--===================--
|
||||
Case eSQLType.PostgreSQL
|
||||
_uow_To.ExecuteNonQuery("ALTER TABLE ""HCategory"" DISABLE TRIGGER ALL")
|
||||
_uow_To.ExecuteNonQuery("ALTER TABLE ""CostHolder"" DISABLE TRIGGER ALL")
|
||||
_uow_To.ExecuteNonQuery("UPDATE ""CostHolder"" SET ""Oid""='" + _CostHolder.Oid.ToString + "' WHERE ""Oid""='" + _CostHolder_New.Oid.ToString + "'")
|
||||
_uow_To.ExecuteNonQuery("UPDATE ""HCategory"" SET ""Oid""='" + _CostHolder.Oid.ToString + "' WHERE ""Oid""='" + _CostHolder_New.Oid.ToString + "'")
|
||||
_uow_To.ExecuteNonQuery("ALTER TABLE ""HCategory"" ENABLE TRIGGER ALL")
|
||||
_uow_To.ExecuteNonQuery("ALTER TABLE ""CostHolder"" ENABLE TRIGGER ALL")
|
||||
End Select
|
||||
|
||||
RaiseEvent DoWork()
|
||||
Next
|
||||
RaiseEvent FinalWork
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message)
|
||||
Finally
|
||||
If _Session_From.IsConnected Then _Session_From.Disconnect()
|
||||
If _Session_To.IsConnected Then _Session_To.Disconnect()
|
||||
RaiseEvent FinalWork
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub aSystemTool_CopyControlling_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aSystemTool_CopyControlling.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _SystemTool As SystemTool = TryCast(View.SelectedObjects(0), SystemTool)
|
||||
Dim _Controlling_Collection As XPCollection(Of Controlling)
|
||||
Dim _Session_From As New Session
|
||||
Dim _Session_To As New Session
|
||||
_Session_From.ConnectionString = GetConnectionString(0, _SystemTool)
|
||||
_Session_To.ConnectionString = GetConnectionString(1, _SystemTool)
|
||||
Try
|
||||
_Session_From.Connect()
|
||||
If _Session_From.IsConnected Then
|
||||
_Session_To.Connect()
|
||||
If _Session_To.IsConnected Then
|
||||
|
||||
Dim _uow_From As New UnitOfWork(_Session_From.DataLayer)
|
||||
Dim _uow_To As New UnitOfWork(_Session_To.DataLayer)
|
||||
_Controlling_Collection = New XPCollection(Of Controlling)(_uow_From, CriteriaOperator.Parse("1=1"))
|
||||
|
||||
RaiseEvent InitWork(1, 1, _Controlling_Collection.Count)
|
||||
For Each _Controlling As Controlling In _Controlling_Collection
|
||||
Dim _Controlling_New As New Controlling(_uow_To)
|
||||
With _Controlling_New
|
||||
.Name = _Controlling.Name
|
||||
If _Controlling.Parent IsNot Nothing Then
|
||||
Dim _Parent As Controlling = _uow_From.FindObject(Of Controlling)(CriteriaOperator.Parse("Oid=?", _Controlling.Parent.Oid))
|
||||
.Parent = _uow_To.GetObjectByKey(Of Controlling)(_Parent.Oid)
|
||||
End If
|
||||
If _Controlling.ChartOfAccounts IsNot Nothing Then
|
||||
.ChartOfAccounts = _uow_To.GetObjectByKey(Of ChartOfAccounts)(_Controlling.ChartOfAccounts.Oid)
|
||||
End If
|
||||
If _Controlling.ChartOfAccounts2 IsNot Nothing Then
|
||||
.ChartOfAccounts2 = _uow_To.GetObjectByKey(Of ChartOfAccounts)(_Controlling.ChartOfAccounts2.Oid)
|
||||
End If
|
||||
.IsCOCRequired = _Controlling.IsCOCRequired
|
||||
.COCAboveAmount = _Controlling.COCAboveAmount
|
||||
.IsParent = _Controlling.IsParent
|
||||
.Controllingdirection = _Controlling.Controllingdirection
|
||||
.IsReInvoiceReason = _Controlling.IsReInvoiceReason
|
||||
.ReInvoiceDescription = _Controlling.ReInvoiceDescription
|
||||
.TechnicalContractLimit = _Controlling.TechnicalContractLimit
|
||||
If _Controlling.Controlling1 IsNot Nothing Then
|
||||
.Controlling1 = _uow_To.GetObjectByKey(Of Controlling)(_Controlling.Controlling1.Oid)
|
||||
Else
|
||||
.Controlling1 = Nothing
|
||||
End If
|
||||
If _Controlling.Controlling2 IsNot Nothing Then
|
||||
.Controlling2 = _uow_To.GetObjectByKey(Of Controlling)(_Controlling.Controlling2.Oid)
|
||||
Else
|
||||
.Controlling2 = Nothing
|
||||
End If
|
||||
If _Controlling.Controlling3 IsNot Nothing Then
|
||||
.Controlling3 = _uow_To.GetObjectByKey(Of Controlling)(_Controlling.Controlling3.Oid)
|
||||
Else
|
||||
.Controlling3 = Nothing
|
||||
End If
|
||||
If _Controlling.Controlling4 IsNot Nothing Then
|
||||
.Controlling4 = _uow_To.GetObjectByKey(Of Controlling)(_Controlling.Controlling4.Oid)
|
||||
Else
|
||||
.Controlling4 = Nothing
|
||||
End If
|
||||
If _Controlling.Controlling5 IsNot Nothing Then
|
||||
.Controlling5 = _uow_To.GetObjectByKey(Of Controlling)(_Controlling.Controlling5.Oid)
|
||||
Else
|
||||
.Controlling5 = Nothing
|
||||
End If
|
||||
.IsAdvancePayment = _Controlling.IsAdvancePayment
|
||||
.IsEstateStatistics = _Controlling.IsEstateStatistics
|
||||
End With
|
||||
_uow_To.CommitChanges()
|
||||
|
||||
|
||||
Select _SystemTool.SQLType_To
|
||||
Case eSQLType.MSSQL
|
||||
_uow_To.ExecuteNonQuery("ALTER TABLE HCategory NOCHECK CONSTRAINT ALL")
|
||||
_uow_To.ExecuteNonQuery("ALTER TABLE Controlling NOCHECK CONSTRAINT ALL")
|
||||
_uow_To.ExecuteNonQuery("UPDATE HCategory SET Oid='" + _Controlling.Oid.ToString + "' WHERE Oid='" + _Controlling_New.Oid.ToString + "'")
|
||||
_uow_To.ExecuteNonQuery("UPDATE Controlling SET Oid='" + _Controlling.Oid.ToString + "' WHERE Oid='" + _Controlling_New.Oid.ToString + "'")
|
||||
_uow_To.ExecuteNonQuery("ALTER TABLE HCategory CHECK CONSTRAINT ALL")
|
||||
_uow_To.ExecuteNonQuery("ALTER TABLE Controlling CHECK CONSTRAINT ALL")
|
||||
Case eSQLType.MySQL
|
||||
'--==Oid regenerálás==--
|
||||
_uow_To.ExecuteNonQuery("SET foreign_key_checks = 0")
|
||||
_uow_To.ExecuteNonQuery("UPDATE HCategory SET Oid='" + _Controlling.Oid.ToString + "' WHERE Oid='" + _Controlling_New.Oid.ToString + "'")
|
||||
_uow_To.ExecuteNonQuery("UPDATE Controlling SET Oid='" + _Controlling.Oid.ToString + "' WHERE Oid='" + _Controlling_New.Oid.ToString + "'")
|
||||
_uow_To.ExecuteNonQuery("SET foreign_key_checks = 1")
|
||||
'--===================--
|
||||
Case eSQLType.PostgreSQL
|
||||
_uow_To.ExecuteNonQuery("ALTER TABLE ""HCategory"" DISABLE TRIGGER ALL")
|
||||
_uow_To.ExecuteNonQuery("ALTER TABLE ""Controlling"" DISABLE TRIGGER ALL")
|
||||
_uow_To.ExecuteNonQuery("UPDATE ""HCategory"" SET ""Oid""='" + _Controlling.Oid.ToString + "' WHERE ""Oid""='" + _Controlling_New.Oid.ToString + "'")
|
||||
_uow_To.ExecuteNonQuery("UPDATE ""Controlling"" SET ""Oid""='" + _Controlling.Oid.ToString + "' WHERE ""Oid""='" + _Controlling_New.Oid.ToString + "'")
|
||||
_uow_To.ExecuteNonQuery("ALTER TABLE ""HCategory"" ENABLE TRIGGER ALL")
|
||||
_uow_To.ExecuteNonQuery("ALTER TABLE ""Controlling"" ENABLE TRIGGER ALL")
|
||||
|
||||
End Select
|
||||
|
||||
RaiseEvent DoWork()
|
||||
Next
|
||||
RaiseEvent FinalWork
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message)
|
||||
Finally
|
||||
If _Session_From.IsConnected Then _Session_From.Disconnect()
|
||||
If _Session_To.IsConnected Then _Session_To.Disconnect()
|
||||
RaiseEvent FinalWork
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub aSystemTool_ExportOids_CustomizePopupWindowParams(sender As Object, e As CustomizePopupWindowParamsEventArgs) Handles aSystemTool_ExportOids.CustomizePopupWindowParams
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _ExportOids_PopUp As New ExportOids_PopUp(_onew.Session)
|
||||
|
||||
e.View = Application.CreateDetailView(_onew, "ExportOids_PopUp_DetailView", False, _ExportOids_PopUp)
|
||||
End Sub
|
||||
Private Sub aSystemTool_ExportOids_Execute(sender As Object, e As PopupWindowShowActionExecuteEventArgs) Handles aSystemTool_ExportOids.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _ExportOids_PopUp As ExportOids_PopUp = TryCast(e.PopupWindow.View.SelectedObjects(0), ExportOids_PopUp)
|
||||
If _ExportOids_PopUp IsNot Nothing Then
|
||||
Dim _FileName As String = IO.Path.GetTempPath + "Export.txt"
|
||||
If IO.File.Exists(_FileName) Then IO.File.Delete(_FileName)
|
||||
Dim _StreamWriter As New System.IO.StreamWriter(_FileName, True)
|
||||
Select Case _ExportOids_PopUp.ExportOidClass
|
||||
Case eExportOidClass.Controlling
|
||||
Dim _Controlling_Collection As New XPCollection(Of Controlling)(_ocur.Session, CriteriaOperator.Parse("1=1"))
|
||||
_StreamWriter.WriteLine("<Services_Controlling>")
|
||||
_StreamWriter.WriteLine("<!--szolgaltatascsoport id - Controlling Oid-->")
|
||||
Dim _Index As Integer = 1
|
||||
For Each _Controlling As Controlling In _Controlling_Collection
|
||||
_StreamWriter.WriteLine("<!--" + _Controlling.Name + "-->")
|
||||
_StreamWriter.WriteLine("<add key=" + _Index.ToString + " value=" + _Controlling.Oid.ToString + "></add>")
|
||||
_Index += 1
|
||||
Next
|
||||
_StreamWriter.WriteLine("</Services_Controlling>")
|
||||
Case eExportOidClass.CostHolder
|
||||
Dim _CostHolder_Collection As New XPCollection(Of CostHolder)(_ocur.Session, CriteriaOperator.Parse("1=1"))
|
||||
_StreamWriter.WriteLine("<Services_CostHolder>")
|
||||
_StreamWriter.WriteLine("<!--szolgaltatascsoport id - CostHolder Oid-->")
|
||||
Dim _Index As Integer = 1
|
||||
For Each _CostHolder As CostHolder In _CostHolder_Collection
|
||||
_StreamWriter.WriteLine("<!--" + _CostHolder.Name + "-->")
|
||||
_StreamWriter.WriteLine("<add key=" + _Index.ToString + " value=" + _CostHolder.Oid.ToString + "></add>")
|
||||
_Index += 1
|
||||
Next
|
||||
_StreamWriter.WriteLine("</Services_CostHolder>")
|
||||
Case eExportOidClass.VAT
|
||||
Dim _VAT_Collection As New XPCollection(Of VAT)(_ocur.Session, CriteriaOperator.Parse("1=1"))
|
||||
_StreamWriter.WriteLine("<Services_VAT>")
|
||||
_StreamWriter.WriteLine("<!--afanev - VAT Oid-->")
|
||||
Dim _Index As Integer = 1
|
||||
For Each _VAT As VAT In _VAT_Collection
|
||||
_StreamWriter.WriteLine("<!--" + _VAT.ShortName + "-->")
|
||||
_StreamWriter.WriteLine("<add key=" + _VAT.KeyValuePercent.ToString + " value=" + _VAT.Oid.ToString + "></add>")
|
||||
Next
|
||||
_StreamWriter.WriteLine("</Services_VAT>")
|
||||
End Select
|
||||
_StreamWriter.Close()
|
||||
|
||||
If _ExportOids_PopUp.OpenFileAfterExport Then
|
||||
Process.Start(_FileName)
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Private Sub aSystemTool_CopyCustomersGLParameters_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aSystemTool_CopyCustomersGLParameters.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _SystemTool As SystemTool = TryCast(View.SelectedObjects(0), SystemTool)
|
||||
Dim _CustomersGLParameters_Collection As XPCollection(Of CustomersGLParameters)
|
||||
Dim _Session_From As New Session
|
||||
Dim _Session_To As New Session
|
||||
_Session_From.ConnectionString = GetConnectionString(0, _SystemTool)
|
||||
_Session_To.ConnectionString = GetConnectionString(1, _SystemTool)
|
||||
Try
|
||||
_Session_From.Connect()
|
||||
If _Session_From.IsConnected Then
|
||||
_Session_To.Connect()
|
||||
If _Session_To.IsConnected Then
|
||||
|
||||
Dim _uow_From As New UnitOfWork(_Session_From.DataLayer)
|
||||
Dim _uow_To As New UnitOfWork(_Session_To.DataLayer)
|
||||
_CustomersGLParameters_Collection = New XPCollection(Of CustomersGLParameters)(_uow_From, CriteriaOperator.Parse("1=1"))
|
||||
|
||||
RaiseEvent InitWork(1, 1, _CustomersGLParameters_Collection.Count)
|
||||
For Each _CustomersGLParameters As CustomersGLParameters In _CustomersGLParameters_Collection
|
||||
Dim _CustomersGLParameters_New As New CustomersGLParameters(_uow_To)
|
||||
With _CustomersGLParameters_New
|
||||
.ShortName = _CustomersGLParameters.ShortName
|
||||
.DefaultforBusiness = _CustomersGLParameters.DefaultforBusiness
|
||||
End With
|
||||
_uow_To.CommitChanges()
|
||||
|
||||
Select Case _SystemTool.SQLType_To
|
||||
Case eSQLType.MSSQL
|
||||
_uow_To.ExecuteNonQuery("UPDATE CustomersGLParameters SET Oid='" + _CustomersGLParameters.Oid.ToString + "' WHERE Oid='" + _CustomersGLParameters_New.Oid.ToString + "'")
|
||||
Case eSQLType.MySQL
|
||||
'--==Oid regenerálás==--
|
||||
_uow_To.ExecuteNonQuery("UPDATE CustomersGLParameters SET Oid='" + _CustomersGLParameters.Oid.ToString + "' WHERE Oid='" + _CustomersGLParameters_New.Oid.ToString + "'")
|
||||
'--===================--
|
||||
Case eSQLType.PostgreSQL
|
||||
_uow_To.ExecuteNonQuery("UPDATE ""CustomersGLParameters"" SET ""Oid""='" + _CustomersGLParameters.Oid.ToString + "' WHERE ""Oid""='" + _CustomersGLParameters_New.Oid.ToString + "'")
|
||||
End Select
|
||||
|
||||
RaiseEvent DoWork()
|
||||
Next
|
||||
RaiseEvent FinalWork
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message)
|
||||
Finally
|
||||
If _Session_From.IsConnected Then _Session_From.Disconnect()
|
||||
If _Session_To.IsConnected Then _Session_To.Disconnect()
|
||||
RaiseEvent FinalWork
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub aSystemTool_CopyUnits_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aSystemTool_CopyUnits.Execute
|
||||
'Beep()
|
||||
|
||||
End Sub
|
||||
Private Sub aSystemTool_CopyWorkflowSystem_CustomizePopupWindowParams(sender As Object, e As CustomizePopupWindowParamsEventArgs) Handles aSystemTool_CopyWorkflowSystem.CustomizePopupWindowParams
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _SystemTool As SystemTool = TryCast(View.SelectedObjects(0), SystemTool)
|
||||
Dim _Session_From As New Session
|
||||
_Session_From.ConnectionString = GetConnectionString(0, _SystemTool)
|
||||
_Session_From.Connect()
|
||||
If _Session_From.IsConnected Then
|
||||
Dim _CopyWorkflowSystem_CollectionSource As New CollectionSource(_onew, GetType(CopyWorkflowSystem_PopUp))
|
||||
Dim _WorkflowSystem_Collection As New XPCollection(Of WorkflowSystem)(_Session_From)
|
||||
|
||||
If _WorkflowSystem_Collection.Count > 0 Then
|
||||
For Each _WorkflowSystem As WorkflowSystem In _WorkflowSystem_Collection
|
||||
Dim _CopyWorkflowSystem_PopUp As New CopyWorkflowSystem_PopUp(_onew.Session)
|
||||
With _CopyWorkflowSystem_PopUp
|
||||
.NeedToCopy = True
|
||||
.WorkflowSystem = _onew.GetObject(_WorkflowSystem)
|
||||
End With
|
||||
_CopyWorkflowSystem_CollectionSource.Add(_CopyWorkflowSystem_PopUp)
|
||||
Next
|
||||
End If
|
||||
e.View = Application.CreateListView("CopyWorkflowSystem_PopUp_ListView", _CopyWorkflowSystem_CollectionSource, True)
|
||||
_Session_From.Disconnect()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Private Sub aSystemTool_CopyWorkflowSystem_Execute(sender As Object, e As PopupWindowShowActionExecuteEventArgs) Handles aSystemTool_CopyWorkflowSystem.Execute
|
||||
Try
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _SystemTool As SystemTool = TryCast(View.SelectedObjects(0), SystemTool)
|
||||
Dim _Session_From As New Session
|
||||
Dim _Session_To As New Session
|
||||
_Session_From.ConnectionString = GetConnectionString(0, _SystemTool)
|
||||
_Session_To.ConnectionString = GetConnectionString(1, _SystemTool)
|
||||
|
||||
_Session_From.Connect()
|
||||
If _Session_From.IsConnected Then
|
||||
_Session_To.Connect()
|
||||
If _Session_To.IsConnected Then
|
||||
RaiseEvent InitWork(1, 1, TryCast(e.PopupWindow.View, ListView).CollectionSource.GetCount())
|
||||
Dim _uow_To As New UnitOfWork(_Session_To.DataLayer)
|
||||
|
||||
For Each _CopyWorkflowSystem_PopUp As CopyWorkflowSystem_PopUp In TryCast(e.PopupWindow.View, ListView).CollectionSource.Collection
|
||||
If _CopyWorkflowSystem_PopUp.NeedToCopy Then
|
||||
Dim _WorkflowSystem As New WorkflowSystem(_uow_To)
|
||||
With _WorkflowSystem
|
||||
.CustomersFrom = _uow_To.FindObject(Of CustomersFrom)(CriteriaOperator.Parse("IsDefault=True"))
|
||||
.PartnerType = _CopyWorkflowSystem_PopUp.WorkflowSystem.PartnerType
|
||||
.ShortName = _CopyWorkflowSystem_PopUp.WorkflowSystem.ShortName
|
||||
.Description = _CopyWorkflowSystem_PopUp.WorkflowSystem.Description
|
||||
End With
|
||||
|
||||
For Each _WorkflowSystemSteps As WorkflowSystemSteps In _CopyWorkflowSystem_PopUp.WorkflowSystem.WorkflowSystemSteps
|
||||
Dim _WorkflowSystemSteps_NEW As New WorkflowSystemSteps(_uow_To)
|
||||
With _WorkflowSystemSteps_NEW
|
||||
.WorkflowSystem = _WorkflowSystem
|
||||
.ShortName = _WorkflowSystemSteps.ShortName
|
||||
.StepIndex = _WorkflowSystemSteps.StepIndex
|
||||
.TaskDescription = _WorkflowSystemSteps.TaskDescription
|
||||
.ExpirationDayofFailure = _WorkflowSystemSteps.ExpirationDayofFailure
|
||||
.ActionOnSuccess = _WorkflowSystemSteps.ActionOnSuccess
|
||||
.ActionOnFailure = _WorkflowSystemSteps.ActionOnFailure
|
||||
.IsLastStep = _WorkflowSystemSteps.IsLastStep
|
||||
.IsReadyForImport = _WorkflowSystemSteps.IsReadyForImport
|
||||
.StepFinancialType = _WorkflowSystemSteps.StepFinancialType
|
||||
End With
|
||||
Next
|
||||
_uow_To.CommitChanges()
|
||||
RaiseEvent DoWork()
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, "Hiba!")
|
||||
Finally
|
||||
RaiseEvent FinalWork
|
||||
End Try
|
||||
End Sub
|
||||
Private Function IsExistChartOfAccounts(_AccountNumberIn As String, _ChartOfAccounts_CollectionIn As XPCollection(Of ChartOfAccounts)) As Boolean
|
||||
Dim _Result As Boolean = False
|
||||
For Each _ChartOfAccounts As ChartOfAccounts In _ChartOfAccounts_CollectionIn
|
||||
If _ChartOfAccounts.AccountNumber = _AccountNumberIn Then
|
||||
_Result = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
Return _Result
|
||||
End Function
|
||||
|
||||
End Class
|
||||
Reference in New Issue
Block a user