jj: Update TesTGUI & EDM Designer
This commit is contained in:
parent
bad26b316a
commit
fb976bc43a
@ -1,179 +0,0 @@
|
|||||||
Imports NLog
|
|
||||||
Imports NLog.Config
|
|
||||||
Imports NLog.Targets
|
|
||||||
Imports NLog.Targets.Wrappers
|
|
||||||
Imports NLog.Targets.Wrappers.BufferingTargetWrapperOverflowAction
|
|
||||||
|
|
||||||
Imports System.IO
|
|
||||||
|
|
||||||
Public Class ClassLogger
|
|
||||||
Private Const FileNameFormat As String = "${shortdate}-${var:product}.log"
|
|
||||||
Private Const FileNameFormatDetail As String = "${shortdate}-${var:product}-Detail.log"
|
|
||||||
Private Const FileNameFormatDebug As String = "${shortdate}-${var:product}-Debug.log"
|
|
||||||
|
|
||||||
Private Const TARGET_DEFAULT As String = "default"
|
|
||||||
Private Const TARGET_DEFAULT_EX As String = "defaultEx"
|
|
||||||
Private Const TARGET_DETAIL As String = "detail"
|
|
||||||
Private Const TARGET_DEBUG As String = "debug"
|
|
||||||
|
|
||||||
Private Const defaultLogFormat As String = "${longdate}|${level:uppercase=true}|${logger}|${message}"
|
|
||||||
Private Const exceptionLogFormat As String = "${longdate}|${level:uppercase=true}|${logger}|${message}|${exception:format=message}|${exception:format=toString}"
|
|
||||||
|
|
||||||
Private config As LoggingConfiguration
|
|
||||||
Private debugOn As Boolean = False
|
|
||||||
|
|
||||||
Private ReadOnly failSafePath As String = Path.GetTempPath()
|
|
||||||
Private ReadOnly basePath As String = failSafePath
|
|
||||||
|
|
||||||
Public Enum PathType As Integer
|
|
||||||
AppData = 0
|
|
||||||
CurrentDirectory = 1
|
|
||||||
CustomPath = 2
|
|
||||||
End Enum
|
|
||||||
|
|
||||||
Public LogFile As String
|
|
||||||
|
|
||||||
|
|
||||||
Public Property Debug As Boolean
|
|
||||||
Get
|
|
||||||
Return debugOn
|
|
||||||
End Get
|
|
||||||
Set(value As Boolean)
|
|
||||||
If debugOn <> value Then
|
|
||||||
debugOn = value
|
|
||||||
|
|
||||||
If value = True Then
|
|
||||||
ActivateDebugLog()
|
|
||||||
Else
|
|
||||||
DeactivateDebugLog()
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
''' <summary>
|
|
||||||
''' Initializes a new Logger for a specific "Product"
|
|
||||||
''' </summary>
|
|
||||||
''' <param name="product">An name that identifies the Logs</param>
|
|
||||||
''' <param name="logPath">The basepath to write logs to. Can be AppData, CurrentDirectory or CustomPath.</param>
|
|
||||||
''' <param name="customLogPath">If `logPath` is set to custom, this defines the custom logPath</param>
|
|
||||||
Public Sub New(product As String, logPath As PathType, Optional customLogPath As String = Nothing)
|
|
||||||
If logPath = PathType.AppData Then
|
|
||||||
Dim appDataDir = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)
|
|
||||||
basePath = Path.Combine(appDataDir, "Digital Data", product)
|
|
||||||
ElseIf logPath = PathType.CurrentDirectory Then
|
|
||||||
basePath = "Log"
|
|
||||||
Else 'Custom Path
|
|
||||||
basePath = customLogPath
|
|
||||||
End If
|
|
||||||
|
|
||||||
config = New LoggingConfiguration()
|
|
||||||
config.Variables("product") = product
|
|
||||||
|
|
||||||
config.AddTarget(TARGET_DEFAULT_EX, WrapTargetInBuffered(GetDefaultLogTargetWithExceptions(basePath)))
|
|
||||||
config.AddTarget(TARGET_DEFAULT, WrapTargetInBuffered(GetDefaultLogTarget(basePath)))
|
|
||||||
config.AddTarget(TARGET_DETAIL, WrapTargetInBuffered(GetDetailLogTarget(basePath)))
|
|
||||||
config.AddTarget(TARGET_DEBUG, WrapTargetInBuffered(GetDebugLogTarget(basePath)))
|
|
||||||
|
|
||||||
AddDefaultLogTargets()
|
|
||||||
|
|
||||||
LogManager.Configuration = config
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Function WrapTargetInBuffered(target As FileTarget) As Target
|
|
||||||
Dim bufferedWrapper = New BufferingTargetWrapper()
|
|
||||||
|
|
||||||
bufferedWrapper.WrappedTarget = target
|
|
||||||
|
|
||||||
' Number of log events to be buffered. When the limit is reached,
|
|
||||||
' then a synchronous flush is performed.
|
|
||||||
bufferedWrapper.BufferSize = 100
|
|
||||||
|
|
||||||
' Action to be taken when the buffer exceeds the set bufferSize.
|
|
||||||
bufferedWrapper.OverflowAction = Flush
|
|
||||||
|
|
||||||
' Timeout (in milliseconds) after a write, until the entire buffer
|
|
||||||
' is asynchronously flushed. Use -1 to disable timed flushes.
|
|
||||||
bufferedWrapper.FlushTimeout = 100
|
|
||||||
|
|
||||||
Return bufferedWrapper
|
|
||||||
End Function
|
|
||||||
|
|
||||||
|
|
||||||
Private Sub ActivateDebugLog()
|
|
||||||
' Clear Logging Rules
|
|
||||||
config.LoggingRules.Clear()
|
|
||||||
|
|
||||||
' Add default targets and debug target
|
|
||||||
AddDefaultLogTargets()
|
|
||||||
config.AddRuleForOneLevel(LogLevel.Debug, TARGET_DEBUG)
|
|
||||||
|
|
||||||
' Reload all running loggers
|
|
||||||
LogManager.ReconfigExistingLoggers()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub DeactivateDebugLog()
|
|
||||||
' Clear Logging Rules
|
|
||||||
config.LoggingRules.Clear()
|
|
||||||
|
|
||||||
' Add default targets
|
|
||||||
AddDefaultLogTargets()
|
|
||||||
|
|
||||||
' Reload all running loggers
|
|
||||||
LogManager.ReconfigExistingLoggers()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub AddDefaultLogTargets()
|
|
||||||
config.AddRuleForOneLevel(LogLevel.Error, TARGET_DEFAULT_EX)
|
|
||||||
config.AddRuleForOneLevel(LogLevel.Fatal, TARGET_DEFAULT_EX)
|
|
||||||
config.AddRuleForOneLevel(LogLevel.Warn, TARGET_DEFAULT)
|
|
||||||
config.AddRuleForOneLevel(LogLevel.Info, TARGET_DETAIL)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#Region "Log Targets"
|
|
||||||
Private Function GetDefaultLogTarget(basePath As String) As FileTarget
|
|
||||||
Dim defaultFilePath As String = Path.Combine(basePath, FileNameFormat)
|
|
||||||
Dim defaultLog As New FileTarget() With {
|
|
||||||
.FileName = defaultFilePath,
|
|
||||||
.Layout = defaultLogFormat,
|
|
||||||
.MaxArchiveFiles = 30,
|
|
||||||
.KeepFileOpen = True
|
|
||||||
}
|
|
||||||
|
|
||||||
Return defaultLog
|
|
||||||
End Function
|
|
||||||
Private Function GetDefaultLogTargetWithExceptions(basePath As String) As FileTarget
|
|
||||||
Dim defaultFilePath As String = Path.Combine(basePath, FileNameFormat)
|
|
||||||
Dim defaultLogWithExceptionData As New FileTarget() With {
|
|
||||||
.FileName = defaultFilePath,
|
|
||||||
.Layout = exceptionLogFormat,
|
|
||||||
.MaxArchiveFiles = 30,
|
|
||||||
.KeepFileOpen = True
|
|
||||||
}
|
|
||||||
|
|
||||||
Return defaultLogWithExceptionData
|
|
||||||
End Function
|
|
||||||
Private Function GetDetailLogTarget(basePath As String) As FileTarget
|
|
||||||
Dim detailFilePath As String = Path.Combine(basePath, FileNameFormatDetail)
|
|
||||||
Dim detailLog As New FileTarget() With {
|
|
||||||
.FileName = detailFilePath,
|
|
||||||
.Layout = defaultLogFormat,
|
|
||||||
.MaxArchiveFiles = 1,
|
|
||||||
.KeepFileOpen = True
|
|
||||||
}
|
|
||||||
|
|
||||||
Return detailLog
|
|
||||||
End Function
|
|
||||||
Private Function GetDebugLogTarget(basePath As String) As FileTarget
|
|
||||||
Dim debugFilePath As String = Path.Combine(basePath, FileNameFormatDebug)
|
|
||||||
Dim debugLog As New FileTarget() With {
|
|
||||||
.FileName = debugFilePath,
|
|
||||||
.Layout = defaultLogFormat,
|
|
||||||
.MaxArchiveFiles = 1,
|
|
||||||
.KeepFileOpen = True
|
|
||||||
}
|
|
||||||
|
|
||||||
Return debugLog
|
|
||||||
End Function
|
|
||||||
#End Region
|
|
||||||
End Class
|
|
||||||
@ -111,7 +111,6 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="ClassCurrentUser.vb" />
|
<Compile Include="ClassCurrentUser.vb" />
|
||||||
<Compile Include="ClassInit.vb" />
|
<Compile Include="ClassInit.vb" />
|
||||||
<Compile Include="ClassLogger.vb" />
|
|
||||||
<Compile Include="FrmConnection.Designer.vb">
|
<Compile Include="FrmConnection.Designer.vb">
|
||||||
<DependentUpon>FrmConnection.vb</DependentUpon>
|
<DependentUpon>FrmConnection.vb</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
|||||||
@ -1,12 +1,13 @@
|
|||||||
Imports DigitalData.Modules.Database
|
Imports DigitalData.Modules.Database
|
||||||
|
Imports DigitalData.Modules.Logging
|
||||||
|
|
||||||
Public Class FrmConnection
|
Public Class FrmConnection
|
||||||
Public Property LogFactory As NLog.LogFactory
|
Public Property LogConfig As LogConfig
|
||||||
|
|
||||||
Private _logger As NLog.Logger
|
Private _logger As NLog.Logger
|
||||||
|
|
||||||
Private Sub FrmConnection_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
Private Sub FrmConnection_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||||
_logger = LogFactory.GetCurrentClassLogger()
|
_logger = LogConfig.GetLogger()
|
||||||
|
|
||||||
FbDatabaseLocationTextBox.DataBindings.Add("Text", My.Settings, "fbDatabaseLocation")
|
FbDatabaseLocationTextBox.DataBindings.Add("Text", My.Settings, "fbDatabaseLocation")
|
||||||
FbDatasourceTextBox.DataBindings.Add("Text", My.Settings, "fbDatasource")
|
FbDatasourceTextBox.DataBindings.Add("Text", My.Settings, "fbDatasource")
|
||||||
@ -18,7 +19,7 @@ Public Class FrmConnection
|
|||||||
Dim dbTest As Firebird
|
Dim dbTest As Firebird
|
||||||
|
|
||||||
Try
|
Try
|
||||||
dbTest = New Firebird(LogFactory, My.Settings.fbDatasource, My.Settings.fbDatabaseLocation, My.Settings.fbUser, My.Settings.fbPassword)
|
dbTest = New Firebird(LogConfig, My.Settings.fbDatasource, My.Settings.fbDatabaseLocation, My.Settings.fbUser, My.Settings.fbPassword)
|
||||||
|
|
||||||
If dbTest.ConnectionFailed Then
|
If dbTest.ConnectionFailed Then
|
||||||
MsgBox("Connection failed!", MsgBoxStyle.Information, "Database Connection")
|
MsgBox("Connection failed!", MsgBoxStyle.Information, "Database Connection")
|
||||||
|
|||||||
@ -6,7 +6,7 @@ Public Class FrmMain
|
|||||||
Private _selectedTable As Integer
|
Private _selectedTable As Integer
|
||||||
Private _selectedTableName As String
|
Private _selectedTableName As String
|
||||||
|
|
||||||
Private _logger As NLog.Logger
|
Private _logger As Logger
|
||||||
Private _logConfig As LogConfig
|
Private _logConfig As LogConfig
|
||||||
Private _firebird As Firebird
|
Private _firebird As Firebird
|
||||||
|
|
||||||
@ -56,7 +56,7 @@ Public Class FrmMain
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Sub Init()
|
Private Sub Init()
|
||||||
_firebird = New Firebird(_logConfig.LogFactory, My.Settings.fbDatasource, My.Settings.fbDatabaseLocation, My.Settings.fbUser, My.Settings.fbPassword)
|
_firebird = New Firebird(_logConfig, My.Settings.fbDatasource, My.Settings.fbDatabaseLocation, My.Settings.fbUser, My.Settings.fbPassword)
|
||||||
|
|
||||||
If _firebird.ConnectionFailed Then
|
If _firebird.ConnectionFailed Then
|
||||||
MsgBox("Database connection failed. Please check the log.", vbCritical)
|
MsgBox("Database connection failed. Please check the log.", vbCritical)
|
||||||
@ -72,13 +72,25 @@ Public Class FrmMain
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub FrmMain_Load(sender As Object, e As EventArgs) Handles Me.Load
|
Private Sub FrmMain_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||||
_logConfig = New LogConfig(ClassLogger.PathType.CurrentDirectory)
|
_logConfig = New LogConfig(LogConfig.PathType.CurrentDirectory)
|
||||||
_logger = _logConfig.LogFactory.GetCurrentClassLogger()
|
_logger = _logConfig.GetLogger() '_logConfig.LogFactory.GetCurrentClassLogger(GetType(Logger))
|
||||||
|
|
||||||
|
_logger.NewBlock("STARTUP")
|
||||||
|
_logger.Info("INFO")
|
||||||
|
_logger.Warn("WARN")
|
||||||
|
_logger.NewBlock("ERROR")
|
||||||
|
|
||||||
|
|
||||||
|
Try
|
||||||
|
Throw New Exception("ERROR")
|
||||||
|
Catch ex As Exception
|
||||||
|
_logger.Error(ex)
|
||||||
|
End Try
|
||||||
|
|
||||||
' Check for existing database credentials
|
' Check for existing database credentials
|
||||||
While Not DatabaseSettingsExist()
|
While Not DatabaseSettingsExist()
|
||||||
Dim form As New FrmConnection With {
|
Dim form As New FrmConnection With {
|
||||||
.LogFactory = _logConfig.LogFactory
|
.LogConfig = _logConfig
|
||||||
}
|
}
|
||||||
Dim result As DialogResult = form.ShowDialog()
|
Dim result As DialogResult = form.ShowDialog()
|
||||||
|
|
||||||
@ -151,7 +163,7 @@ Public Class FrmMain
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub NeueTabelleToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles NeueTabelleToolStripMenuItem.Click
|
Private Sub NeueTabelleToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles NeueTabelleToolStripMenuItem.Click
|
||||||
Dim oForm As New FrmNewTable(_logConfig.LogFactory)
|
Dim oForm As New FrmNewTable(_logConfig)
|
||||||
oForm.ShowDialog()
|
oForm.ShowDialog()
|
||||||
|
|
||||||
Dim oTables As DataTable = LoadTables()
|
Dim oTables As DataTable = LoadTables()
|
||||||
|
|||||||
@ -1,24 +1,24 @@
|
|||||||
Imports NLog
|
Imports DigitalData.Modules.Database
|
||||||
Imports DigitalData.Modules.Database
|
Imports DigitalData.Modules.Logging
|
||||||
|
|
||||||
|
|
||||||
Public Class FrmNewTable
|
Public Class FrmNewTable
|
||||||
Private _logFactory As LogFactory
|
Private _logConfig As LogConfig
|
||||||
Private _logger As Logger
|
Private _logger As Logger
|
||||||
Private _db As Firebird
|
Private _db As Firebird
|
||||||
|
|
||||||
Public Sub New(LogFactory As LogFactory)
|
Public Sub New(LogConfig As LogConfig)
|
||||||
' Dieser Aufruf ist für den Designer erforderlich.
|
' Dieser Aufruf ist für den Designer erforderlich.
|
||||||
InitializeComponent()
|
InitializeComponent()
|
||||||
|
|
||||||
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
|
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
|
||||||
_logFactory = LogFactory
|
_logConfig = LogConfig
|
||||||
_logger = _logFactory.GetCurrentClassLogger()
|
_logger = _logConfig.GetLogger()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub FrmNewTable_Load(sender As Object, e As EventArgs) Handles Me.Load
|
Private Sub FrmNewTable_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||||
Try
|
Try
|
||||||
_db = New Firebird(_logFactory, My.Settings.fbDatasource, My.Settings.fbDatabaseLocation, My.Settings.fbUser, My.Settings.fbPassword)
|
_db = New Firebird(_logConfig, My.Settings.fbDatasource, My.Settings.fbDatabaseLocation, My.Settings.fbUser, My.Settings.fbPassword)
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
MsgBox("Connection to DB failed!", MsgBoxStyle.Critical)
|
MsgBox("Connection to DB failed!", MsgBoxStyle.Critical)
|
||||||
_logger.Error(ex)
|
_logger.Error(ex)
|
||||||
|
|||||||
@ -4,19 +4,18 @@ Imports System.ComponentModel
|
|||||||
|
|
||||||
Public Class Form1
|
Public Class Form1
|
||||||
Dim MyLogger As LogConfig
|
Dim MyLogger As LogConfig
|
||||||
Shared Logger As NLog.Logger
|
Dim Logger As Logger
|
||||||
|
|
||||||
Protected _windream As Windream
|
|
||||||
Protected _windream2 As Windream2
|
Protected _windream2 As Windream2
|
||||||
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
|
||||||
Dim serverName As String = TextBox1.Text
|
Dim serverName As String = TextBox1.Text
|
||||||
|
|
||||||
' Windream.vb
|
' Windream.vb
|
||||||
'_windream = New Windream("W", True, False)
|
'_windream2 = New Windream("W", True, False)
|
||||||
|
|
||||||
' Windream2.vb
|
' Windream2.vb
|
||||||
Try
|
Try
|
||||||
_windream2 = New ConnectionBuilder(MyLogger.LogFactory).
|
_windream2 = New ConnectionBuilder(MyLogger).
|
||||||
WithDriveLetter("W").
|
WithDriveLetter("W").
|
||||||
WithSessionReconnect().
|
WithSessionReconnect().
|
||||||
With64BitSupport().
|
With64BitSupport().
|
||||||
@ -40,7 +39,7 @@ Public Class Form1
|
|||||||
|
|
||||||
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles Me.Load
|
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||||
MyLogger = New LogConfig(LogConfig.PathType.CurrentDirectory, Nothing, "MAIN")
|
MyLogger = New LogConfig(LogConfig.PathType.CurrentDirectory, Nothing, "MAIN")
|
||||||
Logger = MyLogger.LogFactory.GetCurrentClassLogger()
|
Logger = MyLogger.GetLogger()
|
||||||
|
|
||||||
Dim MySecondLogger = New LogConfig(LogConfig.PathType.CurrentDirectory, Nothing, "MAIN2")
|
Dim MySecondLogger = New LogConfig(LogConfig.PathType.CurrentDirectory, Nothing, "MAIN2")
|
||||||
Dim SecondLogger = MySecondLogger.LogFactory.GetCurrentClassLogger()
|
Dim SecondLogger = MySecondLogger.LogFactory.GetCurrentClassLogger()
|
||||||
@ -56,42 +55,43 @@ Public Class Form1
|
|||||||
|
|
||||||
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles GetValue.Click
|
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles GetValue.Click
|
||||||
My.Settings.Save()
|
My.Settings.Save()
|
||||||
If IsNothing(_windream) Then
|
If IsNothing(_windream2) Then
|
||||||
MsgBox("windream initialisieren")
|
MsgBox("windream initialisieren")
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
Dim result As DataTable = _windream.GetValueforIndex(txtWMFile.Text, txtWMIndex.Text)
|
Dim result As List(Of String) = _windream2.GetIndexValue(txtWMFile.Text, txtWMIndex.Text)
|
||||||
If result.Rows.Count = 0 Then
|
If result.Count = 0 Then
|
||||||
MsgBox("No result")
|
MsgBox("No result")
|
||||||
Else
|
Else
|
||||||
txtWMValue.Text = result.Rows(0).Item(0).ToString
|
txtWMValue.Text = result.Item(0).ToString
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub IndexFile_Click(sender As Object, e As EventArgs) Handles IndexFile.Click
|
Private Sub IndexFile_Click(sender As Object, e As EventArgs) Handles IndexFile.Click
|
||||||
My.Settings.Save()
|
My.Settings.Save()
|
||||||
If IsNothing(_windream) Then
|
If IsNothing(_windream2) Then
|
||||||
MsgBox("windream initialisieren")
|
MsgBox("windream initialisieren")
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
Dim arrValue() As String = Nothing
|
Dim arrValue() As String = Nothing
|
||||||
ReDim Preserve arrValue(0)
|
ReDim Preserve arrValue(0)
|
||||||
arrValue(0) = txtWMValue.Text
|
arrValue(0) = txtWMValue.Text
|
||||||
If _windream.NewIndexFile(txtWMFile.Text, txtWMIndex.Text, arrValue) = True Then
|
'If _windream2.NewIndexFile(txtWMFile.Text, txtWMIndex.Text, arrValue) = True Then
|
||||||
MsgBox("Success")
|
' MsgBox("Success")
|
||||||
Else
|
'Else
|
||||||
MsgBox("no indexing")
|
' MsgBox("no indexing")
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub Button2_Click_1(sender As Object, e As EventArgs) Handles Button2.Click
|
Private Sub Button2_Click_1(sender As Object, e As EventArgs) Handles Button2.Click
|
||||||
My.Settings.Save()
|
My.Settings.Save()
|
||||||
If IsNothing(_windream) Then
|
If IsNothing(_windream2) Then
|
||||||
MsgBox("windream initialisieren")
|
MsgBox("windream initialisieren")
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
Dim DTResults As DataTable = _windream.GetSearchDocuments(txtwmsearch.Text, "Dokument-ID")
|
|
||||||
|
Dim DTResults As DataTable = _windream2.GetSearchDocuments(txtwmsearch.Text, "Dokument-ID")
|
||||||
If DTResults.Rows.Count > 0 Then
|
If DTResults.Rows.Count > 0 Then
|
||||||
GridControl1.DataSource = DTResults
|
GridControl1.DataSource = DTResults
|
||||||
Else
|
Else
|
||||||
@ -103,13 +103,13 @@ Public Class Form1
|
|||||||
Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click
|
Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click
|
||||||
Dim items As New List(Of String)
|
Dim items As New List(Of String)
|
||||||
|
|
||||||
items = _windream.GetChoicelistItems(ComboBox1.Text)
|
items = _windream2.GetChoiceListItems(ComboBox1.Text)
|
||||||
|
|
||||||
MsgBox("choicelist items:" & vbNewLine & (String.Join(vbNewLine, items.ToArray)))
|
MsgBox("choicelist items:" & vbNewLine & (String.Join(vbNewLine, items.ToArray)))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub ComboBox1_Click(sender As Object, e As EventArgs) Handles ComboBox1.Click
|
Private Sub ComboBox1_Click(sender As Object, e As EventArgs) Handles ComboBox1.Click
|
||||||
Dim lists = _windream.GetChoiceLists()
|
Dim lists = _windream2.GetChoiceLists()
|
||||||
|
|
||||||
ComboBox1.Items.Clear()
|
ComboBox1.Items.Clear()
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user