Compare commits
5 Commits
ac5ab2a9b3
...
91d769d6b9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
91d769d6b9 | ||
|
|
2eb5f5f057 | ||
|
|
865c9df359 | ||
|
|
35c13eb81d | ||
|
|
9b10bc80e1 |
@@ -25,14 +25,19 @@ Public Class frmRelations
|
|||||||
|
|
||||||
DetailRow = oCronDetails.Rows.Item(0)
|
DetailRow = oCronDetails.Rows.Item(0)
|
||||||
JobResult = New JobResult() With {
|
JobResult = New JobResult() With {
|
||||||
|
.Tables = New List(Of JobResult.ResultTable) From {
|
||||||
|
New JobResult.ResultTable() With {
|
||||||
.Table = oUsers,
|
.Table = oUsers,
|
||||||
.TableRelationColumn = "GUID",
|
.TableRelationColumn = "GUID",
|
||||||
.ChildTable = oGroupUser,
|
.ChildTable = oGroupUser,
|
||||||
.ChildRelationColumn = "USER_ID"
|
.ChildRelationColumn = "USER_ID"
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
||||||
JobListener.SaveDataTables(JobResult, DetailRow)
|
JobListener.SaveDataTables(JobResult.Tables.First)
|
||||||
End Sub
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
@@ -72,7 +72,7 @@
|
|||||||
<Import Include="System.Threading.Tasks" />
|
<Import Include="System.Threading.Tasks" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Rights.vb" />
|
<Compile Include="Client\Rights.vb" />
|
||||||
<Compile Include="Client\Channel.vb" />
|
<Compile Include="Client\Channel.vb" />
|
||||||
<Compile Include="Connected Services\EDMIServiceReference\Reference.vb">
|
<Compile Include="Connected Services\EDMIServiceReference\Reference.vb">
|
||||||
<AutoGen>True</AutoGen>
|
<AutoGen>True</AutoGen>
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ Interface IEDMIService
|
|||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "Access Rights"
|
#Region "Access Rights"
|
||||||
|
<OperationContract>
|
||||||
Function GetAccessRight(UserId As Long, ObjectId As Long) As AccessRightResult
|
Function GetAccessRight(UserId As Long, ObjectId As Long) As AccessRightResult
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|||||||
@@ -28,11 +28,14 @@ Public Class DatatableJob
|
|||||||
Dim oCronDetails As DataTable = oMSSQL.GetDatatable(oCronSQL)
|
Dim oCronDetails As DataTable = oMSSQL.GetDatatable(oCronSQL)
|
||||||
|
|
||||||
For Each oRow As DataRow In oCronDetails.Rows
|
For Each oRow As DataRow In oCronDetails.Rows
|
||||||
|
Dim oDatatableName As String = NotNull(oRow.Item("DT_NAME"), String.Empty)
|
||||||
|
Dim oParentColumn As String = NotNull(oRow.Item("DT_COLUMN"), String.Empty)
|
||||||
|
Dim oChildColumn As String = NotNull(oRow.Item("CHILD_DT_COLUMN"), String.Empty)
|
||||||
Dim oConnectionId As Integer = NotNull(oRow.Item("CON_ID"), String.Empty)
|
Dim oConnectionId As Integer = NotNull(oRow.Item("CON_ID"), String.Empty)
|
||||||
Dim oTitle As String = NotNull(oRow.Item("TITLE"), String.Empty)
|
Dim oTitle As String = NotNull(oRow.Item("TITLE"), String.Empty)
|
||||||
Dim oSQL As String = NotNull(oRow.Item("COMMAND"), String.Empty)
|
Dim oSQL As String = NotNull(oRow.Item("COMMAND"), String.Empty)
|
||||||
Dim oDatatableName As String = NotNull(oRow.Item("DT_NAME"), String.Empty)
|
|
||||||
|
|
||||||
|
Try
|
||||||
oLogger.Debug("Running Command-Job [{0}]", oTitle)
|
oLogger.Debug("Running Command-Job [{0}]", oTitle)
|
||||||
oLogger.Debug("Datatable Name: {0}", oDatatableName)
|
oLogger.Debug("Datatable Name: {0}", oDatatableName)
|
||||||
oLogger.Debug("Connection Id: {0}", oConnectionId)
|
oLogger.Debug("Connection Id: {0}", oConnectionId)
|
||||||
@@ -50,8 +53,6 @@ Public Class DatatableJob
|
|||||||
Dim oChildTableNAme As String = NotNull(oRow.Item("CHILD_DT_NAME"), String.Empty)
|
Dim oChildTableNAme As String = NotNull(oRow.Item("CHILD_DT_NAME"), String.Empty)
|
||||||
|
|
||||||
If oChildTableNAme <> String.Empty Then
|
If oChildTableNAme <> String.Empty Then
|
||||||
Dim oParentColumn As String = NotNull(oRow.Item("DT_COLUMN"), String.Empty)
|
|
||||||
Dim oChildColumn As String = NotNull(oRow.Item("CHILD_DT_COLUMN"), String.Empty)
|
|
||||||
oLogger.Debug("Child Datatable [{0}] defined, Relation: Parent [{1}] -> Child [{2}]", oChildTableNAme, oParentColumn, oChildColumn)
|
oLogger.Debug("Child Datatable [{0}] defined, Relation: Parent [{1}] -> Child [{2}]", oChildTableNAme, oParentColumn, oChildColumn)
|
||||||
|
|
||||||
Dim oChildTable As DataTable = oMSSQL.GetDatatableWithConnection($"SELECT * FROM {oChildTableNAme}", oConnectionString)
|
Dim oChildTable As DataTable = oMSSQL.GetDatatableWithConnection($"SELECT * FROM {oChildTableNAme}", oConnectionString)
|
||||||
@@ -65,6 +66,10 @@ Public Class DatatableJob
|
|||||||
|
|
||||||
oLogger.Info("Fetched Datatable [{0}]", oDatatableName)
|
oLogger.Info("Fetched Datatable [{0}]", oDatatableName)
|
||||||
oResult.Tables.Add(oResultTable)
|
oResult.Tables.Add(oResultTable)
|
||||||
|
Catch ex As Exception
|
||||||
|
oLogger.Warn("Execute: Error while saving Table: [{0}]", oDatatableName)
|
||||||
|
oLogger.Error(ex)
|
||||||
|
End Try
|
||||||
Next
|
Next
|
||||||
|
|
||||||
' Das Ergebnis speichern
|
' Das Ergebnis speichern
|
||||||
@@ -72,7 +77,7 @@ Public Class DatatableJob
|
|||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
oLogger.Error(ex)
|
oLogger.Error(ex)
|
||||||
oLogger.Warn("Unhandled exception while executing SQL for Datatable {0}", oCronJobTitle)
|
oLogger.Warn("Execute: Unhandled exception while executing SQL for Datatable {0}", oCronJobTitle)
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
Return Task.FromResult(True)
|
Return Task.FromResult(True)
|
||||||
|
|||||||
Reference in New Issue
Block a user