diff --git a/GUIs.Test.ZUGFeRDTest/Form1.vb b/GUIs.Test.ZUGFeRDTest/Form1.vb index 29c79637..0603bc3f 100644 --- a/GUIs.Test.ZUGFeRDTest/Form1.vb +++ b/GUIs.Test.ZUGFeRDTest/Form1.vb @@ -88,13 +88,14 @@ Public Class Form1 Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Dim args As New WorkerArgs() With { .MaxAttachmentSizeInMegaBytes = 10, - .IgnoreRejectionStatus = False + .IgnoreRejectionStatus = False, + .NamePortal = "TEST FROM FORM" } args = LoadFolderConfig(args) args = LoadPropertyMapFor(args, "DEFAULT") args.InsertIntoSQLServer = True - Dim job As New Jobs.ImportZUGFeRDFiles(_logConfig, _firebird, 1, _mssql) + Dim job As New Jobs.ImportZUGFeRDFiles(_logConfig, _firebird, 1, "TEST", _mssql) job.Start(args) End Sub diff --git a/GUIs.ZooFlow/Administration/ClassConstants.vb b/GUIs.ZooFlow/Administration/ClassConstants.vb index d6498a98..3545ae8a 100644 --- a/GUIs.ZooFlow/Administration/ClassConstants.vb +++ b/GUIs.ZooFlow/Administration/ClassConstants.vb @@ -4,6 +4,7 @@ Public Const PAGE_IDB_ATTRIBUTES = "IDB_ATTRIBUTES" Public Const PAGE_IDB_BUSINESS_ENTITIES = "IDB_BUSINESS_ENTITIES" Public Const PAGE_IDB_SOURCE_SQL = "IDB_SOURCE_SQL" + Public Const PAGE_IDB_OBJECT_STORES = "IDB_OBJECT_STORES" Public Const MODULE_GLOBIX = "GLOBIX" Public Const PAGE_GLOBIX_PROFILES = "GLOBIX_PROFILES" diff --git a/GUIs.ZooFlow/Administration/ClassDetailForm.vb b/GUIs.ZooFlow/Administration/ClassDetailForm.vb index 4ee54396..42df7a58 100644 --- a/GUIs.ZooFlow/Administration/ClassDetailForm.vb +++ b/GUIs.ZooFlow/Administration/ClassDetailForm.vb @@ -21,6 +21,13 @@ Public Class ClassDetailForm .[Module] = MODULE_IDB, .Entity = PAGE_IDB_BUSINESS_ENTITIES }}, + {PAGE_IDB_OBJECT_STORES, ' This Key will be matched with the Entity Id from the Database + New DetailSettings With { + .GridTitle = "IDB Object Stores", ' This will be shown above the Data Grid + .NewRecordTitle = "New Object Store", ' This will be shown on the "New" Button + .[Module] = MODULE_IDB, + .Entity = PAGE_IDB_OBJECT_STORES + }}, {PAGE_META_SOURCE_SQL, New DetailSettings With { .GridTitle = "Source SQL", @@ -57,7 +64,9 @@ Public Class ClassDetailForm Case PAGE_IDB_BUSINESS_ENTITIES Load_IDBEntity(PrimaryKey, IsInsert) Return True - + Case PAGE_IDB_OBJECT_STORES + Load_IDBObjectstore(PrimaryKey, IsInsert) + Return True Case PAGE_CW_PROFILES Load_CWProfile(PrimaryKey, IsInsert) Return True @@ -99,6 +108,17 @@ Public Class ClassDetailForm Throw ex End Try End Sub + Private Sub Load_IDBObjectstore(PrimaryKey As Integer, IsInsert As Boolean) + Try + Dim oForm As New frmAdmin_IDBObjectStore(PrimaryKey) With {.IsInsert = IsInsert} + oForm.ShowDialog() + + RaiseEvent DetailFormClosed(Me, oForm) + Catch ex As Exception + Logger.Error(ex) + Throw ex + End Try + End Sub Private Sub Load_IDBEntity(PrimaryKey As Integer, IsInsert As Boolean) Try diff --git a/GUIs.ZooFlow/Administration/frmAdmin_IDBAttribute.Designer.vb b/GUIs.ZooFlow/Administration/frmAdmin_IDBAttribute.Designer.vb index 39e5753e..c2973dce 100644 --- a/GUIs.ZooFlow/Administration/frmAdmin_IDBAttribute.Designer.vb +++ b/GUIs.ZooFlow/Administration/frmAdmin_IDBAttribute.Designer.vb @@ -107,7 +107,7 @@ Partial Class frmAdmin_IDBAttribute Me.RibbonControl1.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.[False] Me.RibbonControl1.ShowPageHeadersMode = DevExpress.XtraBars.Ribbon.ShowPageHeadersMode.Hide Me.RibbonControl1.ShowToolbarCustomizeItem = False - Me.RibbonControl1.Size = New System.Drawing.Size(857, 63) + Me.RibbonControl1.Size = New System.Drawing.Size(857, 66) Me.RibbonControl1.StatusBar = Me.RibbonStatusBar1 Me.RibbonControl1.Toolbar.ShowCustomizeItem = False ' @@ -127,11 +127,9 @@ Partial Class frmAdmin_IDBAttribute ' 'labelStatus ' - Me.labelStatus.Caption = "labelStatus" Me.labelStatus.Id = 5 Me.labelStatus.ImageOptions.SvgImage = Global.DigitalData.GUIs.ZooFlow.My.Resources.Resources.about Me.labelStatus.Name = "labelStatus" - Me.labelStatus.PaintStyle = DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph Me.labelStatus.Visibility = DevExpress.XtraBars.BarItemVisibility.OnlyInCustomizing ' 'BarButtonItem3 @@ -158,10 +156,10 @@ Partial Class frmAdmin_IDBAttribute 'RibbonStatusBar1 ' Me.RibbonStatusBar1.ItemLinks.Add(Me.labelStatus) - Me.RibbonStatusBar1.Location = New System.Drawing.Point(0, 500) + Me.RibbonStatusBar1.Location = New System.Drawing.Point(0, 502) Me.RibbonStatusBar1.Name = "RibbonStatusBar1" Me.RibbonStatusBar1.Ribbon = Me.RibbonControl1 - Me.RibbonStatusBar1.Size = New System.Drawing.Size(857, 24) + Me.RibbonStatusBar1.Size = New System.Drawing.Size(857, 22) ' 'RibbonPage2 ' @@ -182,21 +180,21 @@ Partial Class frmAdmin_IDBAttribute Me.LayoutControl1.Controls.Add(Me.txtChangedWhen) Me.LayoutControl1.Controls.Add(Me.ComboBoxEdit1) 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.Root = Me.Root - Me.LayoutControl1.Size = New System.Drawing.Size(857, 437) + Me.LayoutControl1.Size = New System.Drawing.Size(857, 436) Me.LayoutControl1.TabIndex = 2 Me.LayoutControl1.Text = "LayoutControl1" ' 'TextEdit1 ' Me.TextEdit1.DataBindings.Add(New System.Windows.Forms.Binding("EditValue", Me.VWIDB_BE_ATTRIBUTEBindingSource, "ATTR_ID", True)) - Me.TextEdit1.Location = New System.Drawing.Point(154, 20) + Me.TextEdit1.Location = New System.Drawing.Point(168, 20) Me.TextEdit1.MenuManager = Me.RibbonControl1 Me.TextEdit1.Name = "TextEdit1" Me.TextEdit1.Properties.ReadOnly = True - Me.TextEdit1.Size = New System.Drawing.Size(683, 20) + Me.TextEdit1.Size = New System.Drawing.Size(669, 20) Me.TextEdit1.StyleController = Me.LayoutControl1 Me.TextEdit1.TabIndex = 4 ' @@ -213,10 +211,10 @@ Partial Class frmAdmin_IDBAttribute 'TextEdit2 ' Me.TextEdit2.DataBindings.Add(New System.Windows.Forms.Binding("EditValue", Me.VWIDB_BE_ATTRIBUTEBindingSource, "ATTR_TITLE", True)) - Me.TextEdit2.Location = New System.Drawing.Point(154, 60) + Me.TextEdit2.Location = New System.Drawing.Point(168, 60) Me.TextEdit2.MenuManager = Me.RibbonControl1 Me.TextEdit2.Name = "TextEdit2" - Me.TextEdit2.Size = New System.Drawing.Size(683, 20) + Me.TextEdit2.Size = New System.Drawing.Size(669, 20) Me.TextEdit2.StyleController = Me.LayoutControl1 Me.TextEdit2.TabIndex = 5 ' @@ -224,11 +222,11 @@ Partial Class frmAdmin_IDBAttribute ' Me.SpinEdit1.DataBindings.Add(New System.Windows.Forms.Binding("EditValue", Me.VWIDB_BE_ATTRIBUTEBindingSource, "VIEW_SEQUENCE", True)) Me.SpinEdit1.EditValue = New Decimal(New Integer() {0, 0, 0, 0}) - Me.SpinEdit1.Location = New System.Drawing.Point(572, 180) + Me.SpinEdit1.Location = New System.Drawing.Point(586, 180) Me.SpinEdit1.MenuManager = Me.RibbonControl1 Me.SpinEdit1.Name = "SpinEdit1" Me.SpinEdit1.Properties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}) - Me.SpinEdit1.Size = New System.Drawing.Size(265, 20) + Me.SpinEdit1.Size = New System.Drawing.Size(251, 20) Me.SpinEdit1.StyleController = Me.LayoutControl1 Me.SpinEdit1.TabIndex = 6 ' @@ -238,7 +236,7 @@ Partial Class frmAdmin_IDBAttribute Me.CheckEdit1.MenuManager = Me.RibbonControl1 Me.CheckEdit1.Name = "CheckEdit1" Me.CheckEdit1.Properties.Caption = "Attribut mehrzeilig" - Me.CheckEdit1.Size = New System.Drawing.Size(817, 20) + Me.CheckEdit1.Size = New System.Drawing.Size(817, 18) Me.CheckEdit1.StyleController = Me.LayoutControl1 Me.CheckEdit1.TabIndex = 7 ' @@ -249,67 +247,67 @@ Partial Class frmAdmin_IDBAttribute Me.CheckEdit2.MenuManager = Me.RibbonControl1 Me.CheckEdit2.Name = "CheckEdit2" Me.CheckEdit2.Properties.Caption = "Standard in Ergebnisliste" - Me.CheckEdit2.Size = New System.Drawing.Size(398, 20) + Me.CheckEdit2.Size = New System.Drawing.Size(398, 18) Me.CheckEdit2.StyleController = Me.LayoutControl1 Me.CheckEdit2.TabIndex = 8 ' 'TextEdit3 ' - Me.TextEdit3.Location = New System.Drawing.Point(154, 140) + Me.TextEdit3.Location = New System.Drawing.Point(168, 140) Me.TextEdit3.MenuManager = Me.RibbonControl1 Me.TextEdit3.Name = "TextEdit3" - Me.TextEdit3.Size = New System.Drawing.Size(683, 20) + Me.TextEdit3.Size = New System.Drawing.Size(669, 20) Me.TextEdit3.StyleController = Me.LayoutControl1 Me.TextEdit3.TabIndex = 9 ' 'txtAddedWho ' Me.txtAddedWho.DataBindings.Add(New System.Windows.Forms.Binding("EditValue", Me.VWIDB_BE_ATTRIBUTEBindingSource, "ADDED_WHO", True)) - Me.txtAddedWho.Location = New System.Drawing.Point(154, 260) + Me.txtAddedWho.Location = New System.Drawing.Point(168, 258) Me.txtAddedWho.MenuManager = Me.RibbonControl1 Me.txtAddedWho.Name = "txtAddedWho" Me.txtAddedWho.Properties.ReadOnly = True - Me.txtAddedWho.Size = New System.Drawing.Size(264, 20) + Me.txtAddedWho.Size = New System.Drawing.Size(250, 20) Me.txtAddedWho.StyleController = Me.LayoutControl1 Me.txtAddedWho.TabIndex = 10 ' 'txtAddedWhen ' Me.txtAddedWhen.DataBindings.Add(New System.Windows.Forms.Binding("EditValue", Me.VWIDB_BE_ATTRIBUTEBindingSource, "ADDED_WHEN", True)) - Me.txtAddedWhen.Location = New System.Drawing.Point(572, 260) + Me.txtAddedWhen.Location = New System.Drawing.Point(586, 258) Me.txtAddedWhen.MenuManager = Me.RibbonControl1 Me.txtAddedWhen.Name = "txtAddedWhen" Me.txtAddedWhen.Properties.ReadOnly = True - Me.txtAddedWhen.Size = New System.Drawing.Size(265, 20) + Me.txtAddedWhen.Size = New System.Drawing.Size(251, 20) Me.txtAddedWhen.StyleController = Me.LayoutControl1 Me.txtAddedWhen.TabIndex = 11 ' 'txtChangedWho ' Me.txtChangedWho.DataBindings.Add(New System.Windows.Forms.Binding("EditValue", Me.VWIDB_BE_ATTRIBUTEBindingSource, "CHANGED_WHO", True)) - Me.txtChangedWho.Location = New System.Drawing.Point(154, 300) + Me.txtChangedWho.Location = New System.Drawing.Point(168, 298) Me.txtChangedWho.MenuManager = Me.RibbonControl1 Me.txtChangedWho.Name = "txtChangedWho" Me.txtChangedWho.Properties.ReadOnly = True - Me.txtChangedWho.Size = New System.Drawing.Size(264, 20) + Me.txtChangedWho.Size = New System.Drawing.Size(250, 20) Me.txtChangedWho.StyleController = Me.LayoutControl1 Me.txtChangedWho.TabIndex = 12 ' 'txtChangedWhen ' Me.txtChangedWhen.DataBindings.Add(New System.Windows.Forms.Binding("EditValue", Me.VWIDB_BE_ATTRIBUTEBindingSource, "CHANGED_WHEN", True)) - Me.txtChangedWhen.Location = New System.Drawing.Point(572, 300) + Me.txtChangedWhen.Location = New System.Drawing.Point(586, 298) Me.txtChangedWhen.MenuManager = Me.RibbonControl1 Me.txtChangedWhen.Name = "txtChangedWhen" Me.txtChangedWhen.Properties.ReadOnly = True - Me.txtChangedWhen.Size = New System.Drawing.Size(265, 20) + Me.txtChangedWhen.Size = New System.Drawing.Size(251, 20) Me.txtChangedWhen.StyleController = Me.LayoutControl1 Me.txtChangedWhen.TabIndex = 13 ' 'ComboBoxEdit1 ' Me.ComboBoxEdit1.DataBindings.Add(New System.Windows.Forms.Binding("EditValue", Me.VWIDB_BE_ATTRIBUTEBindingSource, "TYPE_ID", True)) - Me.ComboBoxEdit1.Location = New System.Drawing.Point(154, 100) + Me.ComboBoxEdit1.Location = New System.Drawing.Point(168, 100) Me.ComboBoxEdit1.MenuManager = Me.RibbonControl1 Me.ComboBoxEdit1.Name = "ComboBoxEdit1" Me.ComboBoxEdit1.Properties.BestFitMode = DevExpress.XtraEditors.Controls.BestFitMode.BestFit @@ -319,7 +317,7 @@ Partial Class frmAdmin_IDBAttribute Me.ComboBoxEdit1.Properties.NullText = "" Me.ComboBoxEdit1.Properties.PopupSizeable = False Me.ComboBoxEdit1.Properties.ValueMember = "GUID" - Me.ComboBoxEdit1.Size = New System.Drawing.Size(683, 20) + Me.ComboBoxEdit1.Size = New System.Drawing.Size(669, 20) Me.ComboBoxEdit1.StyleController = Me.LayoutControl1 Me.ComboBoxEdit1.TabIndex = 14 ' @@ -334,7 +332,7 @@ Partial Class frmAdmin_IDBAttribute Me.Root.GroupBordersVisible = False Me.Root.Items.AddRange(New DevExpress.XtraLayout.BaseLayoutItem() {Me.LayoutControlItem1, Me.LayoutControlItem2, Me.LayoutControlItem4, Me.LayoutControlItem6, Me.LayoutControlItem7, Me.LayoutControlItem3, Me.LayoutControlItem11, Me.LayoutControlItem9, Me.LayoutControlItem5, Me.LayoutControlItem8, Me.LayoutControlItem10}) Me.Root.Name = "Root" - Me.Root.Size = New System.Drawing.Size(857, 437) + Me.Root.Size = New System.Drawing.Size(857, 436) Me.Root.TextVisible = False ' 'LayoutControlItem1 @@ -346,7 +344,7 @@ Partial Class frmAdmin_IDBAttribute Me.LayoutControlItem1.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10) Me.LayoutControlItem1.Size = New System.Drawing.Size(837, 40) Me.LayoutControlItem1.Text = "GUID" - Me.LayoutControlItem1.TextSize = New System.Drawing.Size(131, 13) + Me.LayoutControlItem1.TextSize = New System.Drawing.Size(145, 13) ' 'LayoutControlItem2 ' @@ -356,7 +354,7 @@ Partial Class frmAdmin_IDBAttribute Me.LayoutControlItem2.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10) Me.LayoutControlItem2.Size = New System.Drawing.Size(837, 40) Me.LayoutControlItem2.Text = "Bezeichnung" - Me.LayoutControlItem2.TextSize = New System.Drawing.Size(131, 13) + Me.LayoutControlItem2.TextSize = New System.Drawing.Size(145, 13) ' 'LayoutControlItem4 ' @@ -364,7 +362,7 @@ Partial Class frmAdmin_IDBAttribute Me.LayoutControlItem4.Location = New System.Drawing.Point(0, 200) Me.LayoutControlItem4.Name = "LayoutControlItem4" Me.LayoutControlItem4.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10) - Me.LayoutControlItem4.Size = New System.Drawing.Size(837, 40) + Me.LayoutControlItem4.Size = New System.Drawing.Size(837, 38) Me.LayoutControlItem4.TextSize = New System.Drawing.Size(0, 0) Me.LayoutControlItem4.TextVisible = False ' @@ -376,17 +374,17 @@ Partial Class frmAdmin_IDBAttribute Me.LayoutControlItem6.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10) Me.LayoutControlItem6.Size = New System.Drawing.Size(837, 40) Me.LayoutControlItem6.Text = "Kommentar" - Me.LayoutControlItem6.TextSize = New System.Drawing.Size(131, 13) + Me.LayoutControlItem6.TextSize = New System.Drawing.Size(145, 13) ' 'LayoutControlItem7 ' Me.LayoutControlItem7.Control = Me.txtAddedWho - Me.LayoutControlItem7.Location = New System.Drawing.Point(0, 240) + Me.LayoutControlItem7.Location = New System.Drawing.Point(0, 238) Me.LayoutControlItem7.Name = "LayoutControlItem7" Me.LayoutControlItem7.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10) Me.LayoutControlItem7.Size = New System.Drawing.Size(418, 40) Me.LayoutControlItem7.Text = "Erstellt Wer" - Me.LayoutControlItem7.TextSize = New System.Drawing.Size(131, 13) + Me.LayoutControlItem7.TextSize = New System.Drawing.Size(145, 13) ' 'LayoutControlItem3 ' @@ -397,7 +395,7 @@ Partial Class frmAdmin_IDBAttribute Me.LayoutControlItem3.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10) Me.LayoutControlItem3.Size = New System.Drawing.Size(419, 40) Me.LayoutControlItem3.Text = "Reihenfolge in Ergebnisliste" - Me.LayoutControlItem3.TextSize = New System.Drawing.Size(131, 13) + Me.LayoutControlItem3.TextSize = New System.Drawing.Size(145, 13) ' 'LayoutControlItem11 ' @@ -407,17 +405,17 @@ Partial Class frmAdmin_IDBAttribute Me.LayoutControlItem11.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10) Me.LayoutControlItem11.Size = New System.Drawing.Size(837, 40) Me.LayoutControlItem11.Text = "Attribut-Typ" - Me.LayoutControlItem11.TextSize = New System.Drawing.Size(131, 13) + Me.LayoutControlItem11.TextSize = New System.Drawing.Size(145, 13) ' 'LayoutControlItem9 ' Me.LayoutControlItem9.Control = Me.txtChangedWho - Me.LayoutControlItem9.Location = New System.Drawing.Point(0, 280) + Me.LayoutControlItem9.Location = New System.Drawing.Point(0, 278) Me.LayoutControlItem9.Name = "LayoutControlItem9" Me.LayoutControlItem9.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10) - Me.LayoutControlItem9.Size = New System.Drawing.Size(418, 137) + Me.LayoutControlItem9.Size = New System.Drawing.Size(418, 138) Me.LayoutControlItem9.Text = "Geändert Wer" - Me.LayoutControlItem9.TextSize = New System.Drawing.Size(131, 13) + Me.LayoutControlItem9.TextSize = New System.Drawing.Size(145, 13) ' 'LayoutControlItem5 ' @@ -432,22 +430,22 @@ Partial Class frmAdmin_IDBAttribute 'LayoutControlItem8 ' Me.LayoutControlItem8.Control = Me.txtAddedWhen - Me.LayoutControlItem8.Location = New System.Drawing.Point(418, 240) + Me.LayoutControlItem8.Location = New System.Drawing.Point(418, 238) Me.LayoutControlItem8.Name = "LayoutControlItem8" Me.LayoutControlItem8.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10) Me.LayoutControlItem8.Size = New System.Drawing.Size(419, 40) Me.LayoutControlItem8.Text = "Erstellt Wann" - Me.LayoutControlItem8.TextSize = New System.Drawing.Size(131, 13) + Me.LayoutControlItem8.TextSize = New System.Drawing.Size(145, 13) ' 'LayoutControlItem10 ' Me.LayoutControlItem10.Control = Me.txtChangedWhen - Me.LayoutControlItem10.Location = New System.Drawing.Point(418, 280) + Me.LayoutControlItem10.Location = New System.Drawing.Point(418, 278) Me.LayoutControlItem10.Name = "LayoutControlItem10" Me.LayoutControlItem10.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10) - Me.LayoutControlItem10.Size = New System.Drawing.Size(419, 137) + Me.LayoutControlItem10.Size = New System.Drawing.Size(419, 138) Me.LayoutControlItem10.Text = "Geändert Wann" - Me.LayoutControlItem10.TextSize = New System.Drawing.Size(131, 13) + Me.LayoutControlItem10.TextSize = New System.Drawing.Size(145, 13) ' 'TableAdapterManager ' @@ -456,6 +454,8 @@ Partial Class frmAdmin_IDBAttribute Me.TableAdapterManager.TBIDB_ATTRIBUTE_TYPETableAdapter = Nothing Me.TableAdapterManager.TBIDB_ATTRIBUTETableAdapter = Nothing Me.TableAdapterManager.TBIDB_BUSINESS_ENTITYTableAdapter = Nothing + Me.TableAdapterManager.TBIDB_CATALOGTableAdapter = Nothing + Me.TableAdapterManager.TBIDB_OBJECT_STORETableAdapter = Nothing Me.TableAdapterManager.TBZF_ADMIN_SOURCE_SQLTableAdapter = Nothing Me.TableAdapterManager.UpdateOrder = DigitalData.GUIs.ZooFlow.DSIDB_StammdatenTableAdapters.TableAdapterManager.UpdateOrderOption.InsertUpdateDelete ' diff --git a/GUIs.ZooFlow/Administration/frmAdmin_IDBAttribute.vb b/GUIs.ZooFlow/Administration/frmAdmin_IDBAttribute.vb index dc354da0..14c33fcf 100644 --- a/GUIs.ZooFlow/Administration/frmAdmin_IDBAttribute.vb +++ b/GUIs.ZooFlow/Administration/frmAdmin_IDBAttribute.vb @@ -21,6 +21,7 @@ TBIDB_ATTRIBUTE_TYPETableAdapter.Fill(DSIDB_Stammdaten.TBIDB_ATTRIBUTE_TYPE) VWIDB_BE_ATTRIBUTETableAdapter.Connection.ConnectionString = My.DatabaseIDB.CurrentSQLConnectionString VWIDB_BE_ATTRIBUTETableAdapter.FillByAttributeId(DSIDB_Stammdaten.VWIDB_BE_ATTRIBUTE, PrimaryKey, 1) + Catch ex As Exception ShowErrorMessage(ex) End Try diff --git a/GUIs.ZooFlow/Administration/frmAdmin_IDBObjectStore.Designer.vb b/GUIs.ZooFlow/Administration/frmAdmin_IDBObjectStore.Designer.vb new file mode 100644 index 00000000..eab024b0 --- /dev/null +++ b/GUIs.ZooFlow/Administration/frmAdmin_IDBObjectStore.Designer.vb @@ -0,0 +1,475 @@ +Imports DigitalData.GUIs.Common.Base + + +Partial Class frmAdmin_IDBObjectStore + Inherits BaseRibbonForm + + 'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen. + _ + Protected Overrides Sub Dispose(ByVal disposing As Boolean) + Try + If disposing AndAlso components IsNot Nothing Then + components.Dispose() + End If + Finally + MyBase.Dispose(disposing) + End Try + End Sub + + 'Wird vom Windows Form-Designer benötigt. + Private components As System.ComponentModel.IContainer + + 'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich. + 'Das Bearbeiten ist mit dem Windows Form-Designer möglich. + 'Das Bearbeiten mit dem Code-Editor ist nicht möglich. + _ + Private Sub InitializeComponent() + Me.components = New System.ComponentModel.Container() + Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmAdmin_IDBObjectStore)) + Me.RibbonControl1 = New DevExpress.XtraBars.Ribbon.RibbonControl() + Me.BarButtonItem1 = New DevExpress.XtraBars.BarButtonItem() + Me.BarButtonItem2 = New DevExpress.XtraBars.BarButtonItem() + Me.BarButtonItem3 = New DevExpress.XtraBars.BarButtonItem() + Me.RibbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage() + Me.RibbonPageGroup1 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() + Me.RibbonPageGroup2 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() + Me.RibbonStatusBar1 = New DevExpress.XtraBars.Ribbon.RibbonStatusBar() + Me.RibbonPage2 = New DevExpress.XtraBars.Ribbon.RibbonPage() + Me.LayoutControl1 = New DevExpress.XtraLayout.LayoutControl() + Me.CHANGED_WHENTextBox = New System.Windows.Forms.TextBox() + Me.TBIDB_OBJECT_STOREBindingSource = New System.Windows.Forms.BindingSource(Me.components) + Me.DSIDB_Stammdaten = New DigitalData.GUIs.ZooFlow.DSIDB_Stammdaten() + Me.CHANGED_WHOTextBox = New System.Windows.Forms.TextBox() + Me.ADDED_WHENTextBox = New System.Windows.Forms.TextBox() + Me.ADDED_WHOTextBox = New System.Windows.Forms.TextBox() + Me.COMMENTTextBox = New System.Windows.Forms.TextBox() + Me.IS_ARCHIVECheckBox = New System.Windows.Forms.CheckBox() + Me.CAT_IDTextBox = New System.Windows.Forms.TextBox() + Me.OBJECT_TITLETextBox = New System.Windows.Forms.TextBox() + Me.GUIDTextBox = New System.Windows.Forms.TextBox() + Me.Root = New DevExpress.XtraLayout.LayoutControlGroup() + Me.LayoutControlItem2 = New DevExpress.XtraLayout.LayoutControlItem() + Me.LayoutControlItem7 = New DevExpress.XtraLayout.LayoutControlItem() + Me.LayoutControlItem8 = New DevExpress.XtraLayout.LayoutControlItem() + Me.LayoutControlItem9 = New DevExpress.XtraLayout.LayoutControlItem() + Me.LayoutControlItem10 = New DevExpress.XtraLayout.LayoutControlItem() + Me.LayoutControlItem11 = New DevExpress.XtraLayout.LayoutControlItem() + Me.LayoutControlItem3 = New DevExpress.XtraLayout.LayoutControlItem() + Me.LayoutControlItem6 = New DevExpress.XtraLayout.LayoutControlItem() + Me.LayoutControlItem5 = New DevExpress.XtraLayout.LayoutControlItem() + Me.TBIDB_OBJECT_STORETableAdapter = New DigitalData.GUIs.ZooFlow.DSIDB_StammdatenTableAdapters.TBIDB_OBJECT_STORETableAdapter() + Me.TableAdapterManager = New DigitalData.GUIs.ZooFlow.DSIDB_StammdatenTableAdapters.TableAdapterManager() + Me.TBIDB_CATALOGBindingSource = New System.Windows.Forms.BindingSource(Me.components) + Me.TBIDB_CATALOGTableAdapter = New DigitalData.GUIs.ZooFlow.DSIDB_StammdatenTableAdapters.TBIDB_CATALOGTableAdapter() + Me.CAT_TITLETextBox = New System.Windows.Forms.TextBox() + Me.LayoutControlItem12 = New DevExpress.XtraLayout.LayoutControlItem() + Me.labelStatus = New DevExpress.XtraBars.BarStaticItem() + CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.LayoutControl1, System.ComponentModel.ISupportInitialize).BeginInit() + Me.LayoutControl1.SuspendLayout() + CType(Me.TBIDB_OBJECT_STOREBindingSource, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.DSIDB_Stammdaten, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.Root, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.LayoutControlItem2, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.LayoutControlItem7, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.LayoutControlItem8, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.LayoutControlItem9, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.LayoutControlItem10, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.LayoutControlItem11, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.LayoutControlItem3, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.LayoutControlItem6, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.LayoutControlItem5, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.TBIDB_CATALOGBindingSource, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.LayoutControlItem12, System.ComponentModel.ISupportInitialize).BeginInit() + Me.SuspendLayout() + ' + 'RibbonControl1 + ' + Me.RibbonControl1.CommandLayout = DevExpress.XtraBars.Ribbon.CommandLayout.Simplified + Me.RibbonControl1.ExpandCollapseItem.Id = 0 + Me.RibbonControl1.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl1.ExpandCollapseItem, Me.RibbonControl1.SearchEditItem, Me.BarButtonItem1, Me.BarButtonItem2, Me.BarButtonItem3, Me.labelStatus}) + Me.RibbonControl1.Location = New System.Drawing.Point(0, 0) + Me.RibbonControl1.MaxItemId = 5 + Me.RibbonControl1.Name = "RibbonControl1" + Me.RibbonControl1.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage1}) + Me.RibbonControl1.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.[False] + Me.RibbonControl1.ShowPageHeadersMode = DevExpress.XtraBars.Ribbon.ShowPageHeadersMode.Hide + Me.RibbonControl1.ShowToolbarCustomizeItem = False + Me.RibbonControl1.Size = New System.Drawing.Size(1244, 66) + Me.RibbonControl1.StatusBar = Me.RibbonStatusBar1 + Me.RibbonControl1.Toolbar.ShowCustomizeItem = False + ' + 'BarButtonItem1 + ' + Me.BarButtonItem1.Caption = "Speichern und Schliessen" + Me.BarButtonItem1.Id = 1 + Me.BarButtonItem1.ImageOptions.SvgImage = CType(resources.GetObject("BarButtonItem1.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage) + Me.BarButtonItem1.Name = "BarButtonItem1" + ' + 'BarButtonItem2 + ' + Me.BarButtonItem2.Caption = "Speichern" + Me.BarButtonItem2.Id = 2 + Me.BarButtonItem2.ImageOptions.SvgImage = CType(resources.GetObject("BarButtonItem2.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage) + Me.BarButtonItem2.Name = "BarButtonItem2" + ' + 'BarButtonItem3 + ' + Me.BarButtonItem3.Caption = "Löschen" + Me.BarButtonItem3.Id = 3 + Me.BarButtonItem3.ImageOptions.SvgImage = CType(resources.GetObject("BarButtonItem3.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage) + Me.BarButtonItem3.Name = "BarButtonItem3" + ' + 'RibbonPage1 + ' + Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup1, Me.RibbonPageGroup2}) + Me.RibbonPage1.Name = "RibbonPage1" + Me.RibbonPage1.Text = "RibbonPage1" + ' + 'RibbonPageGroup1 + ' + Me.RibbonPageGroup1.ItemLinks.Add(Me.BarButtonItem1) + Me.RibbonPageGroup1.ItemLinks.Add(Me.BarButtonItem2) + Me.RibbonPageGroup1.ItemLinks.Add(Me.BarButtonItem3) + Me.RibbonPageGroup1.Name = "RibbonPageGroup1" + Me.RibbonPageGroup1.Text = "RibbonPageGroup1" + ' + 'RibbonPageGroup2 + ' + Me.RibbonPageGroup2.Name = "RibbonPageGroup2" + Me.RibbonPageGroup2.Text = "RibbonPageGroup2" + ' + 'RibbonStatusBar1 + ' + Me.RibbonStatusBar1.ItemLinks.Add(Me.labelStatus) + Me.RibbonStatusBar1.Location = New System.Drawing.Point(0, 872) + Me.RibbonStatusBar1.Name = "RibbonStatusBar1" + Me.RibbonStatusBar1.Ribbon = Me.RibbonControl1 + Me.RibbonStatusBar1.Size = New System.Drawing.Size(1244, 22) + ' + 'RibbonPage2 + ' + Me.RibbonPage2.Name = "RibbonPage2" + Me.RibbonPage2.Text = "RibbonPage2" + ' + 'LayoutControl1 + ' + Me.LayoutControl1.Controls.Add(Me.CAT_TITLETextBox) + Me.LayoutControl1.Controls.Add(Me.CHANGED_WHENTextBox) + Me.LayoutControl1.Controls.Add(Me.CHANGED_WHOTextBox) + Me.LayoutControl1.Controls.Add(Me.ADDED_WHENTextBox) + Me.LayoutControl1.Controls.Add(Me.ADDED_WHOTextBox) + Me.LayoutControl1.Controls.Add(Me.COMMENTTextBox) + Me.LayoutControl1.Controls.Add(Me.IS_ARCHIVECheckBox) + Me.LayoutControl1.Controls.Add(Me.CAT_IDTextBox) + Me.LayoutControl1.Controls.Add(Me.OBJECT_TITLETextBox) + Me.LayoutControl1.Controls.Add(Me.GUIDTextBox) + Me.LayoutControl1.Dock = System.Windows.Forms.DockStyle.Fill + Me.LayoutControl1.Location = New System.Drawing.Point(0, 66) + Me.LayoutControl1.Name = "LayoutControl1" + Me.LayoutControl1.Root = Me.Root + Me.LayoutControl1.Size = New System.Drawing.Size(1244, 806) + Me.LayoutControl1.TabIndex = 2 + Me.LayoutControl1.Text = "LayoutControl1" + ' + 'CHANGED_WHENTextBox + ' + Me.CHANGED_WHENTextBox.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBIDB_OBJECT_STOREBindingSource, "CHANGED_WHEN", True)) + Me.CHANGED_WHENTextBox.Location = New System.Drawing.Point(98, 156) + Me.CHANGED_WHENTextBox.Name = "CHANGED_WHENTextBox" + Me.CHANGED_WHENTextBox.ReadOnly = True + Me.CHANGED_WHENTextBox.Size = New System.Drawing.Size(1134, 20) + Me.CHANGED_WHENTextBox.TabIndex = 14 + ' + 'TBIDB_OBJECT_STOREBindingSource + ' + Me.TBIDB_OBJECT_STOREBindingSource.DataMember = "TBIDB_OBJECT_STORE" + Me.TBIDB_OBJECT_STOREBindingSource.DataSource = Me.DSIDB_Stammdaten + ' + 'DSIDB_Stammdaten + ' + Me.DSIDB_Stammdaten.DataSetName = "DSIDB_Stammdaten" + Me.DSIDB_Stammdaten.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema + ' + 'CHANGED_WHOTextBox + ' + Me.CHANGED_WHOTextBox.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBIDB_OBJECT_STOREBindingSource, "CHANGED_WHO", True)) + Me.CHANGED_WHOTextBox.Location = New System.Drawing.Point(98, 132) + Me.CHANGED_WHOTextBox.Name = "CHANGED_WHOTextBox" + Me.CHANGED_WHOTextBox.ReadOnly = True + Me.CHANGED_WHOTextBox.Size = New System.Drawing.Size(1134, 20) + Me.CHANGED_WHOTextBox.TabIndex = 13 + ' + 'ADDED_WHENTextBox + ' + Me.ADDED_WHENTextBox.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBIDB_OBJECT_STOREBindingSource, "ADDED_WHEN", True)) + Me.ADDED_WHENTextBox.Location = New System.Drawing.Point(98, 108) + Me.ADDED_WHENTextBox.Name = "ADDED_WHENTextBox" + Me.ADDED_WHENTextBox.ReadOnly = True + Me.ADDED_WHENTextBox.Size = New System.Drawing.Size(1134, 20) + Me.ADDED_WHENTextBox.TabIndex = 12 + ' + 'ADDED_WHOTextBox + ' + Me.ADDED_WHOTextBox.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBIDB_OBJECT_STOREBindingSource, "ADDED_WHO", True)) + Me.ADDED_WHOTextBox.Location = New System.Drawing.Point(98, 84) + Me.ADDED_WHOTextBox.Name = "ADDED_WHOTextBox" + Me.ADDED_WHOTextBox.ReadOnly = True + Me.ADDED_WHOTextBox.Size = New System.Drawing.Size(1134, 20) + Me.ADDED_WHOTextBox.TabIndex = 11 + ' + 'COMMENTTextBox + ' + Me.COMMENTTextBox.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBIDB_OBJECT_STOREBindingSource, "COMMENT", True)) + Me.COMMENTTextBox.Location = New System.Drawing.Point(98, 60) + Me.COMMENTTextBox.Name = "COMMENTTextBox" + Me.COMMENTTextBox.Size = New System.Drawing.Size(1134, 20) + Me.COMMENTTextBox.TabIndex = 10 + ' + 'IS_ARCHIVECheckBox + ' + Me.IS_ARCHIVECheckBox.DataBindings.Add(New System.Windows.Forms.Binding("CheckState", Me.TBIDB_OBJECT_STOREBindingSource, "IS_ARCHIVE", True)) + Me.IS_ARCHIVECheckBox.Location = New System.Drawing.Point(813, 12) + Me.IS_ARCHIVECheckBox.Name = "IS_ARCHIVECheckBox" + Me.IS_ARCHIVECheckBox.Size = New System.Drawing.Size(419, 20) + Me.IS_ARCHIVECheckBox.TabIndex = 9 + Me.IS_ARCHIVECheckBox.Text = "Ist Archiv?" + Me.IS_ARCHIVECheckBox.UseVisualStyleBackColor = True + ' + 'CAT_IDTextBox + ' + Me.CAT_IDTextBox.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBIDB_OBJECT_STOREBindingSource, "CAT_ID", True)) + Me.CAT_IDTextBox.Location = New System.Drawing.Point(98, 36) + Me.CAT_IDTextBox.Name = "CAT_IDTextBox" + Me.CAT_IDTextBox.ReadOnly = True + Me.CAT_IDTextBox.Size = New System.Drawing.Size(111, 20) + Me.CAT_IDTextBox.TabIndex = 8 + ' + 'OBJECT_TITLETextBox + ' + Me.OBJECT_TITLETextBox.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBIDB_OBJECT_STOREBindingSource, "OBJECT_TITLE", True)) + Me.OBJECT_TITLETextBox.Location = New System.Drawing.Point(299, 12) + Me.OBJECT_TITLETextBox.Name = "OBJECT_TITLETextBox" + Me.OBJECT_TITLETextBox.Size = New System.Drawing.Size(510, 20) + Me.OBJECT_TITLETextBox.TabIndex = 6 + ' + 'GUIDTextBox + ' + Me.GUIDTextBox.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBIDB_OBJECT_STOREBindingSource, "GUID", True)) + Me.GUIDTextBox.Location = New System.Drawing.Point(98, 12) + Me.GUIDTextBox.Name = "GUIDTextBox" + Me.GUIDTextBox.Size = New System.Drawing.Size(111, 20) + Me.GUIDTextBox.TabIndex = 5 + ' + 'Root + ' + Me.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.[True] + Me.Root.GroupBordersVisible = False + Me.Root.Items.AddRange(New DevExpress.XtraLayout.BaseLayoutItem() {Me.LayoutControlItem2, Me.LayoutControlItem7, Me.LayoutControlItem8, Me.LayoutControlItem9, Me.LayoutControlItem10, Me.LayoutControlItem11, Me.LayoutControlItem3, Me.LayoutControlItem6, Me.LayoutControlItem5, Me.LayoutControlItem12}) + Me.Root.Name = "Root" + Me.Root.Size = New System.Drawing.Size(1244, 806) + Me.Root.TextVisible = False + ' + 'LayoutControlItem2 + ' + Me.LayoutControlItem2.Control = Me.GUIDTextBox + Me.LayoutControlItem2.Location = New System.Drawing.Point(0, 0) + Me.LayoutControlItem2.Name = "LayoutControlItem2" + Me.LayoutControlItem2.Size = New System.Drawing.Size(201, 24) + Me.LayoutControlItem2.Text = "ID:" + Me.LayoutControlItem2.TextSize = New System.Drawing.Size(83, 13) + ' + 'LayoutControlItem7 + ' + Me.LayoutControlItem7.Control = Me.COMMENTTextBox + Me.LayoutControlItem7.Location = New System.Drawing.Point(0, 48) + Me.LayoutControlItem7.Name = "LayoutControlItem7" + Me.LayoutControlItem7.Size = New System.Drawing.Size(1224, 24) + Me.LayoutControlItem7.Text = "Kommentar:" + Me.LayoutControlItem7.TextSize = New System.Drawing.Size(83, 13) + ' + 'LayoutControlItem8 + ' + Me.LayoutControlItem8.Control = Me.ADDED_WHOTextBox + Me.LayoutControlItem8.Location = New System.Drawing.Point(0, 72) + Me.LayoutControlItem8.Name = "LayoutControlItem8" + Me.LayoutControlItem8.Size = New System.Drawing.Size(1224, 24) + Me.LayoutControlItem8.Text = "Erstellt wer:" + Me.LayoutControlItem8.TextSize = New System.Drawing.Size(83, 13) + ' + 'LayoutControlItem9 + ' + Me.LayoutControlItem9.Control = Me.ADDED_WHENTextBox + Me.LayoutControlItem9.Location = New System.Drawing.Point(0, 96) + Me.LayoutControlItem9.Name = "LayoutControlItem9" + Me.LayoutControlItem9.Size = New System.Drawing.Size(1224, 24) + Me.LayoutControlItem9.Text = "Erstellt wann:" + Me.LayoutControlItem9.TextSize = New System.Drawing.Size(83, 13) + ' + 'LayoutControlItem10 + ' + Me.LayoutControlItem10.Control = Me.CHANGED_WHOTextBox + Me.LayoutControlItem10.Location = New System.Drawing.Point(0, 120) + Me.LayoutControlItem10.Name = "LayoutControlItem10" + Me.LayoutControlItem10.Size = New System.Drawing.Size(1224, 24) + Me.LayoutControlItem10.Text = "Geändert wer:" + Me.LayoutControlItem10.TextSize = New System.Drawing.Size(83, 13) + ' + 'LayoutControlItem11 + ' + Me.LayoutControlItem11.Control = Me.CHANGED_WHENTextBox + Me.LayoutControlItem11.Location = New System.Drawing.Point(0, 144) + Me.LayoutControlItem11.Name = "LayoutControlItem11" + Me.LayoutControlItem11.Size = New System.Drawing.Size(1224, 642) + Me.LayoutControlItem11.Text = "Geändert wann:" + Me.LayoutControlItem11.TextSize = New System.Drawing.Size(83, 13) + ' + 'LayoutControlItem3 + ' + Me.LayoutControlItem3.Control = Me.OBJECT_TITLETextBox + Me.LayoutControlItem3.Location = New System.Drawing.Point(201, 0) + Me.LayoutControlItem3.Name = "LayoutControlItem3" + Me.LayoutControlItem3.Size = New System.Drawing.Size(600, 24) + Me.LayoutControlItem3.Text = "Bezeichnung:" + Me.LayoutControlItem3.TextSize = New System.Drawing.Size(83, 13) + ' + 'LayoutControlItem6 + ' + Me.LayoutControlItem6.Control = Me.IS_ARCHIVECheckBox + Me.LayoutControlItem6.Location = New System.Drawing.Point(801, 0) + Me.LayoutControlItem6.Name = "LayoutControlItem6" + Me.LayoutControlItem6.Size = New System.Drawing.Size(423, 24) + Me.LayoutControlItem6.Text = "IS ARCHIVE:" + Me.LayoutControlItem6.TextSize = New System.Drawing.Size(0, 0) + Me.LayoutControlItem6.TextVisible = False + ' + 'LayoutControlItem5 + ' + Me.LayoutControlItem5.Control = Me.CAT_IDTextBox + Me.LayoutControlItem5.Location = New System.Drawing.Point(0, 24) + Me.LayoutControlItem5.Name = "LayoutControlItem5" + Me.LayoutControlItem5.Size = New System.Drawing.Size(201, 24) + Me.LayoutControlItem5.Text = "Pfad-ID:" + Me.LayoutControlItem5.TextSize = New System.Drawing.Size(83, 13) + ' + 'TBIDB_OBJECT_STORETableAdapter + ' + Me.TBIDB_OBJECT_STORETableAdapter.ClearBeforeFill = True + ' + 'TableAdapterManager + ' + Me.TableAdapterManager.BackupDataSetBeforeUpdate = False + Me.TableAdapterManager.TBIDB_ATTRIBUTE_TYPETableAdapter = Nothing + Me.TableAdapterManager.TBIDB_ATTRIBUTETableAdapter = Nothing + Me.TableAdapterManager.TBIDB_BUSINESS_ENTITYTableAdapter = Nothing + Me.TableAdapterManager.TBIDB_CATALOGTableAdapter = Nothing + Me.TableAdapterManager.TBIDB_OBJECT_STORETableAdapter = Me.TBIDB_OBJECT_STORETableAdapter + Me.TableAdapterManager.TBZF_ADMIN_SOURCE_SQLTableAdapter = Nothing + Me.TableAdapterManager.UpdateOrder = DigitalData.GUIs.ZooFlow.DSIDB_StammdatenTableAdapters.TableAdapterManager.UpdateOrderOption.InsertUpdateDelete + ' + 'TBIDB_CATALOGBindingSource + ' + Me.TBIDB_CATALOGBindingSource.DataMember = "TBIDB_CATALOG" + Me.TBIDB_CATALOGBindingSource.DataSource = Me.DSIDB_Stammdaten + ' + 'TBIDB_CATALOGTableAdapter + ' + Me.TBIDB_CATALOGTableAdapter.ClearBeforeFill = True + ' + 'CAT_TITLETextBox + ' + Me.CAT_TITLETextBox.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBIDB_CATALOGBindingSource, "CAT_TITLE", True)) + Me.CAT_TITLETextBox.Location = New System.Drawing.Point(299, 36) + Me.CAT_TITLETextBox.Name = "CAT_TITLETextBox" + Me.CAT_TITLETextBox.Size = New System.Drawing.Size(933, 20) + Me.CAT_TITLETextBox.TabIndex = 16 + ' + 'LayoutControlItem12 + ' + Me.LayoutControlItem12.Control = Me.CAT_TITLETextBox + Me.LayoutControlItem12.Location = New System.Drawing.Point(201, 24) + Me.LayoutControlItem12.Name = "LayoutControlItem12" + Me.LayoutControlItem12.Size = New System.Drawing.Size(1023, 24) + Me.LayoutControlItem12.Text = "Pfad:" + Me.LayoutControlItem12.TextSize = New System.Drawing.Size(83, 13) + ' + 'labelStatus + ' + Me.labelStatus.Id = 4 + Me.labelStatus.ImageOptions.SvgImage = CType(resources.GetObject("labelStatus.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage) + Me.labelStatus.Name = "labelStatus" + Me.labelStatus.PaintStyle = DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph + ' + 'frmAdmin_IDBObjectStore + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.ClientSize = New System.Drawing.Size(1244, 894) + Me.Controls.Add(Me.LayoutControl1) + Me.Controls.Add(Me.RibbonStatusBar1) + Me.Controls.Add(Me.RibbonControl1) + Me.Name = "frmAdmin_IDBObjectStore" + Me.Ribbon = Me.RibbonControl1 + Me.StatusBar = Me.RibbonStatusBar1 + Me.Text = "frmAdmin_IDBObjectStore" + CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.LayoutControl1, System.ComponentModel.ISupportInitialize).EndInit() + Me.LayoutControl1.ResumeLayout(False) + CType(Me.TBIDB_OBJECT_STOREBindingSource, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.DSIDB_Stammdaten, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.Root, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.LayoutControlItem2, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.LayoutControlItem7, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.LayoutControlItem8, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.LayoutControlItem9, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.LayoutControlItem10, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.LayoutControlItem11, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.LayoutControlItem3, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.LayoutControlItem6, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.LayoutControlItem5, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.TBIDB_CATALOGBindingSource, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.LayoutControlItem12, System.ComponentModel.ISupportInitialize).EndInit() + Me.ResumeLayout(False) + Me.PerformLayout() + + End Sub + + Friend WithEvents RibbonControl1 As DevExpress.XtraBars.Ribbon.RibbonControl + Friend WithEvents RibbonPage1 As DevExpress.XtraBars.Ribbon.RibbonPage + Friend WithEvents RibbonPageGroup1 As DevExpress.XtraBars.Ribbon.RibbonPageGroup + Friend WithEvents RibbonPageGroup2 As DevExpress.XtraBars.Ribbon.RibbonPageGroup + Friend WithEvents RibbonStatusBar1 As DevExpress.XtraBars.Ribbon.RibbonStatusBar + Friend WithEvents RibbonPage2 As DevExpress.XtraBars.Ribbon.RibbonPage + Friend WithEvents BarButtonItem1 As DevExpress.XtraBars.BarButtonItem + Friend WithEvents BarButtonItem2 As DevExpress.XtraBars.BarButtonItem + Friend WithEvents BarButtonItem3 As DevExpress.XtraBars.BarButtonItem + Friend WithEvents LayoutControl1 As DevExpress.XtraLayout.LayoutControl + Friend WithEvents Root As DevExpress.XtraLayout.LayoutControlGroup + Friend WithEvents DSIDB_Stammdaten As DSIDB_Stammdaten + Friend WithEvents TBIDB_OBJECT_STOREBindingSource As BindingSource + Friend WithEvents TBIDB_OBJECT_STORETableAdapter As DSIDB_StammdatenTableAdapters.TBIDB_OBJECT_STORETableAdapter + Friend WithEvents TableAdapterManager As DSIDB_StammdatenTableAdapters.TableAdapterManager + Friend WithEvents CHANGED_WHENTextBox As TextBox + Friend WithEvents CHANGED_WHOTextBox As TextBox + Friend WithEvents ADDED_WHENTextBox As TextBox + Friend WithEvents ADDED_WHOTextBox As TextBox + Friend WithEvents COMMENTTextBox As TextBox + Friend WithEvents IS_ARCHIVECheckBox As CheckBox + Friend WithEvents CAT_IDTextBox As TextBox + Friend WithEvents OBJECT_TITLETextBox As TextBox + Friend WithEvents GUIDTextBox As TextBox + Friend WithEvents LayoutControlItem2 As DevExpress.XtraLayout.LayoutControlItem + Friend WithEvents LayoutControlItem5 As DevExpress.XtraLayout.LayoutControlItem + Friend WithEvents LayoutControlItem6 As DevExpress.XtraLayout.LayoutControlItem + Friend WithEvents LayoutControlItem7 As DevExpress.XtraLayout.LayoutControlItem + Friend WithEvents LayoutControlItem8 As DevExpress.XtraLayout.LayoutControlItem + Friend WithEvents LayoutControlItem9 As DevExpress.XtraLayout.LayoutControlItem + Friend WithEvents LayoutControlItem10 As DevExpress.XtraLayout.LayoutControlItem + Friend WithEvents LayoutControlItem11 As DevExpress.XtraLayout.LayoutControlItem + Friend WithEvents LayoutControlItem3 As DevExpress.XtraLayout.LayoutControlItem + Friend WithEvents TBIDB_CATALOGBindingSource As BindingSource + Friend WithEvents TBIDB_CATALOGTableAdapter As DSIDB_StammdatenTableAdapters.TBIDB_CATALOGTableAdapter + Friend WithEvents CAT_TITLETextBox As TextBox + Friend WithEvents LayoutControlItem12 As DevExpress.XtraLayout.LayoutControlItem + Friend WithEvents labelStatus As DevExpress.XtraBars.BarStaticItem +End Class diff --git a/GUIs.ZooFlow/Administration/frmAdmin_IDBObjectStore.resx b/GUIs.ZooFlow/Administration/frmAdmin_IDBObjectStore.resx new file mode 100644 index 00000000..b4aad41f --- /dev/null +++ b/GUIs.ZooFlow/Administration/frmAdmin_IDBObjectStore.resx @@ -0,0 +1,223 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjE5LjIsIFZlcnNpb249MTkuMi4z + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAACQCAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5Z + ZWxsb3d7ZmlsbDojRkZCMTE1O30KCS5CbGFja3tmaWxsOiM3MjcyNzI7fQoJLkdyZWVue2ZpbGw6IzAz + OUMyMzt9CgkuUmVke2ZpbGw6I0QxMUMxQzt9Cgkuc3Qwe29wYWNpdHk6MC43NTt9Cgkuc3Qxe29wYWNp + dHk6MC41O30KPC9zdHlsZT4NCiAgPGcgaWQ9IkNoZWNrIj4NCiAgICA8cG9seWdvbiBwb2ludHM9IjI3 + LDUgMTEsMjEgNSwxNSAyLDE4IDExLDI3IDMwLDggICIgY2xhc3M9IkdyZWVuIiAvPg0KICA8L2c+DQo8 + L3N2Zz4L + + + + + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjE5LjIsIFZlcnNpb249MTkuMi4z + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAO4BAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iU2F2ZSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMzIg + MzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsYWNre2ZpbGw6IzcyNzI3Mjt9Cjwvc3R5 + bGU+DQogIDxwYXRoIGQ9Ik0yNyw0aC0zdjEwSDhWNEg1QzQuNCw0LDQsNC40LDQsNXYyMmMwLDAuNiww + LjQsMSwxLDFoMjJjMC42LDAsMS0wLjQsMS0xVjVDMjgsNC40LDI3LjYsNCwyNyw0eiBNMjQsMjRIOHYt + NiAgaDE2VjI0eiBNMTAsNHY4aDEwVjRIMTB6IE0xNCwxMGgtMlY2aDJWMTB6IiBjbGFzcz0iQmxhY2si + IC8+DQo8L3N2Zz4L + + + + + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjE5LjIsIFZlcnNpb249MTkuMi4z + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAD0DAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLlJlZHtmaWxsOiNEMTFDMUM7fQoJLkJs + YWNre2ZpbGw6IzcyNzI3Mjt9CgkuQmx1ZXtmaWxsOiMxMTc3RDc7fQoJLkdyZWVue2ZpbGw6IzAzOUMy + Mzt9CgkuWWVsbG93e2ZpbGw6I0ZGQjExNTt9CgkuV2hpdGV7ZmlsbDojRkZGRkZGO30KCS5zdDB7b3Bh + Y2l0eTowLjU7fQoJLnN0MXtvcGFjaXR5OjAuNzU7fQo8L3N0eWxlPg0KICA8ZyBpZD0iRGVsZXRlIj4N + CiAgICA8Zz4NCiAgICAgIDxwYXRoIGQ9Ik0xOC44LDE2bDYuOS02LjljMC40LTAuNCwwLjQtMSwwLTEu + NGwtMS40LTEuNGMtMC40LTAuNC0xLTAuNC0xLjQsMEwxNiwxMy4yTDkuMSw2LjNjLTAuNC0wLjQtMS0w + LjQtMS40LDAgICAgTDYuMyw3LjdjLTAuNCwwLjQtMC40LDEsMCwxLjRsNi45LDYuOWwtNi45LDYuOWMt + MC40LDAuNC0wLjQsMSwwLDEuNGwxLjQsMS40YzAuNCwwLjQsMSwwLjQsMS40LDBsNi45LTYuOWw2Ljks + Ni45ICAgIGMwLjQsMC40LDEsMC40LDEuNCwwbDEuNC0xLjRjMC40LTAuNCwwLjQtMSwwLTEuNEwxOC44 + LDE2eiIgY2xhc3M9IlJlZCIgLz4NCiAgICA8L2c+DQogIDwvZz4NCjwvc3ZnPgs= + + + + + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjE5LjIsIFZlcnNpb249MTkuMi4z + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAABsDAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLlllbGxvd3tmaWxsOiNGRkIxMTU7fQoJ + LlJlZHtmaWxsOiNEMTFDMUM7fQoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5HcmVlbntmaWxsOiMwMzlD + MjM7fQoJLkJsYWNre2ZpbGw6IzcyNzI3Mjt9CgkuV2hpdGV7ZmlsbDojRkZGRkZGO30KCS5zdDB7b3Bh + Y2l0eTowLjU7fQoJLnN0MXtkaXNwbGF5Om5vbmU7fQoJLnN0MntkaXNwbGF5OmlubGluZTtmaWxsOiMw + MzlDMjM7fQoJLnN0M3tkaXNwbGF5OmlubGluZTtmaWxsOiNEMTFDMUM7fQoJLnN0NHtkaXNwbGF5Omlu + bGluZTtmaWxsOiM3MjcyNzI7fQo8L3N0eWxlPg0KICA8ZyBpZD0iQWJvdXQiPg0KICAgIDxwYXRoIGQ9 + Ik0xNiwyQzguMywyLDIsOC4zLDIsMTZzNi4zLDE0LDE0LDE0czE0LTYuMywxNC0xNFMyMy43LDIsMTYs + MnogTTE2LDZjMS4xLDAsMiwwLjksMiwycy0wLjksMi0yLDJzLTItMC45LTItMiAgIFMxNC45LDYsMTYs + NnogTTIwLDI0aC04di0yaDJ2LThoLTJ2LTJoMmg0djEwaDJWMjR6IiBjbGFzcz0iQmx1ZSIgLz4NCiAg + PC9nPg0KPC9zdmc+Cw== + + + + 845, 17 + + + 177, 17 + + + 177, 17 + + + 17, 17 + + + 427, 17 + + + 672, 17 + + + 845, 17 + + + 17, 17 + + + 1067, 17 + + \ No newline at end of file diff --git a/GUIs.ZooFlow/Administration/frmAdmin_IDBObjectStore.vb b/GUIs.ZooFlow/Administration/frmAdmin_IDBObjectStore.vb new file mode 100644 index 00000000..b87c6442 --- /dev/null +++ b/GUIs.ZooFlow/Administration/frmAdmin_IDBObjectStore.vb @@ -0,0 +1,111 @@ +Public Class frmAdmin_IDBObjectStore + Implements IAdminForm + + Public Property PrimaryKey As Integer Implements IAdminForm.PrimaryKey + + + Public Property HasChanges As Boolean Implements IAdminForm.HasChanges + + + + Public Property IsInsert As Boolean Implements IAdminForm.IsInsert + Dim oStorePath As String = String.Empty + + Public Function DeleteData() As Boolean Implements IAdminForm.DeleteData + Throw New NotImplementedException() + End Function + Public Sub New(PrimaryKey As Integer, Optional IsInsert As Boolean = False) + ' Dieser Aufruf ist für den Designer erforderlich. + InitializeComponent() + + ' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu. + InitializeBaseForm(My.LogConfig) + Me.PrimaryKey = PrimaryKey + Me.IsInsert = IsInsert + End Sub + + Private Sub BarButtonItem3_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem3.ItemClick + + End Sub + + + + Private Sub frmAdmin_IDBObjectStore_Load(sender As Object, e As EventArgs) Handles MyBase.Load + 'TODO: Diese Codezeile lädt Daten in die Tabelle "DSIDB_Stammdaten.TBIDB_OBJECT_STORE". Sie können sie bei Bedarf verschieben oder entfernen. + Me.TBIDB_OBJECT_STORETableAdapter.Connection.ConnectionString = My.DatabaseIDB.CurrentSQLConnectionString + Me.TBIDB_CATALOGTableAdapter.Connection.ConnectionString = My.DatabaseIDB.CurrentSQLConnectionString + Me.TBIDB_OBJECT_STORETableAdapter.Fill(Me.DSIDB_Stammdaten.TBIDB_OBJECT_STORE) + If IsInsert Then + TBIDB_OBJECT_STOREBindingSource.AddNew() + ADDED_WHOTextBox.Text = My.Application.User.UserName + Else + If CAT_IDTextBox.Text <> String.Empty Then + Me.TBIDB_CATALOGTableAdapter.Fill(Me.DSIDB_Stammdaten.TBIDB_CATALOG, CType(CAT_IDTextBox.Text, Integer)) + oStorePath = CAT_TITLETextBox.Text + End If + End If + + + End Sub + + Private Sub BarButtonItem1_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem1.ItemClick + ResetMessages() + + If SaveData() Then + Close() + End If + End Sub + + Private Sub BarButtonItem2_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem2.ItemClick + ResetMessages() + + If SaveData() And HasChanges Then + ShowStatus("ObjectStore gespeichert!") + End If + End Sub + Private Sub ResetMessages() + labelStatus.Visibility = DevExpress.XtraBars.BarItemVisibility.Never + End Sub + + Private Sub ShowStatus(Message As String) + labelStatus.Caption = Message + labelStatus.Visibility = DevExpress.XtraBars.BarItemVisibility.Always + End Sub + Public Function SaveData() As Boolean + Try + TBIDB_OBJECT_STOREBindingSource.EndEdit() + + If DSIDB_Stammdaten.TBIDB_OBJECT_STORE.GetChanges() IsNot Nothing Then + HasChanges = True + + If IsInsert Then + Dim oSQL = $"INSERT INTO TBIDB_CATALOG (CAT_TITLE, CAT_STRING, ADDED_WHO) VALUES ('FILESTORE_' + '{OBJECT_TITLETextBox.Text}','{CAT_TITLETextBox.Text}','{My.Application.User.UserName}')" + If My.DatabaseIDB.ExecuteNonQuery(oSQL) Then + Dim oID = $"SELECT GUID FROM TBIDB_CATALOG WHERE CAT_TITLE = 'FILESTORE_' + '{OBJECT_TITLETextBox.Text}'" + oID = My.DatabaseIDB.GetScalarValue(oID) + CAT_IDTextBox.Text = oID + TBIDB_OBJECT_STOREBindingSource.EndEdit() + End If + + Else + If oStorePath <> CAT_TITLETextBox.Text Then + Dim oSQL = $"UPDATE TBIDB_CATALOG SET CAT_TITLE = 'FILESTORE_' & '{OBJECT_TITLETextBox.Text}', CAT_STRING = {CAT_TITLETextBox.Text}, ADDED_WHO = '{My.Application.User.UserName}'" & + $"WHERE (GUID = {CAT_IDTextBox.Text})" + My.DatabaseIDB.ExecuteNonQuery(oSQL) + End If + CHANGED_WHOTextBox.Text = My.Application.User.UserName + End If + + TBIDB_OBJECT_STOREBindingSource.EndEdit() + + ' TODO: Update Database + TBIDB_OBJECT_STORETableAdapter.Update(DSIDB_Stammdaten.TBIDB_OBJECT_STORE) + End If + + Return True + Catch ex As Exception + ShowErrorMessage(ex) + Return False + End Try + End Function +End Class \ No newline at end of file diff --git a/GUIs.ZooFlow/App.config b/GUIs.ZooFlow/App.config index 32d1773c..aba68645 100644 --- a/GUIs.ZooFlow/App.config +++ b/GUIs.ZooFlow/App.config @@ -11,12 +11,12 @@ diff --git a/GUIs.ZooFlow/DSIDB_Stammdaten.Designer.vb b/GUIs.ZooFlow/DSIDB_Stammdaten.Designer.vb index 3cc988e4..2650ee63 100644 --- a/GUIs.ZooFlow/DSIDB_Stammdaten.Designer.vb +++ b/GUIs.ZooFlow/DSIDB_Stammdaten.Designer.vb @@ -35,8 +35,14 @@ Partial Public Class DSIDB_Stammdaten Private tableTBZF_ADMIN_SOURCE_SQL As TBZF_ADMIN_SOURCE_SQLDataTable + Private tableTBIDB_OBJECT_STORE As TBIDB_OBJECT_STOREDataTable + + Private tableTBIDB_CATALOG As TBIDB_CATALOGDataTable + Private relationFK_TYP_ID As Global.System.Data.DataRelation + Private relationFK_OS_CAT_ID As Global.System.Data.DataRelation + Private _schemaSerializationMode As Global.System.Data.SchemaSerializationMode = Global.System.Data.SchemaSerializationMode.IncludeSchema _ + Public ReadOnly Property TBIDB_OBJECT_STORE() As TBIDB_OBJECT_STOREDataTable + Get + Return Me.tableTBIDB_OBJECT_STORE + End Get + End Property + + _ + Public ReadOnly Property TBIDB_CATALOG() As TBIDB_CATALOGDataTable + Get + Return Me.tableTBIDB_CATALOG + End Get + End Property + _ + Private Function ShouldSerializeTBIDB_OBJECT_STORE() As Boolean + Return false + End Function + + _ + Private Function ShouldSerializeTBIDB_CATALOG() As Boolean + Return false + End Function + _ Private Sub SchemaChanged(ByVal sender As Object, ByVal e As Global.System.ComponentModel.CollectionChangeEventArgs) @@ -420,6 +489,12 @@ Partial Public Class DSIDB_Stammdaten _ Public Delegate Sub TBZF_ADMIN_SOURCE_SQLRowChangeEventHandler(ByVal sender As Object, ByVal e As TBZF_ADMIN_SOURCE_SQLRowChangeEvent) + _ + Public Delegate Sub TBIDB_OBJECT_STORERowChangeEventHandler(ByVal sender As Object, ByVal e As TBIDB_OBJECT_STORERowChangeEvent) + + _ + Public Delegate Sub TBIDB_CATALOGRowChangeEventHandler(ByVal sender As Object, ByVal e As TBIDB_CATALOGRowChangeEvent) + ''' '''Represents the strongly named DataTable class. ''' @@ -2546,6 +2621,764 @@ Partial Public Class DSIDB_Stammdaten End Function End Class + ''' + '''Represents the strongly named DataTable class. + ''' + _ + Partial Public Class TBIDB_OBJECT_STOREDataTable + Inherits Global.System.Data.TypedTableBase(Of TBIDB_OBJECT_STORERow) + + Private columnGUID As Global.System.Data.DataColumn + + Private columnOBJECT_TITLE As Global.System.Data.DataColumn + + Private columnCAT_ID As Global.System.Data.DataColumn + + Private columnOBJ_PATH As Global.System.Data.DataColumn + + Private columnIS_ARCHIVE As Global.System.Data.DataColumn + + Private columnCOMMENT As Global.System.Data.DataColumn + + Private columnADDED_WHO As Global.System.Data.DataColumn + + Private columnADDED_WHEN As Global.System.Data.DataColumn + + Private columnCHANGED_WHO As Global.System.Data.DataColumn + + Private columnCHANGED_WHEN As Global.System.Data.DataColumn + + Private columnCAT_TITLE As Global.System.Data.DataColumn + + _ + Public Sub New() + MyBase.New + Me.TableName = "TBIDB_OBJECT_STORE" + Me.BeginInit + Me.InitClass + Me.EndInit + End Sub + + _ + Friend Sub New(ByVal table As Global.System.Data.DataTable) + MyBase.New + Me.TableName = table.TableName + If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then + Me.CaseSensitive = table.CaseSensitive + End If + If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then + Me.Locale = table.Locale + End If + If (table.Namespace <> table.DataSet.Namespace) Then + Me.Namespace = table.Namespace + End If + Me.Prefix = table.Prefix + Me.MinimumCapacity = table.MinimumCapacity + End Sub + + _ + Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) + MyBase.New(info, context) + Me.InitVars + End Sub + + _ + Public ReadOnly Property GUIDColumn() As Global.System.Data.DataColumn + Get + Return Me.columnGUID + End Get + End Property + + _ + Public ReadOnly Property OBJECT_TITLEColumn() As Global.System.Data.DataColumn + Get + Return Me.columnOBJECT_TITLE + End Get + End Property + + _ + Public ReadOnly Property CAT_IDColumn() As Global.System.Data.DataColumn + Get + Return Me.columnCAT_ID + End Get + End Property + + _ + Public ReadOnly Property OBJ_PATHColumn() As Global.System.Data.DataColumn + Get + Return Me.columnOBJ_PATH + End Get + End Property + + _ + Public ReadOnly Property IS_ARCHIVEColumn() As Global.System.Data.DataColumn + Get + Return Me.columnIS_ARCHIVE + End Get + End Property + + _ + Public ReadOnly Property COMMENTColumn() As Global.System.Data.DataColumn + Get + Return Me.columnCOMMENT + End Get + End Property + + _ + Public ReadOnly Property ADDED_WHOColumn() As Global.System.Data.DataColumn + Get + Return Me.columnADDED_WHO + End Get + End Property + + _ + Public ReadOnly Property ADDED_WHENColumn() As Global.System.Data.DataColumn + Get + Return Me.columnADDED_WHEN + End Get + End Property + + _ + Public ReadOnly Property CHANGED_WHOColumn() As Global.System.Data.DataColumn + Get + Return Me.columnCHANGED_WHO + End Get + End Property + + _ + Public ReadOnly Property CHANGED_WHENColumn() As Global.System.Data.DataColumn + Get + Return Me.columnCHANGED_WHEN + End Get + End Property + + _ + Public ReadOnly Property CAT_TITLEColumn() As Global.System.Data.DataColumn + Get + Return Me.columnCAT_TITLE + End Get + End Property + + _ + Public ReadOnly Property Count() As Integer + Get + Return Me.Rows.Count + End Get + End Property + + _ + Public Default ReadOnly Property Item(ByVal index As Integer) As TBIDB_OBJECT_STORERow + Get + Return CType(Me.Rows(index),TBIDB_OBJECT_STORERow) + End Get + End Property + + _ + Public Event TBIDB_OBJECT_STORERowChanging As TBIDB_OBJECT_STORERowChangeEventHandler + + _ + Public Event TBIDB_OBJECT_STORERowChanged As TBIDB_OBJECT_STORERowChangeEventHandler + + _ + Public Event TBIDB_OBJECT_STORERowDeleting As TBIDB_OBJECT_STORERowChangeEventHandler + + _ + Public Event TBIDB_OBJECT_STORERowDeleted As TBIDB_OBJECT_STORERowChangeEventHandler + + _ + Public Overloads Sub AddTBIDB_OBJECT_STORERow(ByVal row As TBIDB_OBJECT_STORERow) + Me.Rows.Add(row) + End Sub + + _ + Public Overloads Function AddTBIDB_OBJECT_STORERow(ByVal OBJECT_TITLE As String, ByVal parentTBIDB_CATALOGRowByFK_OS_CAT_ID As TBIDB_CATALOGRow, ByVal OBJ_PATH As String, ByVal IS_ARCHIVE As Boolean, ByVal COMMENT As String, ByVal ADDED_WHO As String, ByVal ADDED_WHEN As Date, ByVal CHANGED_WHO As String, ByVal CHANGED_WHEN As Date, ByVal CAT_TITLE As String) As TBIDB_OBJECT_STORERow + Dim rowTBIDB_OBJECT_STORERow As TBIDB_OBJECT_STORERow = CType(Me.NewRow,TBIDB_OBJECT_STORERow) + Dim columnValuesArray() As Object = New Object() {Nothing, OBJECT_TITLE, Nothing, OBJ_PATH, IS_ARCHIVE, COMMENT, ADDED_WHO, ADDED_WHEN, CHANGED_WHO, CHANGED_WHEN, CAT_TITLE} + If (Not (parentTBIDB_CATALOGRowByFK_OS_CAT_ID) Is Nothing) Then + columnValuesArray(2) = parentTBIDB_CATALOGRowByFK_OS_CAT_ID(0) + End If + rowTBIDB_OBJECT_STORERow.ItemArray = columnValuesArray + Me.Rows.Add(rowTBIDB_OBJECT_STORERow) + Return rowTBIDB_OBJECT_STORERow + End Function + + _ + Public Function FindByGUID(ByVal GUID As Integer) As TBIDB_OBJECT_STORERow + Return CType(Me.Rows.Find(New Object() {GUID}),TBIDB_OBJECT_STORERow) + End Function + + _ + Public Overrides Function Clone() As Global.System.Data.DataTable + Dim cln As TBIDB_OBJECT_STOREDataTable = CType(MyBase.Clone,TBIDB_OBJECT_STOREDataTable) + cln.InitVars + Return cln + End Function + + _ + Protected Overrides Function CreateInstance() As Global.System.Data.DataTable + Return New TBIDB_OBJECT_STOREDataTable() + End Function + + _ + Friend Sub InitVars() + Me.columnGUID = MyBase.Columns("GUID") + Me.columnOBJECT_TITLE = MyBase.Columns("OBJECT_TITLE") + Me.columnCAT_ID = MyBase.Columns("CAT_ID") + Me.columnOBJ_PATH = MyBase.Columns("OBJ_PATH") + Me.columnIS_ARCHIVE = MyBase.Columns("IS_ARCHIVE") + Me.columnCOMMENT = MyBase.Columns("COMMENT") + Me.columnADDED_WHO = MyBase.Columns("ADDED_WHO") + Me.columnADDED_WHEN = MyBase.Columns("ADDED_WHEN") + Me.columnCHANGED_WHO = MyBase.Columns("CHANGED_WHO") + Me.columnCHANGED_WHEN = MyBase.Columns("CHANGED_WHEN") + Me.columnCAT_TITLE = MyBase.Columns("CAT_TITLE") + End Sub + + _ + Private Sub InitClass() + Me.columnGUID = New Global.System.Data.DataColumn("GUID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) + MyBase.Columns.Add(Me.columnGUID) + Me.columnOBJECT_TITLE = New Global.System.Data.DataColumn("OBJECT_TITLE", GetType(String), Nothing, Global.System.Data.MappingType.Element) + MyBase.Columns.Add(Me.columnOBJECT_TITLE) + Me.columnCAT_ID = New Global.System.Data.DataColumn("CAT_ID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) + MyBase.Columns.Add(Me.columnCAT_ID) + Me.columnOBJ_PATH = New Global.System.Data.DataColumn("OBJ_PATH", GetType(String), Nothing, Global.System.Data.MappingType.Element) + MyBase.Columns.Add(Me.columnOBJ_PATH) + Me.columnIS_ARCHIVE = New Global.System.Data.DataColumn("IS_ARCHIVE", GetType(Boolean), Nothing, Global.System.Data.MappingType.Element) + MyBase.Columns.Add(Me.columnIS_ARCHIVE) + Me.columnCOMMENT = New Global.System.Data.DataColumn("COMMENT", GetType(String), Nothing, Global.System.Data.MappingType.Element) + MyBase.Columns.Add(Me.columnCOMMENT) + Me.columnADDED_WHO = New Global.System.Data.DataColumn("ADDED_WHO", GetType(String), Nothing, Global.System.Data.MappingType.Element) + MyBase.Columns.Add(Me.columnADDED_WHO) + Me.columnADDED_WHEN = New Global.System.Data.DataColumn("ADDED_WHEN", GetType(Date), Nothing, Global.System.Data.MappingType.Element) + MyBase.Columns.Add(Me.columnADDED_WHEN) + Me.columnCHANGED_WHO = New Global.System.Data.DataColumn("CHANGED_WHO", GetType(String), Nothing, Global.System.Data.MappingType.Element) + MyBase.Columns.Add(Me.columnCHANGED_WHO) + Me.columnCHANGED_WHEN = New Global.System.Data.DataColumn("CHANGED_WHEN", GetType(Date), Nothing, Global.System.Data.MappingType.Element) + MyBase.Columns.Add(Me.columnCHANGED_WHEN) + Me.columnCAT_TITLE = New Global.System.Data.DataColumn("CAT_TITLE", GetType(String), Nothing, Global.System.Data.MappingType.Element) + MyBase.Columns.Add(Me.columnCAT_TITLE) + Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnGUID}, true)) + Me.columnGUID.AutoIncrement = true + Me.columnGUID.AllowDBNull = false + Me.columnGUID.ReadOnly = true + Me.columnGUID.Unique = true + Me.columnOBJECT_TITLE.AllowDBNull = false + Me.columnOBJECT_TITLE.MaxLength = 250 + Me.columnCAT_ID.AllowDBNull = false + Me.columnCAT_ID.DefaultValue = CType(0,Integer) + Me.columnOBJ_PATH.AllowDBNull = false + Me.columnOBJ_PATH.DefaultValue = CType("",String) + Me.columnOBJ_PATH.MaxLength = 250 + Me.columnIS_ARCHIVE.AllowDBNull = false + Me.columnIS_ARCHIVE.DefaultValue = CType(false,Boolean) + Me.columnCOMMENT.MaxLength = 500 + Me.columnADDED_WHO.MaxLength = 30 + Me.columnCHANGED_WHO.MaxLength = 30 + Me.columnCAT_TITLE.MaxLength = 100 + End Sub + + _ + Public Function NewTBIDB_OBJECT_STORERow() As TBIDB_OBJECT_STORERow + Return CType(Me.NewRow,TBIDB_OBJECT_STORERow) + End Function + + _ + Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow + Return New TBIDB_OBJECT_STORERow(builder) + End Function + + _ + Protected Overrides Function GetRowType() As Global.System.Type + Return GetType(TBIDB_OBJECT_STORERow) + End Function + + _ + Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) + MyBase.OnRowChanged(e) + If (Not (Me.TBIDB_OBJECT_STORERowChangedEvent) Is Nothing) Then + RaiseEvent TBIDB_OBJECT_STORERowChanged(Me, New TBIDB_OBJECT_STORERowChangeEvent(CType(e.Row,TBIDB_OBJECT_STORERow), e.Action)) + End If + End Sub + + _ + Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) + MyBase.OnRowChanging(e) + If (Not (Me.TBIDB_OBJECT_STORERowChangingEvent) Is Nothing) Then + RaiseEvent TBIDB_OBJECT_STORERowChanging(Me, New TBIDB_OBJECT_STORERowChangeEvent(CType(e.Row,TBIDB_OBJECT_STORERow), e.Action)) + End If + End Sub + + _ + Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) + MyBase.OnRowDeleted(e) + If (Not (Me.TBIDB_OBJECT_STORERowDeletedEvent) Is Nothing) Then + RaiseEvent TBIDB_OBJECT_STORERowDeleted(Me, New TBIDB_OBJECT_STORERowChangeEvent(CType(e.Row,TBIDB_OBJECT_STORERow), e.Action)) + End If + End Sub + + _ + Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) + MyBase.OnRowDeleting(e) + If (Not (Me.TBIDB_OBJECT_STORERowDeletingEvent) Is Nothing) Then + RaiseEvent TBIDB_OBJECT_STORERowDeleting(Me, New TBIDB_OBJECT_STORERowChangeEvent(CType(e.Row,TBIDB_OBJECT_STORERow), e.Action)) + End If + End Sub + + _ + Public Sub RemoveTBIDB_OBJECT_STORERow(ByVal row As TBIDB_OBJECT_STORERow) + Me.Rows.Remove(row) + End Sub + + _ + Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType + Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() + Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() + Dim ds As DSIDB_Stammdaten = New DSIDB_Stammdaten() + Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() + any1.Namespace = "http://www.w3.org/2001/XMLSchema" + any1.MinOccurs = New Decimal(0) + any1.MaxOccurs = Decimal.MaxValue + any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax + sequence.Items.Add(any1) + Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() + any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" + any2.MinOccurs = New Decimal(1) + any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax + sequence.Items.Add(any2) + Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() + attribute1.Name = "namespace" + attribute1.FixedValue = ds.Namespace + type.Attributes.Add(attribute1) + Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() + attribute2.Name = "tableTypeName" + attribute2.FixedValue = "TBIDB_OBJECT_STOREDataTable" + type.Attributes.Add(attribute2) + type.Particle = sequence + Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable + If xs.Contains(dsSchema.TargetNamespace) Then + Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() + Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() + Try + Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing + dsSchema.Write(s1) + Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator + Do While schemas.MoveNext + schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) + s2.SetLength(0) + schema.Write(s2) + If (s1.Length = s2.Length) Then + s1.Position = 0 + s2.Position = 0 + + Do While ((s1.Position <> s1.Length) _ + AndAlso (s1.ReadByte = s2.ReadByte)) + + + Loop + If (s1.Position = s1.Length) Then + Return type + End If + End If + + Loop + Finally + If (Not (s1) Is Nothing) Then + s1.Close + End If + If (Not (s2) Is Nothing) Then + s2.Close + End If + End Try + End If + xs.Add(dsSchema) + Return type + End Function + End Class + + ''' + '''Represents the strongly named DataTable class. + ''' + _ + Partial Public Class TBIDB_CATALOGDataTable + Inherits Global.System.Data.TypedTableBase(Of TBIDB_CATALOGRow) + + Private columnGUID As Global.System.Data.DataColumn + + Private columnCAT_TITLE As Global.System.Data.DataColumn + + Private columnCAT_STRING As Global.System.Data.DataColumn + + Private columnADDED_WHO As Global.System.Data.DataColumn + + Private columnADDED_WHEN As Global.System.Data.DataColumn + + Private columnCHANGED_WHO As Global.System.Data.DataColumn + + Private columnCHANGED_WHEN As Global.System.Data.DataColumn + + _ + Public Sub New() + MyBase.New + Me.TableName = "TBIDB_CATALOG" + Me.BeginInit + Me.InitClass + Me.EndInit + End Sub + + _ + Friend Sub New(ByVal table As Global.System.Data.DataTable) + MyBase.New + Me.TableName = table.TableName + If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then + Me.CaseSensitive = table.CaseSensitive + End If + If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then + Me.Locale = table.Locale + End If + If (table.Namespace <> table.DataSet.Namespace) Then + Me.Namespace = table.Namespace + End If + Me.Prefix = table.Prefix + Me.MinimumCapacity = table.MinimumCapacity + End Sub + + _ + Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext) + MyBase.New(info, context) + Me.InitVars + End Sub + + _ + Public ReadOnly Property GUIDColumn() As Global.System.Data.DataColumn + Get + Return Me.columnGUID + End Get + End Property + + _ + Public ReadOnly Property CAT_TITLEColumn() As Global.System.Data.DataColumn + Get + Return Me.columnCAT_TITLE + End Get + End Property + + _ + Public ReadOnly Property CAT_STRINGColumn() As Global.System.Data.DataColumn + Get + Return Me.columnCAT_STRING + End Get + End Property + + _ + Public ReadOnly Property ADDED_WHOColumn() As Global.System.Data.DataColumn + Get + Return Me.columnADDED_WHO + End Get + End Property + + _ + Public ReadOnly Property ADDED_WHENColumn() As Global.System.Data.DataColumn + Get + Return Me.columnADDED_WHEN + End Get + End Property + + _ + Public ReadOnly Property CHANGED_WHOColumn() As Global.System.Data.DataColumn + Get + Return Me.columnCHANGED_WHO + End Get + End Property + + _ + Public ReadOnly Property CHANGED_WHENColumn() As Global.System.Data.DataColumn + Get + Return Me.columnCHANGED_WHEN + End Get + End Property + + _ + Public ReadOnly Property Count() As Integer + Get + Return Me.Rows.Count + End Get + End Property + + _ + Public Default ReadOnly Property Item(ByVal index As Integer) As TBIDB_CATALOGRow + Get + Return CType(Me.Rows(index),TBIDB_CATALOGRow) + End Get + End Property + + _ + Public Event TBIDB_CATALOGRowChanging As TBIDB_CATALOGRowChangeEventHandler + + _ + Public Event TBIDB_CATALOGRowChanged As TBIDB_CATALOGRowChangeEventHandler + + _ + Public Event TBIDB_CATALOGRowDeleting As TBIDB_CATALOGRowChangeEventHandler + + _ + Public Event TBIDB_CATALOGRowDeleted As TBIDB_CATALOGRowChangeEventHandler + + _ + Public Overloads Sub AddTBIDB_CATALOGRow(ByVal row As TBIDB_CATALOGRow) + Me.Rows.Add(row) + End Sub + + _ + Public Overloads Function AddTBIDB_CATALOGRow(ByVal CAT_TITLE As String, ByVal CAT_STRING As String, ByVal ADDED_WHO As String, ByVal ADDED_WHEN As Date, ByVal CHANGED_WHO As String, ByVal CHANGED_WHEN As Date) As TBIDB_CATALOGRow + Dim rowTBIDB_CATALOGRow As TBIDB_CATALOGRow = CType(Me.NewRow,TBIDB_CATALOGRow) + Dim columnValuesArray() As Object = New Object() {Nothing, CAT_TITLE, CAT_STRING, ADDED_WHO, ADDED_WHEN, CHANGED_WHO, CHANGED_WHEN} + rowTBIDB_CATALOGRow.ItemArray = columnValuesArray + Me.Rows.Add(rowTBIDB_CATALOGRow) + Return rowTBIDB_CATALOGRow + End Function + + _ + Public Function FindByGUID(ByVal GUID As Integer) As TBIDB_CATALOGRow + Return CType(Me.Rows.Find(New Object() {GUID}),TBIDB_CATALOGRow) + End Function + + _ + Public Overrides Function Clone() As Global.System.Data.DataTable + Dim cln As TBIDB_CATALOGDataTable = CType(MyBase.Clone,TBIDB_CATALOGDataTable) + cln.InitVars + Return cln + End Function + + _ + Protected Overrides Function CreateInstance() As Global.System.Data.DataTable + Return New TBIDB_CATALOGDataTable() + End Function + + _ + Friend Sub InitVars() + Me.columnGUID = MyBase.Columns("GUID") + Me.columnCAT_TITLE = MyBase.Columns("CAT_TITLE") + Me.columnCAT_STRING = MyBase.Columns("CAT_STRING") + Me.columnADDED_WHO = MyBase.Columns("ADDED_WHO") + Me.columnADDED_WHEN = MyBase.Columns("ADDED_WHEN") + Me.columnCHANGED_WHO = MyBase.Columns("CHANGED_WHO") + Me.columnCHANGED_WHEN = MyBase.Columns("CHANGED_WHEN") + End Sub + + _ + Private Sub InitClass() + Me.columnGUID = New Global.System.Data.DataColumn("GUID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element) + MyBase.Columns.Add(Me.columnGUID) + Me.columnCAT_TITLE = New Global.System.Data.DataColumn("CAT_TITLE", GetType(String), Nothing, Global.System.Data.MappingType.Element) + MyBase.Columns.Add(Me.columnCAT_TITLE) + Me.columnCAT_STRING = New Global.System.Data.DataColumn("CAT_STRING", GetType(String), Nothing, Global.System.Data.MappingType.Element) + MyBase.Columns.Add(Me.columnCAT_STRING) + Me.columnADDED_WHO = New Global.System.Data.DataColumn("ADDED_WHO", GetType(String), Nothing, Global.System.Data.MappingType.Element) + MyBase.Columns.Add(Me.columnADDED_WHO) + Me.columnADDED_WHEN = New Global.System.Data.DataColumn("ADDED_WHEN", GetType(Date), Nothing, Global.System.Data.MappingType.Element) + MyBase.Columns.Add(Me.columnADDED_WHEN) + Me.columnCHANGED_WHO = New Global.System.Data.DataColumn("CHANGED_WHO", GetType(String), Nothing, Global.System.Data.MappingType.Element) + MyBase.Columns.Add(Me.columnCHANGED_WHO) + Me.columnCHANGED_WHEN = New Global.System.Data.DataColumn("CHANGED_WHEN", GetType(Date), Nothing, Global.System.Data.MappingType.Element) + MyBase.Columns.Add(Me.columnCHANGED_WHEN) + Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnGUID}, true)) + Me.columnGUID.AutoIncrement = true + Me.columnGUID.AllowDBNull = false + Me.columnGUID.ReadOnly = true + Me.columnGUID.Unique = true + Me.columnCAT_TITLE.AllowDBNull = false + Me.columnCAT_TITLE.MaxLength = 100 + Me.columnCAT_STRING.AllowDBNull = false + Me.columnCAT_STRING.MaxLength = 900 + Me.columnADDED_WHO.AllowDBNull = false + Me.columnADDED_WHO.MaxLength = 30 + Me.columnADDED_WHEN.AllowDBNull = false + Me.columnCHANGED_WHO.MaxLength = 30 + End Sub + + _ + Public Function NewTBIDB_CATALOGRow() As TBIDB_CATALOGRow + Return CType(Me.NewRow,TBIDB_CATALOGRow) + End Function + + _ + Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow + Return New TBIDB_CATALOGRow(builder) + End Function + + _ + Protected Overrides Function GetRowType() As Global.System.Type + Return GetType(TBIDB_CATALOGRow) + End Function + + _ + Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs) + MyBase.OnRowChanged(e) + If (Not (Me.TBIDB_CATALOGRowChangedEvent) Is Nothing) Then + RaiseEvent TBIDB_CATALOGRowChanged(Me, New TBIDB_CATALOGRowChangeEvent(CType(e.Row,TBIDB_CATALOGRow), e.Action)) + End If + End Sub + + _ + Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs) + MyBase.OnRowChanging(e) + If (Not (Me.TBIDB_CATALOGRowChangingEvent) Is Nothing) Then + RaiseEvent TBIDB_CATALOGRowChanging(Me, New TBIDB_CATALOGRowChangeEvent(CType(e.Row,TBIDB_CATALOGRow), e.Action)) + End If + End Sub + + _ + Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs) + MyBase.OnRowDeleted(e) + If (Not (Me.TBIDB_CATALOGRowDeletedEvent) Is Nothing) Then + RaiseEvent TBIDB_CATALOGRowDeleted(Me, New TBIDB_CATALOGRowChangeEvent(CType(e.Row,TBIDB_CATALOGRow), e.Action)) + End If + End Sub + + _ + Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs) + MyBase.OnRowDeleting(e) + If (Not (Me.TBIDB_CATALOGRowDeletingEvent) Is Nothing) Then + RaiseEvent TBIDB_CATALOGRowDeleting(Me, New TBIDB_CATALOGRowChangeEvent(CType(e.Row,TBIDB_CATALOGRow), e.Action)) + End If + End Sub + + _ + Public Sub RemoveTBIDB_CATALOGRow(ByVal row As TBIDB_CATALOGRow) + Me.Rows.Remove(row) + End Sub + + _ + Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType + Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType() + Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence() + Dim ds As DSIDB_Stammdaten = New DSIDB_Stammdaten() + Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() + any1.Namespace = "http://www.w3.org/2001/XMLSchema" + any1.MinOccurs = New Decimal(0) + any1.MaxOccurs = Decimal.MaxValue + any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax + sequence.Items.Add(any1) + Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny() + any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1" + any2.MinOccurs = New Decimal(1) + any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax + sequence.Items.Add(any2) + Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() + attribute1.Name = "namespace" + attribute1.FixedValue = ds.Namespace + type.Attributes.Add(attribute1) + Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute() + attribute2.Name = "tableTypeName" + attribute2.FixedValue = "TBIDB_CATALOGDataTable" + type.Attributes.Add(attribute2) + type.Particle = sequence + Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable + If xs.Contains(dsSchema.TargetNamespace) Then + Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() + Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream() + Try + Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing + dsSchema.Write(s1) + Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator + Do While schemas.MoveNext + schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema) + s2.SetLength(0) + schema.Write(s2) + If (s1.Length = s2.Length) Then + s1.Position = 0 + s2.Position = 0 + + Do While ((s1.Position <> s1.Length) _ + AndAlso (s1.ReadByte = s2.ReadByte)) + + + Loop + If (s1.Position = s1.Length) Then + Return type + End If + End If + + Loop + Finally + If (Not (s1) Is Nothing) Then + s1.Close + End If + If (Not (s2) Is Nothing) Then + s2.Close + End If + End Try + End If + xs.Add(dsSchema) + Return type + End Function + End Class + ''' '''Represents strongly named DataRow class. ''' @@ -3665,6 +4498,385 @@ Partial Public Class DSIDB_Stammdaten End Sub End Class + ''' + '''Represents strongly named DataRow class. + ''' + Partial Public Class TBIDB_OBJECT_STORERow + Inherits Global.System.Data.DataRow + + Private tableTBIDB_OBJECT_STORE As TBIDB_OBJECT_STOREDataTable + + _ + Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) + MyBase.New(rb) + Me.tableTBIDB_OBJECT_STORE = CType(Me.Table,TBIDB_OBJECT_STOREDataTable) + End Sub + + _ + Public Property GUID() As Integer + Get + Return CType(Me(Me.tableTBIDB_OBJECT_STORE.GUIDColumn),Integer) + End Get + Set + Me(Me.tableTBIDB_OBJECT_STORE.GUIDColumn) = value + End Set + End Property + + _ + Public Property OBJECT_TITLE() As String + Get + Return CType(Me(Me.tableTBIDB_OBJECT_STORE.OBJECT_TITLEColumn),String) + End Get + Set + Me(Me.tableTBIDB_OBJECT_STORE.OBJECT_TITLEColumn) = value + End Set + End Property + + _ + Public Property CAT_ID() As Integer + Get + Return CType(Me(Me.tableTBIDB_OBJECT_STORE.CAT_IDColumn),Integer) + End Get + Set + Me(Me.tableTBIDB_OBJECT_STORE.CAT_IDColumn) = value + End Set + End Property + + _ + Public Property OBJ_PATH() As String + Get + Return CType(Me(Me.tableTBIDB_OBJECT_STORE.OBJ_PATHColumn),String) + End Get + Set + Me(Me.tableTBIDB_OBJECT_STORE.OBJ_PATHColumn) = value + End Set + End Property + + _ + Public Property IS_ARCHIVE() As Boolean + Get + Return CType(Me(Me.tableTBIDB_OBJECT_STORE.IS_ARCHIVEColumn),Boolean) + End Get + Set + Me(Me.tableTBIDB_OBJECT_STORE.IS_ARCHIVEColumn) = value + End Set + End Property + + _ + Public Property COMMENT() As String + Get + Try + Return CType(Me(Me.tableTBIDB_OBJECT_STORE.COMMENTColumn),String) + Catch e As Global.System.InvalidCastException + Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte COMMENT in Tabelle TBIDB_OBJECT_STORE ist DBNull.", e) + End Try + End Get + Set + Me(Me.tableTBIDB_OBJECT_STORE.COMMENTColumn) = value + End Set + End Property + + _ + Public Property ADDED_WHO() As String + Get + Try + Return CType(Me(Me.tableTBIDB_OBJECT_STORE.ADDED_WHOColumn),String) + Catch e As Global.System.InvalidCastException + Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte ADDED_WHO in Tabelle TBIDB_OBJECT_STORE ist DBNull.", e) + End Try + End Get + Set + Me(Me.tableTBIDB_OBJECT_STORE.ADDED_WHOColumn) = value + End Set + End Property + + _ + Public Property ADDED_WHEN() As Date + Get + Try + Return CType(Me(Me.tableTBIDB_OBJECT_STORE.ADDED_WHENColumn),Date) + Catch e As Global.System.InvalidCastException + Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte ADDED_WHEN in Tabelle TBIDB_OBJECT_STORE ist DBNull.", e) + End Try + End Get + Set + Me(Me.tableTBIDB_OBJECT_STORE.ADDED_WHENColumn) = value + End Set + End Property + + _ + Public Property CHANGED_WHO() As String + Get + Try + Return CType(Me(Me.tableTBIDB_OBJECT_STORE.CHANGED_WHOColumn),String) + Catch e As Global.System.InvalidCastException + Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte CHANGED_WHO in Tabelle TBIDB_OBJECT_STORE ist DBNull.", e) + End Try + End Get + Set + Me(Me.tableTBIDB_OBJECT_STORE.CHANGED_WHOColumn) = value + End Set + End Property + + _ + Public Property CHANGED_WHEN() As Date + Get + Try + Return CType(Me(Me.tableTBIDB_OBJECT_STORE.CHANGED_WHENColumn),Date) + Catch e As Global.System.InvalidCastException + Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte CHANGED_WHEN in Tabelle TBIDB_OBJECT_STORE ist DBNull.", e) + End Try + End Get + Set + Me(Me.tableTBIDB_OBJECT_STORE.CHANGED_WHENColumn) = value + End Set + End Property + + _ + Public Property CAT_TITLE() As String + Get + Try + Return CType(Me(Me.tableTBIDB_OBJECT_STORE.CAT_TITLEColumn),String) + Catch e As Global.System.InvalidCastException + Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte CAT_TITLE in Tabelle TBIDB_OBJECT_STORE ist DBNull.", e) + End Try + End Get + Set + Me(Me.tableTBIDB_OBJECT_STORE.CAT_TITLEColumn) = value + End Set + End Property + + _ + Public Property TBIDB_CATALOGRow() As TBIDB_CATALOGRow + Get + Return CType(Me.GetParentRow(Me.Table.ParentRelations("FK_OS_CAT_ID")),TBIDB_CATALOGRow) + End Get + Set + Me.SetParentRow(value, Me.Table.ParentRelations("FK_OS_CAT_ID")) + End Set + End Property + + _ + Public Function IsCOMMENTNull() As Boolean + Return Me.IsNull(Me.tableTBIDB_OBJECT_STORE.COMMENTColumn) + End Function + + _ + Public Sub SetCOMMENTNull() + Me(Me.tableTBIDB_OBJECT_STORE.COMMENTColumn) = Global.System.Convert.DBNull + End Sub + + _ + Public Function IsADDED_WHONull() As Boolean + Return Me.IsNull(Me.tableTBIDB_OBJECT_STORE.ADDED_WHOColumn) + End Function + + _ + Public Sub SetADDED_WHONull() + Me(Me.tableTBIDB_OBJECT_STORE.ADDED_WHOColumn) = Global.System.Convert.DBNull + End Sub + + _ + Public Function IsADDED_WHENNull() As Boolean + Return Me.IsNull(Me.tableTBIDB_OBJECT_STORE.ADDED_WHENColumn) + End Function + + _ + Public Sub SetADDED_WHENNull() + Me(Me.tableTBIDB_OBJECT_STORE.ADDED_WHENColumn) = Global.System.Convert.DBNull + End Sub + + _ + Public Function IsCHANGED_WHONull() As Boolean + Return Me.IsNull(Me.tableTBIDB_OBJECT_STORE.CHANGED_WHOColumn) + End Function + + _ + Public Sub SetCHANGED_WHONull() + Me(Me.tableTBIDB_OBJECT_STORE.CHANGED_WHOColumn) = Global.System.Convert.DBNull + End Sub + + _ + Public Function IsCHANGED_WHENNull() As Boolean + Return Me.IsNull(Me.tableTBIDB_OBJECT_STORE.CHANGED_WHENColumn) + End Function + + _ + Public Sub SetCHANGED_WHENNull() + Me(Me.tableTBIDB_OBJECT_STORE.CHANGED_WHENColumn) = Global.System.Convert.DBNull + End Sub + + _ + Public Function IsCAT_TITLENull() As Boolean + Return Me.IsNull(Me.tableTBIDB_OBJECT_STORE.CAT_TITLEColumn) + End Function + + _ + Public Sub SetCAT_TITLENull() + Me(Me.tableTBIDB_OBJECT_STORE.CAT_TITLEColumn) = Global.System.Convert.DBNull + End Sub + End Class + + ''' + '''Represents strongly named DataRow class. + ''' + Partial Public Class TBIDB_CATALOGRow + Inherits Global.System.Data.DataRow + + Private tableTBIDB_CATALOG As TBIDB_CATALOGDataTable + + _ + Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder) + MyBase.New(rb) + Me.tableTBIDB_CATALOG = CType(Me.Table,TBIDB_CATALOGDataTable) + End Sub + + _ + Public Property GUID() As Integer + Get + Return CType(Me(Me.tableTBIDB_CATALOG.GUIDColumn),Integer) + End Get + Set + Me(Me.tableTBIDB_CATALOG.GUIDColumn) = value + End Set + End Property + + _ + Public Property CAT_TITLE() As String + Get + Return CType(Me(Me.tableTBIDB_CATALOG.CAT_TITLEColumn),String) + End Get + Set + Me(Me.tableTBIDB_CATALOG.CAT_TITLEColumn) = value + End Set + End Property + + _ + Public Property CAT_STRING() As String + Get + Return CType(Me(Me.tableTBIDB_CATALOG.CAT_STRINGColumn),String) + End Get + Set + Me(Me.tableTBIDB_CATALOG.CAT_STRINGColumn) = value + End Set + End Property + + _ + Public Property ADDED_WHO() As String + Get + Return CType(Me(Me.tableTBIDB_CATALOG.ADDED_WHOColumn),String) + End Get + Set + Me(Me.tableTBIDB_CATALOG.ADDED_WHOColumn) = value + End Set + End Property + + _ + Public Property ADDED_WHEN() As Date + Get + Return CType(Me(Me.tableTBIDB_CATALOG.ADDED_WHENColumn),Date) + End Get + Set + Me(Me.tableTBIDB_CATALOG.ADDED_WHENColumn) = value + End Set + End Property + + _ + Public Property CHANGED_WHO() As String + Get + Try + Return CType(Me(Me.tableTBIDB_CATALOG.CHANGED_WHOColumn),String) + Catch e As Global.System.InvalidCastException + Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte CHANGED_WHO in Tabelle TBIDB_CATALOG ist DBNull.", e) + End Try + End Get + Set + Me(Me.tableTBIDB_CATALOG.CHANGED_WHOColumn) = value + End Set + End Property + + _ + Public Property CHANGED_WHEN() As Date + Get + Try + Return CType(Me(Me.tableTBIDB_CATALOG.CHANGED_WHENColumn),Date) + Catch e As Global.System.InvalidCastException + Throw New Global.System.Data.StrongTypingException("Der Wert für Spalte CHANGED_WHEN in Tabelle TBIDB_CATALOG ist DBNull.", e) + End Try + End Get + Set + Me(Me.tableTBIDB_CATALOG.CHANGED_WHENColumn) = value + End Set + End Property + + _ + Public Function IsCHANGED_WHONull() As Boolean + Return Me.IsNull(Me.tableTBIDB_CATALOG.CHANGED_WHOColumn) + End Function + + _ + Public Sub SetCHANGED_WHONull() + Me(Me.tableTBIDB_CATALOG.CHANGED_WHOColumn) = Global.System.Convert.DBNull + End Sub + + _ + Public Function IsCHANGED_WHENNull() As Boolean + Return Me.IsNull(Me.tableTBIDB_CATALOG.CHANGED_WHENColumn) + End Function + + _ + Public Sub SetCHANGED_WHENNull() + Me(Me.tableTBIDB_CATALOG.CHANGED_WHENColumn) = Global.System.Convert.DBNull + End Sub + + _ + Public Function GetTBIDB_OBJECT_STORERows() As TBIDB_OBJECT_STORERow() + If (Me.Table.ChildRelations("FK_OS_CAT_ID") Is Nothing) Then + Return New TBIDB_OBJECT_STORERow(-1) {} + Else + Return CType(MyBase.GetChildRows(Me.Table.ChildRelations("FK_OS_CAT_ID")),TBIDB_OBJECT_STORERow()) + End If + End Function + End Class + ''' '''Row event argument class ''' @@ -3844,6 +5056,78 @@ Partial Public Class DSIDB_Stammdaten End Get End Property End Class + + ''' + '''Row event argument class + ''' + _ + Public Class TBIDB_OBJECT_STORERowChangeEvent + Inherits Global.System.EventArgs + + Private eventRow As TBIDB_OBJECT_STORERow + + Private eventAction As Global.System.Data.DataRowAction + + _ + Public Sub New(ByVal row As TBIDB_OBJECT_STORERow, ByVal action As Global.System.Data.DataRowAction) + MyBase.New + Me.eventRow = row + Me.eventAction = action + End Sub + + _ + Public ReadOnly Property Row() As TBIDB_OBJECT_STORERow + Get + Return Me.eventRow + End Get + End Property + + _ + Public ReadOnly Property Action() As Global.System.Data.DataRowAction + Get + Return Me.eventAction + End Get + End Property + End Class + + ''' + '''Row event argument class + ''' + _ + Public Class TBIDB_CATALOGRowChangeEvent + Inherits Global.System.EventArgs + + Private eventRow As TBIDB_CATALOGRow + + Private eventAction As Global.System.Data.DataRowAction + + _ + Public Sub New(ByVal row As TBIDB_CATALOGRow, ByVal action As Global.System.Data.DataRowAction) + MyBase.New + Me.eventRow = row + Me.eventAction = action + End Sub + + _ + Public ReadOnly Property Row() As TBIDB_CATALOGRow + Get + Return Me.eventRow + End Get + End Property + + _ + Public ReadOnly Property Action() As Global.System.Data.DataRowAction + Get + Return Me.eventAction + End Get + End Property + End Class End Class Namespace DSIDB_StammdatenTableAdapters @@ -5773,6 +7057,801 @@ Namespace DSIDB_StammdatenTableAdapters End Function End Class + ''' + '''Represents the connection and commands used to retrieve and save data. + ''' + _ + Partial Public Class TBIDB_OBJECT_STORETableAdapter + Inherits Global.System.ComponentModel.Component + + Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter + + Private _connection As Global.System.Data.SqlClient.SqlConnection + + Private _transaction As Global.System.Data.SqlClient.SqlTransaction + + Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand + + Private _clearBeforeFill As Boolean + + _ + Public Sub New() + MyBase.New + Me.ClearBeforeFill = true + End Sub + + _ + Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter + Get + If (Me._adapter Is Nothing) Then + Me.InitAdapter + End If + Return Me._adapter + End Get + End Property + + _ + Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection + Get + If (Me._connection Is Nothing) Then + Me.InitConnection + End If + Return Me._connection + End Get + Set + Me._connection = value + If (Not (Me.Adapter.InsertCommand) Is Nothing) Then + Me.Adapter.InsertCommand.Connection = value + End If + If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then + Me.Adapter.DeleteCommand.Connection = value + End If + If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then + Me.Adapter.UpdateCommand.Connection = value + End If + Dim i As Integer = 0 + Do While (i < Me.CommandCollection.Length) + If (Not (Me.CommandCollection(i)) Is Nothing) Then + CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value + End If + i = (i + 1) + Loop + End Set + End Property + + _ + Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction + Get + Return Me._transaction + End Get + Set + Me._transaction = value + Dim i As Integer = 0 + Do While (i < Me.CommandCollection.Length) + Me.CommandCollection(i).Transaction = Me._transaction + i = (i + 1) + Loop + If ((Not (Me.Adapter) Is Nothing) _ + AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then + Me.Adapter.DeleteCommand.Transaction = Me._transaction + End If + If ((Not (Me.Adapter) Is Nothing) _ + AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then + Me.Adapter.InsertCommand.Transaction = Me._transaction + End If + If ((Not (Me.Adapter) Is Nothing) _ + AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then + Me.Adapter.UpdateCommand.Transaction = Me._transaction + End If + End Set + End Property + + _ + Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() + Get + If (Me._commandCollection Is Nothing) Then + Me.InitCommandCollection + End If + Return Me._commandCollection + End Get + End Property + + _ + Public Property ClearBeforeFill() As Boolean + Get + Return Me._clearBeforeFill + End Get + Set + Me._clearBeforeFill = value + End Set + End Property + + _ + Private Sub InitAdapter() + Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() + Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() + tableMapping.SourceTable = "Table" + tableMapping.DataSetTable = "TBIDB_OBJECT_STORE" + tableMapping.ColumnMappings.Add("GUID", "GUID") + tableMapping.ColumnMappings.Add("OBJECT_TITLE", "OBJECT_TITLE") + tableMapping.ColumnMappings.Add("CAT_ID", "CAT_ID") + tableMapping.ColumnMappings.Add("OBJ_PATH", "OBJ_PATH") + tableMapping.ColumnMappings.Add("IS_ARCHIVE", "IS_ARCHIVE") + tableMapping.ColumnMappings.Add("COMMENT", "COMMENT") + tableMapping.ColumnMappings.Add("ADDED_WHO", "ADDED_WHO") + tableMapping.ColumnMappings.Add("ADDED_WHEN", "ADDED_WHEN") + tableMapping.ColumnMappings.Add("CHANGED_WHO", "CHANGED_WHO") + tableMapping.ColumnMappings.Add("CHANGED_WHEN", "CHANGED_WHEN") + tableMapping.ColumnMappings.Add("CAT_TITLE", "CAT_TITLE") + Me._adapter.TableMappings.Add(tableMapping) + Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand() + Me._adapter.DeleteCommand.Connection = Me.Connection + Me._adapter.DeleteCommand.CommandText = "DELETE FROM [TBIDB_OBJECT_STORE] WHERE (([GUID] = @Original_GUID) AND ([OBJECT_TI"& _ + "TLE] = @Original_OBJECT_TITLE) AND ([CAT_ID] = @Original_CAT_ID) AND ([OBJ_PATH]"& _ + " = @Original_OBJ_PATH) AND ([IS_ARCHIVE] = @Original_IS_ARCHIVE) AND ((@IsNull_C"& _ + "OMMENT = 1 AND [COMMENT] IS NULL) OR ([COMMENT] = @Original_COMMENT)) AND ([ADDE"& _ + "D_WHO] = @Original_ADDED_WHO) AND ([ADDED_WHEN] = @Original_ADDED_WHEN) AND ((@I"& _ + "sNull_CHANGED_WHO = 1 AND [CHANGED_WHO] IS NULL) OR ([CHANGED_WHO] = @Original_C"& _ + "HANGED_WHO)) AND ((@IsNull_CHANGED_WHEN = 1 AND [CHANGED_WHEN] IS NULL) OR ([CHA"& _ + "NGED_WHEN] = @Original_CHANGED_WHEN)))" + Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_GUID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "GUID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_OBJECT_TITLE", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "OBJECT_TITLE", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_CAT_ID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CAT_ID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_OBJ_PATH", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "OBJ_PATH", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_IS_ARCHIVE", Global.System.Data.SqlDbType.Bit, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "IS_ARCHIVE", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_COMMENT", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "COMMENT", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_COMMENT", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "COMMENT", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_ADDED_WHO", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ADDED_WHO", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_ADDED_WHEN", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ADDED_WHEN", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_CHANGED_WHO", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CHANGED_WHO", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_CHANGED_WHO", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CHANGED_WHO", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_CHANGED_WHEN", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CHANGED_WHEN", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_CHANGED_WHEN", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CHANGED_WHEN", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() + Me._adapter.InsertCommand.Connection = Me.Connection + Me._adapter.InsertCommand.CommandText = "INSERT INTO TBIDB_OBJECT_STORE"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" (OBJECT_TITLE, CAT_ID, O"& _ + "BJ_PATH, IS_ARCHIVE, COMMENT, ADDED_WHO)"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"VALUES (@OBJECT_TITLE,@CAT_ID,@"& _ + "OBJ_PATH,@IS_ARCHIVE,@COMMENT,@ADDED_WHO); "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT GUID, OBJECT_TITLE, CAT_ID, "& _ + "OBJ_PATH, IS_ARCHIVE, COMMENT, ADDED_WHO, ADDED_WHEN, CHANGED_WHO, CHANGED_WHEN "& _ + "FROM TBIDB_OBJECT_STORE WHERE (GUID = SCOPE_IDENTITY())" + Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@OBJECT_TITLE", Global.System.Data.SqlDbType.VarChar, 250, Global.System.Data.ParameterDirection.Input, 0, 0, "OBJECT_TITLE", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CAT_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "CAT_ID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@OBJ_PATH", Global.System.Data.SqlDbType.VarChar, 250, Global.System.Data.ParameterDirection.Input, 0, 0, "OBJ_PATH", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IS_ARCHIVE", Global.System.Data.SqlDbType.Bit, 1, Global.System.Data.ParameterDirection.Input, 0, 0, "IS_ARCHIVE", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@COMMENT", Global.System.Data.SqlDbType.VarChar, 500, Global.System.Data.ParameterDirection.Input, 0, 0, "COMMENT", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ADDED_WHO", Global.System.Data.SqlDbType.VarChar, 30, Global.System.Data.ParameterDirection.Input, 0, 0, "ADDED_WHO", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() + Me._adapter.UpdateCommand.Connection = Me.Connection + Me._adapter.UpdateCommand.CommandText = "UPDATE TBIDB_OBJECT_STORE"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SET OBJECT_TITLE = @OBJECT_TITLE,"& _ + " CAT_ID = @CAT_ID, OBJ_PATH = @OBJ_PATH, IS_ARCHIVE = @IS_ARCHIVE, COMMENT = @CO"& _ + "MMENT, CHANGED_WHO = @CHANGED_WHO"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHERE (GUID = @Original_GUID); "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELEC"& _ + "T GUID, OBJECT_TITLE, CAT_ID, OBJ_PATH, IS_ARCHIVE, COMMENT, ADDED_WHO, ADDED_WH"& _ + "EN, CHANGED_WHO, CHANGED_WHEN FROM TBIDB_OBJECT_STORE WHERE (GUID = @GUID)" + Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@OBJECT_TITLE", Global.System.Data.SqlDbType.VarChar, 250, Global.System.Data.ParameterDirection.Input, 0, 0, "OBJECT_TITLE", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CAT_ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "CAT_ID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@OBJ_PATH", Global.System.Data.SqlDbType.VarChar, 250, Global.System.Data.ParameterDirection.Input, 0, 0, "OBJ_PATH", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IS_ARCHIVE", Global.System.Data.SqlDbType.Bit, 1, Global.System.Data.ParameterDirection.Input, 0, 0, "IS_ARCHIVE", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@COMMENT", Global.System.Data.SqlDbType.VarChar, 500, Global.System.Data.ParameterDirection.Input, 0, 0, "COMMENT", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CHANGED_WHO", Global.System.Data.SqlDbType.VarChar, 30, Global.System.Data.ParameterDirection.Input, 0, 0, "CHANGED_WHO", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_GUID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "GUID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@GUID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "GUID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + End Sub + + _ + Private Sub InitConnection() + Me._connection = New Global.System.Data.SqlClient.SqlConnection() + Me._connection.ConnectionString = Global.DigitalData.GUIs.ZooFlow.Settings.Default.IDBConnectionStringDEFAULT + End Sub + + _ + Private Sub InitCommandCollection() + Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} + Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() + Me._commandCollection(0).Connection = Me.Connection + Me._commandCollection(0).CommandText = "SELECT TBIDB_OBJECT_STORE.GUID, TBIDB_OBJECT_STORE.OBJECT_TITLE, TBIDB_OBJ"& _ + "ECT_STORE.CAT_ID, TBIDB_OBJECT_STORE.OBJ_PATH, TBIDB_OBJECT_STORE.IS_ARCHIVE, TB"& _ + "IDB_OBJECT_STORE.COMMENT, "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" TBIDB_OBJECT_STORE.ADDED_WH"& _ + "O, TBIDB_OBJECT_STORE.ADDED_WHEN, TBIDB_OBJECT_STORE.CHANGED_WHO, TBIDB_OBJECT_S"& _ + "TORE.CHANGED_WHEN, TBIDB_CATALOG.CAT_TITLE"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"FROM TBIDB_OBJECT_STORE I"& _ + "NNER JOIN"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" TBIDB_CATALOG ON TBIDB_OBJECT_STORE.CAT_ID ="& _ + " TBIDB_CATALOG.GUID" + Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text + End Sub + + _ + Public Overloads Overridable Function Fill(ByVal dataTable As DSIDB_Stammdaten.TBIDB_OBJECT_STOREDataTable) As Integer + Me.Adapter.SelectCommand = Me.CommandCollection(0) + If (Me.ClearBeforeFill = true) Then + dataTable.Clear + End If + Dim returnValue As Integer = Me.Adapter.Fill(dataTable) + Return returnValue + End Function + + _ + Public Overloads Overridable Function GetData() As DSIDB_Stammdaten.TBIDB_OBJECT_STOREDataTable + Me.Adapter.SelectCommand = Me.CommandCollection(0) + Dim dataTable As DSIDB_Stammdaten.TBIDB_OBJECT_STOREDataTable = New DSIDB_Stammdaten.TBIDB_OBJECT_STOREDataTable() + Me.Adapter.Fill(dataTable) + Return dataTable + End Function + + _ + Public Overloads Overridable Function Update(ByVal dataTable As DSIDB_Stammdaten.TBIDB_OBJECT_STOREDataTable) As Integer + Return Me.Adapter.Update(dataTable) + End Function + + _ + Public Overloads Overridable Function Update(ByVal dataSet As DSIDB_Stammdaten) As Integer + Return Me.Adapter.Update(dataSet, "TBIDB_OBJECT_STORE") + End Function + + _ + Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer + Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) + End Function + + _ + Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer + Return Me.Adapter.Update(dataRows) + End Function + + _ + Public Overloads Overridable Function Delete(ByVal Original_GUID As Integer, ByVal Original_OBJECT_TITLE As String, ByVal Original_CAT_ID As Integer, ByVal Original_OBJ_PATH As String, ByVal Original_IS_ARCHIVE As Boolean, ByVal Original_COMMENT As String, ByVal Original_ADDED_WHO As String, ByVal Original_ADDED_WHEN As Global.System.Nullable(Of Date), ByVal Original_CHANGED_WHO As String, ByVal Original_CHANGED_WHEN As Global.System.Nullable(Of Date)) As Integer + Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_GUID,Integer) + If (Original_OBJECT_TITLE Is Nothing) Then + Throw New Global.System.ArgumentNullException("Original_OBJECT_TITLE") + Else + Me.Adapter.DeleteCommand.Parameters(1).Value = CType(Original_OBJECT_TITLE,String) + End If + Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_CAT_ID,Integer) + If (Original_OBJ_PATH Is Nothing) Then + Throw New Global.System.ArgumentNullException("Original_OBJ_PATH") + Else + Me.Adapter.DeleteCommand.Parameters(3).Value = CType(Original_OBJ_PATH,String) + End If + Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_IS_ARCHIVE,Boolean) + If (Original_COMMENT Is Nothing) Then + Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1,Object) + Me.Adapter.DeleteCommand.Parameters(6).Value = Global.System.DBNull.Value + Else + Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0,Object) + Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_COMMENT,String) + End If + If (Original_ADDED_WHO Is Nothing) Then + Me.Adapter.DeleteCommand.Parameters(7).Value = Global.System.DBNull.Value + Else + Me.Adapter.DeleteCommand.Parameters(7).Value = CType(Original_ADDED_WHO,String) + End If + If (Original_ADDED_WHEN.HasValue = true) Then + Me.Adapter.DeleteCommand.Parameters(8).Value = CType(Original_ADDED_WHEN.Value,Date) + Else + Me.Adapter.DeleteCommand.Parameters(8).Value = Global.System.DBNull.Value + End If + If (Original_CHANGED_WHO Is Nothing) Then + Me.Adapter.DeleteCommand.Parameters(9).Value = CType(1,Object) + Me.Adapter.DeleteCommand.Parameters(10).Value = Global.System.DBNull.Value + Else + Me.Adapter.DeleteCommand.Parameters(9).Value = CType(0,Object) + Me.Adapter.DeleteCommand.Parameters(10).Value = CType(Original_CHANGED_WHO,String) + End If + If (Original_CHANGED_WHEN.HasValue = true) Then + Me.Adapter.DeleteCommand.Parameters(11).Value = CType(0,Object) + Me.Adapter.DeleteCommand.Parameters(12).Value = CType(Original_CHANGED_WHEN.Value,Date) + Else + Me.Adapter.DeleteCommand.Parameters(11).Value = CType(1,Object) + Me.Adapter.DeleteCommand.Parameters(12).Value = Global.System.DBNull.Value + End If + Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State + If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ + <> Global.System.Data.ConnectionState.Open) Then + Me.Adapter.DeleteCommand.Connection.Open + End If + Try + Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery + Return returnValue + Finally + If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then + Me.Adapter.DeleteCommand.Connection.Close + End If + End Try + End Function + + _ + Public Overloads Overridable Function Insert(ByVal OBJECT_TITLE As String, ByVal CAT_ID As Integer, ByVal OBJ_PATH As String, ByVal IS_ARCHIVE As Boolean, ByVal COMMENT As String, ByVal ADDED_WHO As String) As Integer + If (OBJECT_TITLE Is Nothing) Then + Throw New Global.System.ArgumentNullException("OBJECT_TITLE") + Else + Me.Adapter.InsertCommand.Parameters(0).Value = CType(OBJECT_TITLE,String) + End If + Me.Adapter.InsertCommand.Parameters(1).Value = CType(CAT_ID,Integer) + If (OBJ_PATH Is Nothing) Then + Throw New Global.System.ArgumentNullException("OBJ_PATH") + Else + Me.Adapter.InsertCommand.Parameters(2).Value = CType(OBJ_PATH,String) + End If + Me.Adapter.InsertCommand.Parameters(3).Value = CType(IS_ARCHIVE,Boolean) + If (COMMENT Is Nothing) Then + Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value + Else + Me.Adapter.InsertCommand.Parameters(4).Value = CType(COMMENT,String) + End If + If (ADDED_WHO Is Nothing) Then + Me.Adapter.InsertCommand.Parameters(5).Value = Global.System.DBNull.Value + Else + Me.Adapter.InsertCommand.Parameters(5).Value = CType(ADDED_WHO,String) + End If + Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State + If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ + <> Global.System.Data.ConnectionState.Open) Then + Me.Adapter.InsertCommand.Connection.Open + End If + Try + Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery + Return returnValue + Finally + If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then + Me.Adapter.InsertCommand.Connection.Close + End If + End Try + End Function + + _ + Public Overloads Overridable Function Update(ByVal OBJECT_TITLE As String, ByVal CAT_ID As Integer, ByVal OBJ_PATH As String, ByVal IS_ARCHIVE As Boolean, ByVal COMMENT As String, ByVal CHANGED_WHO As String, ByVal Original_GUID As Integer, ByVal GUID As Integer) As Integer + If (OBJECT_TITLE Is Nothing) Then + Throw New Global.System.ArgumentNullException("OBJECT_TITLE") + Else + Me.Adapter.UpdateCommand.Parameters(0).Value = CType(OBJECT_TITLE,String) + End If + Me.Adapter.UpdateCommand.Parameters(1).Value = CType(CAT_ID,Integer) + If (OBJ_PATH Is Nothing) Then + Throw New Global.System.ArgumentNullException("OBJ_PATH") + Else + Me.Adapter.UpdateCommand.Parameters(2).Value = CType(OBJ_PATH,String) + End If + Me.Adapter.UpdateCommand.Parameters(3).Value = CType(IS_ARCHIVE,Boolean) + If (COMMENT Is Nothing) Then + Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value + Else + Me.Adapter.UpdateCommand.Parameters(4).Value = CType(COMMENT,String) + End If + If (CHANGED_WHO Is Nothing) Then + Me.Adapter.UpdateCommand.Parameters(5).Value = Global.System.DBNull.Value + Else + Me.Adapter.UpdateCommand.Parameters(5).Value = CType(CHANGED_WHO,String) + End If + Me.Adapter.UpdateCommand.Parameters(6).Value = CType(Original_GUID,Integer) + Me.Adapter.UpdateCommand.Parameters(7).Value = CType(GUID,Integer) + Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State + If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ + <> Global.System.Data.ConnectionState.Open) Then + Me.Adapter.UpdateCommand.Connection.Open + End If + Try + Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery + Return returnValue + Finally + If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then + Me.Adapter.UpdateCommand.Connection.Close + End If + End Try + End Function + End Class + + ''' + '''Represents the connection and commands used to retrieve and save data. + ''' + _ + Partial Public Class TBIDB_CATALOGTableAdapter + Inherits Global.System.ComponentModel.Component + + Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter + + Private _connection As Global.System.Data.SqlClient.SqlConnection + + Private _transaction As Global.System.Data.SqlClient.SqlTransaction + + Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand + + Private _clearBeforeFill As Boolean + + _ + Public Sub New() + MyBase.New + Me.ClearBeforeFill = true + End Sub + + _ + Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter + Get + If (Me._adapter Is Nothing) Then + Me.InitAdapter + End If + Return Me._adapter + End Get + End Property + + _ + Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection + Get + If (Me._connection Is Nothing) Then + Me.InitConnection + End If + Return Me._connection + End Get + Set + Me._connection = value + If (Not (Me.Adapter.InsertCommand) Is Nothing) Then + Me.Adapter.InsertCommand.Connection = value + End If + If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then + Me.Adapter.DeleteCommand.Connection = value + End If + If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then + Me.Adapter.UpdateCommand.Connection = value + End If + Dim i As Integer = 0 + Do While (i < Me.CommandCollection.Length) + If (Not (Me.CommandCollection(i)) Is Nothing) Then + CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value + End If + i = (i + 1) + Loop + End Set + End Property + + _ + Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction + Get + Return Me._transaction + End Get + Set + Me._transaction = value + Dim i As Integer = 0 + Do While (i < Me.CommandCollection.Length) + Me.CommandCollection(i).Transaction = Me._transaction + i = (i + 1) + Loop + If ((Not (Me.Adapter) Is Nothing) _ + AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then + Me.Adapter.DeleteCommand.Transaction = Me._transaction + End If + If ((Not (Me.Adapter) Is Nothing) _ + AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then + Me.Adapter.InsertCommand.Transaction = Me._transaction + End If + If ((Not (Me.Adapter) Is Nothing) _ + AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then + Me.Adapter.UpdateCommand.Transaction = Me._transaction + End If + End Set + End Property + + _ + Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand() + Get + If (Me._commandCollection Is Nothing) Then + Me.InitCommandCollection + End If + Return Me._commandCollection + End Get + End Property + + _ + Public Property ClearBeforeFill() As Boolean + Get + Return Me._clearBeforeFill + End Get + Set + Me._clearBeforeFill = value + End Set + End Property + + _ + Private Sub InitAdapter() + Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter() + Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping() + tableMapping.SourceTable = "Table" + tableMapping.DataSetTable = "TBIDB_CATALOG" + tableMapping.ColumnMappings.Add("GUID", "GUID") + tableMapping.ColumnMappings.Add("CAT_TITLE", "CAT_TITLE") + tableMapping.ColumnMappings.Add("CAT_STRING", "CAT_STRING") + tableMapping.ColumnMappings.Add("ADDED_WHO", "ADDED_WHO") + tableMapping.ColumnMappings.Add("ADDED_WHEN", "ADDED_WHEN") + tableMapping.ColumnMappings.Add("CHANGED_WHO", "CHANGED_WHO") + tableMapping.ColumnMappings.Add("CHANGED_WHEN", "CHANGED_WHEN") + Me._adapter.TableMappings.Add(tableMapping) + Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand() + Me._adapter.DeleteCommand.Connection = Me.Connection + Me._adapter.DeleteCommand.CommandText = "DELETE FROM [TBIDB_CATALOG] WHERE (([GUID] = @Original_GUID) AND ([CAT_TITLE] = @"& _ + "Original_CAT_TITLE) AND ([CAT_STRING] = @Original_CAT_STRING) AND ([ADDED_WHO] ="& _ + " @Original_ADDED_WHO) AND ([ADDED_WHEN] = @Original_ADDED_WHEN) AND ((@IsNull_CH"& _ + "ANGED_WHO = 1 AND [CHANGED_WHO] IS NULL) OR ([CHANGED_WHO] = @Original_CHANGED_W"& _ + "HO)) AND ((@IsNull_CHANGED_WHEN = 1 AND [CHANGED_WHEN] IS NULL) OR ([CHANGED_WHE"& _ + "N] = @Original_CHANGED_WHEN)))" + Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_GUID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "GUID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_CAT_TITLE", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CAT_TITLE", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_CAT_STRING", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CAT_STRING", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_ADDED_WHO", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ADDED_WHO", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_ADDED_WHEN", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "ADDED_WHEN", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_CHANGED_WHO", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CHANGED_WHO", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_CHANGED_WHO", Global.System.Data.SqlDbType.VarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CHANGED_WHO", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_CHANGED_WHEN", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CHANGED_WHEN", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", "")) + Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_CHANGED_WHEN", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CHANGED_WHEN", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand() + Me._adapter.InsertCommand.Connection = Me.Connection + Me._adapter.InsertCommand.CommandText = "INSERT INTO TBIDB_CATALOG"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&" (CAT_TITLE, CAT_STRING, ADDED"& _ + "_WHO)"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"VALUES (@CAT_TITLE,@CAT_STRING,@ADDED_WHO); "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT GUID, CAT_TI"& _ + "TLE, CAT_STRING, ADDED_WHO, ADDED_WHEN, CHANGED_WHO, CHANGED_WHEN FROM TBIDB_CAT"& _ + "ALOG WHERE (GUID = SCOPE_IDENTITY())" + Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CAT_TITLE", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "CAT_TITLE", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CAT_STRING", Global.System.Data.SqlDbType.VarChar, 900, Global.System.Data.ParameterDirection.Input, 0, 0, "CAT_STRING", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ADDED_WHO", Global.System.Data.SqlDbType.VarChar, 30, Global.System.Data.ParameterDirection.Input, 0, 0, "ADDED_WHO", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand() + Me._adapter.UpdateCommand.Connection = Me.Connection + Me._adapter.UpdateCommand.CommandText = "UPDATE TBIDB_CATALOG"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SET CAT_TITLE = @CAT_TITLE, CAT_STRING"& _ + " = @CAT_STRING, ADDED_WHO = @ADDED_WHO"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHERE (GUID = @Original_GUID); "&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)& _ + "SELECT GUID, CAT_TITLE, CAT_STRING, ADDED_WHO, ADDED_WHEN, CHANGED_WHO, CHANGED_"& _ + "WHEN FROM TBIDB_CATALOG WHERE (GUID = @GUID)" + Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CAT_TITLE", Global.System.Data.SqlDbType.VarChar, 100, Global.System.Data.ParameterDirection.Input, 0, 0, "CAT_TITLE", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CAT_STRING", Global.System.Data.SqlDbType.VarChar, 900, Global.System.Data.ParameterDirection.Input, 0, 0, "CAT_STRING", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ADDED_WHO", Global.System.Data.SqlDbType.VarChar, 30, Global.System.Data.ParameterDirection.Input, 0, 0, "ADDED_WHO", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_GUID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "GUID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@GUID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "GUID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", "")) + End Sub + + _ + Private Sub InitConnection() + Me._connection = New Global.System.Data.SqlClient.SqlConnection() + Me._connection.ConnectionString = Global.DigitalData.GUIs.ZooFlow.Settings.Default.IDBConnectionStringDEFAULT + End Sub + + _ + Private Sub InitCommandCollection() + Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {} + Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand() + Me._commandCollection(0).Connection = Me.Connection + Me._commandCollection(0).CommandText = "SELECT GUID, CAT_TITLE, CAT_STRING, ADDED_WHO, ADDED_WHEN, CHANGED_WHO, CH"& _ + "ANGED_WHEN"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"FROM TBIDB_CATALOG"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"WHERE (GUID = @ID)" + Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text + Me._commandCollection(0).Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@ID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "GUID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", "")) + End Sub + + _ + Public Overloads Overridable Function Fill(ByVal dataTable As DSIDB_Stammdaten.TBIDB_CATALOGDataTable, ByVal ID As Integer) As Integer + Me.Adapter.SelectCommand = Me.CommandCollection(0) + Me.Adapter.SelectCommand.Parameters(0).Value = CType(ID,Integer) + If (Me.ClearBeforeFill = true) Then + dataTable.Clear + End If + Dim returnValue As Integer = Me.Adapter.Fill(dataTable) + Return returnValue + End Function + + _ + Public Overloads Overridable Function GetData(ByVal ID As Integer) As DSIDB_Stammdaten.TBIDB_CATALOGDataTable + Me.Adapter.SelectCommand = Me.CommandCollection(0) + Me.Adapter.SelectCommand.Parameters(0).Value = CType(ID,Integer) + Dim dataTable As DSIDB_Stammdaten.TBIDB_CATALOGDataTable = New DSIDB_Stammdaten.TBIDB_CATALOGDataTable() + Me.Adapter.Fill(dataTable) + Return dataTable + End Function + + _ + Public Overloads Overridable Function Update(ByVal dataTable As DSIDB_Stammdaten.TBIDB_CATALOGDataTable) As Integer + Return Me.Adapter.Update(dataTable) + End Function + + _ + Public Overloads Overridable Function Update(ByVal dataSet As DSIDB_Stammdaten) As Integer + Return Me.Adapter.Update(dataSet, "TBIDB_CATALOG") + End Function + + _ + Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer + Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow}) + End Function + + _ + Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer + Return Me.Adapter.Update(dataRows) + End Function + + _ + Public Overloads Overridable Function Delete(ByVal Original_GUID As Integer, ByVal Original_CAT_TITLE As String, ByVal Original_CAT_STRING As String, ByVal Original_ADDED_WHO As String, ByVal Original_ADDED_WHEN As Date, ByVal Original_CHANGED_WHO As String, ByVal Original_CHANGED_WHEN As Global.System.Nullable(Of Date)) As Integer + Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_GUID,Integer) + If (Original_CAT_TITLE Is Nothing) Then + Throw New Global.System.ArgumentNullException("Original_CAT_TITLE") + Else + Me.Adapter.DeleteCommand.Parameters(1).Value = CType(Original_CAT_TITLE,String) + End If + If (Original_CAT_STRING Is Nothing) Then + Throw New Global.System.ArgumentNullException("Original_CAT_STRING") + Else + Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_CAT_STRING,String) + End If + If (Original_ADDED_WHO Is Nothing) Then + Throw New Global.System.ArgumentNullException("Original_ADDED_WHO") + Else + Me.Adapter.DeleteCommand.Parameters(3).Value = CType(Original_ADDED_WHO,String) + End If + Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_ADDED_WHEN,Date) + If (Original_CHANGED_WHO Is Nothing) Then + Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1,Object) + Me.Adapter.DeleteCommand.Parameters(6).Value = Global.System.DBNull.Value + Else + Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0,Object) + Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_CHANGED_WHO,String) + End If + If (Original_CHANGED_WHEN.HasValue = true) Then + Me.Adapter.DeleteCommand.Parameters(7).Value = CType(0,Object) + Me.Adapter.DeleteCommand.Parameters(8).Value = CType(Original_CHANGED_WHEN.Value,Date) + Else + Me.Adapter.DeleteCommand.Parameters(7).Value = CType(1,Object) + Me.Adapter.DeleteCommand.Parameters(8).Value = Global.System.DBNull.Value + End If + Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State + If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ + <> Global.System.Data.ConnectionState.Open) Then + Me.Adapter.DeleteCommand.Connection.Open + End If + Try + Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery + Return returnValue + Finally + If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then + Me.Adapter.DeleteCommand.Connection.Close + End If + End Try + End Function + + _ + Public Overloads Overridable Function Insert(ByVal CAT_TITLE As String, ByVal CAT_STRING As String, ByVal ADDED_WHO As String) As Integer + If (CAT_TITLE Is Nothing) Then + Throw New Global.System.ArgumentNullException("CAT_TITLE") + Else + Me.Adapter.InsertCommand.Parameters(0).Value = CType(CAT_TITLE,String) + End If + If (CAT_STRING Is Nothing) Then + Throw New Global.System.ArgumentNullException("CAT_STRING") + Else + Me.Adapter.InsertCommand.Parameters(1).Value = CType(CAT_STRING,String) + End If + If (ADDED_WHO Is Nothing) Then + Throw New Global.System.ArgumentNullException("ADDED_WHO") + Else + Me.Adapter.InsertCommand.Parameters(2).Value = CType(ADDED_WHO,String) + End If + Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State + If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ + <> Global.System.Data.ConnectionState.Open) Then + Me.Adapter.InsertCommand.Connection.Open + End If + Try + Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery + Return returnValue + Finally + If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then + Me.Adapter.InsertCommand.Connection.Close + End If + End Try + End Function + + _ + Public Overloads Overridable Function Update(ByVal CAT_TITLE As String, ByVal CAT_STRING As String, ByVal ADDED_WHO As String, ByVal Original_GUID As Integer, ByVal GUID As Integer) As Integer + If (CAT_TITLE Is Nothing) Then + Throw New Global.System.ArgumentNullException("CAT_TITLE") + Else + Me.Adapter.UpdateCommand.Parameters(0).Value = CType(CAT_TITLE,String) + End If + If (CAT_STRING Is Nothing) Then + Throw New Global.System.ArgumentNullException("CAT_STRING") + Else + Me.Adapter.UpdateCommand.Parameters(1).Value = CType(CAT_STRING,String) + End If + If (ADDED_WHO Is Nothing) Then + Throw New Global.System.ArgumentNullException("ADDED_WHO") + Else + Me.Adapter.UpdateCommand.Parameters(2).Value = CType(ADDED_WHO,String) + End If + Me.Adapter.UpdateCommand.Parameters(3).Value = CType(Original_GUID,Integer) + Me.Adapter.UpdateCommand.Parameters(4).Value = CType(GUID,Integer) + Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State + If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _ + <> Global.System.Data.ConnectionState.Open) Then + Me.Adapter.UpdateCommand.Connection.Open + End If + Try + Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery + Return returnValue + Finally + If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then + Me.Adapter.UpdateCommand.Connection.Close + End If + End Try + End Function + End Class + ''' '''TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios ''' @@ -5794,6 +7873,10 @@ Namespace DSIDB_StammdatenTableAdapters Private _tBZF_ADMIN_SOURCE_SQLTableAdapter As TBZF_ADMIN_SOURCE_SQLTableAdapter + Private _tBIDB_OBJECT_STORETableAdapter As TBIDB_OBJECT_STORETableAdapter + + Private _tBIDB_CATALOGTableAdapter As TBIDB_CATALOGTableAdapter + Private _backupDataSetBeforeUpdate As Boolean Private _connection As Global.System.Data.IDbConnection @@ -5865,6 +7948,34 @@ Namespace DSIDB_StammdatenTableAdapters End Set End Property + _ + Public Property TBIDB_OBJECT_STORETableAdapter() As TBIDB_OBJECT_STORETableAdapter + Get + Return Me._tBIDB_OBJECT_STORETableAdapter + End Get + Set + Me._tBIDB_OBJECT_STORETableAdapter = value + End Set + End Property + + _ + Public Property TBIDB_CATALOGTableAdapter() As TBIDB_CATALOGTableAdapter + Get + Return Me._tBIDB_CATALOGTableAdapter + End Get + Set + Me._tBIDB_CATALOGTableAdapter = value + End Set + End Property + _ Public Property BackupDataSetBeforeUpdate() As Boolean @@ -5900,6 +8011,14 @@ Namespace DSIDB_StammdatenTableAdapters AndAlso (Not (Me._tBZF_ADMIN_SOURCE_SQLTableAdapter.Connection) Is Nothing)) Then Return Me._tBZF_ADMIN_SOURCE_SQLTableAdapter.Connection End If + If ((Not (Me._tBIDB_OBJECT_STORETableAdapter) Is Nothing) _ + AndAlso (Not (Me._tBIDB_OBJECT_STORETableAdapter.Connection) Is Nothing)) Then + Return Me._tBIDB_OBJECT_STORETableAdapter.Connection + End If + If ((Not (Me._tBIDB_CATALOGTableAdapter) Is Nothing) _ + AndAlso (Not (Me._tBIDB_CATALOGTableAdapter.Connection) Is Nothing)) Then + Return Me._tBIDB_CATALOGTableAdapter.Connection + End If Return Nothing End Get Set @@ -5925,6 +8044,12 @@ Namespace DSIDB_StammdatenTableAdapters If (Not (Me._tBZF_ADMIN_SOURCE_SQLTableAdapter) Is Nothing) Then count = (count + 1) End If + If (Not (Me._tBIDB_OBJECT_STORETableAdapter) Is Nothing) Then + count = (count + 1) + End If + If (Not (Me._tBIDB_CATALOGTableAdapter) Is Nothing) Then + count = (count + 1) + End If Return count End Get End Property @@ -5945,6 +8070,15 @@ Namespace DSIDB_StammdatenTableAdapters allChangedRows.AddRange(updatedRows) End If End If + If (Not (Me._tBIDB_CATALOGTableAdapter) Is Nothing) Then + Dim updatedRows() As Global.System.Data.DataRow = dataSet.TBIDB_CATALOG.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) + updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) + If ((Not (updatedRows) Is Nothing) _ + AndAlso (0 < updatedRows.Length)) Then + result = (result + Me._tBIDB_CATALOGTableAdapter.Update(updatedRows)) + allChangedRows.AddRange(updatedRows) + End If + End If If (Not (Me._tBIDB_BUSINESS_ENTITYTableAdapter) Is Nothing) Then Dim updatedRows() As Global.System.Data.DataRow = dataSet.TBIDB_BUSINESS_ENTITY.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) @@ -5972,6 +8106,15 @@ Namespace DSIDB_StammdatenTableAdapters allChangedRows.AddRange(updatedRows) End If End If + If (Not (Me._tBIDB_OBJECT_STORETableAdapter) Is Nothing) Then + Dim updatedRows() As Global.System.Data.DataRow = dataSet.TBIDB_OBJECT_STORE.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent) + updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows) + If ((Not (updatedRows) Is Nothing) _ + AndAlso (0 < updatedRows.Length)) Then + result = (result + Me._tBIDB_OBJECT_STORETableAdapter.Update(updatedRows)) + allChangedRows.AddRange(updatedRows) + End If + End If Return result End Function @@ -5990,6 +8133,14 @@ Namespace DSIDB_StammdatenTableAdapters allAddedRows.AddRange(addedRows) End If End If + If (Not (Me._tBIDB_CATALOGTableAdapter) Is Nothing) Then + Dim addedRows() As Global.System.Data.DataRow = dataSet.TBIDB_CATALOG.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) + If ((Not (addedRows) Is Nothing) _ + AndAlso (0 < addedRows.Length)) Then + result = (result + Me._tBIDB_CATALOGTableAdapter.Update(addedRows)) + allAddedRows.AddRange(addedRows) + End If + End If If (Not (Me._tBIDB_BUSINESS_ENTITYTableAdapter) Is Nothing) Then Dim addedRows() As Global.System.Data.DataRow = dataSet.TBIDB_BUSINESS_ENTITY.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) If ((Not (addedRows) Is Nothing) _ @@ -6014,6 +8165,14 @@ Namespace DSIDB_StammdatenTableAdapters allAddedRows.AddRange(addedRows) End If End If + If (Not (Me._tBIDB_OBJECT_STORETableAdapter) Is Nothing) Then + Dim addedRows() As Global.System.Data.DataRow = dataSet.TBIDB_OBJECT_STORE.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added) + If ((Not (addedRows) Is Nothing) _ + AndAlso (0 < addedRows.Length)) Then + result = (result + Me._tBIDB_OBJECT_STORETableAdapter.Update(addedRows)) + allAddedRows.AddRange(addedRows) + End If + End If Return result End Function @@ -6024,6 +8183,14 @@ Namespace DSIDB_StammdatenTableAdapters Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")> _ Private Function UpdateDeletedRows(ByVal dataSet As DSIDB_Stammdaten, ByVal allChangedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)) As Integer Dim result As Integer = 0 + If (Not (Me._tBIDB_OBJECT_STORETableAdapter) Is Nothing) Then + Dim deletedRows() As Global.System.Data.DataRow = dataSet.TBIDB_OBJECT_STORE.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) + If ((Not (deletedRows) Is Nothing) _ + AndAlso (0 < deletedRows.Length)) Then + result = (result + Me._tBIDB_OBJECT_STORETableAdapter.Update(deletedRows)) + allChangedRows.AddRange(deletedRows) + End If + End If If (Not (Me._tBZF_ADMIN_SOURCE_SQLTableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.TBZF_ADMIN_SOURCE_SQL.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ @@ -6048,6 +8215,14 @@ Namespace DSIDB_StammdatenTableAdapters allChangedRows.AddRange(deletedRows) End If End If + If (Not (Me._tBIDB_CATALOGTableAdapter) Is Nothing) Then + Dim deletedRows() As Global.System.Data.DataRow = dataSet.TBIDB_CATALOG.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) + If ((Not (deletedRows) Is Nothing) _ + AndAlso (0 < deletedRows.Length)) Then + result = (result + Me._tBIDB_CATALOGTableAdapter.Update(deletedRows)) + allChangedRows.AddRange(deletedRows) + End If + End If If (Not (Me._tBIDB_ATTRIBUTE_TYPETableAdapter) Is Nothing) Then Dim deletedRows() As Global.System.Data.DataRow = dataSet.TBIDB_ATTRIBUTE_TYPE.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted) If ((Not (deletedRows) Is Nothing) _ @@ -6117,6 +8292,16 @@ Namespace DSIDB_StammdatenTableAdapters Throw New Global.System.ArgumentException("Für alle von einem TableAdapterManager verwalteten Instanzen von TableAdapter mus"& _ "s die gleiche Verbindungszeichenfolge verwendet werden.") End If + If ((Not (Me._tBIDB_OBJECT_STORETableAdapter) Is Nothing) _ + AndAlso (Me.MatchTableAdapterConnection(Me._tBIDB_OBJECT_STORETableAdapter.Connection) = false)) Then + Throw New Global.System.ArgumentException("Für alle von einem TableAdapterManager verwalteten Instanzen von TableAdapter mus"& _ + "s die gleiche Verbindungszeichenfolge verwendet werden.") + End If + If ((Not (Me._tBIDB_CATALOGTableAdapter) Is Nothing) _ + AndAlso (Me.MatchTableAdapterConnection(Me._tBIDB_CATALOGTableAdapter.Connection) = false)) Then + Throw New Global.System.ArgumentException("Für alle von einem TableAdapterManager verwalteten Instanzen von TableAdapter mus"& _ + "s die gleiche Verbindungszeichenfolge verwendet werden.") + End If Dim workConnection As Global.System.Data.IDbConnection = Me.Connection If (workConnection Is Nothing) Then Throw New Global.System.ApplicationException("TableAdapterManager enthält keine Verbindungsinformationen. Legen Sie jede TableA"& _ @@ -6187,6 +8372,24 @@ Namespace DSIDB_StammdatenTableAdapters adaptersWithAcceptChangesDuringUpdate.Add(Me._tBZF_ADMIN_SOURCE_SQLTableAdapter.Adapter) End If End If + If (Not (Me._tBIDB_OBJECT_STORETableAdapter) Is Nothing) Then + revertConnections.Add(Me._tBIDB_OBJECT_STORETableAdapter, Me._tBIDB_OBJECT_STORETableAdapter.Connection) + Me._tBIDB_OBJECT_STORETableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) + Me._tBIDB_OBJECT_STORETableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) + If Me._tBIDB_OBJECT_STORETableAdapter.Adapter.AcceptChangesDuringUpdate Then + Me._tBIDB_OBJECT_STORETableAdapter.Adapter.AcceptChangesDuringUpdate = false + adaptersWithAcceptChangesDuringUpdate.Add(Me._tBIDB_OBJECT_STORETableAdapter.Adapter) + End If + End If + If (Not (Me._tBIDB_CATALOGTableAdapter) Is Nothing) Then + revertConnections.Add(Me._tBIDB_CATALOGTableAdapter, Me._tBIDB_CATALOGTableAdapter.Connection) + Me._tBIDB_CATALOGTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection) + Me._tBIDB_CATALOGTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction) + If Me._tBIDB_CATALOGTableAdapter.Adapter.AcceptChangesDuringUpdate Then + Me._tBIDB_CATALOGTableAdapter.Adapter.AcceptChangesDuringUpdate = false + adaptersWithAcceptChangesDuringUpdate.Add(Me._tBIDB_CATALOGTableAdapter.Adapter) + End If + End If ' '---- Perform updates ----------- ' @@ -6263,6 +8466,14 @@ Namespace DSIDB_StammdatenTableAdapters Me._tBZF_ADMIN_SOURCE_SQLTableAdapter.Connection = CType(revertConnections(Me._tBZF_ADMIN_SOURCE_SQLTableAdapter),Global.System.Data.SqlClient.SqlConnection) Me._tBZF_ADMIN_SOURCE_SQLTableAdapter.Transaction = Nothing End If + If (Not (Me._tBIDB_OBJECT_STORETableAdapter) Is Nothing) Then + Me._tBIDB_OBJECT_STORETableAdapter.Connection = CType(revertConnections(Me._tBIDB_OBJECT_STORETableAdapter),Global.System.Data.SqlClient.SqlConnection) + Me._tBIDB_OBJECT_STORETableAdapter.Transaction = Nothing + End If + If (Not (Me._tBIDB_CATALOGTableAdapter) Is Nothing) Then + Me._tBIDB_CATALOGTableAdapter.Connection = CType(revertConnections(Me._tBIDB_CATALOGTableAdapter),Global.System.Data.SqlClient.SqlConnection) + Me._tBIDB_CATALOGTableAdapter.Transaction = Nothing + End If If (0 < adaptersWithAcceptChangesDuringUpdate.Count) Then Dim adapters((adaptersWithAcceptChangesDuringUpdate.Count) - 1) As Global.System.Data.Common.DataAdapter adaptersWithAcceptChangesDuringUpdate.CopyTo(adapters) diff --git a/GUIs.ZooFlow/DSIDB_Stammdaten.xsc b/GUIs.ZooFlow/DSIDB_Stammdaten.xsc index 475f1632..a99687e5 100644 --- a/GUIs.ZooFlow/DSIDB_Stammdaten.xsc +++ b/GUIs.ZooFlow/DSIDB_Stammdaten.xsc @@ -25,5 +25,19 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/GUIs.ZooFlow/DSIDB_Stammdaten.xsd b/GUIs.ZooFlow/DSIDB_Stammdaten.xsd index 99adc727..26777917 100644 --- a/GUIs.ZooFlow/DSIDB_Stammdaten.xsd +++ b/GUIs.ZooFlow/DSIDB_Stammdaten.xsd @@ -377,6 +377,159 @@ SELECT GUID, PARENT_ID, ENTITY_TITLE, SCOPE, PK_COLUMN, COMMENT, SQL_COMMAND, AD + + + + + + DELETE FROM [TBIDB_OBJECT_STORE] WHERE (([GUID] = @Original_GUID) AND ([OBJECT_TITLE] = @Original_OBJECT_TITLE) AND ([CAT_ID] = @Original_CAT_ID) AND ([OBJ_PATH] = @Original_OBJ_PATH) AND ([IS_ARCHIVE] = @Original_IS_ARCHIVE) AND ((@IsNull_COMMENT = 1 AND [COMMENT] IS NULL) OR ([COMMENT] = @Original_COMMENT)) AND ([ADDED_WHO] = @Original_ADDED_WHO) AND ([ADDED_WHEN] = @Original_ADDED_WHEN) AND ((@IsNull_CHANGED_WHO = 1 AND [CHANGED_WHO] IS NULL) OR ([CHANGED_WHO] = @Original_CHANGED_WHO)) AND ((@IsNull_CHANGED_WHEN = 1 AND [CHANGED_WHEN] IS NULL) OR ([CHANGED_WHEN] = @Original_CHANGED_WHEN))) + + + + + + + + + + + + + + + + + + + + INSERT INTO TBIDB_OBJECT_STORE + (OBJECT_TITLE, CAT_ID, OBJ_PATH, IS_ARCHIVE, COMMENT, ADDED_WHO) +VALUES (@OBJECT_TITLE,@CAT_ID,@OBJ_PATH,@IS_ARCHIVE,@COMMENT,@ADDED_WHO); +SELECT GUID, OBJECT_TITLE, CAT_ID, OBJ_PATH, IS_ARCHIVE, COMMENT, ADDED_WHO, ADDED_WHEN, CHANGED_WHO, CHANGED_WHEN FROM TBIDB_OBJECT_STORE WHERE (GUID = SCOPE_IDENTITY()) + + + + + + + + + + + + + SELECT TBIDB_OBJECT_STORE.GUID, TBIDB_OBJECT_STORE.OBJECT_TITLE, TBIDB_OBJECT_STORE.CAT_ID, TBIDB_OBJECT_STORE.OBJ_PATH, TBIDB_OBJECT_STORE.IS_ARCHIVE, TBIDB_OBJECT_STORE.COMMENT, + TBIDB_OBJECT_STORE.ADDED_WHO, TBIDB_OBJECT_STORE.ADDED_WHEN, TBIDB_OBJECT_STORE.CHANGED_WHO, TBIDB_OBJECT_STORE.CHANGED_WHEN, TBIDB_CATALOG.CAT_TITLE +FROM TBIDB_OBJECT_STORE INNER JOIN + TBIDB_CATALOG ON TBIDB_OBJECT_STORE.CAT_ID = TBIDB_CATALOG.GUID + + + + + + UPDATE TBIDB_OBJECT_STORE +SET OBJECT_TITLE = @OBJECT_TITLE, CAT_ID = @CAT_ID, OBJ_PATH = @OBJ_PATH, IS_ARCHIVE = @IS_ARCHIVE, COMMENT = @COMMENT, CHANGED_WHO = @CHANGED_WHO +WHERE (GUID = @Original_GUID); +SELECT GUID, OBJECT_TITLE, CAT_ID, OBJ_PATH, IS_ARCHIVE, COMMENT, ADDED_WHO, ADDED_WHEN, CHANGED_WHO, CHANGED_WHEN FROM TBIDB_OBJECT_STORE WHERE (GUID = @GUID) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DELETE FROM [TBIDB_CATALOG] WHERE (([GUID] = @Original_GUID) AND ([CAT_TITLE] = @Original_CAT_TITLE) AND ([CAT_STRING] = @Original_CAT_STRING) AND ([ADDED_WHO] = @Original_ADDED_WHO) AND ([ADDED_WHEN] = @Original_ADDED_WHEN) AND ((@IsNull_CHANGED_WHO = 1 AND [CHANGED_WHO] IS NULL) OR ([CHANGED_WHO] = @Original_CHANGED_WHO)) AND ((@IsNull_CHANGED_WHEN = 1 AND [CHANGED_WHEN] IS NULL) OR ([CHANGED_WHEN] = @Original_CHANGED_WHEN))) + + + + + + + + + + + + + + + + INSERT INTO TBIDB_CATALOG + (CAT_TITLE, CAT_STRING, ADDED_WHO) +VALUES (@CAT_TITLE,@CAT_STRING,@ADDED_WHO); +SELECT GUID, CAT_TITLE, CAT_STRING, ADDED_WHO, ADDED_WHEN, CHANGED_WHO, CHANGED_WHEN FROM TBIDB_CATALOG WHERE (GUID = SCOPE_IDENTITY()) + + + + + + + + + + SELECT GUID, CAT_TITLE, CAT_STRING, ADDED_WHO, ADDED_WHEN, CHANGED_WHO, CHANGED_WHEN +FROM TBIDB_CATALOG +WHERE (GUID = @ID) + + + + + + + + UPDATE TBIDB_CATALOG +SET CAT_TITLE = @CAT_TITLE, CAT_STRING = @CAT_STRING, ADDED_WHO = @ADDED_WHO +WHERE (GUID = @Original_GUID); +SELECT GUID, CAT_TITLE, CAT_STRING, ADDED_WHO, ADDED_WHEN, CHANGED_WHO, CHANGED_WHEN FROM TBIDB_CATALOG WHERE (GUID = @GUID) + + + + + + + + + + + + + + + + + + + + + + @@ -645,6 +798,96 @@ SELECT GUID, PARENT_ID, ENTITY_TITLE, SCOPE, PK_COLUMN, COMMENT, SQL_COMMAND, AD + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -667,10 +910,19 @@ SELECT GUID, PARENT_ID, ENTITY_TITLE, SCOPE, PK_COLUMN, COMMENT, SQL_COMMAND, AD + + + + + + + + + \ No newline at end of file diff --git a/GUIs.ZooFlow/DSIDB_Stammdaten.xss b/GUIs.ZooFlow/DSIDB_Stammdaten.xss index 26b68ac6..7cec4add 100644 --- a/GUIs.ZooFlow/DSIDB_Stammdaten.xss +++ b/GUIs.ZooFlow/DSIDB_Stammdaten.xss @@ -4,16 +4,18 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. --> - + - - - - - + + + + + + + - + 677 @@ -25,5 +27,17 @@ + + + + 896 + 467 + + + 747 + 467 + + + \ No newline at end of file diff --git a/GUIs.ZooFlow/My Project/Settings.Designer.vb b/GUIs.ZooFlow/My Project/Settings.Designer.vb index 8fbf2560..b2272aaf 100644 --- a/GUIs.ZooFlow/My Project/Settings.Designer.vb +++ b/GUIs.ZooFlow/My Project/Settings.Designer.vb @@ -14,7 +14,7 @@ Option Explicit On _ Partial Friend NotInheritable Class Settings Inherits Global.System.Configuration.ApplicationSettingsBase @@ -56,8 +56,8 @@ Partial Friend NotInheritable Class Settings _ + Global.System.Configuration.DefaultSettingValueAttribute("Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=IDB;Persist Security Inf"& _ + "o=True;User ID=sa;Password=dd")> _ Public ReadOnly Property IDBConnectionStringDEFAULT() As String Get Return CType(Me("IDBConnectionStringDEFAULT"),String) @@ -87,7 +87,8 @@ Partial Friend NotInheritable Class Settings _ + Global.System.Configuration.DefaultSettingValueAttribute("Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=DD_ECM;Persist Security "& _ + "Info=True;User ID=sa;Password=dd")> _ Public ReadOnly Property DD_ECMConnectionString() As String Get Return CType(Me("DD_ECMConnectionString"),String) diff --git a/GUIs.ZooFlow/My Project/Settings.settings b/GUIs.ZooFlow/My Project/Settings.settings index 8a4e196a..32a23f97 100644 --- a/GUIs.ZooFlow/My Project/Settings.settings +++ b/GUIs.ZooFlow/My Project/Settings.settings @@ -5,10 +5,10 @@ <?xml version="1.0" encoding="utf-16"?> <SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> - <ConnectionString>Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=IDB_TEST;Persist Security Info=True;User ID=sa;Password=dd</ConnectionString> + <ConnectionString>Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=IDB;Persist Security Info=True;User ID=sa;Password=dd</ConnectionString> <ProviderName>System.Data.SqlClient</ProviderName> </SerializableConnectionString> - Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=IDB_TEST;Persist Security Info=True;User ID=sa;Password=dd + Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=IDB;Persist Security Info=True;User ID=sa;Password=dd True @@ -23,10 +23,10 @@ <?xml version="1.0" encoding="utf-16"?> <SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> - <ConnectionString>Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=DD_ECM_TEST;User ID=sa</ConnectionString> + <ConnectionString>Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=DD_ECM;Persist Security Info=True;User ID=sa;Password=dd</ConnectionString> <ProviderName>System.Data.SqlClient</ProviderName> </SerializableConnectionString> - Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=DD_ECM_TEST;User ID=sa + Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=DD_ECM;Persist Security Info=True;User ID=sa;Password=dd 17255 diff --git a/GUIs.ZooFlow/ZooFlow.vbproj b/GUIs.ZooFlow/ZooFlow.vbproj index 6a7e5bb6..360d0a0e 100644 --- a/GUIs.ZooFlow/ZooFlow.vbproj +++ b/GUIs.ZooFlow/ZooFlow.vbproj @@ -165,6 +165,12 @@ Form + + frmAdmin_IDBObjectStore.vb + + + Form + frmAdmin_Globix.vb @@ -202,12 +208,6 @@ DSIDB_Stammdaten.xsd - - frmAdmin_IDBStore.vb - - - Form - frmServiceConfig.vb @@ -373,12 +373,12 @@ frmAdmin_Globix.vb + + frmAdmin_IDBObjectStore.vb + frmAdmin_SourceSQL.vb - - frmAdmin_IDBStore.vb - frmServiceConfig.vb diff --git a/GUIs.ZooFlow/frmAdmin_IDBStore.Designer.vb b/GUIs.ZooFlow/frmAdmin_IDBStore.Designer.vb deleted file mode 100644 index 54e0bbeb..00000000 --- a/GUIs.ZooFlow/frmAdmin_IDBStore.Designer.vb +++ /dev/null @@ -1,97 +0,0 @@ - _ -Partial Class frmAdmin_IDBStore - Inherits DevExpress.XtraBars.Ribbon.RibbonForm - - 'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen. - _ - Protected Overrides Sub Dispose(ByVal disposing As Boolean) - Try - If disposing AndAlso components IsNot Nothing Then - components.Dispose() - End If - Finally - MyBase.Dispose(disposing) - End Try - End Sub - - 'Wird vom Windows Form-Designer benötigt. - Private components As System.ComponentModel.IContainer - - 'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich. - 'Das Bearbeiten ist mit dem Windows Form-Designer möglich. - 'Das Bearbeiten mit dem Code-Editor ist nicht möglich. - _ - Private Sub InitializeComponent() - Me.RibbonControl1 = New DevExpress.XtraBars.Ribbon.RibbonControl() - Me.RibbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage() - Me.RibbonPageGroup1 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() - Me.RibbonPageGroup2 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() - Me.RibbonStatusBar1 = New DevExpress.XtraBars.Ribbon.RibbonStatusBar() - Me.RibbonPage2 = New DevExpress.XtraBars.Ribbon.RibbonPage() - CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).BeginInit() - Me.SuspendLayout() - ' - 'RibbonControl1 - ' - Me.RibbonControl1.CommandLayout = DevExpress.XtraBars.Ribbon.CommandLayout.Simplified - Me.RibbonControl1.ExpandCollapseItem.Id = 0 - Me.RibbonControl1.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl1.ExpandCollapseItem, Me.RibbonControl1.SearchEditItem}) - Me.RibbonControl1.Location = New System.Drawing.Point(0, 0) - Me.RibbonControl1.MaxItemId = 1 - Me.RibbonControl1.Name = "RibbonControl1" - Me.RibbonControl1.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage1}) - Me.RibbonControl1.Size = New System.Drawing.Size(800, 94) - Me.RibbonControl1.StatusBar = Me.RibbonStatusBar1 - ' - 'RibbonPage1 - ' - Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup1, Me.RibbonPageGroup2}) - Me.RibbonPage1.Name = "RibbonPage1" - Me.RibbonPage1.Text = "RibbonPage1" - ' - 'RibbonPageGroup1 - ' - Me.RibbonPageGroup1.Name = "RibbonPageGroup1" - Me.RibbonPageGroup1.Text = "RibbonPageGroup1" - ' - 'RibbonPageGroup2 - ' - Me.RibbonPageGroup2.Name = "RibbonPageGroup2" - Me.RibbonPageGroup2.Text = "RibbonPageGroup2" - ' - 'RibbonStatusBar1 - ' - Me.RibbonStatusBar1.Location = New System.Drawing.Point(0, 428) - Me.RibbonStatusBar1.Name = "RibbonStatusBar1" - Me.RibbonStatusBar1.Ribbon = Me.RibbonControl1 - Me.RibbonStatusBar1.Size = New System.Drawing.Size(800, 22) - ' - 'RibbonPage2 - ' - Me.RibbonPage2.Name = "RibbonPage2" - Me.RibbonPage2.Text = "RibbonPage2" - ' - 'frmAdmin_IDBStore - ' - Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) - Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(800, 450) - Me.Controls.Add(Me.RibbonStatusBar1) - Me.Controls.Add(Me.RibbonControl1) - Me.Name = "frmAdmin_IDBStore" - Me.Ribbon = Me.RibbonControl1 - Me.StatusBar = Me.RibbonStatusBar1 - Me.Text = "frmAdmin_IDBStore" - CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).EndInit() - Me.ResumeLayout(False) - Me.PerformLayout() - - End Sub - - Friend WithEvents RibbonControl1 As DevExpress.XtraBars.Ribbon.RibbonControl - Friend WithEvents RibbonPage1 As DevExpress.XtraBars.Ribbon.RibbonPage - Friend WithEvents RibbonPageGroup1 As DevExpress.XtraBars.Ribbon.RibbonPageGroup - Friend WithEvents RibbonPageGroup2 As DevExpress.XtraBars.Ribbon.RibbonPageGroup - Friend WithEvents RibbonStatusBar1 As DevExpress.XtraBars.Ribbon.RibbonStatusBar - Friend WithEvents RibbonPage2 As DevExpress.XtraBars.Ribbon.RibbonPage -End Class diff --git a/GUIs.ZooFlow/frmAdmin_IDBStore.resx b/GUIs.ZooFlow/frmAdmin_IDBStore.resx deleted file mode 100644 index 1af7de15..00000000 --- a/GUIs.ZooFlow/frmAdmin_IDBStore.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/GUIs.ZooFlow/frmAdmin_IDBStore.vb b/GUIs.ZooFlow/frmAdmin_IDBStore.vb deleted file mode 100644 index ee31bafc..00000000 --- a/GUIs.ZooFlow/frmAdmin_IDBStore.vb +++ /dev/null @@ -1,21 +0,0 @@ -Imports DigitalData.Modules.Logging -Public Class frmAdmin_IDBStore - Implements IAdminForm - Public Property PrimaryKey As Integer Implements IAdminForm.PrimaryKey - Public Property HasChanges As Boolean Implements IAdminForm.HasChanges - Public Property IsInsert As Boolean Implements IAdminForm.IsInsert - - Public Sub New(PrimaryKey As Integer, Optional IsInsert As Boolean = False) - ' Dieser Aufruf ist für den Designer erforderlich. - InitializeComponent() - - ' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu. - 'InitializeBaseForm(My.LogConfig) - Me.PrimaryKey = PrimaryKey - Me.IsInsert = IsInsert - End Sub - - Public Function DeleteData() As Boolean Implements IAdminForm.DeleteData - Throw New NotImplementedException() - End Function -End Class \ No newline at end of file diff --git a/Modules.Jobs/EDMI/ZUGFeRD/EmailFunctions.vb b/Modules.Jobs/EDMI/ZUGFeRD/EmailFunctions.vb index fcdc485f..cb697665 100644 --- a/Modules.Jobs/EDMI/ZUGFeRD/EmailFunctions.vb +++ b/Modules.Jobs/EDMI/ZUGFeRD/EmailFunctions.vb @@ -17,7 +17,7 @@ Public Class EmailFunctions _firebird = Firebird End Sub - Public Sub AddToEmailQueueFB(MessageId As String, BodyText As String, EmailData As EmailData) + Public Sub AddToEmailQueueFB(MessageId As String, BodyText As String, EmailData As EmailData, NamePortal As String) If EmailData Is Nothing Then _logger.Warn("EmailData is empty. Email will not be sent!") Exit Sub @@ -27,10 +27,10 @@ Public Class EmailFunctions Dim oJobId = RandomValue(1, 10000) Dim oReference = MessageId Dim oEmailTo = "" - Dim oSubject = EmailStrings.EMAIL_SUBJECT_REJECTED + Dim oSubject = EmailStrings.EMAIL_SUBJECT_REJECTED.Replace(EmailStrings.constNAME_ZUGFERD_PORTAL, NamePortal) Dim oAccountId = 1 Dim oCreatedWho = "ZUGFeRD Service" - Dim oFinalBodyText = String.Format(EmailStrings.EMAIL_WRAPPING_TEXT, BodyText) + Dim oFinalBodyText = String.Format(EmailStrings.EMAIL_WRAPPING_TEXT.Replace(EmailStrings.constNAME_ZUGFERD_PORTAL, NamePortal), BodyText) Dim oEmailAddress = EmailData.From Dim oAttachment = EmailData.Attachment @@ -63,7 +63,7 @@ Public Class EmailFunctions _logger.Error(ex) End Try End Sub - Public Sub AddToEmailQueueMSSQL(MessageId As String, BodyText As String, pEmailData As EmailData, SourceProcedure As String, pEmailAccountId As Integer) + Public Sub AddToEmailQueueMSSQL(MessageId As String, BodyText As String, pEmailData As EmailData, SourceProcedure As String, pEmailAccountId As Integer, NamePortal As String) If pEmailData Is Nothing Then _logger.Warn("EmailData is empty. Email will not be sent!") Exit Sub @@ -73,14 +73,14 @@ Public Class EmailFunctions Dim oJobId = RandomValue(1, 10000) Dim oReference = MessageId Dim oEmailTo = "" - Dim oSubject = EmailStrings.EMAIL_SUBJECT_REJECTED + Dim oSubject = EmailStrings.EMAIL_SUBJECT_REJECTED.Replace(EmailStrings.constNAME_ZUGFERD_PORTAL, NamePortal) Dim oCreatedWho = "ZUGFeRD Service" Dim oMaskedBodyText = BodyText.Replace("'", "''") - Dim oSubjectBodyText = String.Format(EmailStrings.EMAIL_SUBJECT_TEXT, pEmailData.Subject).Replace("'", "''") + Dim oSubjectBodyText = String.Format(EmailStrings.EMAIL_SUBJECT_TEXT.Replace(EmailStrings.constNAME_ZUGFERD_PORTAL, NamePortal), pEmailData.Subject).Replace("'", "''") Dim oCompleteBodyText = oMaskedBodyText & oSubjectBodyText - Dim oFinalBodyText = String.Format(EmailStrings.EMAIL_WRAPPING_TEXT, oCompleteBodyText) + Dim oFinalBodyText = String.Format(EmailStrings.EMAIL_WRAPPING_TEXT.Replace(EmailStrings.constNAME_ZUGFERD_PORTAL, NamePortal), oCompleteBodyText) Dim oEmailAddress = pEmailData.From Dim oAttachment = pEmailData.Attachment diff --git a/Modules.Jobs/EDMI/ZUGFeRD/EmailStrings.vb b/Modules.Jobs/EDMI/ZUGFeRD/EmailStrings.vb index f5e6a8c3..3def7e00 100644 --- a/Modules.Jobs/EDMI/ZUGFeRD/EmailStrings.vb +++ b/Modules.Jobs/EDMI/ZUGFeRD/EmailStrings.vb @@ -1,13 +1,13 @@ Public Class EmailStrings - + Public Const constNAME_ZUGFERD_PORTAL = "@NAME_ZUGFERD_PORTAL" Public Const EMAIL_WRAPPING_TEXT = "Sehr geehrte Damen und Herren,

- das WISAG-Portal zur Verarbeitung der Eingangsrechnungen im ZUGFeRD-Format konnte die von Ihnen gesandte Rechnung + das @NAME_ZUGFERD_PORTAL zur Verarbeitung der Eingangsrechnungen im ZUGFeRD-Format konnte die von Ihnen gesandte Rechnung leider nicht verarbeiten!

Grund: {0}

Bitte prüfen Sie die Datei und nehmen Sie bei Bedarf mit uns Kontakt auf.

Vielen Dank für Ihr Verständnis.
Mit freundlichen Grüßen
Ihre IT-Abteilung" Public Const EMAIL_SUBJECT_TEXT = "

Der Betreff der Original-Email war: {0}

" - Public Const EMAIL_SUBJECT_REJECTED = "WISAG ZUGFeRD Portal: Beleg abgelehnt" - Public Const EMAIL_SUBJECT_EXCEPTION = "WISAG ZUGFeRD Portal: Unbehandelte Ausnahme" + Public Const EMAIL_SUBJECT_REJECTED = "@NAME_ZUGFERD_PORTAL: Beleg abgelehnt" + Public Const EMAIL_SUBJECT_EXCEPTION = "@NAME_ZUGFERD_PORTAL: Unbehandelte Ausnahme" Public Const EMAIL_UNHANDLED_EXCEPTION = """

Beim Verarbeiten der Datei mit der Message ID '{0}' ist ein schwerer Fehler aufgetreten.

diff --git a/Modules.Jobs/EDMI/ZUGFeRD/ImportZUGFeRDFiles.vb b/Modules.Jobs/EDMI/ZUGFeRD/ImportZUGFeRDFiles.vb index d755d139..ec77830a 100644 --- a/Modules.Jobs/EDMI/ZUGFeRD/ImportZUGFeRDFiles.vb +++ b/Modules.Jobs/EDMI/ZUGFeRD/ImportZUGFeRDFiles.vb @@ -41,7 +41,7 @@ Public Class ImportZUGFeRDFiles Private ReadOnly _email As EmailFunctions - Public Sub New(LogConfig As LogConfig, Firebird As Firebird, pEmailOutAccount As Integer, Optional MSSQL As MSSQLServer = Nothing) + Public Sub New(LogConfig As LogConfig, Firebird As Firebird, pEmailOutAccount As Integer, pPortalName As String, Optional MSSQL As MSSQLServer = Nothing) _logConfig = LogConfig _logger = LogConfig.GetLogger() _firebird = Firebird @@ -374,7 +374,7 @@ Public Class ImportZUGFeRDFiles Dim oBody = EmailStrings.EMAIL_MD5_ERROR Dim oEmailData = MoveAndRenameEmailToRejected(oArgs, oMessageId) - _email.AddToEmailQueueMSSQL(oMessageId, oBody, oEmailData, "MD5HashException", _EmailOutAccountId) + _email.AddToEmailQueueMSSQL(oMessageId, oBody, oEmailData, "MD5HashException", _EmailOutAccountId, oArgs.NamePortal) AddRejectedState(oMessageId, "MD5HashException", "Die gesendete Rechnung wurde bereits verarbeitet!", "", oSQLTransaction) Catch ex As InvalidFerdException @@ -386,7 +386,7 @@ Public Class ImportZUGFeRDFiles Dim oBody = EmailStrings.EMAIL_INVALID_DOCUMENT Dim oEmailData = MoveAndRenameEmailToRejected(oArgs, oMessageId) - _email.AddToEmailQueueMSSQL(oMessageId, oBody, oEmailData, "InvalidFerdException", _EmailOutAccountId) + _email.AddToEmailQueueMSSQL(oMessageId, oBody, oEmailData, "InvalidFerdException", _EmailOutAccountId, oArgs.NamePortal) AddRejectedState(oMessageId, "InvalidFerdException", "Inkorrekte Formate", "", oSQLTransaction) Catch ex As TooMuchFerdsException @@ -396,7 +396,7 @@ Public Class ImportZUGFeRDFiles Dim oBody = EmailStrings.EMAIL_TOO_MUCH_FERDS Dim oEmailData = MoveAndRenameEmailToRejected(oArgs, oMessageId) - _email.AddToEmailQueueMSSQL(oMessageId, oBody, oEmailData, "TooMuchFerdsException", _EmailOutAccountId) + _email.AddToEmailQueueMSSQL(oMessageId, oBody, oEmailData, "TooMuchFerdsException", _EmailOutAccountId, oArgs.NamePortal) AddRejectedState(oMessageId, "TooMuchFerdsException", "Email enthielt mehr als ein ZUGFeRD-Dokument", "", oSQLTransaction) Catch ex As NoFerdsException @@ -406,7 +406,7 @@ Public Class ImportZUGFeRDFiles Dim oBody = EmailStrings.EMAIL_NO_FERDS Dim oEmailData = MoveAndRenameEmailToRejected(oArgs, oMessageId) - _email.AddToEmailQueueMSSQL(oMessageId, oBody, oEmailData, "NoFerdsException", _EmailOutAccountId) + _email.AddToEmailQueueMSSQL(oMessageId, oBody, oEmailData, "NoFerdsException", _EmailOutAccountId, oArgs.NamePortal) AddRejectedState(oMessageId, "NoFerdsException", " Email enthielt keine ZUGFeRD-Dokumente", "", oSQLTransaction) Catch ex As NoFerdsAlternateException @@ -428,7 +428,7 @@ Public Class ImportZUGFeRDFiles Dim oBody = CreateBodyForMissingProperties(ex.File.Name, oMissingProperties) Dim oEmailData = MoveAndRenameEmailToRejected(oArgs, oMessageId) - _email.AddToEmailQueueMSSQL(oMessageId, oBody, oEmailData, "MissingValueException", _EmailOutAccountId) + _email.AddToEmailQueueMSSQL(oMessageId, oBody, oEmailData, "MissingValueException", _EmailOutAccountId, oArgs.NamePortal) AddRejectedState(oMessageId, "MissingValueException", "Es fehlten ZugferdSpezifikationen", oMessage, oSQLTransaction) Catch ex As FileSizeLimitReachedException @@ -446,7 +446,7 @@ Public Class ImportZUGFeRDFiles Dim oBody = String.Format(EmailStrings.EMAIL_FILE_SIZE_REACHED, oArgs.MaxAttachmentSizeInMegaBytes, oFileWithoutMessageId) - _email.AddToEmailQueueMSSQL(oMessageId, oBody, oEmailData, "FileSizeLimitReachedException", _EmailOutAccountId) + _email.AddToEmailQueueMSSQL(oMessageId, oBody, oEmailData, "FileSizeLimitReachedException", _EmailOutAccountId, oArgs.NamePortal) AddRejectedState(oMessageId, "FileSizeLimitReachedException", "Erlaubte Dateigröße überschritten", "", oSQLTransaction) Catch ex As OutOfMemoryException @@ -459,7 +459,7 @@ Public Class ImportZUGFeRDFiles .From = oArgs.ExceptionEmailAddress, .Subject = $"OutOfMemoryException im ZUGFeRD-Parser @ {oMessageId}" } - _email.AddToEmailQueueMSSQL(oMessageId, oBody, oEmailData, "OutOfMemoryException", _EmailOutAccountId) + _email.AddToEmailQueueMSSQL(oMessageId, oBody, oEmailData, "OutOfMemoryException", _EmailOutAccountId, oArgs.NamePortal) ' Rollback Firebird oFBTransaction.Rollback() @@ -481,7 +481,7 @@ Public Class ImportZUGFeRDFiles .From = oArgs.ExceptionEmailAddress, .Subject = $"UnhandledException im ZUGFeRD-Parser @ {oMessageId}" } - _email.AddToEmailQueueMSSQL(oMessageId, oBody, oEmailData, "UnhandledException", _EmailOutAccountId) + _email.AddToEmailQueueMSSQL(oMessageId, oBody, oEmailData, "UnhandledException", _EmailOutAccountId, oArgs.NamePortal) ' Rollback Firebird oFBTransaction.Rollback() @@ -510,7 +510,7 @@ Public Class ImportZUGFeRDFiles .From = oArgs.ExceptionEmailAddress, .Subject = $"FileMoveException im ZUGFeRD-Parser @ {oMessageId}" } - _email.AddToEmailQueueMSSQL(oMessageId, oBody, oEmailData, "FileMoveException", _EmailOutAccountId) + _email.AddToEmailQueueMSSQL(oMessageId, oBody, oEmailData, "FileMoveException", _EmailOutAccountId, oArgs.NamePortal) _logger.Warn("Could not move files!") _logger.Error(ex) @@ -697,7 +697,7 @@ Public Class ImportZUGFeRDFiles ' Close the connection oConnection.Close() If Message.Contains("REJECTED") Then - oSQL = $"UPDATE TBEMLP_HISTORY SET COMMENT = '{Message}' CUST_REJECTED = 1,CUST_REJECTED_WHEN = GETDATE() WHERE EMAIL_MSGID = '{MessageId}'" + oSQL = $"UPDATE TBEMLP_HISTORY SET COMMENT = '{Message}', CUST_REJECTED = 1,CUST_REJECTED_WHEN = GETDATE() WHERE EMAIL_MSGID = '{MessageId}'" _mssql.ExecuteNonQuery(oSQL) End If diff --git a/Modules.Jobs/EDMI/ZUGFeRD/WorkerArgs.vb b/Modules.Jobs/EDMI/ZUGFeRD/WorkerArgs.vb index 2d5e8baf..662f107f 100644 --- a/Modules.Jobs/EDMI/ZUGFeRD/WorkerArgs.vb +++ b/Modules.Jobs/EDMI/ZUGFeRD/WorkerArgs.vb @@ -19,4 +19,5 @@ Public Class WorkerArgs Public ExceptionEmailAddress As String = Nothing Public IgnoreRejectionStatus As Boolean = False Public MaxAttachmentSizeInMegaBytes As Integer = -1 + Public NamePortal As String = "NO PORTAL_NAME IN CONFIG" End Class \ No newline at end of file diff --git a/Modules.Jobs/My Project/AssemblyInfo.vb b/Modules.Jobs/My Project/AssemblyInfo.vb index 4815083d..7b2f2d59 100644 --- a/Modules.Jobs/My Project/AssemblyInfo.vb +++ b/Modules.Jobs/My Project/AssemblyInfo.vb @@ -30,5 +30,5 @@ Imports System.Runtime.InteropServices ' Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern ' übernehmen, indem Sie "*" eingeben: - - + + diff --git a/Services.ZUGFeRDService/Config.vb b/Services.ZUGFeRDService/Config.vb index 3ced11da..3b2a7e45 100644 --- a/Services.ZUGFeRDService/Config.vb +++ b/Services.ZUGFeRDService/Config.vb @@ -6,6 +6,8 @@ Public Property MSSQLEnabled As Boolean = False Public Property MSSQLEmailOutAccountID As String = 1 + Public Property PORTAL_NAME As String = "WISAG-Portal" + Public Property JobInterval As Integer = 10 Public Property ExceptionEmailAddress As String = "wisag-flow@digitaldata.works" diff --git a/Services.ZUGFeRDService/My Project/AssemblyInfo.vb b/Services.ZUGFeRDService/My Project/AssemblyInfo.vb index 3410833b..df2e1ba6 100644 --- a/Services.ZUGFeRDService/My Project/AssemblyInfo.vb +++ b/Services.ZUGFeRDService/My Project/AssemblyInfo.vb @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - - + + diff --git a/Services.ZUGFeRDService/ThreadRunner.vb b/Services.ZUGFeRDService/ThreadRunner.vb index 672dc210..7bd310af 100644 --- a/Services.ZUGFeRDService/ThreadRunner.vb +++ b/Services.ZUGFeRDService/ThreadRunner.vb @@ -52,7 +52,8 @@ Public Class ThreadRunner Dim oArgs As New WorkerArgs With { .ExceptionEmailAddress = _config.Config.ExceptionEmailAddress, .IgnoreRejectionStatus = _config.Config.Custom.IgnoreRejectionStatus, - .MaxAttachmentSizeInMegaBytes = _config.Config.Custom.MaxAttachmentSizeInMegaBytes + .MaxAttachmentSizeInMegaBytes = _config.Config.Custom.MaxAttachmentSizeInMegaBytes, + .NamePortal = _config.Config.PORTAL_NAME } oArgs = LoadFolderConfig(oArgs) oArgs = LoadPropertyMapFor(oArgs, "DEFAULT") @@ -160,7 +161,7 @@ Public Class ThreadRunner Dim args As WorkerArgs = e.Argument _logger.Debug("Background worker running..") - Dim job As New ImportZUGFeRDFiles(_logConfig, _firebird, _config.Config.MSSQLEmailOutAccountID, _mssql) + Dim job As New ImportZUGFeRDFiles(_logConfig, _firebird, _config.Config.MSSQLEmailOutAccountID, _config.Config.PORTAL_NAME, _mssql) job.Start(args) Catch ex As Exception _logger.Warn("Background worker failed!")