EDMIService: WIP
This commit is contained in:
@@ -116,7 +116,7 @@
|
||||
<userSettings>
|
||||
<DigitalData.GUIs.ZooFlow.Settings>
|
||||
<setting name="IDBOBJID" serializeAs="String">
|
||||
<value>17255</value>
|
||||
<value />
|
||||
</setting>
|
||||
</DigitalData.GUIs.ZooFlow.Settings>
|
||||
</userSettings>
|
||||
|
||||
4
GUIs.ZooFlow/ClassStrings.vb
Normal file
4
GUIs.ZooFlow/ClassStrings.vb
Normal file
@@ -0,0 +1,4 @@
|
||||
Public Class ClassStrings
|
||||
Public Const TEXT_MISSING_INPUT = "Bitte vervollständigen Sie die Eingaben!"
|
||||
Public Const TITLE_MISSING_INPUT = "Fehlende Eingaben"
|
||||
End Class
|
||||
137
GUIs.ZooFlow/Globix/ClassValidator.vb
Normal file
137
GUIs.ZooFlow/Globix/ClassValidator.vb
Normal file
@@ -0,0 +1,137 @@
|
||||
Imports DigitalData.Controls.LookupGrid
|
||||
Imports DigitalData.GUIs.ZooFlow.Base
|
||||
Imports DigitalData.GUIs.ZooFlow.frmGlobix_Index
|
||||
Imports DigitalData.Modules.EDMI.API
|
||||
Imports DigitalData.Modules.Logging
|
||||
|
||||
Public Class ClassValidator
|
||||
Inherits BaseClass
|
||||
|
||||
Private ReadOnly Client As Client
|
||||
|
||||
Public Sub New(pLogConfig As LogConfig, pClient As Client)
|
||||
MyBase.New(pLogConfig)
|
||||
Client = pClient
|
||||
End Sub
|
||||
|
||||
Private Function TestIsIndexOptional(pDocType As DocType, pIndexName As String) As Boolean
|
||||
Dim oIsOptional As Boolean = My.Helpers.GetValueFromDatatable(
|
||||
My.Application.Globix.CURR_DT_MAN_INDEXE,
|
||||
$"DOK_ID = {pDocType.Guid} AND INDEXNAME = '{pIndexName}'", "OPTIONAL", "")
|
||||
|
||||
Return oIsOptional
|
||||
End Function
|
||||
|
||||
Private Sub ShowValidationMessage()
|
||||
MsgBox(ClassStrings.TEXT_MISSING_INPUT, MsgBoxStyle.Exclamation, ClassStrings.TITLE_MISSING_INPUT)
|
||||
End Sub
|
||||
|
||||
Function ValidateControls(pControls As ControlCollection, pDocType As DocType) As Boolean
|
||||
Try
|
||||
Logger.Debug("Starting [ValidateControls]")
|
||||
Dim result As Boolean = True
|
||||
|
||||
For Each oControl As Control In pControls
|
||||
|
||||
' ========================= TEXT BOX =========================
|
||||
If oControl.Name.StartsWith("txt") Then
|
||||
Dim oTextBox As DevExpress.XtraEditors.TextEdit = oControl
|
||||
If oTextBox.Text = "" Then
|
||||
Dim oIndexName = Replace(oTextBox.Name, "txt", "")
|
||||
Dim oOptional = TestIsIndexOptional(pDocType, oIndexName)
|
||||
|
||||
If oOptional = False Then
|
||||
ShowValidationMessage()
|
||||
oTextBox.Focus()
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
' ========================= LOOKUP =========================
|
||||
If oControl.Name.StartsWith("cmbMulti") Then
|
||||
Dim oLookup = DirectCast(oControl, LookupControl3)
|
||||
Dim oValues As List(Of String) = oLookup.Properties.SelectedValues
|
||||
|
||||
If oValues.Count = 0 Then
|
||||
Dim oIndexName = Replace(oLookup.Name, "cmbMulti", "")
|
||||
Dim oOptional = TestIsIndexOptional(pDocType, oIndexName)
|
||||
|
||||
If oOptional = False Then
|
||||
ShowValidationMessage()
|
||||
oLookup.Focus()
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
' ========================= COMBO BOX =========================
|
||||
If oControl.Name.StartsWith("cmbSingle") Then
|
||||
Dim cmbSingle As TextBox = oControl
|
||||
|
||||
If cmbSingle.Text = "" Then
|
||||
Dim oIndexName = Replace(cmbSingle.Name, "cmbSingle", "")
|
||||
Dim oOptional = TestIsIndexOptional(pDocType, oIndexName)
|
||||
|
||||
If oOptional = False Then
|
||||
ShowValidationMessage()
|
||||
cmbSingle.Focus()
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If oControl.Name.StartsWith("cmb") Then
|
||||
Dim cmb As ComboBox = oControl
|
||||
If cmb.Text = "" Then
|
||||
Dim oIndexName = Replace(cmb.Name, "cmb", "")
|
||||
Dim oOptional = TestIsIndexOptional(pDocType, oIndexName)
|
||||
|
||||
If oOptional = False Then
|
||||
ShowValidationMessage()
|
||||
cmb.Focus()
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
' ========================= DATE PICKER =========================
|
||||
If oControl.Name.StartsWith("dtp") Then
|
||||
Dim dtp As DevExpress.XtraEditors.DateEdit = oControl
|
||||
Dim oIndexName As String = Replace(dtp.Name, "dtp", "")
|
||||
|
||||
If dtp.Text = String.Empty Then
|
||||
Dim oOptional = TestIsIndexOptional(pDocType, oIndexName)
|
||||
|
||||
If oOptional = False Then
|
||||
ShowValidationMessage()
|
||||
dtp.Focus()
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
' ========================= CHECK BOX =========================
|
||||
If oControl.Name.StartsWith("chk") Then
|
||||
Dim chk As CheckBox = oControl
|
||||
'result = True
|
||||
End If
|
||||
|
||||
'If TypeOf (oControl) Is Button Then
|
||||
' Continue For
|
||||
'End If
|
||||
|
||||
'If oControl.Name.StartsWith("lbl") = False And result = False Then
|
||||
' Logger.Info("Die Überprüfung der manuellen Indices ist fehlerhaft. Bitte informieren Sie den Systembetreuer")
|
||||
' Return False
|
||||
'End If
|
||||
Next
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
Logger.Warn("Unvorhergesehener Fehler in ValidateControls")
|
||||
Logger.Error(ex.Message)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
End Class
|
||||
54
GUIs.ZooFlow/Globix/frmGlobix_Index.Designer.vb
generated
54
GUIs.ZooFlow/Globix/frmGlobix_Index.Designer.vb
generated
@@ -52,9 +52,10 @@ Partial Class frmGlobix_Index
|
||||
Me.SplitContainerControl1 = New DevExpress.XtraEditors.SplitContainerControl()
|
||||
Me.pnlIndex = New System.Windows.Forms.Panel()
|
||||
Me.Panel3 = New System.Windows.Forms.Panel()
|
||||
Me.Button1 = New System.Windows.Forms.Button()
|
||||
Me.btnAblageFlow = New System.Windows.Forms.Button()
|
||||
Me.Panel1 = New System.Windows.Forms.Panel()
|
||||
Me.ComboBoxEdit1 = New DevExpress.XtraEditors.ComboBoxEdit()
|
||||
Me.cmbDocType = New DevExpress.XtraEditors.ComboBoxEdit()
|
||||
Me.DocumentViewer1 = New DigitalData.Controls.DocumentViewer.DocumentViewer()
|
||||
Me.GlobixDataset = New DigitalData.GUIs.ZooFlow.GlobixDataset()
|
||||
CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
@@ -62,7 +63,7 @@ Partial Class frmGlobix_Index
|
||||
Me.SplitContainerControl1.SuspendLayout()
|
||||
Me.Panel3.SuspendLayout()
|
||||
Me.Panel1.SuspendLayout()
|
||||
CType(Me.ComboBoxEdit1.Properties, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.cmbDocType.Properties, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.GlobixDataset, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
@@ -263,6 +264,7 @@ Partial Class frmGlobix_Index
|
||||
'
|
||||
'Panel3
|
||||
'
|
||||
Me.Panel3.Controls.Add(Me.Button1)
|
||||
Me.Panel3.Controls.Add(Me.btnAblageFlow)
|
||||
Me.Panel3.Dock = System.Windows.Forms.DockStyle.Bottom
|
||||
Me.Panel3.Location = New System.Drawing.Point(0, 433)
|
||||
@@ -270,24 +272,35 @@ Partial Class frmGlobix_Index
|
||||
Me.Panel3.Size = New System.Drawing.Size(522, 75)
|
||||
Me.Panel3.TabIndex = 2
|
||||
'
|
||||
'Button1
|
||||
'
|
||||
Me.Button1.Font = New System.Drawing.Font("Tahoma", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.Button1.ImageAlign = System.Drawing.ContentAlignment.MiddleRight
|
||||
Me.Button1.Location = New System.Drawing.Point(317, 15)
|
||||
Me.Button1.Name = "Button1"
|
||||
Me.Button1.Size = New System.Drawing.Size(186, 44)
|
||||
Me.Button1.TabIndex = 1
|
||||
Me.Button1.Text = "Starte Ablage (Neu)"
|
||||
Me.Button1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
Me.Button1.UseVisualStyleBackColor = True
|
||||
'
|
||||
'btnAblageFlow
|
||||
'
|
||||
Me.btnAblageFlow.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.btnAblageFlow.Font = New System.Drawing.Font("Tahoma", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.btnAblageFlow.Font = New System.Drawing.Font("Tahoma", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.btnAblageFlow.Image = Global.DigitalData.GUIs.ZooFlow.My.Resources.Resources.ZooFlow_g_64___Kopie
|
||||
Me.btnAblageFlow.ImageAlign = System.Drawing.ContentAlignment.MiddleRight
|
||||
Me.btnAblageFlow.Location = New System.Drawing.Point(0, 0)
|
||||
Me.btnAblageFlow.Location = New System.Drawing.Point(12, 6)
|
||||
Me.btnAblageFlow.Name = "btnAblageFlow"
|
||||
Me.btnAblageFlow.Size = New System.Drawing.Size(522, 75)
|
||||
Me.btnAblageFlow.Size = New System.Drawing.Size(185, 63)
|
||||
Me.btnAblageFlow.TabIndex = 1
|
||||
Me.btnAblageFlow.Text = "Starte Ablage"
|
||||
Me.btnAblageFlow.Text = "Starte Ablage (Alt)"
|
||||
Me.btnAblageFlow.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
Me.btnAblageFlow.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Panel1
|
||||
'
|
||||
Me.Panel1.BackColor = System.Drawing.Color.Silver
|
||||
Me.Panel1.Controls.Add(Me.ComboBoxEdit1)
|
||||
Me.Panel1.Controls.Add(Me.cmbDocType)
|
||||
Me.Panel1.Dock = System.Windows.Forms.DockStyle.Top
|
||||
Me.Panel1.Location = New System.Drawing.Point(0, 0)
|
||||
Me.Panel1.Name = "Panel1"
|
||||
@@ -296,18 +309,18 @@ Partial Class frmGlobix_Index
|
||||
'
|
||||
'ComboBoxEdit1
|
||||
'
|
||||
Me.ComboBoxEdit1.Dock = System.Windows.Forms.DockStyle.Top
|
||||
Me.ComboBoxEdit1.Location = New System.Drawing.Point(0, 0)
|
||||
Me.ComboBoxEdit1.MenuManager = Me.RibbonControl1
|
||||
Me.ComboBoxEdit1.Name = "ComboBoxEdit1"
|
||||
Me.cmbDocType.Dock = System.Windows.Forms.DockStyle.Top
|
||||
Me.cmbDocType.Location = New System.Drawing.Point(0, 0)
|
||||
Me.cmbDocType.MenuManager = Me.RibbonControl1
|
||||
Me.cmbDocType.Name = "ComboBoxEdit1"
|
||||
SerializableAppearanceObject1.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(214, Byte), Integer), CType(CType(49, Byte), Integer))
|
||||
SerializableAppearanceObject1.Options.UseBackColor = True
|
||||
Me.ComboBoxEdit1.Properties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo, "", 20, True, True, False, EditorButtonImageOptions1, New DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), SerializableAppearanceObject1, SerializableAppearanceObject2, SerializableAppearanceObject3, SerializableAppearanceObject4, "", Nothing, Nothing, DevExpress.Utils.ToolTipAnchor.[Default])})
|
||||
Me.ComboBoxEdit1.Properties.ButtonsStyle = DevExpress.XtraEditors.Controls.BorderStyles.UltraFlat
|
||||
Me.ComboBoxEdit1.Properties.NullText = "Bitte wählen Sie ein Profil"
|
||||
Me.ComboBoxEdit1.Properties.Padding = New System.Windows.Forms.Padding(5)
|
||||
Me.ComboBoxEdit1.Size = New System.Drawing.Size(522, 30)
|
||||
Me.ComboBoxEdit1.TabIndex = 4
|
||||
Me.cmbDocType.Properties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo, "", 20, True, True, False, EditorButtonImageOptions1, New DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), SerializableAppearanceObject1, SerializableAppearanceObject2, SerializableAppearanceObject3, SerializableAppearanceObject4, "", Nothing, Nothing, DevExpress.Utils.ToolTipAnchor.[Default])})
|
||||
Me.cmbDocType.Properties.ButtonsStyle = DevExpress.XtraEditors.Controls.BorderStyles.UltraFlat
|
||||
Me.cmbDocType.Properties.NullText = "Bitte wählen Sie ein Profil"
|
||||
Me.cmbDocType.Properties.Padding = New System.Windows.Forms.Padding(5)
|
||||
Me.cmbDocType.Size = New System.Drawing.Size(522, 30)
|
||||
Me.cmbDocType.TabIndex = 4
|
||||
'
|
||||
'DocumentViewer1
|
||||
'
|
||||
@@ -342,7 +355,7 @@ Partial Class frmGlobix_Index
|
||||
Me.SplitContainerControl1.ResumeLayout(False)
|
||||
Me.Panel3.ResumeLayout(False)
|
||||
Me.Panel1.ResumeLayout(False)
|
||||
CType(Me.ComboBoxEdit1.Properties, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.cmbDocType.Properties, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.GlobixDataset, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
@@ -376,6 +389,7 @@ Partial Class frmGlobix_Index
|
||||
Friend WithEvents pnlIndex As Panel
|
||||
Friend WithEvents Panel3 As Panel
|
||||
Friend WithEvents GlobixDataset As GlobixDataset
|
||||
Friend WithEvents ComboBoxEdit1 As DevExpress.XtraEditors.ComboBoxEdit
|
||||
Friend WithEvents cmbDocType As DevExpress.XtraEditors.ComboBoxEdit
|
||||
Friend WithEvents btnAblageFlow As Button
|
||||
Friend WithEvents Button1 As Button
|
||||
End Class
|
||||
|
||||
@@ -11,6 +11,7 @@ Imports DigitalData.Modules.Language.Utils
|
||||
Imports DigitalData.Controls.LookupGrid
|
||||
Imports Independentsoft
|
||||
Imports DevExpress.XtraEditors.Controls
|
||||
Imports DigitalData.Modules.EDMI.API.EDMIServiceReference
|
||||
|
||||
Public Class frmGlobix_Index
|
||||
#Region "+++++ Variablen ++++++"
|
||||
@@ -51,11 +52,13 @@ Public Class frmGlobix_Index
|
||||
Return Name
|
||||
End Function
|
||||
End Class
|
||||
|
||||
Public Class ControlMeta
|
||||
Public Property IndexName As String
|
||||
Public Property IndexType As String
|
||||
Public Property MultipleValues As Boolean = False
|
||||
End Class
|
||||
|
||||
#End Region
|
||||
Public Sub New(LogConfig As LogConfig)
|
||||
|
||||
@@ -260,12 +263,12 @@ Public Class frmGlobix_Index
|
||||
checkItemPreselection.Checked = True
|
||||
|
||||
If My.Application.Globix.CURRENT_LASTDOCTYPE <> "" Then
|
||||
Dim oFoundDocType = ComboBoxEdit1.Properties.Items.
|
||||
Dim oFoundDocType = cmbDocType.Properties.Items.
|
||||
Cast(Of DocType)().
|
||||
Where(Function(dt) dt.Name = My.Application.Globix.CURRENT_LASTDOCTYPE).
|
||||
FirstOrDefault()
|
||||
If oFoundDocType IsNot Nothing Then
|
||||
ComboBoxEdit1.SelectedItem = oFoundDocType
|
||||
cmbDocType.SelectedItem = oFoundDocType
|
||||
End If
|
||||
|
||||
|
||||
@@ -278,13 +281,13 @@ Public Class frmGlobix_Index
|
||||
|
||||
_Logger.Debug("There is a match on REGEX_DOCTYPE: [{0}]", oRoW.Item("DOCTYPE"))
|
||||
_Logger.Debug("Regex: [{0}], FileName: [{1}]", oRoW.Item("Regex"), oOnlyFilename)
|
||||
Dim oFoundDocType = ComboBoxEdit1.Properties.Items.
|
||||
Dim oFoundDocType = cmbDocType.Properties.Items.
|
||||
Cast(Of DocType)().
|
||||
Where(Function(dt) dt.Name = My.Application.Globix.CURRENT_LASTDOCTYPE).
|
||||
FirstOrDefault()
|
||||
|
||||
If oFoundDocType IsNot Nothing Then
|
||||
ComboBoxEdit1.SelectedItem = oFoundDocType
|
||||
cmbDocType.SelectedItem = oFoundDocType
|
||||
End If
|
||||
Exit For
|
||||
End If
|
||||
@@ -307,7 +310,7 @@ Public Class frmGlobix_Index
|
||||
DT_VWGI_DOCTYPE = _DataASorDB.GetDatatable("DD_ECM", oSql, "VWGI_DOCTYPE", oFilter, "SEQUENCE")
|
||||
|
||||
For Each oRow As DataRow In DT_VWGI_DOCTYPE.Rows
|
||||
ComboBoxEdit1.Properties.Items.Add(New DocType With {
|
||||
cmbDocType.Properties.Items.Add(New DocType With {
|
||||
.Guid = oRow.Item("DOCTYPE_ID"),
|
||||
.Name = oRow.Item("DOCTYPE")
|
||||
})
|
||||
@@ -319,9 +322,9 @@ Public Class frmGlobix_Index
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub ComboBoxEdit1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBoxEdit1.SelectedIndexChanged
|
||||
If ComboBoxEdit1.SelectedIndex <> -1 And FormLoaded = True Then
|
||||
Dim oSelectedItem As DocType = ComboBoxEdit1.SelectedItem
|
||||
Private Sub ComboBoxEdit1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cmbDocType.SelectedIndexChanged
|
||||
If cmbDocType.SelectedIndex <> -1 And FormLoaded = True Then
|
||||
Dim oSelectedItem As DocType = cmbDocType.SelectedItem
|
||||
|
||||
My.Application.Globix.CURRENT_DOCTYPE_ID = oSelectedItem.Guid
|
||||
|
||||
@@ -393,8 +396,8 @@ Public Class frmGlobix_Index
|
||||
|
||||
_Controls = oControls
|
||||
If DT_INDEXEMAN.Rows.Count = 0 Then
|
||||
ShowError("Keine Manuellen Indizes für die " & vbNewLine & "Dokumentart " & ComboBoxEdit1.Text & " definiert")
|
||||
_Logger.Info(" - Keine Manuellen Indizes für die " & vbNewLine & "Dokumentart " & ComboBoxEdit1.Text & " definiert")
|
||||
ShowError("Keine Manuellen Indizes für die " & vbNewLine & "Dokumentart " & cmbDocType.Text & " definiert")
|
||||
_Logger.Info(" - Keine Manuellen Indizes für die " & vbNewLine & "Dokumentart " & cmbDocType.Text & " definiert")
|
||||
End If
|
||||
|
||||
For Each oRow As DataRow In DT_INDEXEMAN.Rows
|
||||
@@ -778,13 +781,15 @@ Public Class frmGlobix_Index
|
||||
Private Sub GlobixFlow()
|
||||
ClearError()
|
||||
ClearNotice()
|
||||
Me.Cursor = Cursors.WaitCursor
|
||||
Cursor = Cursors.WaitCursor
|
||||
Refresh_RegexTable()
|
||||
|
||||
For Each rowregex As DataRow In My.Application.Globix.DT_FUNCTION_REGEX.Rows
|
||||
If rowregex.Item("FUNCTION_NAME") = "CLEAN_FILENAME" Then
|
||||
My.Application.Globix.REGEX_CLEAN_FILENAME = rowregex.Item("REGEX")
|
||||
End If
|
||||
Next
|
||||
|
||||
If chkMultiindexing.Visibility = DevExpress.XtraBars.BarItemVisibility.Always And chkMultiindexing.Checked = True Then
|
||||
'Die erste Datei indexieren
|
||||
If WORK_FILE() = True Then
|
||||
@@ -854,7 +859,7 @@ Public Class frmGlobix_Index
|
||||
_Logger.Debug("Manuelle Indexe geladen")
|
||||
|
||||
If My.Application.Globix.CURR_DT_MAN_INDEXE.Rows.Count > 0 Then
|
||||
Dim oDokart As DocType = ComboBoxEdit1.SelectedItem
|
||||
Dim oDokart As DocType = cmbDocType.SelectedItem
|
||||
My.Application.Globix.CURRENT_DOCTYPE_ID = oDokart.Guid
|
||||
|
||||
If CheckWrite_IndexeMan(oDokart.Guid) = True Then
|
||||
@@ -2404,11 +2409,48 @@ Public Class frmGlobix_Index
|
||||
|
||||
End Function
|
||||
|
||||
Private Sub PictureEdit1_EditValueChanged(sender As Object, e As EventArgs)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub btnAblageFlow_Click(sender As Object, e As EventArgs) Handles btnAblageFlow.Click
|
||||
GlobixFlow()
|
||||
End Sub
|
||||
|
||||
Private Async Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
||||
Dim oDokart As DocType = cmbDocType.SelectedItem
|
||||
Await GlobixFlowNew(oDokart)
|
||||
End Sub
|
||||
|
||||
Private Async Function GlobixFlowNew(pDocType As DocType) As Threading.Tasks.Task(Of Boolean)
|
||||
Try
|
||||
ClearError()
|
||||
ClearNotice()
|
||||
Cursor = Cursors.WaitCursor
|
||||
|
||||
Dim oValidator As New ClassValidator(My.LogConfig, My.Application.Service.Client)
|
||||
If oValidator.ValidateControls(pnlIndex.Controls, pDocType) = False Then
|
||||
Return False
|
||||
End If
|
||||
|
||||
'TODO: Globix File Import
|
||||
|
||||
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 oOptions As New Modules.EDMI.API.Options.ImportFileOptions
|
||||
|
||||
Await My.Application.Service.Client.ImportFileAsync(oFileName, oProfileId, oAttributes, oObjectStore, oObjectKind, oBusinessENtity, oOptions)
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
_Logger.Error(ex)
|
||||
MsgBox("Indexierung fehlgeschlagen!", MsgBoxStyle.Critical, Text)
|
||||
|
||||
Finally
|
||||
Cursor = Cursors.Default
|
||||
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
4
GUIs.ZooFlow/My Project/Settings.Designer.vb
generated
4
GUIs.ZooFlow/My Project/Settings.Designer.vb
generated
@@ -14,7 +14,7 @@ Option Explicit On
|
||||
|
||||
|
||||
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.0.0"), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.8.1.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Partial Friend NotInheritable Class Settings
|
||||
Inherits Global.System.Configuration.ApplicationSettingsBase
|
||||
@@ -97,7 +97,7 @@ Partial Friend NotInheritable Class Settings
|
||||
|
||||
<Global.System.Configuration.UserScopedSettingAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Configuration.DefaultSettingValueAttribute("17255")> _
|
||||
Global.System.Configuration.DefaultSettingValueAttribute("")> _
|
||||
Public Property IDBOBJID() As String
|
||||
Get
|
||||
Return CType(Me("IDBOBJID"),String)
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<Value Profile="(Default)">Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=DD_ECM;Persist Security Info=True;User ID=sa;Password=dd</Value>
|
||||
</Setting>
|
||||
<Setting Name="IDBOBJID" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)">17255</Value>
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
@@ -200,6 +200,7 @@
|
||||
<Compile Include="ApplicationEvents.vb" />
|
||||
<Compile Include="Base\BaseClass.vb" />
|
||||
<Compile Include="ClassDragDrop.vb" />
|
||||
<Compile Include="ClassStrings.vb" />
|
||||
<Compile Include="ClipboardWatcher\ClassProfileLoader.vb" />
|
||||
<Compile Include="ClipboardWatcher\Watcher.vb" />
|
||||
<Compile Include="ClassCommandlineArgs.vb" />
|
||||
@@ -235,6 +236,7 @@
|
||||
</Compile>
|
||||
<Compile Include="Globix\ClassExclusions.vb" />
|
||||
<Compile Include="ClassHelpers.vb" />
|
||||
<Compile Include="Globix\ClassValidator.vb" />
|
||||
<Compile Include="Globix\frmGlobixNameconvention.Designer.vb">
|
||||
<DependentUpon>frmGlobixNameconvention.vb</DependentUpon>
|
||||
</Compile>
|
||||
|
||||
199
GUIs.ZooFlow/frmtest.Designer.vb
generated
199
GUIs.ZooFlow/frmtest.Designer.vb
generated
@@ -23,28 +23,19 @@ Partial Class frmtest
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.Label2 = New System.Windows.Forms.Label()
|
||||
Me.txtIDB_OBJ_ID = New System.Windows.Forms.TextBox()
|
||||
Me.txtFile2Import = New System.Windows.Forms.TextBox()
|
||||
Me.Button4 = New System.Windows.Forms.Button()
|
||||
Me.Button5 = New System.Windows.Forms.Button()
|
||||
Me.CheckBoxKeepExtension = New System.Windows.Forms.CheckBox()
|
||||
Me.Button6 = New System.Windows.Forms.Button()
|
||||
Me.btnOpenFile = New System.Windows.Forms.Button()
|
||||
Me.OpenFileDialog1 = New System.Windows.Forms.OpenFileDialog()
|
||||
Me.Button7 = New System.Windows.Forms.Button()
|
||||
Me.Button8 = New System.Windows.Forms.Button()
|
||||
Me.btnNewFile = New System.Windows.Forms.Button()
|
||||
Me.Label4 = New System.Windows.Forms.Label()
|
||||
Me.Label5 = New System.Windows.Forms.Label()
|
||||
Me.cmbObjectStoreType = New System.Windows.Forms.ComboBox()
|
||||
Me.DateTimePicker1 = New System.Windows.Forms.DateTimePicker()
|
||||
Me.Label6 = New System.Windows.Forms.Label()
|
||||
Me.TextBox1 = New System.Windows.Forms.TextBox()
|
||||
Me.btnImportFile = New System.Windows.Forms.Button()
|
||||
Me.Label1 = New System.Windows.Forms.Label()
|
||||
Me.GroupBox1 = New System.Windows.Forms.GroupBox()
|
||||
Me.ListBox1 = New System.Windows.Forms.ListBox()
|
||||
Me.txtAttributeName = New System.Windows.Forms.TextBox()
|
||||
Me.Button2 = New System.Windows.Forms.Button()
|
||||
Me.txtAttibuteValue = New System.Windows.Forms.TextBox()
|
||||
Me.GroupBox1.SuspendLayout()
|
||||
Me.txtProfileId = New System.Windows.Forms.TextBox()
|
||||
Me.txtIDB_OBJ_ID = New System.Windows.Forms.TextBox()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'Label2
|
||||
@@ -56,15 +47,6 @@ Partial Class frmtest
|
||||
Me.Label2.TabIndex = 6
|
||||
Me.Label2.Text = "FileStoreType"
|
||||
'
|
||||
'txtIDB_OBJ_ID
|
||||
'
|
||||
Me.txtIDB_OBJ_ID.DataBindings.Add(New System.Windows.Forms.Binding("Text", Global.DigitalData.GUIs.ZooFlow.Settings.Default, "IDBOBJID", True, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged))
|
||||
Me.txtIDB_OBJ_ID.Location = New System.Drawing.Point(137, 38)
|
||||
Me.txtIDB_OBJ_ID.Name = "txtIDB_OBJ_ID"
|
||||
Me.txtIDB_OBJ_ID.Size = New System.Drawing.Size(100, 20)
|
||||
Me.txtIDB_OBJ_ID.TabIndex = 9
|
||||
Me.txtIDB_OBJ_ID.Text = Global.DigitalData.GUIs.ZooFlow.Settings.Default.IDBOBJID
|
||||
'
|
||||
'txtFile2Import
|
||||
'
|
||||
Me.txtFile2Import.Location = New System.Drawing.Point(137, 12)
|
||||
@@ -72,66 +54,27 @@ Partial Class frmtest
|
||||
Me.txtFile2Import.Size = New System.Drawing.Size(426, 20)
|
||||
Me.txtFile2Import.TabIndex = 11
|
||||
'
|
||||
'Button4
|
||||
'btnOpenFile
|
||||
'
|
||||
Me.Button4.Location = New System.Drawing.Point(16, 345)
|
||||
Me.Button4.Name = "Button4"
|
||||
Me.Button4.Size = New System.Drawing.Size(286, 23)
|
||||
Me.Button4.TabIndex = 13
|
||||
Me.Button4.Text = "4A. Reopen from AppServ"
|
||||
Me.Button4.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Button5
|
||||
'
|
||||
Me.Button5.Location = New System.Drawing.Point(16, 374)
|
||||
Me.Button5.Name = "Button5"
|
||||
Me.Button5.Size = New System.Drawing.Size(286, 23)
|
||||
Me.Button5.TabIndex = 14
|
||||
Me.Button5.Text = "4B. Alternative stream/append"
|
||||
Me.Button5.UseVisualStyleBackColor = True
|
||||
'
|
||||
'CheckBoxKeepExtension
|
||||
'
|
||||
Me.CheckBoxKeepExtension.AutoSize = True
|
||||
Me.CheckBoxKeepExtension.Checked = True
|
||||
Me.CheckBoxKeepExtension.CheckState = System.Windows.Forms.CheckState.Checked
|
||||
Me.CheckBoxKeepExtension.Location = New System.Drawing.Point(16, 19)
|
||||
Me.CheckBoxKeepExtension.Name = "CheckBoxKeepExtension"
|
||||
Me.CheckBoxKeepExtension.Size = New System.Drawing.Size(100, 17)
|
||||
Me.CheckBoxKeepExtension.TabIndex = 15
|
||||
Me.CheckBoxKeepExtension.Text = "Keep Extension"
|
||||
Me.CheckBoxKeepExtension.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Button6
|
||||
'
|
||||
Me.Button6.Location = New System.Drawing.Point(569, 9)
|
||||
Me.Button6.Name = "Button6"
|
||||
Me.Button6.Size = New System.Drawing.Size(75, 23)
|
||||
Me.Button6.TabIndex = 16
|
||||
Me.Button6.Text = "Select File"
|
||||
Me.Button6.UseVisualStyleBackColor = True
|
||||
Me.btnOpenFile.Location = New System.Drawing.Point(569, 9)
|
||||
Me.btnOpenFile.Name = "btnOpenFile"
|
||||
Me.btnOpenFile.Size = New System.Drawing.Size(75, 23)
|
||||
Me.btnOpenFile.TabIndex = 16
|
||||
Me.btnOpenFile.Text = "Select File"
|
||||
Me.btnOpenFile.UseVisualStyleBackColor = True
|
||||
'
|
||||
'OpenFileDialog1
|
||||
'
|
||||
Me.OpenFileDialog1.FileName = "OpenFileDialog1"
|
||||
'
|
||||
'Button7
|
||||
'btnNewFile
|
||||
'
|
||||
Me.Button7.Location = New System.Drawing.Point(16, 403)
|
||||
Me.Button7.Name = "Button7"
|
||||
Me.Button7.Size = New System.Drawing.Size(286, 23)
|
||||
Me.Button7.TabIndex = 14
|
||||
Me.Button7.Text = "4C. Alternative"
|
||||
Me.Button7.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Button8
|
||||
'
|
||||
Me.Button8.Location = New System.Drawing.Point(12, 142)
|
||||
Me.Button8.Name = "Button8"
|
||||
Me.Button8.Size = New System.Drawing.Size(187, 23)
|
||||
Me.Button8.TabIndex = 17
|
||||
Me.Button8.Text = "Import File"
|
||||
Me.Button8.UseVisualStyleBackColor = True
|
||||
Me.btnNewFile.Location = New System.Drawing.Point(12, 142)
|
||||
Me.btnNewFile.Name = "btnNewFile"
|
||||
Me.btnNewFile.Size = New System.Drawing.Size(187, 23)
|
||||
Me.btnNewFile.TabIndex = 17
|
||||
Me.btnNewFile.Text = "NewFile"
|
||||
Me.btnNewFile.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Label4
|
||||
'
|
||||
@@ -177,93 +120,61 @@ Partial Class frmtest
|
||||
Me.Label6.TabIndex = 6
|
||||
Me.Label6.Text = "Date"
|
||||
'
|
||||
'TextBox1
|
||||
'btnImportFile
|
||||
'
|
||||
Me.TextBox1.Location = New System.Drawing.Point(137, 183)
|
||||
Me.TextBox1.Name = "TextBox1"
|
||||
Me.TextBox1.Size = New System.Drawing.Size(426, 20)
|
||||
Me.TextBox1.TabIndex = 21
|
||||
Me.btnImportFile.Location = New System.Drawing.Point(205, 142)
|
||||
Me.btnImportFile.Name = "btnImportFile"
|
||||
Me.btnImportFile.Size = New System.Drawing.Size(187, 23)
|
||||
Me.btnImportFile.TabIndex = 17
|
||||
Me.btnImportFile.Text = "ImportFile (GLOBIX)"
|
||||
Me.btnImportFile.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Label1
|
||||
'
|
||||
Me.Label1.AutoSize = True
|
||||
Me.Label1.Location = New System.Drawing.Point(9, 186)
|
||||
Me.Label1.Location = New System.Drawing.Point(410, 44)
|
||||
Me.Label1.Name = "Label1"
|
||||
Me.Label1.Size = New System.Drawing.Size(98, 13)
|
||||
Me.Label1.Size = New System.Drawing.Size(45, 13)
|
||||
Me.Label1.TabIndex = 18
|
||||
Me.Label1.Text = "File Path (Imported)"
|
||||
Me.Label1.Text = "ProfileId"
|
||||
'
|
||||
'GroupBox1
|
||||
'txtProfileId
|
||||
'
|
||||
Me.GroupBox1.Controls.Add(Me.CheckBoxKeepExtension)
|
||||
Me.GroupBox1.Location = New System.Drawing.Point(653, 12)
|
||||
Me.GroupBox1.Name = "GroupBox1"
|
||||
Me.GroupBox1.Size = New System.Drawing.Size(200, 100)
|
||||
Me.GroupBox1.TabIndex = 22
|
||||
Me.GroupBox1.TabStop = False
|
||||
Me.GroupBox1.Text = "Import Options"
|
||||
Me.txtProfileId.Location = New System.Drawing.Point(461, 41)
|
||||
Me.txtProfileId.Name = "txtProfileId"
|
||||
Me.txtProfileId.Size = New System.Drawing.Size(100, 20)
|
||||
Me.txtProfileId.TabIndex = 21
|
||||
Me.txtProfileId.Text = "1"
|
||||
'
|
||||
'ListBox1
|
||||
'txtIDB_OBJ_ID
|
||||
'
|
||||
Me.ListBox1.FormattingEnabled = True
|
||||
Me.ListBox1.Location = New System.Drawing.Point(653, 118)
|
||||
Me.ListBox1.Name = "ListBox1"
|
||||
Me.ListBox1.Size = New System.Drawing.Size(200, 329)
|
||||
Me.ListBox1.TabIndex = 23
|
||||
'
|
||||
'txtAttributeName
|
||||
'
|
||||
Me.txtAttributeName.Location = New System.Drawing.Point(205, 236)
|
||||
Me.txtAttributeName.Name = "txtAttributeName"
|
||||
Me.txtAttributeName.Size = New System.Drawing.Size(115, 20)
|
||||
Me.txtAttributeName.TabIndex = 24
|
||||
Me.txtAttributeName.Text = "InvoiceNr"
|
||||
'
|
||||
'Button2
|
||||
'
|
||||
Me.Button2.Location = New System.Drawing.Point(12, 234)
|
||||
Me.Button2.Name = "Button2"
|
||||
Me.Button2.Size = New System.Drawing.Size(187, 23)
|
||||
Me.Button2.TabIndex = 17
|
||||
Me.Button2.Text = "GetAttribute"
|
||||
Me.Button2.UseVisualStyleBackColor = True
|
||||
'
|
||||
'txtAttibuteValue
|
||||
'
|
||||
Me.txtAttibuteValue.Location = New System.Drawing.Point(326, 236)
|
||||
Me.txtAttibuteValue.Name = "txtAttibuteValue"
|
||||
Me.txtAttibuteValue.Size = New System.Drawing.Size(100, 20)
|
||||
Me.txtAttibuteValue.TabIndex = 25
|
||||
Me.txtIDB_OBJ_ID.DataBindings.Add(New System.Windows.Forms.Binding("Text", Global.DigitalData.GUIs.ZooFlow.Settings.Default, "IDBOBJID", True, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged))
|
||||
Me.txtIDB_OBJ_ID.Location = New System.Drawing.Point(137, 38)
|
||||
Me.txtIDB_OBJ_ID.Name = "txtIDB_OBJ_ID"
|
||||
Me.txtIDB_OBJ_ID.Size = New System.Drawing.Size(100, 20)
|
||||
Me.txtIDB_OBJ_ID.TabIndex = 9
|
||||
Me.txtIDB_OBJ_ID.Text = Global.DigitalData.GUIs.ZooFlow.Settings.Default.IDBOBJID
|
||||
'
|
||||
'frmtest
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(865, 450)
|
||||
Me.Controls.Add(Me.txtAttibuteValue)
|
||||
Me.Controls.Add(Me.txtAttributeName)
|
||||
Me.Controls.Add(Me.ListBox1)
|
||||
Me.Controls.Add(Me.GroupBox1)
|
||||
Me.Controls.Add(Me.TextBox1)
|
||||
Me.Controls.Add(Me.txtProfileId)
|
||||
Me.Controls.Add(Me.DateTimePicker1)
|
||||
Me.Controls.Add(Me.cmbObjectStoreType)
|
||||
Me.Controls.Add(Me.Label5)
|
||||
Me.Controls.Add(Me.Label1)
|
||||
Me.Controls.Add(Me.Label5)
|
||||
Me.Controls.Add(Me.Label4)
|
||||
Me.Controls.Add(Me.Button2)
|
||||
Me.Controls.Add(Me.Button8)
|
||||
Me.Controls.Add(Me.Button6)
|
||||
Me.Controls.Add(Me.Button7)
|
||||
Me.Controls.Add(Me.Button5)
|
||||
Me.Controls.Add(Me.Button4)
|
||||
Me.Controls.Add(Me.btnImportFile)
|
||||
Me.Controls.Add(Me.btnNewFile)
|
||||
Me.Controls.Add(Me.btnOpenFile)
|
||||
Me.Controls.Add(Me.txtFile2Import)
|
||||
Me.Controls.Add(Me.txtIDB_OBJ_ID)
|
||||
Me.Controls.Add(Me.Label6)
|
||||
Me.Controls.Add(Me.Label2)
|
||||
Me.Name = "frmtest"
|
||||
Me.Text = "frmtest"
|
||||
Me.GroupBox1.ResumeLayout(False)
|
||||
Me.GroupBox1.PerformLayout()
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
@@ -271,23 +182,15 @@ Partial Class frmtest
|
||||
Friend WithEvents Label2 As Label
|
||||
Friend WithEvents txtIDB_OBJ_ID As TextBox
|
||||
Friend WithEvents txtFile2Import As TextBox
|
||||
Friend WithEvents Button4 As Button
|
||||
Friend WithEvents Button5 As Button
|
||||
Friend WithEvents CheckBoxKeepExtension As CheckBox
|
||||
Friend WithEvents Button6 As Button
|
||||
Friend WithEvents btnOpenFile As Button
|
||||
Friend WithEvents OpenFileDialog1 As OpenFileDialog
|
||||
Friend WithEvents Button7 As Button
|
||||
Friend WithEvents Button8 As Button
|
||||
Friend WithEvents btnNewFile As Button
|
||||
Friend WithEvents Label4 As Label
|
||||
Friend WithEvents Label5 As Label
|
||||
Friend WithEvents cmbObjectStoreType As ComboBox
|
||||
Friend WithEvents DateTimePicker1 As DateTimePicker
|
||||
Friend WithEvents Label6 As Label
|
||||
Friend WithEvents TextBox1 As TextBox
|
||||
Friend WithEvents btnImportFile As Button
|
||||
Friend WithEvents Label1 As Label
|
||||
Friend WithEvents GroupBox1 As GroupBox
|
||||
Friend WithEvents ListBox1 As ListBox
|
||||
Friend WithEvents txtAttributeName As TextBox
|
||||
Friend WithEvents Button2 As Button
|
||||
Friend WithEvents txtAttibuteValue As TextBox
|
||||
Friend WithEvents txtProfileId As TextBox
|
||||
End Class
|
||||
|
||||
@@ -6,96 +6,19 @@ Imports System.Text
|
||||
Imports DigitalData.Modules.EDMI.API.Client
|
||||
|
||||
Public Class frmtest
|
||||
'Private Sub Button1_Click(sender As Object, e As EventArgs)
|
||||
' My.Settings.Save()
|
||||
' Dim oString As String
|
||||
' Dim oextension = ""
|
||||
' Dim oKeepExtension As Boolean = False
|
||||
' If CheckBoxKeepExtension.Checked Then
|
||||
' If txtFile2Import.Text <> String.Empty Then
|
||||
' oextension = Path.GetExtension(txtFile2Import.Text)
|
||||
' oKeepExtension = True
|
||||
' End If
|
||||
|
||||
' End If
|
||||
' oString = My.Application.Service.Client.CreateFileStoreObject(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)
|
||||
' Dim oString As String
|
||||
' oString = My.Application.Service.Client.CreateObjectId("DOC", My.Application.User.UserName, "")
|
||||
' txtIDB_OBJ_ID.Text = oString
|
||||
'End Sub
|
||||
|
||||
'Private Async Sub Button3_Click(sender As Object, e As EventArgs)
|
||||
' Try
|
||||
' Dim oResult As Boolean = False
|
||||
|
||||
' Using oStream As New FileStream(txtFile2Import.Text, FileMode.Open, FileAccess.Read)
|
||||
' Using oMemoryStream As New MemoryStream
|
||||
' oStream.CopyTo(oMemoryStream)
|
||||
' Dim oContents As Byte() = oMemoryStream.ToArray()
|
||||
' oResult = Await My.Application.Service.Client.ImportFileObjectAsync(oContents, My.Application.User.UserName, txtIDB_OBJ_ID.Text, "WORK", txtIDBFOPath.Text)
|
||||
' End Using
|
||||
' End Using
|
||||
|
||||
' If oResult = False Then
|
||||
' MsgBox("Oh no error", MsgBoxStyle.Critical)
|
||||
' Else
|
||||
' MsgBox("#Nailedit")
|
||||
' End If
|
||||
' Catch ex As Exception
|
||||
' MsgBox(ex.Message)
|
||||
' End Try
|
||||
'End Sub
|
||||
|
||||
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
|
||||
Try
|
||||
Dim oextension = Path.GetExtension(txtFile2Import.Text)
|
||||
Dim oFile = $"E:\file{oextension}"
|
||||
Using oInputStream As New FileStream(TextBox1.Text, FileMode.Open)
|
||||
Using oFileStream As New FileStream(oFile, FileMode.Create, FileAccess.Write)
|
||||
oInputStream.CopyTo(oFileStream)
|
||||
End Using
|
||||
End Using
|
||||
Dim oPAth = Path.GetDirectoryName(oFile)
|
||||
MsgBox($"File [{oFile}] created!", MsgBoxStyle.Information)
|
||||
Process.Start(oPAth)
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.Critical)
|
||||
End Try
|
||||
Private Sub frmtest_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
cmbObjectStoreType.SelectedIndex = 0
|
||||
End Sub
|
||||
|
||||
Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click
|
||||
Try
|
||||
Dim wFile As System.IO.FileStream
|
||||
Dim byteData() As Byte
|
||||
Dim oextension = Path.GetExtension(txtFile2Import.Text)
|
||||
byteData = Encoding.ASCII.GetBytes(txtFile2Import.Text)
|
||||
wFile = New FileStream($"E:\file{oextension}", FileMode.Append)
|
||||
wFile.Write(byteData, 0, byteData.Length)
|
||||
wFile.Close()
|
||||
Catch ex As IOException
|
||||
MsgBox(ex.ToString)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click
|
||||
Private Sub btnOpenFile_Click(sender As Object, e As EventArgs) Handles btnOpenFile.Click
|
||||
If OpenFileDialog1.ShowDialog() = DialogResult.OK Then
|
||||
txtFile2Import.Text = OpenFileDialog1.FileName
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub Button7_Click(sender As Object, e As EventArgs) Handles Button7.Click
|
||||
Dim oExt = Path.GetExtension(txtFile2Import.Text)
|
||||
Dim oFile = $"E:\file{oExt}"
|
||||
|
||||
File.Copy(TextBox1.Text, oFile)
|
||||
End Sub
|
||||
|
||||
Private Async Sub Button8_Click(sender As Object, e As EventArgs) Handles Button8.Click
|
||||
Private Async Sub btnNewFile_Click(sender As Object, e As EventArgs) Handles btnNewFile.Click
|
||||
Dim oObjectId As Long = Await My.Application.Service.Client.NewFileAsync(
|
||||
txtFile2Import.Text,
|
||||
"WORK",
|
||||
@@ -111,23 +34,22 @@ Public Class frmtest
|
||||
txtIDB_OBJ_ID.Text = oObjectId
|
||||
End Sub
|
||||
|
||||
Private Sub frmtest_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
cmbObjectStoreType.SelectedIndex = 0
|
||||
End Sub
|
||||
|
||||
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button2.Click
|
||||
Try
|
||||
Dim oValue = My.Application.Service.Client.GetVariableValue(txtIDB_OBJ_ID.Text, txtAttributeName.Text)
|
||||
Private Async Sub btnImportFile_Click_(sender As Object, e As EventArgs) Handles btnImportFile.Click
|
||||
Dim oObjectId As Long = Await My.Application.Service.Client.ImportFileAsync(
|
||||
txtFile2Import.Text,
|
||||
txtProfileId.Text,
|
||||
New List(Of EDMIServiceReference.UserAttributeValue),
|
||||
"WORK",
|
||||
"DOC",
|
||||
"DEFAULT"
|
||||
)
|
||||
|
||||
If oValue.Type Is Nothing Then
|
||||
ListBox1.Items.Add("Value is nothing")
|
||||
Else
|
||||
ListBox1.Items.Add(oValue.Value)
|
||||
txtAttibuteValue.Text = oValue.Value
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.ToString)
|
||||
End Try
|
||||
If oObjectId <> INVALID_OBEJCT_ID Then
|
||||
MsgBox("File Imported!", MsgBoxStyle.Information, Text)
|
||||
Else
|
||||
MsgBox("File was not imported. Check the server logs!")
|
||||
End If
|
||||
txtIDB_OBJ_ID.Text = oObjectId
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user