diff --git a/GUIs.ZooFlow/Administration/ClassDetailPage.vb b/GUIs.ZooFlow/Administration/ClassDetailPage.vb index a4d38831..f7c316fa 100644 --- a/GUIs.ZooFlow/Administration/ClassDetailPage.vb +++ b/GUIs.ZooFlow/Administration/ClassDetailPage.vb @@ -43,9 +43,13 @@ Public Class ClassDetailPages Public IsInsert As Boolean = False Public TabPage As XtraTabPage Public Name As String + Public BindingSource As BindingSource + Public DataTable As DataTable + Public AddedWhoEdit As TextEdit + Public ChangedWhoEdit As TextEdit End Class @@ -80,6 +84,10 @@ Public Class ClassDetailPages AddHandler oLayoutControl.GotFocus, AddressOf Handle_Focus For Each oContainer As LayoutControlItem In oLayoutControl.Root.Items + If TypeOf oContainer Is EmptySpaceItem Then + Continue For + End If + Dim oControl As BaseEdit = oContainer.Control AddHandler oControl.GotFocus, AddressOf Handle_Focus AddHandler oControl.EditValueChanged, AddressOf Handle_EditValueChanged diff --git a/GUIs.ZooFlow/Administration/frmAdmin_ClipboardWatcher.vb b/GUIs.ZooFlow/Administration/frmAdmin_ClipboardWatcher.vb index b888e054..1460b961 100644 --- a/GUIs.ZooFlow/Administration/frmAdmin_ClipboardWatcher.vb +++ b/GUIs.ZooFlow/Administration/frmAdmin_ClipboardWatcher.vb @@ -53,8 +53,6 @@ Public Class frmAdmin_ClipboardWatcher End Class Public Sub New(PrimaryKey As Integer) - MyBase.New(My.LogConfig) - ' Dieser Aufruf ist für den Designer erforderlich. InitializeComponent() @@ -64,6 +62,8 @@ Public Class frmAdmin_ClipboardWatcher End Sub Private Sub frmAdmin_CWProfile_Load(sender As Object, e As EventArgs) Handles Me.Load + Init(My.LogConfig) + 'TODO: Diese Codezeile lädt Daten in die Tabelle "DSDD_Stammdaten.TBDD_CONNECTION". Sie können sie bei Bedarf verschieben oder entfernen. Me.TBDD_CONNECTIONTableAdapter.Fill(Me.DSDD_Stammdaten.TBDD_CONNECTION) Try diff --git a/GUIs.ZooFlow/Administration/frmAdmin_IDBEntity.vb b/GUIs.ZooFlow/Administration/frmAdmin_IDBEntity.vb index 59374466..6bb0a288 100644 --- a/GUIs.ZooFlow/Administration/frmAdmin_IDBEntity.vb +++ b/GUIs.ZooFlow/Administration/frmAdmin_IDBEntity.vb @@ -7,8 +7,6 @@ Public Class frmAdmin_IDBEntity Public Property IsInsert As Boolean Implements IAdminForm.IsInsert Public Sub New(PrimaryKey As Integer, Optional IsInsert As Boolean = False) - MyBase.New(My.LogConfig) - ' Dieser Aufruf ist für den Designer erforderlich. InitializeComponent() @@ -19,6 +17,7 @@ Public Class frmAdmin_IDBEntity Private Sub frmAdmin_IDBEntity_Load(sender As Object, e As EventArgs) Handles MyBase.Load Try + Init(My.LogConfig) TBIDB_BUSINESS_ENTITYTableAdapter.Fill(DSIDB_Stammdaten.TBIDB_BUSINESS_ENTITY, PrimaryKey) Catch ex As Exception ShowErrorMessage(ex) diff --git a/GUIs.ZooFlow/Administration/frmAdmin_SourceSQL.vb b/GUIs.ZooFlow/Administration/frmAdmin_SourceSQL.vb index 78a9fe59..0a83b730 100644 --- a/GUIs.ZooFlow/Administration/frmAdmin_SourceSQL.vb +++ b/GUIs.ZooFlow/Administration/frmAdmin_SourceSQL.vb @@ -10,6 +10,8 @@ Public Class frmAdmin_SourceSQL Public Property IsInsert As Boolean Implements IAdminForm.IsInsert + Private Pages As ClassDetailPages + Public Sub New(PrimaryKey As Integer) ' Dieser Aufruf ist für den Designer erforderlich. InitializeComponent() @@ -20,6 +22,17 @@ Public Class frmAdmin_SourceSQL Private Sub frmAdmin_SourceSQL_Load(sender As Object, e As EventArgs) Handles Me.Load Try + Pages = New ClassDetailPages(My.LogConfig, Me, New List(Of LayoutControl) From {LayoutControl1}) + Pages.Add(New ClassDetailPages.PrimaryPage(IsInsert) With { + .Name = "Source SQL", + .AddedWhoEdit = txtAddedWho, + .ChangedWhoEdit = txtChangedWho, + .BindingSource = TBZF_ADMIN_SOURCE_SQLBindingSource, + .DataTable = DSIDB_Stammdaten.TBZF_ADMIN_SOURCE_SQL, + .IsInsert = IsInsert, + .TabPage = Nothing + }) + If IsInsert Then TBZF_ADMIN_SOURCE_SQLBindingSource.AddNew() Else diff --git a/GUIs.ZooFlow/Administration/frmAdmin_Start.Designer.vb b/GUIs.ZooFlow/Administration/frmAdmin_Start.Designer.vb index 63558bf7..769daec3 100644 --- a/GUIs.ZooFlow/Administration/frmAdmin_Start.Designer.vb +++ b/GUIs.ZooFlow/Administration/frmAdmin_Start.Designer.vb @@ -789,7 +789,7 @@ Partial Class frmAdmin_Start Me.Name = "frmAdmin_Start" Me.Ribbon = Me.RibbonControl1 Me.StatusBar = Me.RibbonStatusBar1 - Me.Text = "Administration" + Me.Text = "Administration - ZooFlow" CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.TreeListMenu, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.MainTreeImages, System.ComponentModel.ISupportInitialize).EndInit() diff --git a/GUIs.ZooFlow/Administration/frmAdmin_Start.vb b/GUIs.ZooFlow/Administration/frmAdmin_Start.vb index a59f3b44..f24de442 100644 --- a/GUIs.ZooFlow/Administration/frmAdmin_Start.vb +++ b/GUIs.ZooFlow/Administration/frmAdmin_Start.vb @@ -15,16 +15,8 @@ Public Class frmAdmin_Start Private DetailForm As ClassDetailForm - Public Sub New() - MyBase.New(My.LogConfig) - - ' Dieser Aufruf ist für den Designer erforderlich. - InitializeComponent() - - ' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu. - End Sub - Private Sub frmAdministration_Load(sender As Object, e As EventArgs) Handles MyBase.Load + Init(My.LogConfig) DetailForm = New ClassDetailForm(My.LogConfig) AddHandler DetailForm.DetailFormClosed, AddressOf DetailForm_Closed diff --git a/GUIs.ZooFlow/ClassDataASorDB.vb b/GUIs.ZooFlow/ClassDataASorDB.vb index 7458c820..b2bf726f 100644 --- a/GUIs.ZooFlow/ClassDataASorDB.vb +++ b/GUIs.ZooFlow/ClassDataASorDB.vb @@ -12,7 +12,7 @@ Public Class ClassDataASorDB Dim oReturnDT As DataTable = Nothing If My.Application.Service.IsActive = True And pForce = String.Empty Then Try - Dim oTableResult As TableResult = _Client.GetDatatableByName(pAppServDT, pAppServFilter, pAppServSort) + Dim oTableResult As TableResult = My.Application.Service.Client.GetDatatableByName(pAppServDT, pAppServFilter, pAppServSort) oReturnDT = oTableResult.Table If IsNothing(oReturnDT) Then _Logger.Warn($"Datatable from ApPServData is nothing [{pAppServDT} - {pAppServFilter}] - Failover via DB") @@ -81,7 +81,7 @@ Public Class ClassDataASorDB Public Sub Refresh_Connections() Try Dim oSql = String.Format("SELECT * FROM TBDD_CONNECTION WHERE AKTIV = 1") - DT_CONNECTIONS = GetDatatable("DD_ECM", oSql, "TBDD_CONNECTION", "", "", "") + My.Tables.DTDD_CONNECTION = GetDatatable("DD_ECM", oSql, "TBDD_CONNECTION", "", "", "") Catch ex As Exception _Logger.Error(ex) MsgBox("Unexpected Error in Refresh_Connections: " & ex.Message, MsgBoxStyle.Critical) diff --git a/GUIs.ZooFlow/ClassIDBData.vb b/GUIs.ZooFlow/ClassIDBData.vb index d2113e2b..a160321d 100644 --- a/GUIs.ZooFlow/ClassIDBData.vb +++ b/GUIs.ZooFlow/ClassIDBData.vb @@ -65,8 +65,8 @@ Public Class ClassIDBData Dim oAttributeValue As Object = Nothing - If Not IsNothing(My.Application.IDB_DT_DOC_DATA) Then - If oSingleAttribute = True And My.Application.IDB_DT_DOC_DATA.Rows.Count = 1 And pFromIDB = False Then + If Not IsNothing(My.Tables.DTIDB_DOC_DATA) Then + If oSingleAttribute = True And My.Tables.DTIDB_DOC_DATA.Rows.Count = 1 And pFromIDB = False Then Try If pAttributeName = "IDBCreatedWhen" Then pAttributeName = "ADDED_WHEN" @@ -78,7 +78,7 @@ Public Class ClassIDBData pAttributeName = "CHANGED_WHO" End If - oAttributeValue = My.Application.IDB_DT_DOC_DATA.Rows(0).Item(pAttributeName) + oAttributeValue = My.Tables.DTIDB_DOC_DATA.Rows(0).Item(pAttributeName) Catch ex As Exception _Logger.Debug($"Error getting Attribute from IDB_DT_DOC_DATA: {ex.Message}") End Try diff --git a/GUIs.ZooFlow/ClassInit.vb b/GUIs.ZooFlow/ClassInit.vb index 314dd871..acce4490 100644 --- a/GUIs.ZooFlow/ClassInit.vb +++ b/GUIs.ZooFlow/ClassInit.vb @@ -150,10 +150,10 @@ Public Class ClassInit Dim oSql = "" oSql = "SELECT * FROM TBIDB_COMMON_SQL WHERE ACTIVE = 1" - My.DTCOMMON_SQL = _DataASorDB.GetDatatable("IDB", oSql, "TBIDB_COMMON_SQL", "", "") + My.Tables.DTIDB_COMMON_SQL = _DataASorDB.GetDatatable("IDB", oSql, "TBIDB_COMMON_SQL", "", "") oSql = "SELECT * FROM TBIDB_CATALOG" - My.DTCATALOG = _DataASorDB.GetDatatable("IDB", oSql, "TBIDB_CATALOG", "", "") - For Each oRow As DataRow In My.DTCATALOG.Rows + My.Tables.DTIDB_CATALOG = _DataASorDB.GetDatatable("IDB", oSql, "TBIDB_CATALOG", "", "") + For Each oRow As DataRow In My.Tables.DTIDB_CATALOG.Rows 'Console.WriteLine(oRow.Item("CAT_TITLE").ToString) Select Case oRow.Item("CAT_TITLE").ToString Case "FILESTORE_ARCHIVE" @@ -183,15 +183,12 @@ Public Class ClassInit If oSplit.Length = 2 Then oAppServerPort = oSplit(1) End If - _Client = New Client(_LogConfig, oAppServerAddress, oAppServerPort) - If Not IsNothing(_Client) Then - If _Client.Connect() Then + My.Application.Service.Client = New Client(_LogConfig, oAppServerAddress, oAppServerPort) + If Not IsNothing(My.Application.Service.Client) Then + If My.Application.Service.Client.Connect() Then MyApplication.Service.IsActive = True End If End If - - - Catch ex As Exception _Logger.Error(ex) Throw New InitException("Error in InitBasicData", ex) diff --git a/GUIs.ZooFlow/MyApplication.vb b/GUIs.ZooFlow/MyApplication.vb index f7892be2..4268eef3 100644 --- a/GUIs.ZooFlow/MyApplication.vb +++ b/GUIs.ZooFlow/MyApplication.vb @@ -25,15 +25,12 @@ Namespace My End Get End Property - Property DTAttributes As DataTable - Property DTCOMMON_SQL As DataTable - Property DTCATALOG As DataTable - Property IDB_DT_DOC_DATA As DataTable Property LogConfig As LogConfig Property MainForm As frmAdmin_Start Property SearchForm As frmSearchStart Property Database As MSSQLServer Property DatabaseIDB As MSSQLServer + Property Tables As New ClassTables Property Queries As New ClassQueries Property Filestore_Work As String Property Filestore_Archive As String @@ -56,7 +53,6 @@ Namespace My Public CommandLineFunction As String Public CommandLineArguments As New Dictionary(Of String, String) - Public Property IDB_DT_DOC_DATA As DataTable Public Function GetEnvironment() As Environment Return New Environment With { diff --git a/GUIs.ZooFlow/Queries/ClassTables.vb b/GUIs.ZooFlow/Queries/ClassTables.vb new file mode 100644 index 00000000..9f6d95dc --- /dev/null +++ b/GUIs.ZooFlow/Queries/ClassTables.vb @@ -0,0 +1,7 @@ +Public Class ClassTables + Property DTIDB_ATTRIBUTE As DataTable + Property DTIDB_COMMON_SQL As DataTable + Property DTIDB_CATALOG As DataTable + Property DTIDB_DOC_DATA As DataTable + Property DTDD_CONNECTION As DataTable +End Class diff --git a/GUIs.ZooFlow/Search/frmSearchStart.vb b/GUIs.ZooFlow/Search/frmSearchStart.vb index b425ee4b..c16ed6fe 100644 --- a/GUIs.ZooFlow/Search/frmSearchStart.vb +++ b/GUIs.ZooFlow/Search/frmSearchStart.vb @@ -866,7 +866,7 @@ Public Class frmSearchStart Dim oSearchTerm As String = "" Dim oFilter As String = $"GUID = {pAttrID}" - Dim oFilteredRows() As DataRow = My.DTAttributes.Select(oFilter) + Dim oFilteredRows() As DataRow = My.Tables.DTIDB_ATTRIBUTE.Select(oFilter) If oFilteredRows.Length = 1 Then For Each oRow As DataRow In oFilteredRows Dim oType As Integer = DirectCast(oRow.Item("TYP_ID"), Integer) diff --git a/GUIs.ZooFlow/ZooFlow.vbproj b/GUIs.ZooFlow/ZooFlow.vbproj index 46fec9b8..ced5dc57 100644 --- a/GUIs.ZooFlow/ZooFlow.vbproj +++ b/GUIs.ZooFlow/ZooFlow.vbproj @@ -210,6 +210,7 @@ MyDataset.xsd + frmFlowSearch.vb diff --git a/GUIs.ZooFlow/frmFlowForm.vb b/GUIs.ZooFlow/frmFlowForm.vb index dce6003e..2fea22d7 100644 --- a/GUIs.ZooFlow/frmFlowForm.vb +++ b/GUIs.ZooFlow/frmFlowForm.vb @@ -276,7 +276,7 @@ Public Class frmFlowForm End If oSQL = "SELECT * FROM TBIDB_ATTRIBUTE" - My.DTAttributes = AppServerOrDB.GetDatatable("IDB", oSQL, "TBIDB_ATTRIBUTE", "", "") + My.Tables.DTIDB_ATTRIBUTE = AppServerOrDB.GetDatatable("IDB", oSQL, "TBIDB_ATTRIBUTE", "", "") Me.Cursor = Cursors.Default End Sub @@ -408,7 +408,7 @@ Public Class frmFlowForm Exit Sub End If Dim oSQLFlowSearch As String = "" - For Each oRow As DataRow In My.DTCOMMON_SQL.Rows + For Each oRow As DataRow In My.Tables.DTIDB_COMMON_SQL.Rows If oRow.Item("TITLE") = SQLCMD_FLOW_SEARCH_LOWER_LIMIT Then oSQLFlowSearch = oRow.Item("SQL_COMMAND") diff --git a/GUIs.ZooFlow/frmtest.vb b/GUIs.ZooFlow/frmtest.vb index d0d85b88..ad1f4041 100644 --- a/GUIs.ZooFlow/frmtest.vb +++ b/GUIs.ZooFlow/frmtest.vb @@ -17,14 +17,14 @@ Public Class frmtest End If End If - oString = _Client.NewFileStoreObject(txtIDB_OBJ_ID.Text, txtFilestoreType.Text, txtDate.Text, oextension, oKeepExtension) + oString = My.Application.Service.Client.NewFileStoreObject(txtIDB_OBJ_ID.Text, txtFilestoreType.Text, txtDate.Text, oextension, oKeepExtension) txtIDBFOPath.Text = oString End Sub Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click Dim oString As String - oString = _Client.NewIDB_OBJ_ID("DOC", My.Application.User.UserName, "") + oString = My.Application.Service.Client.NewIDB_OBJ_ID("DOC", My.Application.User.UserName, "") txtIDB_OBJ_ID.Text = oString End Sub @@ -36,7 +36,7 @@ Public Class frmtest Using oMemoryStream As New MemoryStream oStream.CopyTo(oMemoryStream) Dim oContents As Byte() = oMemoryStream.ToArray() - oResult = Await _Client.ImportIDBFOAsync(oContents, My.Application.User.UserName, txtIDB_OBJ_ID.Text, 1, txtIDBFOPath.Text) + oResult = Await My.Application.Service.Client.ImportIDBFOAsync(oContents, My.Application.User.UserName, txtIDB_OBJ_ID.Text, 1, txtIDBFOPath.Text) End Using End Using diff --git a/GUIs.ZooFlow/modCurrent.vb b/GUIs.ZooFlow/modCurrent.vb index a3df0f48..b80e4543 100644 --- a/GUIs.ZooFlow/modCurrent.vb +++ b/GUIs.ZooFlow/modCurrent.vb @@ -1,7 +1,6 @@ Imports DigitalData.Modules.EDMI.API Module modCurrent - Public Property _Client As Client Public Property ADDITIONAL_TITLE As String Public Property DT_CONNECTIONS As DataTable Public Property CURR_MISSING_PATTERN_NAME = "Email To"