EDMIService: sEcond working version
This commit is contained in:
@@ -305,9 +305,9 @@ Public Class frmGlobix_Index
|
||||
End Sub
|
||||
Sub Refresh_Dokart()
|
||||
Try
|
||||
Dim oSql = String.Format("select * from VWGI_DOCTYPE where UPPER(USERNAME) = UPPER('{0}') ORDER BY SEQUENCE", My.Application.User.UserName)
|
||||
Dim oFilter = $"USERNAME = '{My.Application.User.UserName}'"
|
||||
DT_VWGI_DOCTYPE = _DataASorDB.GetDatatable("DD_ECM", oSql, "VWGI_DOCTYPE", oFilter, "SEQUENCE")
|
||||
Dim oSql = String.Format("select * from VWGI_DOCTYPE_IDB where UPPER(USERNAME) = UPPER('{0}') ORDER BY SEQUENCE", My.Application.User.UserName)
|
||||
'Dim oFilter = $"USERNAME = '{My.Application.User.UserName}'"
|
||||
DT_VWGI_DOCTYPE = _DataASorDB.GetDatatable("DD_ECM", oSql, "VWGI_DOCTYPE_IDB", "", "SEQUENCE")
|
||||
|
||||
For Each oRow As DataRow In DT_VWGI_DOCTYPE.Rows
|
||||
cmbDocType.Properties.Items.Add(New DocType With {
|
||||
@@ -2415,7 +2415,11 @@ Public Class frmGlobix_Index
|
||||
|
||||
Private Async Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
||||
Dim oDokart As DocType = cmbDocType.SelectedItem
|
||||
Await GlobixFlowNew(oDokart)
|
||||
Dim oResult = Await GlobixFlowNew(oDokart)
|
||||
If oResult = True Then
|
||||
CancelAttempts = MaxCancelAttempts
|
||||
Close()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Async Function GlobixFlowNew(pDocType As DocType) As Threading.Tasks.Task(Of Boolean)
|
||||
@@ -2425,26 +2429,29 @@ Public Class frmGlobix_Index
|
||||
Cursor = Cursors.WaitCursor
|
||||
|
||||
Dim oValidator As New ClassValidator(My.LogConfig, My.Application.Service.Client)
|
||||
If oValidator.ValidateControls(pnlIndex.Controls, pDocType) = False Then
|
||||
If oValidator.ValidateControls(pnlIndex, pDocType) = False Then
|
||||
Return False
|
||||
End If
|
||||
|
||||
'TODO: Globix File Import
|
||||
Dim oValues = oValidator.GetControlValues(pnlIndex)
|
||||
|
||||
Dim oFileName As String
|
||||
Dim oObjectStore As String
|
||||
Dim oObjectKind As String
|
||||
Dim oBusinessENtity As String
|
||||
Dim oProfileId As Integer
|
||||
Dim oAttributes As List(Of UserAttributeValue)
|
||||
Dim oFileName As String = My.Application.Globix.CURRENT_WORKFILE
|
||||
Dim oObjectStore As String = "WORK"
|
||||
Dim oObjectKind As String = "DOC"
|
||||
Dim oBusinessEntity As String = "DEFAULT"
|
||||
Dim oProfileId As Integer = My.Application.Globix.CURRENT_DOCTYPE_ID
|
||||
Dim oAttributes As List(Of UserAttributeValue) = oValues
|
||||
Dim oOptions As New Modules.EDMI.API.Options.ImportFileOptions
|
||||
|
||||
Await My.Application.Service.Client.ImportFileAsync(oFileName, oProfileId, oAttributes, oObjectStore, oObjectKind, oBusinessENtity, oOptions)
|
||||
Await My.Application.Service.Client.ImportFileAsync(oFileName, oProfileId, oAttributes, oObjectStore, oObjectKind, oBusinessEntity, oOptions)
|
||||
|
||||
MsgBox("Die Datei wurde erfolgreich verarbeitet!", MsgBoxStyle.Information, Text)
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
_Logger.Error(ex)
|
||||
MsgBox("Indexierung fehlgeschlagen!", MsgBoxStyle.Critical, Text)
|
||||
Return False
|
||||
|
||||
Finally
|
||||
Cursor = Cursors.Default
|
||||
|
||||
Reference in New Issue
Block a user