This commit is contained in:
SchreiberM
2017-02-01 12:33:22 +01:00
parent 877eaa2411
commit 5023a28d75
52 changed files with 7752 additions and 3992 deletions

View File

@@ -1,5 +1,5 @@
Imports System.IO
Imports DD_LIB_Standards
Public Class frmWD_EntityImport
Private LOCAL_IMPORTFILE As String
Private LOCAL_NEWFILESTRING As String
@@ -11,7 +11,7 @@ Public Class frmWD_EntityImport
Private Sub frmWD_EntityImport_Load(sender As Object, e As EventArgs) Handles Me.Load
Me.txtEntityString.Text = CURRENT_ENTITYSTRING
If ClassWindream.Init = True Then
If clsWindream.SESSION_CREATED = True Then
ObjektTypenEintragen()
End If
@@ -25,7 +25,7 @@ Public Class frmWD_EntityImport
' Combobox leeren
Me.cmbObjekttyp.Items.Clear()
' alle Objekttypen durchlaufen
For Each oDokumentTyp In ClassWindream.GetObjecttypesAsObjects
For Each oDokumentTyp In clsWD_GET.GetObjecttypesAsObjects
' und in die Combobox eintragen
Me.cmbObjekttyp.Items.Add(oDokumentTyp.aName)
Next
@@ -139,42 +139,42 @@ Public Class frmWD_EntityImport
End Sub
Private Function WINDREAM_IMPORT()
Try
ClassWindream._WDObjekttyp = Me.cmbObjekttyp.Text
Dim streamresult = ClassWindream.Stream_File(LOCAL_IMPORTFILE, LOCAL_TARGET_PATH)
clsWindream.MY_WDOBJECTTYPE = Me.cmbObjekttyp.Text
Dim streamresult = clsWD_SET.Stream_File(LOCAL_IMPORTFILE, LOCAL_TARGET_PATH)
'Dim type = streamresult.GetType
If streamresult = True Then
Dim indexierung_erfolgreich As Boolean = False
'den Entity-Key auslesen
Dim sql As String = "Select Top 1 * from TBPMO_WD_OBJECTTYPE where Upper(object_type) = Upper('" & ClassWindream._WDObjekttyp & "')"
Dim sql As String = "Select Top 1 * from TBPMO_WD_OBJECTTYPE where Upper(object_type) = Upper('" & clsWindream.MY_WDOBJECTTYPE & "')"
Dim dt As DataTable = ClassDatabase.Return_Datatable(sql, True)
If Not dt Is Nothing Then
If dt.Rows.Count = 1 Then
Dim indexname = dt.Rows(0).Item("IDXNAME_ENTITYID").ToString
Dim idxvalue = CURRENT_ENTITY_ID
If LogErrorsOnly = False Then ClassLogger.Add(" >> Entity-ID: " & idxvalue.ToString, False)
indexierung_erfolgreich = ClassWindream.IndexFile(CURRENT_FILEIN_WD, indexname, idxvalue)
indexierung_erfolgreich = clsWD_SET.IndexFile(CURRENT_FILEIN_WD, indexname, idxvalue, clsWindream.MY_WDOBJECTTYPE)
If indexierung_erfolgreich = False Then
MsgBox("Error in indexing file Entity - See log", MsgBoxStyle.Critical)
End If
indexname = dt.Rows(0).Item("IDXNAME_PARENTID").ToString
idxvalue = CURRENT_PARENT_ENTITY_ID
If LogErrorsOnly = False Then ClassLogger.Add(" >> Parent-ID: " & idxvalue.ToString, False)
indexierung_erfolgreich = ClassWindream.IndexFile(CURRENT_FILEIN_WD, indexname, idxvalue)
indexierung_erfolgreich = clsWD_SET.IndexFile(CURRENT_FILEIN_WD, indexname, idxvalue, clsWindream.MY_WDOBJECTTYPE)
If indexierung_erfolgreich = False Then MsgBox("Error in indexing file Parent-ID - See log", MsgBoxStyle.Critical)
'###
'den Record-Key auslesen
indexname = dt.Rows(0).Item("IDXNAME_PARENTID").ToString
idxvalue = CURRENT_RECORD_ID
If LogErrorsOnly = False Then ClassLogger.Add(" >> Record-ID: " & idxvalue.ToString, False)
indexierung_erfolgreich = ClassWindream.IndexFile(CURRENT_FILEIN_WD, indexname, idxvalue)
indexierung_erfolgreich = clsWD_SET.IndexFile(CURRENT_FILEIN_WD, indexname, idxvalue, clsWindream.MY_WDOBJECTTYPE)
If indexierung_erfolgreich = False Then MsgBox("Unexpected Error in indexing file Record-ID - See log", MsgBoxStyle.Critical)
'den Doctype-Key auslesen
indexname = dt.Rows(0).Item("IDXNAME_DOCTYPE").ToString
idxvalue = CURRENT_DOKARTSTRING
If LogErrorsOnly = False Then ClassLogger.Add(" >> Doctype: " & idxvalue.ToString, False)
indexierung_erfolgreich = ClassWindream.IndexFile(CURRENT_FILEIN_WD, indexname, idxvalue)
indexierung_erfolgreich = clsWD_SET.IndexFile(CURRENT_FILEIN_WD, indexname, idxvalue, clsWindream.MY_WDOBJECTTYPE)
If indexierung_erfolgreich = False Then MsgBox("Unexpected Error in indexing file Doctype - See log", MsgBoxStyle.Critical)
'####
End If