30 lines
1.3 KiB
VB.net
30 lines
1.3 KiB
VB.net
Imports DigitalData.Modules.Database
|
|
Imports DigitalData.Modules.Logging
|
|
Imports DigitalData.Services.EDMIService
|
|
|
|
Public Class frmRelations
|
|
Private DB As MSSQLServer
|
|
Private LogConfig As LogConfig
|
|
|
|
Private Sub frmRelations_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
|
LogConfig = New LogConfig(LogConfig.PathType.CustomPath, Application.StartupPath)
|
|
DB = New MSSQLServer(LogConfig, "Server=SDD-VMP04-SQL17\DD_DEVELOP01;Database=DD_ECM_TEST;User Id=sa;Password=dd;")
|
|
|
|
Dim oDataSet As New DataSet()
|
|
|
|
Dim oUsers = DB.GetDatatable("SELECT * FROM TBDD_USER")
|
|
oUsers.TableName = "TBDD_USER"
|
|
Dim oGroupUser = DB.GetDatatable("SELECT * FROM TBDD_GROUPS_USER")
|
|
oGroupUser.TableName = "TBDD_GROUPS_USER"
|
|
|
|
Dim oCronDetails As DataTable = DB.GetDatatable("SELECT * FROM TBAPPSERV_CRON_DETAIL WHERE DT_NAME = 'TBDD_USER'")
|
|
|
|
Dim oListener As New DigitalData.Services.EDMIService.JobListener(LogConfig, DB, oDataSet)
|
|
oListener.SaveDataTables(New DigitalData.Services.EDMIService.JobResult() With {
|
|
.Table = oUsers,
|
|
.TableRelationColumn = "GUID",
|
|
.ChildTable = oGroupUser,
|
|
.ChildRelationColumn = "USER_ID"
|
|
}, oCronDetails.Rows.Item(0))
|
|
End Sub
|
|
End Class |