This commit is contained in:
Jonathan Jenne 2021-05-17 10:37:43 +02:00
parent d038beedfe
commit 9d51d4ffb9
16 changed files with 52 additions and 40 deletions

View File

@ -43,9 +43,13 @@ Public Class ClassDetailPages
Public IsInsert As Boolean = False
Public TabPage As XtraTabPage
Public Name As String
<Description("The Binding Source for the Form")>
Public BindingSource As BindingSource
<Description("The Bound Datatable in the Dataset (eg. MyDataset.TB_FOO_TABLE)")>
Public DataTable As DataTable
<Description("The TextEdit Control containing the AddedWho value")>
Public AddedWhoEdit As TextEdit
<Description("The TextEdit Control containing the ChangedWhoEdit value")>
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

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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()

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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)

View File

@ -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 {

View File

@ -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

View File

@ -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)

View File

@ -210,6 +210,7 @@
<Compile Include="MyDataset.vb">
<DependentUpon>MyDataset.xsd</DependentUpon>
</Compile>
<Compile Include="Queries\ClassTables.vb" />
<Compile Include="Search\frmFlowSearch.Designer.vb">
<DependentUpon>frmFlowSearch.vb</DependentUpon>
</Compile>

View File

@ -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")

View File

@ -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

View File

@ -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"