9 Commits

Author SHA1 Message Date
Jonathan Jenne
925b91261a VirtualDrive: Clean up 2021-04-15 11:18:27 +02:00
Jonathan Jenne
3e7aaae67b JobRunner: Clean up 2021-04-15 11:18:16 +02:00
Jonathan Jenne
87b15f8540 EDMIService: Update Deps, Add Logging, Clean up app.config 2021-04-15 11:16:15 +02:00
Jonathan Jenne
c8f77855ec Jobs: Version 1.5.1 2021-04-15 11:15:26 +02:00
Jonathan Jenne
6ce39ea261 Jobs/EDMI: Add Logging for GetOriginalEmailPath 2021-04-15 11:15:09 +02:00
Jonathan Jenne
2f047b67d9 ZooFlow: Admin 2021-04-15 11:14:39 +02:00
Jonathan Jenne
9b0527d601 TestGUI: update 2021-04-15 11:14:28 +02:00
Jonathan Jenne
2b3e56dca7 Database: Version 2.0.0 2021-04-15 11:13:57 +02:00
Jonathan Jenne
37609ee918 Database: Add Support for MSSQL Transactions
BREAKING CHANGE: Rename GetScalarValueConStr and ExecuteNonQueryCS
2021-04-15 11:13:46 +02:00
23 changed files with 374 additions and 330 deletions

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<configuration> <configuration>
<configSections> <configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">

View File

@@ -62,8 +62,8 @@
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.7.5\lib\net45\NLog.dll</HintPath> <HintPath>..\packages\NLog.4.7.5\lib\net45\NLog.dll</HintPath>
</Reference> </Reference>
<Reference Include="Quartz, Version=3.2.3.0, Culture=neutral, PublicKeyToken=f6b8c98a402cc8a4, processorArchitecture=MSIL"> <Reference Include="Quartz, Version=3.3.2.0, Culture=neutral, PublicKeyToken=f6b8c98a402cc8a4, processorArchitecture=MSIL">
<HintPath>..\packages\Quartz.3.2.3\lib\net461\Quartz.dll</HintPath> <HintPath>..\packages\Quartz.3.3.2\lib\net472\Quartz.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> <Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">

View File

@@ -2,7 +2,7 @@
<packages> <packages>
<package id="Microsoft.Extensions.Logging.Abstractions" version="2.1.1" targetFramework="net461" /> <package id="Microsoft.Extensions.Logging.Abstractions" version="2.1.1" targetFramework="net461" />
<package id="NLog" version="4.7.5" targetFramework="net461" /> <package id="NLog" version="4.7.5" targetFramework="net461" />
<package id="Quartz" version="3.2.3" targetFramework="net461" /> <package id="Quartz" version="3.3.2" targetFramework="net472" />
<package id="System.Buffers" version="4.5.1" targetFramework="net461" /> <package id="System.Buffers" version="4.5.1" targetFramework="net461" />
<package id="System.Diagnostics.DiagnosticSource" version="4.7.1" targetFramework="net461" /> <package id="System.Diagnostics.DiagnosticSource" version="4.7.1" targetFramework="net461" />
<package id="System.Memory" version="4.5.4" targetFramework="net461" /> <package id="System.Memory" version="4.5.4" targetFramework="net461" />

View File

@@ -0,0 +1,3 @@
Public Class ClassValidation
End Class

View File

@@ -48,13 +48,14 @@ Partial Class frmAdmin_SourceSQL
Me.LayoutControlItem4 = New DevExpress.XtraLayout.LayoutControlItem() Me.LayoutControlItem4 = New DevExpress.XtraLayout.LayoutControlItem()
Me.LayoutControlItem5 = New DevExpress.XtraLayout.LayoutControlItem() Me.LayoutControlItem5 = New DevExpress.XtraLayout.LayoutControlItem()
Me.LayoutControlItem6 = New DevExpress.XtraLayout.LayoutControlItem() Me.LayoutControlItem6 = New DevExpress.XtraLayout.LayoutControlItem()
Me.EmptySpaceItem1 = New DevExpress.XtraLayout.EmptySpaceItem()
Me.LayoutControlItem7 = New DevExpress.XtraLayout.LayoutControlItem() Me.LayoutControlItem7 = New DevExpress.XtraLayout.LayoutControlItem()
Me.LayoutControlItem9 = New DevExpress.XtraLayout.LayoutControlItem() Me.LayoutControlItem9 = New DevExpress.XtraLayout.LayoutControlItem()
Me.LayoutControlItem8 = New DevExpress.XtraLayout.LayoutControlItem() Me.LayoutControlItem8 = New DevExpress.XtraLayout.LayoutControlItem()
Me.LayoutControlItem10 = New DevExpress.XtraLayout.LayoutControlItem() Me.LayoutControlItem10 = New DevExpress.XtraLayout.LayoutControlItem()
Me.TBZF_ADMIN_SOURCE_SQLTableAdapter = New DigitalData.GUIs.ZooFlow.DSIDB_StammdatenTableAdapters.TBZF_ADMIN_SOURCE_SQLTableAdapter() Me.TBZF_ADMIN_SOURCE_SQLTableAdapter = New DigitalData.GUIs.ZooFlow.DSIDB_StammdatenTableAdapters.TBZF_ADMIN_SOURCE_SQLTableAdapter()
Me.TableAdapterManager = New DigitalData.GUIs.ZooFlow.DSIDB_StammdatenTableAdapters.TableAdapterManager() Me.TableAdapterManager = New DigitalData.GUIs.ZooFlow.DSIDB_StammdatenTableAdapters.TableAdapterManager()
Me.EmptySpaceItem1 = New DevExpress.XtraLayout.EmptySpaceItem() Me.DxValidationProvider1 = New DevExpress.XtraEditors.DXErrorProvider.DXValidationProvider(Me.components)
CType(Me.RibbonControl, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.RibbonControl, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.LayoutControl1, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.LayoutControl1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.LayoutControl1.SuspendLayout() Me.LayoutControl1.SuspendLayout()
@@ -77,11 +78,12 @@ Partial Class frmAdmin_SourceSQL
CType(Me.LayoutControlItem4, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.LayoutControlItem4, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.LayoutControlItem5, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.LayoutControlItem5, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.LayoutControlItem6, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.LayoutControlItem6, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.EmptySpaceItem1, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.LayoutControlItem7, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.LayoutControlItem7, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.LayoutControlItem9, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.LayoutControlItem9, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.LayoutControlItem8, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.LayoutControlItem8, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.LayoutControlItem10, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.LayoutControlItem10, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.EmptySpaceItem1, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.DxValidationProvider1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout() Me.SuspendLayout()
' '
'RibbonControl 'RibbonControl
@@ -96,7 +98,7 @@ Partial Class frmAdmin_SourceSQL
Me.RibbonControl.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.[False] Me.RibbonControl.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.[False]
Me.RibbonControl.ShowPageHeadersMode = DevExpress.XtraBars.Ribbon.ShowPageHeadersMode.Hide Me.RibbonControl.ShowPageHeadersMode = DevExpress.XtraBars.Ribbon.ShowPageHeadersMode.Hide
Me.RibbonControl.ShowToolbarCustomizeItem = False Me.RibbonControl.ShowToolbarCustomizeItem = False
Me.RibbonControl.Size = New System.Drawing.Size(768, 63) Me.RibbonControl.Size = New System.Drawing.Size(768, 66)
Me.RibbonControl.StatusBar = Me.RibbonStatusBar Me.RibbonControl.StatusBar = Me.RibbonStatusBar
Me.RibbonControl.Toolbar.ShowCustomizeItem = False Me.RibbonControl.Toolbar.ShowCustomizeItem = False
' '
@@ -146,10 +148,10 @@ Partial Class frmAdmin_SourceSQL
'RibbonStatusBar 'RibbonStatusBar
' '
Me.RibbonStatusBar.ItemLinks.Add(Me.labelStatus) Me.RibbonStatusBar.ItemLinks.Add(Me.labelStatus)
Me.RibbonStatusBar.Location = New System.Drawing.Point(0, 583) Me.RibbonStatusBar.Location = New System.Drawing.Point(0, 585)
Me.RibbonStatusBar.Name = "RibbonStatusBar" Me.RibbonStatusBar.Name = "RibbonStatusBar"
Me.RibbonStatusBar.Ribbon = Me.RibbonControl Me.RibbonStatusBar.Ribbon = Me.RibbonControl
Me.RibbonStatusBar.Size = New System.Drawing.Size(768, 24) Me.RibbonStatusBar.Size = New System.Drawing.Size(768, 22)
' '
'LayoutControl1 'LayoutControl1
' '
@@ -164,22 +166,22 @@ Partial Class frmAdmin_SourceSQL
Me.LayoutControl1.Controls.Add(Me.txtChangedWho) Me.LayoutControl1.Controls.Add(Me.txtChangedWho)
Me.LayoutControl1.Controls.Add(Me.TextEdit9) Me.LayoutControl1.Controls.Add(Me.TextEdit9)
Me.LayoutControl1.Dock = System.Windows.Forms.DockStyle.Fill Me.LayoutControl1.Dock = System.Windows.Forms.DockStyle.Fill
Me.LayoutControl1.Location = New System.Drawing.Point(0, 63) Me.LayoutControl1.Location = New System.Drawing.Point(0, 66)
Me.LayoutControl1.Name = "LayoutControl1" Me.LayoutControl1.Name = "LayoutControl1"
Me.LayoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = New System.Drawing.Rectangle(816, 316, 650, 400) Me.LayoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = New System.Drawing.Rectangle(816, 316, 650, 400)
Me.LayoutControl1.Root = Me.Root Me.LayoutControl1.Root = Me.Root
Me.LayoutControl1.Size = New System.Drawing.Size(768, 520) Me.LayoutControl1.Size = New System.Drawing.Size(768, 519)
Me.LayoutControl1.TabIndex = 2 Me.LayoutControl1.TabIndex = 2
Me.LayoutControl1.Text = "LayoutControl1" Me.LayoutControl1.Text = "LayoutControl1"
' '
'TextEdit1 'TextEdit1
' '
Me.TextEdit1.DataBindings.Add(New System.Windows.Forms.Binding("EditValue", Me.TBZF_ADMIN_SOURCE_SQLBindingSource, "GUID", True)) Me.TextEdit1.DataBindings.Add(New System.Windows.Forms.Binding("EditValue", Me.TBZF_ADMIN_SOURCE_SQLBindingSource, "GUID", True))
Me.TextEdit1.Location = New System.Drawing.Point(99, 20) Me.TextEdit1.Location = New System.Drawing.Point(105, 20)
Me.TextEdit1.MenuManager = Me.RibbonControl Me.TextEdit1.MenuManager = Me.RibbonControl
Me.TextEdit1.Name = "TextEdit1" Me.TextEdit1.Name = "TextEdit1"
Me.TextEdit1.Properties.ReadOnly = True Me.TextEdit1.Properties.ReadOnly = True
Me.TextEdit1.Size = New System.Drawing.Size(649, 20) Me.TextEdit1.Size = New System.Drawing.Size(643, 20)
Me.TextEdit1.StyleController = Me.LayoutControl1 Me.TextEdit1.StyleController = Me.LayoutControl1
Me.TextEdit1.TabIndex = 4 Me.TextEdit1.TabIndex = 4
' '
@@ -196,94 +198,94 @@ Partial Class frmAdmin_SourceSQL
'TextEdit2 'TextEdit2
' '
Me.TextEdit2.DataBindings.Add(New System.Windows.Forms.Binding("EditValue", Me.TBZF_ADMIN_SOURCE_SQLBindingSource, "ENTITY_TITLE", True)) Me.TextEdit2.DataBindings.Add(New System.Windows.Forms.Binding("EditValue", Me.TBZF_ADMIN_SOURCE_SQLBindingSource, "ENTITY_TITLE", True))
Me.TextEdit2.Location = New System.Drawing.Point(99, 60) Me.TextEdit2.Location = New System.Drawing.Point(105, 60)
Me.TextEdit2.MenuManager = Me.RibbonControl Me.TextEdit2.MenuManager = Me.RibbonControl
Me.TextEdit2.Name = "TextEdit2" Me.TextEdit2.Name = "TextEdit2"
Me.TextEdit2.Size = New System.Drawing.Size(649, 20) Me.TextEdit2.Size = New System.Drawing.Size(643, 20)
Me.TextEdit2.StyleController = Me.LayoutControl1 Me.TextEdit2.StyleController = Me.LayoutControl1
Me.TextEdit2.TabIndex = 5 Me.TextEdit2.TabIndex = 5
' '
'TextEdit3 'TextEdit3
' '
Me.TextEdit3.DataBindings.Add(New System.Windows.Forms.Binding("EditValue", Me.TBZF_ADMIN_SOURCE_SQLBindingSource, "PK_COLUMN", True)) Me.TextEdit3.DataBindings.Add(New System.Windows.Forms.Binding("EditValue", Me.TBZF_ADMIN_SOURCE_SQLBindingSource, "PK_COLUMN", True))
Me.TextEdit3.Location = New System.Drawing.Point(99, 100) Me.TextEdit3.Location = New System.Drawing.Point(105, 100)
Me.TextEdit3.MenuManager = Me.RibbonControl Me.TextEdit3.MenuManager = Me.RibbonControl
Me.TextEdit3.Name = "TextEdit3" Me.TextEdit3.Name = "TextEdit3"
Me.TextEdit3.Size = New System.Drawing.Size(649, 20) Me.TextEdit3.Size = New System.Drawing.Size(643, 20)
Me.TextEdit3.StyleController = Me.LayoutControl1 Me.TextEdit3.StyleController = Me.LayoutControl1
Me.TextEdit3.TabIndex = 6 Me.TextEdit3.TabIndex = 6
' '
'TextEdit4 'TextEdit4
' '
Me.TextEdit4.DataBindings.Add(New System.Windows.Forms.Binding("EditValue", Me.TBZF_ADMIN_SOURCE_SQLBindingSource, "FK_COLUMN", True)) Me.TextEdit4.DataBindings.Add(New System.Windows.Forms.Binding("EditValue", Me.TBZF_ADMIN_SOURCE_SQLBindingSource, "FK_COLUMN", True))
Me.TextEdit4.Location = New System.Drawing.Point(99, 140) Me.TextEdit4.Location = New System.Drawing.Point(105, 140)
Me.TextEdit4.MenuManager = Me.RibbonControl Me.TextEdit4.MenuManager = Me.RibbonControl
Me.TextEdit4.Name = "TextEdit4" Me.TextEdit4.Name = "TextEdit4"
Me.TextEdit4.Size = New System.Drawing.Size(649, 20) Me.TextEdit4.Size = New System.Drawing.Size(643, 20)
Me.TextEdit4.StyleController = Me.LayoutControl1 Me.TextEdit4.StyleController = Me.LayoutControl1
Me.TextEdit4.TabIndex = 7 Me.TextEdit4.TabIndex = 7
' '
'TextEdit5 'TextEdit5
' '
Me.TextEdit5.DataBindings.Add(New System.Windows.Forms.Binding("EditValue", Me.TBZF_ADMIN_SOURCE_SQLBindingSource, "SCOPE", True)) Me.TextEdit5.DataBindings.Add(New System.Windows.Forms.Binding("EditValue", Me.TBZF_ADMIN_SOURCE_SQLBindingSource, "SCOPE", True))
Me.TextEdit5.Location = New System.Drawing.Point(99, 180) Me.TextEdit5.Location = New System.Drawing.Point(105, 180)
Me.TextEdit5.MenuManager = Me.RibbonControl Me.TextEdit5.MenuManager = Me.RibbonControl
Me.TextEdit5.Name = "TextEdit5" Me.TextEdit5.Name = "TextEdit5"
Me.TextEdit5.Size = New System.Drawing.Size(649, 20) Me.TextEdit5.Size = New System.Drawing.Size(643, 20)
Me.TextEdit5.StyleController = Me.LayoutControl1 Me.TextEdit5.StyleController = Me.LayoutControl1
Me.TextEdit5.TabIndex = 8 Me.TextEdit5.TabIndex = 8
' '
'MemoEdit1 'MemoEdit1
' '
Me.MemoEdit1.DataBindings.Add(New System.Windows.Forms.Binding("EditValue", Me.TBZF_ADMIN_SOURCE_SQLBindingSource, "SQL_COMMAND", True)) Me.MemoEdit1.DataBindings.Add(New System.Windows.Forms.Binding("EditValue", Me.TBZF_ADMIN_SOURCE_SQLBindingSource, "SQL_COMMAND", True))
Me.MemoEdit1.Location = New System.Drawing.Point(99, 220) Me.MemoEdit1.Location = New System.Drawing.Point(105, 220)
Me.MemoEdit1.MenuManager = Me.RibbonControl Me.MemoEdit1.MenuManager = Me.RibbonControl
Me.MemoEdit1.Name = "MemoEdit1" Me.MemoEdit1.Name = "MemoEdit1"
Me.MemoEdit1.Size = New System.Drawing.Size(649, 127) Me.MemoEdit1.Size = New System.Drawing.Size(643, 127)
Me.MemoEdit1.StyleController = Me.LayoutControl1 Me.MemoEdit1.StyleController = Me.LayoutControl1
Me.MemoEdit1.TabIndex = 9 Me.MemoEdit1.TabIndex = 9
' '
'txtAddedWho 'txtAddedWho
' '
Me.txtAddedWho.DataBindings.Add(New System.Windows.Forms.Binding("EditValue", Me.TBZF_ADMIN_SOURCE_SQLBindingSource, "ADDED_WHO", True)) Me.txtAddedWho.DataBindings.Add(New System.Windows.Forms.Binding("EditValue", Me.TBZF_ADMIN_SOURCE_SQLBindingSource, "ADDED_WHO", True))
Me.txtAddedWho.Location = New System.Drawing.Point(99, 367) Me.txtAddedWho.Location = New System.Drawing.Point(105, 367)
Me.txtAddedWho.MenuManager = Me.RibbonControl Me.txtAddedWho.MenuManager = Me.RibbonControl
Me.txtAddedWho.Name = "txtAddedWho" Me.txtAddedWho.Name = "txtAddedWho"
Me.txtAddedWho.Properties.ReadOnly = True Me.txtAddedWho.Properties.ReadOnly = True
Me.txtAddedWho.Size = New System.Drawing.Size(275, 20) Me.txtAddedWho.Size = New System.Drawing.Size(269, 20)
Me.txtAddedWho.StyleController = Me.LayoutControl1 Me.txtAddedWho.StyleController = Me.LayoutControl1
Me.txtAddedWho.TabIndex = 10 Me.txtAddedWho.TabIndex = 10
' '
'TextEdit7 'TextEdit7
' '
Me.TextEdit7.DataBindings.Add(New System.Windows.Forms.Binding("EditValue", Me.TBZF_ADMIN_SOURCE_SQLBindingSource, "ADDED_WHEN", True)) Me.TextEdit7.DataBindings.Add(New System.Windows.Forms.Binding("EditValue", Me.TBZF_ADMIN_SOURCE_SQLBindingSource, "ADDED_WHEN", True))
Me.TextEdit7.Location = New System.Drawing.Point(473, 367) Me.TextEdit7.Location = New System.Drawing.Point(479, 367)
Me.TextEdit7.MenuManager = Me.RibbonControl Me.TextEdit7.MenuManager = Me.RibbonControl
Me.TextEdit7.Name = "TextEdit7" Me.TextEdit7.Name = "TextEdit7"
Me.TextEdit7.Properties.ReadOnly = True Me.TextEdit7.Properties.ReadOnly = True
Me.TextEdit7.Size = New System.Drawing.Size(275, 20) Me.TextEdit7.Size = New System.Drawing.Size(269, 20)
Me.TextEdit7.StyleController = Me.LayoutControl1 Me.TextEdit7.StyleController = Me.LayoutControl1
Me.TextEdit7.TabIndex = 11 Me.TextEdit7.TabIndex = 11
' '
'txtChangedWho 'txtChangedWho
' '
Me.txtChangedWho.DataBindings.Add(New System.Windows.Forms.Binding("EditValue", Me.TBZF_ADMIN_SOURCE_SQLBindingSource, "CHANGED_WHO", True)) Me.txtChangedWho.DataBindings.Add(New System.Windows.Forms.Binding("EditValue", Me.TBZF_ADMIN_SOURCE_SQLBindingSource, "CHANGED_WHO", True))
Me.txtChangedWho.Location = New System.Drawing.Point(99, 407) Me.txtChangedWho.Location = New System.Drawing.Point(105, 407)
Me.txtChangedWho.MenuManager = Me.RibbonControl Me.txtChangedWho.MenuManager = Me.RibbonControl
Me.txtChangedWho.Name = "txtChangedWho" Me.txtChangedWho.Name = "txtChangedWho"
Me.txtChangedWho.Properties.ReadOnly = True Me.txtChangedWho.Properties.ReadOnly = True
Me.txtChangedWho.Size = New System.Drawing.Size(275, 20) Me.txtChangedWho.Size = New System.Drawing.Size(269, 20)
Me.txtChangedWho.StyleController = Me.LayoutControl1 Me.txtChangedWho.StyleController = Me.LayoutControl1
Me.txtChangedWho.TabIndex = 12 Me.txtChangedWho.TabIndex = 12
' '
'TextEdit9 'TextEdit9
' '
Me.TextEdit9.DataBindings.Add(New System.Windows.Forms.Binding("EditValue", Me.TBZF_ADMIN_SOURCE_SQLBindingSource, "CHANGED_WHEN", True)) Me.TextEdit9.DataBindings.Add(New System.Windows.Forms.Binding("EditValue", Me.TBZF_ADMIN_SOURCE_SQLBindingSource, "CHANGED_WHEN", True))
Me.TextEdit9.Location = New System.Drawing.Point(473, 407) Me.TextEdit9.Location = New System.Drawing.Point(479, 407)
Me.TextEdit9.MenuManager = Me.RibbonControl Me.TextEdit9.MenuManager = Me.RibbonControl
Me.TextEdit9.Name = "TextEdit9" Me.TextEdit9.Name = "TextEdit9"
Me.TextEdit9.Properties.ReadOnly = True Me.TextEdit9.Properties.ReadOnly = True
Me.TextEdit9.Size = New System.Drawing.Size(275, 20) Me.TextEdit9.Size = New System.Drawing.Size(269, 20)
Me.TextEdit9.StyleController = Me.LayoutControl1 Me.TextEdit9.StyleController = Me.LayoutControl1
Me.TextEdit9.TabIndex = 13 Me.TextEdit9.TabIndex = 13
' '
@@ -293,7 +295,7 @@ Partial Class frmAdmin_SourceSQL
Me.Root.GroupBordersVisible = False Me.Root.GroupBordersVisible = False
Me.Root.Items.AddRange(New DevExpress.XtraLayout.BaseLayoutItem() {Me.LayoutControlItem1, Me.LayoutControlItem2, Me.LayoutControlItem3, Me.LayoutControlItem4, Me.LayoutControlItem5, Me.LayoutControlItem6, Me.EmptySpaceItem1, Me.LayoutControlItem7, Me.LayoutControlItem9, Me.LayoutControlItem8, Me.LayoutControlItem10}) Me.Root.Items.AddRange(New DevExpress.XtraLayout.BaseLayoutItem() {Me.LayoutControlItem1, Me.LayoutControlItem2, Me.LayoutControlItem3, Me.LayoutControlItem4, Me.LayoutControlItem5, Me.LayoutControlItem6, Me.EmptySpaceItem1, Me.LayoutControlItem7, Me.LayoutControlItem9, Me.LayoutControlItem8, Me.LayoutControlItem10})
Me.Root.Name = "Root" Me.Root.Name = "Root"
Me.Root.Size = New System.Drawing.Size(768, 520) Me.Root.Size = New System.Drawing.Size(768, 519)
Me.Root.TextVisible = False Me.Root.TextVisible = False
' '
'LayoutControlItem1 'LayoutControlItem1
@@ -304,7 +306,7 @@ Partial Class frmAdmin_SourceSQL
Me.LayoutControlItem1.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10) Me.LayoutControlItem1.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10)
Me.LayoutControlItem1.Size = New System.Drawing.Size(748, 40) Me.LayoutControlItem1.Size = New System.Drawing.Size(748, 40)
Me.LayoutControlItem1.Text = "GUID" Me.LayoutControlItem1.Text = "GUID"
Me.LayoutControlItem1.TextSize = New System.Drawing.Size(76, 13) Me.LayoutControlItem1.TextSize = New System.Drawing.Size(82, 13)
' '
'LayoutControlItem2 'LayoutControlItem2
' '
@@ -314,7 +316,7 @@ Partial Class frmAdmin_SourceSQL
Me.LayoutControlItem2.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10) Me.LayoutControlItem2.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10)
Me.LayoutControlItem2.Size = New System.Drawing.Size(748, 40) Me.LayoutControlItem2.Size = New System.Drawing.Size(748, 40)
Me.LayoutControlItem2.Text = "Entity Title" Me.LayoutControlItem2.Text = "Entity Title"
Me.LayoutControlItem2.TextSize = New System.Drawing.Size(76, 13) Me.LayoutControlItem2.TextSize = New System.Drawing.Size(82, 13)
' '
'LayoutControlItem3 'LayoutControlItem3
' '
@@ -324,7 +326,7 @@ Partial Class frmAdmin_SourceSQL
Me.LayoutControlItem3.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10) Me.LayoutControlItem3.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10)
Me.LayoutControlItem3.Size = New System.Drawing.Size(748, 40) Me.LayoutControlItem3.Size = New System.Drawing.Size(748, 40)
Me.LayoutControlItem3.Text = "Primary Key" Me.LayoutControlItem3.Text = "Primary Key"
Me.LayoutControlItem3.TextSize = New System.Drawing.Size(76, 13) Me.LayoutControlItem3.TextSize = New System.Drawing.Size(82, 13)
' '
'LayoutControlItem4 'LayoutControlItem4
' '
@@ -334,7 +336,7 @@ Partial Class frmAdmin_SourceSQL
Me.LayoutControlItem4.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10) Me.LayoutControlItem4.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10)
Me.LayoutControlItem4.Size = New System.Drawing.Size(748, 40) Me.LayoutControlItem4.Size = New System.Drawing.Size(748, 40)
Me.LayoutControlItem4.Text = "Foreign Key" Me.LayoutControlItem4.Text = "Foreign Key"
Me.LayoutControlItem4.TextSize = New System.Drawing.Size(76, 13) Me.LayoutControlItem4.TextSize = New System.Drawing.Size(82, 13)
' '
'LayoutControlItem5 'LayoutControlItem5
' '
@@ -344,7 +346,7 @@ Partial Class frmAdmin_SourceSQL
Me.LayoutControlItem5.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10) Me.LayoutControlItem5.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10)
Me.LayoutControlItem5.Size = New System.Drawing.Size(748, 40) Me.LayoutControlItem5.Size = New System.Drawing.Size(748, 40)
Me.LayoutControlItem5.Text = "Scope" Me.LayoutControlItem5.Text = "Scope"
Me.LayoutControlItem5.TextSize = New System.Drawing.Size(76, 13) Me.LayoutControlItem5.TextSize = New System.Drawing.Size(82, 13)
' '
'LayoutControlItem6 'LayoutControlItem6
' '
@@ -354,7 +356,15 @@ Partial Class frmAdmin_SourceSQL
Me.LayoutControlItem6.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10) Me.LayoutControlItem6.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10)
Me.LayoutControlItem6.Size = New System.Drawing.Size(748, 147) Me.LayoutControlItem6.Size = New System.Drawing.Size(748, 147)
Me.LayoutControlItem6.Text = "SQL Command" Me.LayoutControlItem6.Text = "SQL Command"
Me.LayoutControlItem6.TextSize = New System.Drawing.Size(76, 13) Me.LayoutControlItem6.TextSize = New System.Drawing.Size(82, 13)
'
'EmptySpaceItem1
'
Me.EmptySpaceItem1.AllowHotTrack = False
Me.EmptySpaceItem1.Location = New System.Drawing.Point(0, 427)
Me.EmptySpaceItem1.Name = "EmptySpaceItem1"
Me.EmptySpaceItem1.Size = New System.Drawing.Size(748, 72)
Me.EmptySpaceItem1.TextSize = New System.Drawing.Size(0, 0)
' '
'LayoutControlItem7 'LayoutControlItem7
' '
@@ -364,7 +374,7 @@ Partial Class frmAdmin_SourceSQL
Me.LayoutControlItem7.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10) Me.LayoutControlItem7.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10)
Me.LayoutControlItem7.Size = New System.Drawing.Size(374, 40) Me.LayoutControlItem7.Size = New System.Drawing.Size(374, 40)
Me.LayoutControlItem7.Text = "Erstellt Wer" Me.LayoutControlItem7.Text = "Erstellt Wer"
Me.LayoutControlItem7.TextSize = New System.Drawing.Size(76, 13) Me.LayoutControlItem7.TextSize = New System.Drawing.Size(82, 13)
' '
'LayoutControlItem9 'LayoutControlItem9
' '
@@ -374,7 +384,7 @@ Partial Class frmAdmin_SourceSQL
Me.LayoutControlItem9.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10) Me.LayoutControlItem9.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10)
Me.LayoutControlItem9.Size = New System.Drawing.Size(374, 40) Me.LayoutControlItem9.Size = New System.Drawing.Size(374, 40)
Me.LayoutControlItem9.Text = "Geändert Wer" Me.LayoutControlItem9.Text = "Geändert Wer"
Me.LayoutControlItem9.TextSize = New System.Drawing.Size(76, 13) Me.LayoutControlItem9.TextSize = New System.Drawing.Size(82, 13)
' '
'LayoutControlItem8 'LayoutControlItem8
' '
@@ -384,7 +394,7 @@ Partial Class frmAdmin_SourceSQL
Me.LayoutControlItem8.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10) Me.LayoutControlItem8.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10)
Me.LayoutControlItem8.Size = New System.Drawing.Size(374, 40) Me.LayoutControlItem8.Size = New System.Drawing.Size(374, 40)
Me.LayoutControlItem8.Text = "Erstellt Wann" Me.LayoutControlItem8.Text = "Erstellt Wann"
Me.LayoutControlItem8.TextSize = New System.Drawing.Size(76, 13) Me.LayoutControlItem8.TextSize = New System.Drawing.Size(82, 13)
' '
'LayoutControlItem10 'LayoutControlItem10
' '
@@ -394,7 +404,7 @@ Partial Class frmAdmin_SourceSQL
Me.LayoutControlItem10.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10) Me.LayoutControlItem10.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10)
Me.LayoutControlItem10.Size = New System.Drawing.Size(374, 40) Me.LayoutControlItem10.Size = New System.Drawing.Size(374, 40)
Me.LayoutControlItem10.Text = "Geändert Wann" Me.LayoutControlItem10.Text = "Geändert Wann"
Me.LayoutControlItem10.TextSize = New System.Drawing.Size(76, 13) Me.LayoutControlItem10.TextSize = New System.Drawing.Size(82, 13)
' '
'TBZF_ADMIN_SOURCE_SQLTableAdapter 'TBZF_ADMIN_SOURCE_SQLTableAdapter
' '
@@ -409,14 +419,6 @@ Partial Class frmAdmin_SourceSQL
Me.TableAdapterManager.TBZF_ADMIN_SOURCE_SQLTableAdapter = Me.TBZF_ADMIN_SOURCE_SQLTableAdapter Me.TableAdapterManager.TBZF_ADMIN_SOURCE_SQLTableAdapter = Me.TBZF_ADMIN_SOURCE_SQLTableAdapter
Me.TableAdapterManager.UpdateOrder = DigitalData.GUIs.ZooFlow.DSIDB_StammdatenTableAdapters.TableAdapterManager.UpdateOrderOption.InsertUpdateDelete Me.TableAdapterManager.UpdateOrder = DigitalData.GUIs.ZooFlow.DSIDB_StammdatenTableAdapters.TableAdapterManager.UpdateOrderOption.InsertUpdateDelete
' '
'EmptySpaceItem1
'
Me.EmptySpaceItem1.AllowHotTrack = False
Me.EmptySpaceItem1.Location = New System.Drawing.Point(0, 427)
Me.EmptySpaceItem1.Name = "EmptySpaceItem1"
Me.EmptySpaceItem1.Size = New System.Drawing.Size(748, 73)
Me.EmptySpaceItem1.TextSize = New System.Drawing.Size(0, 0)
'
'frmAdmin_SourceSQL 'frmAdmin_SourceSQL
' '
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
@@ -452,11 +454,12 @@ Partial Class frmAdmin_SourceSQL
CType(Me.LayoutControlItem4, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.LayoutControlItem4, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.LayoutControlItem5, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.LayoutControlItem5, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.LayoutControlItem6, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.LayoutControlItem6, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.EmptySpaceItem1, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.LayoutControlItem7, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.LayoutControlItem7, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.LayoutControlItem9, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.LayoutControlItem9, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.LayoutControlItem8, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.LayoutControlItem8, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.LayoutControlItem10, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.LayoutControlItem10, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.EmptySpaceItem1, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.DxValidationProvider1, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False) Me.ResumeLayout(False)
Me.PerformLayout() Me.PerformLayout()
@@ -497,4 +500,5 @@ Partial Class frmAdmin_SourceSQL
Friend WithEvents LayoutControlItem10 As DevExpress.XtraLayout.LayoutControlItem Friend WithEvents LayoutControlItem10 As DevExpress.XtraLayout.LayoutControlItem
Friend WithEvents labelStatus As DevExpress.XtraBars.BarStaticItem Friend WithEvents labelStatus As DevExpress.XtraBars.BarStaticItem
Friend WithEvents EmptySpaceItem1 As DevExpress.XtraLayout.EmptySpaceItem Friend WithEvents EmptySpaceItem1 As DevExpress.XtraLayout.EmptySpaceItem
Friend WithEvents DxValidationProvider1 As DevExpress.XtraEditors.DXErrorProvider.DXValidationProvider
End Class End Class

View File

@@ -123,13 +123,13 @@
<metadata name="DSIDB_Stammdaten.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="DSIDB_Stammdaten.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value> <value>17, 17</value>
</metadata> </metadata>
<metadata name="DSIDB_Stammdaten.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="TBZF_ADMIN_SOURCE_SQLTableAdapter.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="TBZF_ADMIN_SOURCE_SQLTableAdapter.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>457, 17</value> <value>457, 17</value>
</metadata> </metadata>
<metadata name="TableAdapterManager.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="TableAdapterManager.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>731, 17</value> <value>731, 17</value>
</metadata> </metadata>
<metadata name="DxValidationProvider1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>904, 17</value>
</metadata>
</root> </root>

View File

@@ -1,4 +1,7 @@
Public Class frmAdmin_SourceSQL Imports DevExpress.XtraEditors.DXErrorProvider
Imports DevExpress.XtraLayout
Public Class frmAdmin_SourceSQL
Implements frmAdmin_Interface Implements frmAdmin_Interface
Public Property PrimaryKey As Integer Implements frmAdmin_Interface.PrimaryKey Public Property PrimaryKey As Integer Implements frmAdmin_Interface.PrimaryKey
@@ -15,6 +18,57 @@
Me.PrimaryKey = PrimaryKey Me.PrimaryKey = PrimaryKey
End Sub End Sub
Private Sub frmAdmin_SourceSQL_Load(sender As Object, e As EventArgs) Handles Me.Load
Try
If IsInsert Then
TBZF_ADMIN_SOURCE_SQLBindingSource.AddNew()
Else
TBZF_ADMIN_SOURCE_SQLTableAdapter.Fill(DSIDB_Stammdaten.TBZF_ADMIN_SOURCE_SQL, PrimaryKey)
End If
ValidationHelper()
Catch ex As Exception
ShowError(ex)
End Try
End Sub
Public Sub ValidationHelper()
Dim oTable As DataTable = DSIDB_Stammdaten.TBZF_ADMIN_SOURCE_SQL
Dim oProvider As DXValidationProvider = DxValidationProvider1
Dim oRootControl As Control = LayoutControl1
Dim oControls As List(Of Control) = oRootControl.Controls.
OfType(Of Control).
ToList()
Dim oBoundControls = ListBoundControls(oControls)
Console.WriteLine(oBoundControls.Count)
For Each oControl As Control In oBoundControls
Dim oBinding As Binding = oControl.DataBindings.Item(0)
Next
End Sub
Public Function ListBoundControls(Controls As List(Of Control)) As List(Of Control)
Dim oControlList As New List(Of Control)
For Each oControl As Control In Controls
If oControl.DataBindings IsNot Nothing AndAlso oControl.DataBindings.Count > 0 Then
oControlList.Add(oControl)
End If
If oControl.Controls IsNot Nothing AndAlso oControl.Controls.Count > 0 Then
Dim oControls As New List(Of Control)
oControls.AddRange(oControl.Controls.OfType(Of Control))
oControlList.AddRange(ListBoundControls(oControls))
End If
Next
Return oControlList
End Function
Public Function SaveData() As Boolean Implements frmAdmin_Interface.SaveData Public Function SaveData() As Boolean Implements frmAdmin_Interface.SaveData
Try Try
@@ -51,17 +105,7 @@
End Try End Try
End Function End Function
Private Sub frmAdmin_SourceSQL_Load(sender As Object, e As EventArgs) Handles Me.Load
Try
If IsInsert Then
TBZF_ADMIN_SOURCE_SQLBindingSource.AddNew()
Else
TBZF_ADMIN_SOURCE_SQLTableAdapter.Fill(DSIDB_Stammdaten.TBZF_ADMIN_SOURCE_SQL, PrimaryKey)
End If
Catch ex As Exception
ShowError(ex)
End Try
End Sub
Private Sub ResetMessages() Private Sub ResetMessages()
labelStatus.Visibility = DevExpress.XtraBars.BarItemVisibility.Never labelStatus.Visibility = DevExpress.XtraBars.BarItemVisibility.Never

View File

@@ -138,7 +138,7 @@ Partial Class frmAdmin_Start
Me.RibbonControl1.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage1}) Me.RibbonControl1.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage1})
Me.RibbonControl1.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.[False] Me.RibbonControl1.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.[False]
Me.RibbonControl1.ShowToolbarCustomizeItem = False Me.RibbonControl1.ShowToolbarCustomizeItem = False
Me.RibbonControl1.Size = New System.Drawing.Size(1077, 158) Me.RibbonControl1.Size = New System.Drawing.Size(1077, 159)
Me.RibbonControl1.StatusBar = Me.RibbonStatusBar1 Me.RibbonControl1.StatusBar = Me.RibbonStatusBar1
Me.RibbonControl1.Toolbar.ShowCustomizeItem = False Me.RibbonControl1.Toolbar.ShowCustomizeItem = False
' '
@@ -380,10 +380,10 @@ Partial Class frmAdmin_Start
' '
Me.RibbonStatusBar1.ItemLinks.Add(Me.labelStatus) Me.RibbonStatusBar1.ItemLinks.Add(Me.labelStatus)
Me.RibbonStatusBar1.ItemLinks.Add(Me.labelError) Me.RibbonStatusBar1.ItemLinks.Add(Me.labelError)
Me.RibbonStatusBar1.Location = New System.Drawing.Point(0, 652) Me.RibbonStatusBar1.Location = New System.Drawing.Point(0, 654)
Me.RibbonStatusBar1.Name = "RibbonStatusBar1" Me.RibbonStatusBar1.Name = "RibbonStatusBar1"
Me.RibbonStatusBar1.Ribbon = Me.RibbonControl1 Me.RibbonStatusBar1.Ribbon = Me.RibbonControl1
Me.RibbonStatusBar1.Size = New System.Drawing.Size(1077, 24) Me.RibbonStatusBar1.Size = New System.Drawing.Size(1077, 22)
' '
'RibbonPage2 'RibbonPage2
' '
@@ -392,6 +392,8 @@ Partial Class frmAdmin_Start
' '
'TreeListMenu 'TreeListMenu
' '
Me.TreeListMenu.Appearance.FocusedCell.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
Me.TreeListMenu.Appearance.FocusedCell.Options.UseBackColor = True
Me.TreeListMenu.Appearance.FocusedRow.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer)) Me.TreeListMenu.Appearance.FocusedRow.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
Me.TreeListMenu.Appearance.FocusedRow.Options.UseBackColor = True Me.TreeListMenu.Appearance.FocusedRow.Options.UseBackColor = True
Me.TreeListMenu.Columns.AddRange(New DevExpress.XtraTreeList.Columns.TreeListColumn() {Me.TreeListColumn1}) Me.TreeListMenu.Columns.AddRange(New DevExpress.XtraTreeList.Columns.TreeListColumn() {Me.TreeListColumn1})
@@ -416,7 +418,7 @@ Partial Class frmAdmin_Start
Me.TreeListMenu.OptionsView.ShowIndicator = False Me.TreeListMenu.OptionsView.ShowIndicator = False
Me.TreeListMenu.OptionsView.ShowVertLines = False Me.TreeListMenu.OptionsView.ShowVertLines = False
Me.TreeListMenu.SelectImageList = Me.MainTreeImages Me.TreeListMenu.SelectImageList = Me.MainTreeImages
Me.TreeListMenu.Size = New System.Drawing.Size(193, 465) Me.TreeListMenu.Size = New System.Drawing.Size(193, 446)
Me.TreeListMenu.TabIndex = 8 Me.TreeListMenu.TabIndex = 8
' '
'TreeListColumn1 'TreeListColumn1
@@ -447,18 +449,18 @@ Partial Class frmAdmin_Start
Me.DockPanel1.Controls.Add(Me.DockPanel1_Container) Me.DockPanel1.Controls.Add(Me.DockPanel1_Container)
Me.DockPanel1.Dock = DevExpress.XtraBars.Docking.DockingStyle.Left Me.DockPanel1.Dock = DevExpress.XtraBars.Docking.DockingStyle.Left
Me.DockPanel1.ID = New System.Guid("ce81b5b5-eff5-4006-8018-548aa8413799") Me.DockPanel1.ID = New System.Guid("ce81b5b5-eff5-4006-8018-548aa8413799")
Me.DockPanel1.Location = New System.Drawing.Point(0, 158) Me.DockPanel1.Location = New System.Drawing.Point(0, 159)
Me.DockPanel1.Name = "DockPanel1" Me.DockPanel1.Name = "DockPanel1"
Me.DockPanel1.OriginalSize = New System.Drawing.Size(200, 200) Me.DockPanel1.OriginalSize = New System.Drawing.Size(200, 200)
Me.DockPanel1.Size = New System.Drawing.Size(200, 494) Me.DockPanel1.Size = New System.Drawing.Size(200, 495)
Me.DockPanel1.Text = "Übersicht" Me.DockPanel1.Text = "Übersicht"
' '
'DockPanel1_Container 'DockPanel1_Container
' '
Me.DockPanel1_Container.Controls.Add(Me.TreeListMenu) Me.DockPanel1_Container.Controls.Add(Me.TreeListMenu)
Me.DockPanel1_Container.Location = New System.Drawing.Point(3, 26) Me.DockPanel1_Container.Location = New System.Drawing.Point(3, 46)
Me.DockPanel1_Container.Name = "DockPanel1_Container" Me.DockPanel1_Container.Name = "DockPanel1_Container"
Me.DockPanel1_Container.Size = New System.Drawing.Size(193, 465) Me.DockPanel1_Container.Size = New System.Drawing.Size(193, 446)
Me.DockPanel1_Container.TabIndex = 0 Me.DockPanel1_Container.TabIndex = 0
' '
'TBIDB_ATTRIBUTEBindingSource 'TBIDB_ATTRIBUTEBindingSource
@@ -508,7 +510,7 @@ Partial Class frmAdmin_Start
' '
Me.Panel1.Controls.Add(Me.labelTitle) Me.Panel1.Controls.Add(Me.labelTitle)
Me.Panel1.Dock = System.Windows.Forms.DockStyle.Top Me.Panel1.Dock = System.Windows.Forms.DockStyle.Top
Me.Panel1.Location = New System.Drawing.Point(200, 158) Me.Panel1.Location = New System.Drawing.Point(200, 159)
Me.Panel1.Name = "Panel1" Me.Panel1.Name = "Panel1"
Me.Panel1.Size = New System.Drawing.Size(877, 46) Me.Panel1.Size = New System.Drawing.Size(877, 46)
Me.Panel1.TabIndex = 8 Me.Panel1.TabIndex = 8
@@ -711,11 +713,11 @@ Partial Class frmAdmin_Start
'GridControl1 'GridControl1
' '
Me.GridControl1.Dock = System.Windows.Forms.DockStyle.Fill Me.GridControl1.Dock = System.Windows.Forms.DockStyle.Fill
Me.GridControl1.Location = New System.Drawing.Point(200, 204) Me.GridControl1.Location = New System.Drawing.Point(200, 205)
Me.GridControl1.MainView = Me.GridView1 Me.GridControl1.MainView = Me.GridView1
Me.GridControl1.MenuManager = Me.RibbonControl1 Me.GridControl1.MenuManager = Me.RibbonControl1
Me.GridControl1.Name = "GridControl1" Me.GridControl1.Name = "GridControl1"
Me.GridControl1.Size = New System.Drawing.Size(877, 448) Me.GridControl1.Size = New System.Drawing.Size(877, 449)
Me.GridControl1.TabIndex = 12 Me.GridControl1.TabIndex = 12
Me.GridControl1.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.GridView1}) Me.GridControl1.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.GridView1})
' '

View File

@@ -10,7 +10,7 @@
<Shape ID="DesignTable:TBIDB_ATTRIBUTE" ZOrder="4" X="359" Y="42" Height="305" Width="251" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="24" OldDataTableHeight="0" SplitterPosition="254" /> <Shape ID="DesignTable:TBIDB_ATTRIBUTE" ZOrder="4" X="359" Y="42" Height="305" Width="251" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="24" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:TBIDB_ATTRIBUTE_TYPE" ZOrder="2" X="677" Y="46" Height="286" Width="285" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="235" /> <Shape ID="DesignTable:TBIDB_ATTRIBUTE_TYPE" ZOrder="2" X="677" Y="46" Height="286" Width="285" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="235" />
<Shape ID="DesignTable:VWIDB_BE_ATTRIBUTE" ZOrder="5" X="991" Y="49" Height="324" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" /> <Shape ID="DesignTable:VWIDB_BE_ATTRIBUTE" ZOrder="5" X="991" Y="49" Height="324" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
<Shape ID="DesignTable:TBZF_ADMIN_SOURCE_SQL" ZOrder="1" X="74" Y="377" Height="305" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" /> <Shape ID="DesignTable:TBZF_ADMIN_SOURCE_SQL" ZOrder="1" X="73" Y="378" Height="305" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
</Shapes> </Shapes>
<Connectors> <Connectors>
<Connector ID="DesignRelation:FK_TYP_ID" ZOrder="3" LineWidth="11"> <Connector ID="DesignRelation:FK_TYP_ID" ZOrder="3" LineWidth="11">

View File

@@ -1847,7 +1847,7 @@ Public Class frmGlobix_Index
' ergebnis = ClassDatabase.OracleExecute_Scalar(sql, connectionString) ' ergebnis = ClassDatabase.OracleExecute_Scalar(sql, connectionString)
'Else 'Else
'MSQL 'MSQL
ergebnis = My.Database.GetScalarValueConStr(sql, connectionString) ergebnis = My.Database.GetScalarValueWithConnection(sql, connectionString)
' End If ' End If
Select Case ergebnis Select Case ergebnis
@@ -2022,7 +2022,7 @@ Public Class frmGlobix_Index
'If vProvider.ToLower = "oracle" Then 'If vProvider.ToLower = "oracle" Then
'oErgebnis = My.Database.leExecute_Scalar(SQLCommand, oConnectionString) 'oErgebnis = My.Database.leExecute_Scalar(SQLCommand, oConnectionString)
'Else 'im Moment nur SQL-Server 'Else 'im Moment nur SQL-Server
oErgebnis = My.Database.GetScalarValueConStr(SQLCommand, oConnectionString) oErgebnis = My.Database.GetScalarValueWithConnection(SQLCommand, oConnectionString)
'End If 'End If
_Logger.Debug("SQL-ConnectionString: " & oConnectionString.Substring(0, oConnectionString.LastIndexOf("="))) _Logger.Debug("SQL-ConnectionString: " & oConnectionString.Substring(0, oConnectionString.LastIndexOf("=")))
If oErgebnis Is Nothing Then If oErgebnis Is Nothing Then

View File

@@ -116,6 +116,7 @@
<ItemGroup> <ItemGroup>
<Compile Include="Administration\ClassConstants.vb" /> <Compile Include="Administration\ClassConstants.vb" />
<Compile Include="Administration\ClassDetailForm.vb" /> <Compile Include="Administration\ClassDetailForm.vb" />
<Compile Include="Administration\ClassValidation.vb" />
<Compile Include="Administration\frmAdmin_Base.vb"> <Compile Include="Administration\frmAdmin_Base.vb">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>

View File

@@ -1,4 +1,5 @@
Imports System.Data.Common Imports System.ComponentModel
Imports System.Data.Common
Imports System.Data.SqlClient Imports System.Data.SqlClient
Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Logging
@@ -8,9 +9,21 @@ Public Class MSSQLServer
Public DBInitialized As Boolean = False Public DBInitialized As Boolean = False
Public CurrentSQLConnectionString As String = "" Public CurrentSQLConnectionString As String = ""
Public Const TIMEOUT_DEFAULT As Integer = 120
Public Const TABLE_DEFAULT As String = "DDRESULT"
Private ReadOnly _Timeout As Integer Private ReadOnly _Timeout As Integer
Private ReadOnly _Logger As Logger Private ReadOnly _Logger As Logger
Public Enum TransactionMode
<Description("Use no transaction, neither internal nor external")>
NoTransaction
<Description("Use the transaction supplied in the Transaction Parameter")>
ExternalTransaction
<Description("Create an internal transaction on the fly")>
WithTransaction
End Enum
Public Sub New(LogConfig As LogConfig, ConnectionString As String, Optional Timeout As Integer = 120) Public Sub New(LogConfig As LogConfig, ConnectionString As String, Optional Timeout As Integer = 120)
_Logger = LogConfig.GetLogger() _Logger = LogConfig.GetLogger()
_Timeout = Timeout _Timeout = Timeout
@@ -49,6 +62,36 @@ Public Class MSSQLServer
Return oConnectionStringBuilder.ToString Return oConnectionStringBuilder.ToString
End Function End Function
Private Function MaybeGetTransaction(Connection As SqlConnection, Mode As TransactionMode, Transaction As SqlTransaction) As SqlTransaction
If Mode = TransactionMode.NoTransaction Then
Return Nothing
ElseIf Mode = TransactionMode.ExternalTransaction Then
Return Transaction
Else
Return Connection.BeginTransaction()
End If
End Function
Private Function MaybeCommitTransaction(Transaction As SqlTransaction, TransactionMode As TransactionMode) As Boolean
Select Case TransactionMode
Case TransactionMode.NoTransaction
Return True
Case TransactionMode.ExternalTransaction
Return True
Case TransactionMode.WithTransaction
Try
Transaction.Commit()
Return True
Catch ex As Exception
_Logger.Error(ex)
Return False
End Try
Case Else
Return True
End Select
End Function
Public Function Get_ConnectionStringforID(pConnectionId As Integer) Public Function Get_ConnectionStringforID(pConnectionId As Integer)
Dim connectionString As String = "" Dim connectionString As String = ""
Try Try
@@ -94,7 +137,7 @@ Public Class MSSQLServer
Private Function TestCanConnect(ConnectionString As String) As Boolean Private Function TestCanConnect(ConnectionString As String) As Boolean
Try Try
_Logger.Debug("Testing connection to [{0}]", ConnectionString) _Logger.Debug("Testing connection to [{0}]", MaskConnectionString(ConnectionString))
Dim oConnection As New SqlConnection(ConnectionString) Dim oConnection As New SqlConnection(ConnectionString)
oConnection.Open() oConnection.Open()
oConnection.Close() oConnection.Close()
@@ -105,11 +148,28 @@ Public Class MSSQLServer
End Try End Try
End Function End Function
Private Function GetSQLConnection() As SqlConnection Private Function TestCanConnect(Connection As SqlConnection) As Boolean
Return GetSQLConnection(CurrentSQLConnectionString) Try
If Connection Is Nothing Then
_Logger.Warn("TestCanConnect: Connection is nothing!")
Return False
End If
_Logger.Debug("Testing connection to [{0}]", MaskConnectionString(Connection.ConnectionString))
Connection.Open()
Connection.Close()
Return True
Catch ex As Exception
_Logger.Error(ex)
Return False
End Try
End Function End Function
Private Function GetSQLConnection(ConnectionString As String) As SqlConnection Private Function GetSQLConnection() As SqlConnection
Return GetConnection(CurrentSQLConnectionString)
End Function
Private Function GetConnection(ConnectionString As String) As SqlConnection
Try Try
Dim oConnection As New SqlConnection(ConnectionString) Dim oConnection As New SqlConnection(ConnectionString)
oConnection.Open() oConnection.Open()
@@ -136,233 +196,186 @@ Public Class MSSQLServer
End Try End Try
End Function End Function
Public Function GetDatatable(SqlCommand As String) As DataTable Implements IDatabase.GetDatatable
Return GetDatatable(SqlCommand, _Timeout)
End Function
''' <summary> ''' <summary>
''' Returns a datatable for a sql-statement ''' Returns a datatable for a sql-statement
''' </summary> ''' </summary>
''' <param name="SqlCommand">sqlcommand for datatable (select XYZ from TableORView)</param> ''' <param name="SqlCommand">sqlcommand for datatable (select XYZ from TableORView)</param>
''' <returns>Returns a datatable</returns> ''' <returns>Returns a datatable</returns>
Public Function GetDatatable(SqlCommand As String, Timeout As Integer) As DataTable Implements IDatabase.GetDatatable Public Function GetDatatable(SqlCommand As String, Timeout As Integer) As DataTable Implements IDatabase.GetDatatable
Try Using oSqlConnection = GetSQLConnection()
If TestCanConnect() = False Then Return GetDatatableWithConnectionObject(SqlCommand, oSqlConnection, TransactionMode.WithTransaction, Nothing, Timeout)
Return Nothing
End If
_Logger.Debug("GetDatatable: Running Query [{0}]", SqlCommand)
Using oConnection = GetSQLConnection()
Using oSQLCOmmand = oConnection.CreateCommand()
oSQLCOmmand.CommandText = SqlCommand
oSQLCOmmand.CommandTimeout = Timeout
Dim dt As DataTable = New DataTable()
Dim oAdapter As SqlDataAdapter = New SqlDataAdapter(oSQLCOmmand)
oAdapter.Fill(dt)
Return dt
End Using End Using
End Using
Catch ex As Exception
_Logger.Error(ex)
_Logger.Warn($"GetDatatable failed SQLCommand [{SqlCommand}]")
Return Nothing
End Try
End Function End Function
Public Function GetDatatable(SqlCommand As String) As DataTable Implements IDatabase.GetDatatable Public Function GetDatatable(SqlCommand As String, Transaction As SqlTransaction) As DataTable
Return GetDatatable(SqlCommand, _Timeout) Using oSqlConnection = GetSQLConnection()
Return GetDatatableWithConnectionObject(SqlCommand, oSqlConnection, TransactionMode.ExternalTransaction, Transaction)
End Using
End Function End Function
Public Async Function GetDatatableAsync(SqlCommand As String) As Task(Of DataTable) Public Async Function GetDatatableAsync(SqlCommand As String) As Task(Of DataTable)
Return Await Task.Run(Function() Return Await Task.Run(Function() GetDatatable(SqlCommand, _Timeout))
Return GetDatatable(SqlCommand, _Timeout)
End Function)
End Function End Function
Public Function GetDatatableWithConnection(SqlCommand As String, ConnectionString As String) As DataTable Public Function GetDatatableWithConnection(SqlCommand As String, ConnectionString As String) As DataTable
Try Using oConnection = GetConnection(ConnectionString)
If TestCanConnect(ConnectionString) = False Then Return GetDatatableWithConnectionObject(SqlCommand, oConnection)
Return Nothing
End If
_Logger.Debug("GetDatatableWithConnection: Running Query [{0}]", SqlCommand)
Using oConnection = GetSQLConnection(ConnectionString)
Using oSQLCOmmand = oConnection.CreateCommand()
oSQLCOmmand.CommandText = SqlCommand
oSQLCOmmand.CommandTimeout = _Timeout
Dim dt As DataTable = New DataTable()
Dim oAdapter As SqlDataAdapter = New SqlDataAdapter(oSQLCOmmand)
oAdapter.Fill(dt)
Return dt
End Using End Using
End Using
Catch ex As Exception
_Logger.Error(ex)
_Logger.Warn($"GetDatatableWithConnection failed with SQLCommand [{SqlCommand}] and ConnectionString [{MaskConnectionString(ConnectionString)}]")
Return Nothing
End Try
End Function End Function
Public Function GetDatatableWithConnection2(SqlCommand As String, ConnectionString As String) As DataTable Public Function GetDatatableWithConnectionObject(SqlCommand As String, SqlConnection As SqlConnection,
Try Optional TransactionMode As TransactionMode = TransactionMode.WithTransaction,
If TestCanConnect(ConnectionString) = False Then Optional Transaction As SqlTransaction = Nothing,
Optional Timeout As Integer = 120) As DataTable
If TestCanConnect(SqlConnection) = False Then
Return Nothing Return Nothing
End If End If
_Logger.Debug("GetDatatableWithConnection2: Running Query [{0}]", SqlCommand) Dim oTransaction As SqlTransaction = MaybeGetTransaction(SqlConnection, TransactionMode, Transaction)
Dim oTable As New DataTable() With {.TableName = TABLE_DEFAULT}
Using oConnection = GetSQLConnection(ConnectionString) Try
Using oSQLCOmmand = oConnection.CreateCommand() Dim oAdapter As New SqlDataAdapter(New SqlCommand With {
oSQLCOmmand.CommandText = SqlCommand .CommandText = SqlCommand,
oSQLCOmmand.CommandTimeout = _Timeout .Connection = SqlConnection,
.Transaction = oTransaction,
.CommandTimeout = Timeout
})
Dim oTable As DataTable = New DataTable("DD_RESULT") _Logger.Debug("GetDatatableWithConnectionObject: Running Query [{0}]", SqlCommand)
Using oReader As SqlDataReader = oSQLCOmmand.ExecuteReader() oAdapter.Fill(oTable)
Dim oSchemaTable As DataTable = oReader.GetSchemaTable()
For Each oRow As DataRow In oSchemaTable.Rows _Logger.Debug("GetDatatableWithConnectionObject: Running Query [{0}]", SqlCommand)
Dim oDataColumn As New DataColumn Catch ex As Exception
oDataColumn.ColumnName = oRow("ColumnName").ToString() _Logger.Error(ex)
oDataColumn.DataType = Type.GetType(oRow("DataType").ToString()) _Logger.Warn("GetDatatableWithConnectionObject: Error in GetDatatableWithConnection while executing command: [{0}]", SqlCommand)
oTable.Columns.Add(oDataColumn) Throw ex
Next Finally
MaybeCommitTransaction(oTransaction, TransactionMode)
While (oReader.Read()) End Try
Dim oRow As DataRow = oTable.NewRow()
For index = 0 To oTable.Columns.Count - 1
oRow.Item(index) = oReader.Item(index)
Next
oTable.Rows.Add(oRow)
End While
Return oTable Return oTable
End Using
End Using
End Using
Catch ex As Exception
_Logger.Error(ex)
_Logger.Warn($"GetDatatableWithConnection2 failed SQLCommand [{SqlCommand}]")
Return Nothing
End Try
End Function
Public Function ExecuteNonQuery(SQLCommand As String, Timeout As Integer) As Boolean Implements IDatabase.ExecuteNonQuery
Try
If TestCanConnect() = False Then
Return Nothing
End If
_Logger.Debug("ExecuteNonQuery: Running Query [{0}]", SQLCommand)
Using oConnection = GetSQLConnection()
Using oSQLCOmmand = oConnection.CreateCommand()
oSQLCOmmand.CommandText = SQLCommand
oSQLCOmmand.CommandTimeout = Timeout
oSQLCOmmand.ExecuteNonQuery()
Return True
End Using
End Using
Catch ex As Exception
_Logger.Error(ex)
_Logger.Warn($"ExecuteNonQuery failed SQLCommand [{SQLCommand}]")
Return False
End Try
End Function
Public Function ExecuteNonQueryCS(pSQLCommand As String, ConnString As String, Optional pInfo As String = "")
Try
If pInfo <> "" Then
pInfo = "[" & pInfo & "]"
End If
Dim SQLconnect As New SqlClient.SqlConnection
Dim SQLcommand As SqlClient.SqlCommand
SQLconnect.ConnectionString = ConnString
SQLconnect.Open()
SQLcommand = SQLconnect.CreateCommand
'Update Last Created Record in Foo
SQLcommand.CommandText = pSQLCommand
_Logger.Debug("Execute_non_Query_ConStr Created: " & pSQLCommand)
SQLcommand.ExecuteNonQuery()
SQLcommand.Dispose()
SQLconnect.Close()
Return True
Catch ex As Exception
_Logger.Error(ex)
_Logger.Warn($"ExecuteNonQueryCS failed SQLCommand [{pSQLCommand}]")
Return False
End Try
End Function End Function
Public Function ExecuteNonQuery(SQLCommand As String) As Boolean Implements IDatabase.ExecuteNonQuery Public Function ExecuteNonQuery(SQLCommand As String) As Boolean Implements IDatabase.ExecuteNonQuery
Return ExecuteNonQuery(SQLCommand, _Timeout) Using oConnection = GetSQLConnection()
Return ExecuteNonQueryWithConnectionObject(SQLCommand, oConnection, TransactionMode.WithTransaction, Nothing, TIMEOUT_DEFAULT)
End Using
End Function
Public Function ExecuteNonQuery(SQLCommand As String, Timeout As Integer) As Boolean Implements IDatabase.ExecuteNonQuery
Using oConnection = GetSQLConnection()
Return ExecuteNonQueryWithConnectionObject(SQLCommand, oConnection, TransactionMode.WithTransaction, Nothing, TIMEOUT_DEFAULT)
End Using
End Function
Public Function ExecuteNonQuery(SQLCommand As String, Transaction As SqlTransaction) As Boolean
Using oConnection = GetSQLConnection()
Return ExecuteNonQueryWithConnectionObject(SQLCommand, oConnection, TransactionMode.ExternalTransaction, Transaction, TIMEOUT_DEFAULT)
End Using
End Function End Function
Public Async Function ExecuteNonQueryAsync(SQLCommand As String) As Task(Of Boolean) Public Async Function ExecuteNonQueryAsync(SQLCommand As String) As Task(Of Boolean)
Return Await Task.Run(Function() Return Await Task.Run(Function() ExecuteNonQuery(SQLCommand))
Return ExecuteNonQuery(SQLCommand, _Timeout) End Function
End Function)
Public Function ExecuteNonQueryWithConnection(pSQLCommand As String, ConnString As String) As Boolean
Using oConnection = GetConnection(ConnString)
Return ExecuteNonQueryWithConnectionObject(pSQLCommand, oConnection)
End Using
End Function
Public Function ExecuteNonQueryWithConnectionObject(SqlCommand As String, SqlConnection As SqlConnection,
Optional TransactionMode As TransactionMode = TransactionMode.WithTransaction,
Optional Transaction As SqlTransaction = Nothing,
Optional Timeout As Integer = 120) As Boolean
If TestCanConnect(SqlConnection) = False Then
Return False
End If
Dim oTransaction As SqlTransaction = MaybeGetTransaction(SqlConnection, TransactionMode, Transaction)
Try
Using oSQLCOmmand = SqlConnection.CreateCommand()
oSQLCOmmand.CommandText = SqlCommand
oSQLCOmmand.CommandTimeout = Timeout
oSQLCOmmand.Transaction = oTransaction
oSQLCOmmand.ExecuteNonQuery()
End Using
Return True
Catch ex As Exception
_Logger.Error(ex)
_Logger.Warn("GetDatatableWithConnectionObject: Error in GetDatatableWithConnection while executing command: [{0}]", SqlCommand)
Return False
Finally
MaybeCommitTransaction(oTransaction, TransactionMode)
End Try
End Function
Public Function GetScalarValue(SQLQuery As String) As Object Implements IDatabase.GetScalarValue
Using oConnection = GetSQLConnection()
Return GetScalarValueWithConnectionObject(SQLQuery, oConnection)
End Using
End Function End Function
Public Function GetScalarValue(SQLCommand As String, Timeout As Integer) As Object Implements IDatabase.GetScalarValue Public Function GetScalarValue(SQLCommand As String, Timeout As Integer) As Object Implements IDatabase.GetScalarValue
Try Using oConnection = GetSQLConnection()
Return GetScalarValueWithConnectionObject(SQLCommand, oConnection, TransactionMode.WithTransaction, Nothing, Timeout)
End Using
End Function
Public Function GetScalarValue(SQLCommand As String, Transaction As SqlTransaction) As Object
Using oConnection = GetSQLConnection()
Return GetScalarValueWithConnectionObject(SQLCommand, oConnection, TransactionMode.ExternalTransaction, Transaction)
End Using
End Function
Public Async Function GetScalarValueAsync(SQLQuery As String) As Task(Of Object)
Return Await Task.Run(Function() GetScalarValue(SQLQuery, _Timeout))
End Function
Public Function GetScalarValueWithConnection(SQLCommand As String, ConnectionString As String) As Object
Using oConnection = GetConnection(ConnectionString)
Return GetScalarValueWithConnectionObject(SQLCommand, oConnection)
End Using
End Function
Public Function GetScalarValueWithConnectionObject(SqlCommand As String, SqlConnection As SqlConnection,
Optional TransactionMode As TransactionMode = TransactionMode.WithTransaction,
Optional Transaction As SqlTransaction = Nothing,
Optional Timeout As Integer = 120) As Object
If TestCanConnect() = False Then If TestCanConnect() = False Then
Return Nothing Return Nothing
End If End If
_Logger.Debug("GetScalarValue: Running Query [{0}]", SQLCommand) Dim oTransaction As SqlTransaction = MaybeGetTransaction(SqlConnection, TransactionMode, Transaction)
Dim oResult As Object = Nothing
Using oConnection As SqlConnection = GetSQLConnection()
Using oSQLCOmmand = oConnection.CreateCommand()
oSQLCOmmand.CommandText = SQLCommand
oSQLCOmmand.CommandTimeout = Timeout
Dim oResult As Object = oSQLCOmmand.ExecuteScalar()
Return oResult
End Using
End Using
Catch ex As Exception
_Logger.Error(ex)
_Logger.Warn($"GetScalarValue failed SQLCommand [{SQLCommand}]")
Return Nothing
End Try
End Function
Public Function GetScalarValue(SQLQuery As String) As Object Implements IDatabase.GetScalarValue
Return GetScalarValue(SQLQuery, _Timeout)
End Function
Public Async Function GetScalarValueAsync(SQLQuery As String) As Task(Of Object)
Return Await Task.Run(Function()
Return GetScalarValue(SQLQuery, _Timeout)
End Function)
End Function
Public Function GetScalarValueWithConnection(SQLCommand As String, ConnectionString As String) As Object
Try Try
If TestCanConnect(ConnectionString) = False Then Using oSQLCOmmand = SqlConnection.CreateCommand()
Return Nothing oSQLCOmmand.CommandText = SqlCommand
End If oSQLCOmmand.CommandTimeout = Timeout
oSQLCOmmand.Transaction = oTransaction
_Logger.Debug("GetScalarValue: Running Query [{0}]", SQLCommand) oResult = oSQLCOmmand.ExecuteScalar()
Using oConnection As SqlConnection = GetSQLConnection(ConnectionString)
Using oSQLCOmmand = oConnection.CreateCommand()
oSQLCOmmand.CommandText = SQLCommand
oSQLCOmmand.CommandTimeout = _Timeout
Dim oResult As Object = oSQLCOmmand.ExecuteScalar()
Return oResult
End Using
End Using End Using
Catch ex As Exception Catch ex As Exception
_Logger.Error(ex) _Logger.Error(ex)
_Logger.Warn($"GetScalarValueWithConnection failed SQLCommand [{SQLCommand}]") _Logger.Warn("GetDatatableWithConnectionObject: Error in GetDatatableWithConnection while executing command: [{0}]", SqlCommand)
Return Nothing Finally
MaybeCommitTransaction(oTransaction, TransactionMode)
End Try End Try
Return oResult
End Function End Function
Public Function GetScalarValue(SQLCommand As SqlCommand, OutputParameter As String, Timeout As Integer) As Object Public Function GetScalarValue(SQLCommand As SqlCommand, OutputParameter As String, Timeout As Integer) As Object
@@ -396,30 +409,6 @@ Public Class MSSQLServer
Return Nothing Return Nothing
End Try End Try
End Function End Function
Public Function GetScalarValueConStr(pSQLCommand As String, ConString As String, Optional pInfo As String = "")
Dim result
Try
If pInfo <> "" Then
pInfo = "[" & pInfo & "]"
End If
Dim SQLconnect As New SqlClient.SqlConnection
Dim SQLcommand As SqlClient.SqlCommand
SQLconnect.ConnectionString = ConString
SQLconnect.Open()
SQLcommand = SQLconnect.CreateCommand
'Update Last Created Record in Foo
SQLcommand.CommandText = pSQLCommand
_Logger.Debug("Execute_Scalar_ConStr Scalar: " & pSQLCommand)
result = SQLcommand.ExecuteScalar()
SQLcommand.Dispose()
SQLconnect.Close()
Return result
Catch ex As Exception
_Logger.Error(ex)
_Logger.Warn($"GetScalarValueConStr failed SQLCommand [{pSQLCommand}]")
Return Nothing
End Try
End Function
Public Function GetScalarValue(SQLCommand As SqlCommand, OutputParameter As String) As Object Public Function GetScalarValue(SQLCommand As SqlCommand, OutputParameter As String) As Object
Return GetScalarValue(SQLCommand, OutputParameter, _Timeout) Return GetScalarValue(SQLCommand, OutputParameter, _Timeout)

View File

@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben: ' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.2.3.0")> <Assembly: AssemblyVersion("2.0.0.0")>
<Assembly: AssemblyFileVersion("1.2.3.0")> <Assembly: AssemblyFileVersion("2.0.0.0")>

View File

@@ -176,6 +176,7 @@ Public Class EmailFunctions
If IO.File.Exists(oAttachmentPath) Then If IO.File.Exists(oAttachmentPath) Then
Return oAttachmentPath Return oAttachmentPath
Else Else
_logger.Warn("Email File {0} does not exist. Empty String will be returned.", oAttachmentPath)
Return String.Empty Return String.Empty
End If End If
End Function End Function

View File

@@ -30,5 +30,5 @@ Imports System.Runtime.InteropServices
' Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern ' Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
' übernehmen, indem Sie "*" eingeben: ' übernehmen, indem Sie "*" eingeben:
<Assembly: AssemblyVersion("1.5.0.0")> <Assembly: AssemblyVersion("1.5.1.0")>
<Assembly: AssemblyFileVersion("1.5.0.0")> <Assembly: AssemblyFileVersion("1.5.1.0")>

View File

@@ -4,10 +4,7 @@
</configSections> </configSections>
<system.diagnostics> <system.diagnostics>
<sources> <sources>
<source name="System.ServiceModel" <source name="System.ServiceModel" switchValue="Warning" switchType="DigitalData.Services.EDMIService.TraceSwitch, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" propagateActivity="true">
switchValue="Warning"
switchType="DigitalData.Services.EDMIService.TraceSwitch, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"
propagateActivity="true">
<listeners> <listeners>
<add name="xml" /> <add name="xml" />
</listeners> </listeners>
@@ -30,19 +27,8 @@
</diagnostics> </diagnostics>
<bindings> <bindings>
<netTcpBinding> <netTcpBinding>
<binding name="tcpBinding" <binding name="tcpBinding" transferMode="Streamed" sendTimeout="00:10:00" receiveTimeout="00:10:00" maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647">
transferMode="Streamed" <readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
sendTimeout="00:10:00"
receiveTimeout="00:10:00"
maxBufferSize="2147483647"
maxBufferPoolSize="2147483647"
maxReceivedMessageSize="2147483647">
<readerQuotas
maxDepth="32"
maxStringContentLength="2147483647"
maxArrayLength="2147483647"
maxBytesPerRead="2147483647"
maxNameTableCharCount="2147483647" />
<security mode="Transport"> <security mode="Transport">
<transport clientCredentialType="Windows" /> <transport clientCredentialType="Windows" />
</security> </security>

View File

@@ -73,12 +73,12 @@ Public Class EDMIService
#Region "=== Database ===" #Region "=== Database ==="
Public Function ReturnDatatableFromCache(Name As String, FilterExpression As String, SortByColumn As String) As TableResult Implements IEDMIService.ReturnDatatableFromCache Public Function ReturnDatatableFromCache(Name As String, FilterExpression As String, SortByColumn As String) As TableResult Implements IEDMIService.ReturnDatatableFromCache
Try Try
_Logger.Info($"ReturnDatatableFromCache, Datatable: {Name}") _Logger.Info($"ReturnDatatableFromCache: Datatable: {Name}")
Dim oDataset As DataSet = GlobalState.TableStore Dim oDataset As DataSet = GlobalState.TableStore
Dim oDataTable As DataTable = Nothing Dim oDataTable As DataTable = Nothing
_Logger.Debug("DataSet contains [{0}] datatables", oDataset.Tables.Count) _Logger.Debug("ReturnDatatableFromCache: DataSet contains [{0}] datatables", oDataset.Tables.Count)
If oDataset.Tables.Contains(Name) Then If oDataset.Tables.Contains(Name) Then
oDataTable = oDataset.Tables.Item(Name).Copy() oDataTable = oDataset.Tables.Item(Name).Copy()
@@ -99,13 +99,13 @@ Public Class EDMIService
oFilteredTable.TableName = Name oFilteredTable.TableName = Name
End If End If
_Logger.Debug("Datatable Stats for [{0}]:", Name) _Logger.Debug("ReturnDatatableFromCache: Datatable Stats for [{0}]:", Name)
_Logger.Debug("Unfiltered: [{0}] rows", oDataTable.Rows.Count) _Logger.Debug("Unfiltered: [{0}] rows", oDataTable.Rows.Count)
_Logger.Debug("Filtered: [{0}] rows", oFilteredTable.Rows.Count) _Logger.Debug("Filtered: [{0}] rows", oFilteredTable.Rows.Count)
Return New TableResult(oFilteredTable) Return New TableResult(oFilteredTable)
Else Else
_Logger.Warn($"Datatable {Name} does not exist") _Logger.Warn($"ReturnDatatableFromCache: Datatable {Name} does not exist")
Dim oDetails As New DataTableDoesNotExistFault(Name) Dim oDetails As New DataTableDoesNotExistFault(Name)
Throw New FaultException(Of DataTableDoesNotExistFault)(oDetails) Throw New FaultException(Of DataTableDoesNotExistFault)(oDetails)
End If End If

View File

@@ -73,8 +73,8 @@
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.7.5\lib\net45\NLog.dll</HintPath> <HintPath>..\packages\NLog.4.7.5\lib\net45\NLog.dll</HintPath>
</Reference> </Reference>
<Reference Include="Quartz, Version=3.2.3.0, Culture=neutral, PublicKeyToken=f6b8c98a402cc8a4, processorArchitecture=MSIL"> <Reference Include="Quartz, Version=3.3.2.0, Culture=neutral, PublicKeyToken=f6b8c98a402cc8a4, processorArchitecture=MSIL">
<HintPath>..\packages\Quartz.3.2.3\lib\net461\Quartz.dll</HintPath> <HintPath>..\packages\Quartz.3.3.2\lib\net472\Quartz.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> <Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">

View File

@@ -3,7 +3,7 @@
<package id="FirebirdSql.Data.FirebirdClient" version="7.5.0" targetFramework="net472" /> <package id="FirebirdSql.Data.FirebirdClient" version="7.5.0" targetFramework="net472" />
<package id="Microsoft.Extensions.Logging.Abstractions" version="2.1.1" targetFramework="net472" /> <package id="Microsoft.Extensions.Logging.Abstractions" version="2.1.1" targetFramework="net472" />
<package id="NLog" version="4.7.5" targetFramework="net472" /> <package id="NLog" version="4.7.5" targetFramework="net472" />
<package id="Quartz" version="3.2.3" targetFramework="net472" /> <package id="Quartz" version="3.3.2" targetFramework="net472" />
<package id="System.Buffers" version="4.5.1" targetFramework="net472" /> <package id="System.Buffers" version="4.5.1" targetFramework="net472" />
<package id="System.Diagnostics.DiagnosticSource" version="4.7.1" targetFramework="net472" /> <package id="System.Diagnostics.DiagnosticSource" version="4.7.1" targetFramework="net472" />
<package id="System.Memory" version="4.5.4" targetFramework="net472" /> <package id="System.Memory" version="4.5.4" targetFramework="net472" />

View File

@@ -130,6 +130,8 @@ Public Class JobRunner
_Logger = Logger _Logger = Logger
End Sub End Sub
Private Function GetLogger(name As String) As Logging.Logger Implements ILogProvider.GetLogger Private Function GetLogger(name As String) As Logging.Logger Implements ILogProvider.GetLogger
Return Function(level, func, exception, parameters) Return Function(level, func, exception, parameters)
If exception IsNot Nothing Then If exception IsNot Nothing Then
@@ -149,7 +151,7 @@ Public Class JobRunner
Throw New NotImplementedException() Throw New NotImplementedException()
End Function End Function
Private Function OpenMappedContext(key As String, value As String) As IDisposable Implements ILogProvider.OpenMappedContext Public Function OpenMappedContext(key As String, value As Object, Optional destructure As Boolean = False) As IDisposable Implements ILogProvider.OpenMappedContext
_Logger.Warn("OpenMappedContext is not implemented") _Logger.Warn("OpenMappedContext is not implemented")
Throw New NotImplementedException() Throw New NotImplementedException()
End Function End Function

View File

@@ -51,11 +51,14 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="Microsoft.Extensions.Logging.Abstractions, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Extensions.Logging.Abstractions.2.1.1\lib\netstandard2.0\Microsoft.Extensions.Logging.Abstractions.dll</HintPath>
</Reference>
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.7.5\lib\net45\NLog.dll</HintPath> <HintPath>..\packages\NLog.4.7.5\lib\net45\NLog.dll</HintPath>
</Reference> </Reference>
<Reference Include="Quartz, Version=3.0.7.0, Culture=neutral, PublicKeyToken=f6b8c98a402cc8a4, processorArchitecture=MSIL"> <Reference Include="Quartz, Version=3.3.2.0, Culture=neutral, PublicKeyToken=f6b8c98a402cc8a4, processorArchitecture=MSIL">
<HintPath>..\packages\Quartz.3.0.7\lib\net452\Quartz.dll</HintPath> <HintPath>..\packages\Quartz.3.3.2\lib\net461\Quartz.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="Microsoft.Extensions.Logging.Abstractions" version="2.1.1" targetFramework="net461" />
<package id="NLog" version="4.7.5" targetFramework="net461" /> <package id="NLog" version="4.7.5" targetFramework="net461" />
<package id="Quartz" version="3.0.7" targetFramework="net461" /> <package id="Quartz" version="3.3.2" targetFramework="net461" />
</packages> </packages>

View File

@@ -3,4 +3,12 @@
<startup> <startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" /> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup> </startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="FirebirdSql.Data.FirebirdClient" publicKeyToken="3750abcc3150b00c" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-7.5.0.0" newVersion="7.5.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration> </configuration>