Pusch_27042016
This commit is contained in:
@@ -148,6 +148,9 @@ Public Class ClassControlBuilder
|
|||||||
Dim control As Control = DirectCast(sender, Control)
|
Dim control As Control = DirectCast(sender, Control)
|
||||||
Dim controlId As Integer = DirectCast(control.Tag, ClassControlMetadata).Id
|
Dim controlId As Integer = DirectCast(control.Tag, ClassControlMetadata).Id
|
||||||
CONTROL_ID = controlId
|
CONTROL_ID = controlId
|
||||||
|
If CONTROL_ID = 29 Then
|
||||||
|
Console.WriteLine("Obacht")
|
||||||
|
End If
|
||||||
Dim SQL As String = String.Format("SELECT GUID, SQL_COMMAND_1 FROM TBPMO_CONTROL WHERE SQL_COMMAND_1 LIKE '%@{0}@%'", controlId)
|
Dim SQL As String = String.Format("SELECT GUID, SQL_COMMAND_1 FROM TBPMO_CONTROL WHERE SQL_COMMAND_1 LIKE '%@{0}@%'", controlId)
|
||||||
Dim value
|
Dim value
|
||||||
|
|
||||||
@@ -175,7 +178,13 @@ Public Class ClassControlBuilder
|
|||||||
If datatable.Rows.Count = 0 Then
|
If datatable.Rows.Count = 0 Then
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
If CURRENT_RECORD_ID = 0 And CtrlCommandUI.IsInsert = True Then
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
If CURRENT_RECORD_ID = 0 Then
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
For Each row As DataRow In datatable.Rows
|
For Each row As DataRow In datatable.Rows
|
||||||
Dim sqlcommand As String = row.Item("SQL_COMMAND_1")
|
Dim sqlcommand As String = row.Item("SQL_COMMAND_1")
|
||||||
|
|
||||||
@@ -263,7 +272,7 @@ Public Class ClassControlBuilder
|
|||||||
If dt.Rows.Count = 1 Then
|
If dt.Rows.Count = 1 Then
|
||||||
Try
|
Try
|
||||||
Dim value1 As String = dt.Rows(0).Item(0)
|
Dim value1 As String = dt.Rows(0).Item(0)
|
||||||
ControlLoader.TextBox.LoadValue(DirectCast(dependingControl, TextBox), 9999, 9999, value1, True)
|
ControlLoader.TextBox.LoadValue(DirectCast(dependingControl, TextBox), 9999, 9999, value1, 999, True)
|
||||||
Dim sql1 = String.Format("SELECT GUID FROM TBPMO_CONTROL_VALUE WHERE CONTROL_ID = {0} AND RECORD_ID = {1}", dependingControlId, CURRENT_RECORD_ID)
|
Dim sql1 = String.Format("SELECT GUID FROM TBPMO_CONTROL_VALUE WHERE CONTROL_ID = {0} AND RECORD_ID = {1}", dependingControlId, CURRENT_RECORD_ID)
|
||||||
Dim id = ClassDatabase.Execute_Scalar(sql1)
|
Dim id = ClassDatabase.Execute_Scalar(sql1)
|
||||||
|
|
||||||
|
|||||||
@@ -21,8 +21,8 @@
|
|||||||
Dim CONNID = ClassDatabase.Execute_Scalar(String.Format("SELECT CONNECTION_ID_1 FROM TBPMO_CONTROL WHERE GUID = {0}", ControlId))
|
Dim CONNID = ClassDatabase.Execute_Scalar(String.Format("SELECT CONNECTION_ID_1 FROM TBPMO_CONTROL WHERE GUID = {0}", ControlId))
|
||||||
Dim SQL As String = ClassDatabase.Execute_Scalar(String.Format("SELECT SQL_COMMAND_1 FROM TBPMO_CONTROL WHERE GUID = {0}", ControlId))
|
Dim SQL As String = ClassDatabase.Execute_Scalar(String.Format("SELECT SQL_COMMAND_1 FROM TBPMO_CONTROL WHERE GUID = {0}", ControlId))
|
||||||
SQL = ClassControlValues.ReplaceSqlCommandPlaceholders(SQL, RecordId, ParentRecordId, entity_ID)
|
SQL = ClassControlValues.ReplaceSqlCommandPlaceholders(SQL, RecordId, ParentRecordId, entity_ID)
|
||||||
If ControlId = 984 Then
|
If ControlId = 272 Then
|
||||||
Console.WriteLine("VertragsNr")
|
Console.WriteLine("272")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If SQL = "" Or IsDBNull(SQL) Then
|
If SQL = "" Or IsDBNull(SQL) Then
|
||||||
@@ -199,15 +199,19 @@
|
|||||||
|
|
||||||
Public Shared Sub LoadValue(control As Windows.Forms.Label, recordId As Integer, parentRecordId As Integer, value As String, entity_ID As Integer, Optional VARIABLE_VALUE As Boolean = False)
|
Public Shared Sub LoadValue(control As Windows.Forms.Label, recordId As Integer, parentRecordId As Integer, value As String, entity_ID As Integer, Optional VARIABLE_VALUE As Boolean = False)
|
||||||
Try
|
Try
|
||||||
|
Dim ControlId As Integer = DirectCast(control.Tag, ClassControlMetadata).Id
|
||||||
|
If ControlId = 272 Then
|
||||||
|
Console.WriteLine("272")
|
||||||
|
End If
|
||||||
Dim autoValue = LoadAutoValue(control, recordId, parentRecordId, entity_ID)
|
Dim autoValue = LoadAutoValue(control, recordId, parentRecordId, entity_ID)
|
||||||
|
|
||||||
If IsNothing(autoValue) Then
|
If IsNothing(autoValue) Then
|
||||||
If VARIABLE_VALUE = True Then
|
If VARIABLE_VALUE = True Then
|
||||||
control.Text = value
|
control.Text = value
|
||||||
Else
|
Else
|
||||||
Dim ControlId As Integer = DirectCast(control.Tag, ClassControlMetadata).Id
|
|
||||||
|
|
||||||
If ControlId = 984 Then
|
|
||||||
|
If ControlId = 272 Then
|
||||||
Console.WriteLine("VertragsNr")
|
Console.WriteLine("VertragsNr")
|
||||||
End If
|
End If
|
||||||
Dim SQL = String.Format("SELECT GUID FROM TBPMO_CONTROL_SCREEN WHERE CONTROL_ID = {0} AND SCREEN_ID = {1}", ControlId, CURRENT_SCREEN_ID)
|
Dim SQL = String.Format("SELECT GUID FROM TBPMO_CONTROL_SCREEN WHERE CONTROL_ID = {0} AND SCREEN_ID = {1}", ControlId, CURRENT_SCREEN_ID)
|
||||||
@@ -268,16 +272,26 @@
|
|||||||
|
|
||||||
Public Shared Sub LoadValue(control As Windows.Forms.TextBox, recordId As Integer, parentRecordId As Integer, value As String, entity_ID As Integer, Optional VARIABLE_VALUE As Boolean = False)
|
Public Shared Sub LoadValue(control As Windows.Forms.TextBox, recordId As Integer, parentRecordId As Integer, value As String, entity_ID As Integer, Optional VARIABLE_VALUE As Boolean = False)
|
||||||
Try
|
Try
|
||||||
Dim autoValue = LoadAutoValue(control, recordId, parentRecordId, entity_ID)
|
Dim ControlId As Integer = DirectCast(control.Tag, ClassControlMetadata).Id
|
||||||
If VARIABLE_VALUE = True Then
|
If ControlId = 272 Then
|
||||||
|
Console.WriteLine("272")
|
||||||
|
End If
|
||||||
|
If CURRENT_RECORD_ENABLED = False Then
|
||||||
control.Text = value
|
control.Text = value
|
||||||
Else
|
Else
|
||||||
If IsNothing(autoValue) Then
|
|
||||||
|
If VARIABLE_VALUE = True Then
|
||||||
control.Text = value
|
control.Text = value
|
||||||
Else
|
Else
|
||||||
control.Text = autoValue
|
Dim autoValue = LoadAutoValue(control, recordId, parentRecordId, entity_ID)
|
||||||
|
If IsNothing(autoValue) Then
|
||||||
|
control.Text = value
|
||||||
|
Else
|
||||||
|
control.Text = autoValue
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
MsgBox("Unexpected Error in LoadValue3:" & vbNewLine & ex.Message)
|
MsgBox("Unexpected Error in LoadValue3:" & vbNewLine & ex.Message)
|
||||||
ClassLogger.Add("Unexpected Error in LoadValue3: " & ex.Message, True)
|
ClassLogger.Add("Unexpected Error in LoadValue3: " & ex.Message, True)
|
||||||
|
|||||||
@@ -229,6 +229,9 @@ Public Class ClassControlValues
|
|||||||
End If
|
End If
|
||||||
Select Case control.GetType()
|
Select Case control.GetType()
|
||||||
Case GetType(TextBox)
|
Case GetType(TextBox)
|
||||||
|
If CURRENT_CONTROL_ID = 272 Then
|
||||||
|
Console.WriteLine("272")
|
||||||
|
End If
|
||||||
Dim textbox As TextBox = DirectCast(control, TextBox)
|
Dim textbox As TextBox = DirectCast(control, TextBox)
|
||||||
ControlLoader.TextBox.LoadValue(textbox, recordId, parentRecordId, value, entity_ID)
|
ControlLoader.TextBox.LoadValue(textbox, recordId, parentRecordId, value, entity_ID)
|
||||||
|
|
||||||
@@ -237,6 +240,7 @@ Public Class ClassControlValues
|
|||||||
ControlLoader.Label.LoadValue(label, recordId, parentRecordId, value, entity_ID)
|
ControlLoader.Label.LoadValue(label, recordId, parentRecordId, value, entity_ID)
|
||||||
|
|
||||||
Case GetType(CustomComboBox)
|
Case GetType(CustomComboBox)
|
||||||
|
|
||||||
Dim combobox As CustomComboBox = DirectCast(control, CustomComboBox)
|
Dim combobox As CustomComboBox = DirectCast(control, CustomComboBox)
|
||||||
ControlLoader.Combobox.LoadValue(combobox, recordId, parentRecordId, value)
|
ControlLoader.Combobox.LoadValue(combobox, recordId, parentRecordId, value)
|
||||||
|
|
||||||
@@ -531,6 +535,9 @@ Public Class ClassControlValues
|
|||||||
|
|
||||||
Select Case control.GetType()
|
Select Case control.GetType()
|
||||||
Case GetType(TextBox)
|
Case GetType(TextBox)
|
||||||
|
If ControlID = 272 Then
|
||||||
|
Console.WriteLine("obacht")
|
||||||
|
End If
|
||||||
Dim textbox As TextBox = DirectCast(control, TextBox)
|
Dim textbox As TextBox = DirectCast(control, TextBox)
|
||||||
If IsDBNull(autoValue) Then
|
If IsDBNull(autoValue) Then
|
||||||
textbox.Text = ""
|
textbox.Text = ""
|
||||||
@@ -559,6 +566,7 @@ Public Class ClassControlValues
|
|||||||
radio.Checked = StrToBool(autoValue)
|
radio.Checked = StrToBool(autoValue)
|
||||||
|
|
||||||
Case GetType(CustomComboBox)
|
Case GetType(CustomComboBox)
|
||||||
|
|
||||||
Dim combobox As CustomComboBox = DirectCast(control, CustomComboBox)
|
Dim combobox As CustomComboBox = DirectCast(control, CustomComboBox)
|
||||||
If IsDBNull(autoValue) Then
|
If IsDBNull(autoValue) Then
|
||||||
combobox.SelectedIndex = -1
|
combobox.SelectedIndex = -1
|
||||||
@@ -595,9 +603,6 @@ Public Class ClassControlValues
|
|||||||
Dim CONNID = ClassDatabase.Execute_Scalar(String.Format("SELECT CONNECTION_ID_1 FROM TBPMO_CONTROL WHERE GUID = {0}", ControlID))
|
Dim CONNID = ClassDatabase.Execute_Scalar(String.Format("SELECT CONNECTION_ID_1 FROM TBPMO_CONTROL WHERE GUID = {0}", ControlID))
|
||||||
Dim SQL_AUTOVALUE As String = ClassDatabase.Execute_Scalar(String.Format("SELECT SQL_COMMAND_1 FROM TBPMO_CONTROL WHERE GUID = {0}", ControlID))
|
Dim SQL_AUTOVALUE As String = ClassDatabase.Execute_Scalar(String.Format("SELECT SQL_COMMAND_1 FROM TBPMO_CONTROL WHERE GUID = {0}", ControlID))
|
||||||
SQL_AUTOVALUE = ClassControlValues.ReplaceSqlCommandPlaceholders(SQL_AUTOVALUE, RecordID, ParentRecordId, entity_ID)
|
SQL_AUTOVALUE = ClassControlValues.ReplaceSqlCommandPlaceholders(SQL_AUTOVALUE, RecordID, ParentRecordId, entity_ID)
|
||||||
If ControlID = 984 Then
|
|
||||||
Console.WriteLine("VertragsNr")
|
|
||||||
End If
|
|
||||||
|
|
||||||
If SQL_AUTOVALUE = "" Or IsDBNull(SQL_AUTOVALUE) Then
|
If SQL_AUTOVALUE = "" Or IsDBNull(SQL_AUTOVALUE) Then
|
||||||
Exit Sub
|
Exit Sub
|
||||||
@@ -613,7 +618,7 @@ Public Class ClassControlValues
|
|||||||
End If
|
End If
|
||||||
' AutoValue = ClassDatabase.Execute_Scalar(SQL)
|
' AutoValue = ClassDatabase.Execute_Scalar(SQL)
|
||||||
|
|
||||||
If Not String.IsNullOrEmpty(autoValue) And Not IsDBNull(autoValue) Then
|
If Not IsNothing(autoValue) And Not IsDBNull(autoValue) Then
|
||||||
lbl.Text = autoValue
|
lbl.Text = autoValue
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
@@ -224,9 +224,6 @@ Public Class ClassDatabase
|
|||||||
Public Shared Function Execute_Scalar(cmdscalar As String, Optional Userinput As Boolean = False)
|
Public Shared Function Execute_Scalar(cmdscalar As String, Optional Userinput As Boolean = False)
|
||||||
Dim result
|
Dim result
|
||||||
Try
|
Try
|
||||||
If cmdscalar = "select RECORD_ENTITY_ID FROM TBPMO_RECORD WHERE GUID = @RECORD_ID" Then
|
|
||||||
MsgBox("Unexpected SQL Error - Details following....", MsgBoxStyle.Exclamation)
|
|
||||||
End If
|
|
||||||
Dim SQLconnect As New SqlClient.SqlConnection
|
Dim SQLconnect As New SqlClient.SqlConnection
|
||||||
Dim SQLcommand As SqlClient.SqlCommand
|
Dim SQLcommand As SqlClient.SqlCommand
|
||||||
SQLconnect.ConnectionString = connectionString
|
SQLconnect.ConnectionString = connectionString
|
||||||
|
|||||||
@@ -48,6 +48,8 @@ Partial Class frmConstructor_Main
|
|||||||
Me.ButtonResetFilter = New System.Windows.Forms.ToolStripMenuItem()
|
Me.ButtonResetFilter = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
Me.ButtonExportToExcel = New System.Windows.Forms.ToolStripMenuItem()
|
Me.ButtonExportToExcel = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
Me.DatenNeuLadenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
Me.DatenNeuLadenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
|
Me.ToolStripSeparator6 = New System.Windows.Forms.ToolStripSeparator()
|
||||||
|
Me.tsmi_RecordDelete = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
Me.grvwGrid = New DevExpress.XtraGrid.Views.Grid.GridView()
|
Me.grvwGrid = New DevExpress.XtraGrid.Views.Grid.GridView()
|
||||||
Me.grvwCarousel = New DevExpress.XtraGrid.Views.Layout.LayoutView()
|
Me.grvwCarousel = New DevExpress.XtraGrid.Views.Layout.LayoutView()
|
||||||
Me.grvwTiles = New DevExpress.XtraGrid.Views.Tile.TileView()
|
Me.grvwTiles = New DevExpress.XtraGrid.Views.Tile.TileView()
|
||||||
@@ -56,6 +58,8 @@ Partial Class frmConstructor_Main
|
|||||||
Me.TabDetails = New DevExpress.XtraTab.XtraTabPage()
|
Me.TabDetails = New DevExpress.XtraTab.XtraTabPage()
|
||||||
Me.pnlDetails = New System.Windows.Forms.Panel()
|
Me.pnlDetails = New System.Windows.Forms.Panel()
|
||||||
Me.TabWindream = New DevExpress.XtraTab.XtraTabPage()
|
Me.TabWindream = New DevExpress.XtraTab.XtraTabPage()
|
||||||
|
Me.GridControlDocSearch = New DevExpress.XtraGrid.GridControl()
|
||||||
|
Me.GridViewDoc_Search = New DevExpress.XtraGrid.Views.Grid.GridView()
|
||||||
Me.AxObjectListControl = New AxOBJECTLISTCONTROLLib.AxObjectListControl()
|
Me.AxObjectListControl = New AxOBJECTLISTCONTROLLib.AxObjectListControl()
|
||||||
Me.ToolStripDokumente = New System.Windows.Forms.ToolStrip()
|
Me.ToolStripDokumente = New System.Windows.Forms.ToolStrip()
|
||||||
Me.tslblWindreamView = New System.Windows.Forms.ToolStripLabel()
|
Me.tslblWindreamView = New System.Windows.Forms.ToolStripLabel()
|
||||||
@@ -154,6 +158,8 @@ Partial Class frmConstructor_Main
|
|||||||
Me.TCDetails.SuspendLayout()
|
Me.TCDetails.SuspendLayout()
|
||||||
Me.TabDetails.SuspendLayout()
|
Me.TabDetails.SuspendLayout()
|
||||||
Me.TabWindream.SuspendLayout()
|
Me.TabWindream.SuspendLayout()
|
||||||
|
CType(Me.GridControlDocSearch, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
|
CType(Me.GridViewDoc_Search, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
CType(Me.AxObjectListControl, System.ComponentModel.ISupportInitialize).BeginInit()
|
CType(Me.AxObjectListControl, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
Me.ToolStripDokumente.SuspendLayout()
|
Me.ToolStripDokumente.SuspendLayout()
|
||||||
Me.TabFollowUp.SuspendLayout()
|
Me.TabFollowUp.SuspendLayout()
|
||||||
@@ -250,7 +256,7 @@ Partial Class frmConstructor_Main
|
|||||||
'
|
'
|
||||||
'ContextMenuGrid
|
'ContextMenuGrid
|
||||||
'
|
'
|
||||||
Me.ContextMenuGrid.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.FunktionenDataGridToolStripMenuItem, Me.ToolStripSeparator1, Me.AnsichtUmschaltenToolStripMenuItem, Me.ButtonSetViewAsDefault, Me.ButtonResetView, Me.ToolStripSeparator2, Me.ButtonResetFilter, Me.ButtonExportToExcel, Me.DatenNeuLadenToolStripMenuItem})
|
Me.ContextMenuGrid.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.FunktionenDataGridToolStripMenuItem, Me.ToolStripSeparator1, Me.AnsichtUmschaltenToolStripMenuItem, Me.ButtonSetViewAsDefault, Me.ButtonResetView, Me.ToolStripSeparator2, Me.ButtonResetFilter, Me.ButtonExportToExcel, Me.DatenNeuLadenToolStripMenuItem, Me.ToolStripSeparator6, Me.tsmi_RecordDelete})
|
||||||
Me.ContextMenuGrid.Name = "ContextMenuGrid"
|
Me.ContextMenuGrid.Name = "ContextMenuGrid"
|
||||||
resources.ApplyResources(Me.ContextMenuGrid, "ContextMenuGrid")
|
resources.ApplyResources(Me.ContextMenuGrid, "ContextMenuGrid")
|
||||||
'
|
'
|
||||||
@@ -322,6 +328,17 @@ Partial Class frmConstructor_Main
|
|||||||
Me.DatenNeuLadenToolStripMenuItem.Name = "DatenNeuLadenToolStripMenuItem"
|
Me.DatenNeuLadenToolStripMenuItem.Name = "DatenNeuLadenToolStripMenuItem"
|
||||||
resources.ApplyResources(Me.DatenNeuLadenToolStripMenuItem, "DatenNeuLadenToolStripMenuItem")
|
resources.ApplyResources(Me.DatenNeuLadenToolStripMenuItem, "DatenNeuLadenToolStripMenuItem")
|
||||||
'
|
'
|
||||||
|
'ToolStripSeparator6
|
||||||
|
'
|
||||||
|
Me.ToolStripSeparator6.Name = "ToolStripSeparator6"
|
||||||
|
resources.ApplyResources(Me.ToolStripSeparator6, "ToolStripSeparator6")
|
||||||
|
'
|
||||||
|
'tsmi_RecordDelete
|
||||||
|
'
|
||||||
|
Me.tsmi_RecordDelete.Image = Global.DD_Record_Organiser.My.Resources.Resources.delete
|
||||||
|
Me.tsmi_RecordDelete.Name = "tsmi_RecordDelete"
|
||||||
|
resources.ApplyResources(Me.tsmi_RecordDelete, "tsmi_RecordDelete")
|
||||||
|
'
|
||||||
'grvwGrid
|
'grvwGrid
|
||||||
'
|
'
|
||||||
Me.grvwGrid.Appearance.EvenRow.BackColor = CType(resources.GetObject("grvwGrid.Appearance.EvenRow.BackColor"), System.Drawing.Color)
|
Me.grvwGrid.Appearance.EvenRow.BackColor = CType(resources.GetObject("grvwGrid.Appearance.EvenRow.BackColor"), System.Drawing.Color)
|
||||||
@@ -410,12 +427,25 @@ Partial Class frmConstructor_Main
|
|||||||
'TabWindream
|
'TabWindream
|
||||||
'
|
'
|
||||||
Me.TabWindream.AllowDrop = True
|
Me.TabWindream.AllowDrop = True
|
||||||
|
Me.TabWindream.Controls.Add(Me.GridControlDocSearch)
|
||||||
Me.TabWindream.Controls.Add(Me.AxObjectListControl)
|
Me.TabWindream.Controls.Add(Me.AxObjectListControl)
|
||||||
Me.TabWindream.Controls.Add(Me.ToolStripDokumente)
|
Me.TabWindream.Controls.Add(Me.ToolStripDokumente)
|
||||||
Me.TabWindream.Image = Global.DD_Record_Organiser.My.Resources.Resources.Files_7954
|
Me.TabWindream.Image = Global.DD_Record_Organiser.My.Resources.Resources.Files_7954
|
||||||
Me.TabWindream.Name = "TabWindream"
|
Me.TabWindream.Name = "TabWindream"
|
||||||
resources.ApplyResources(Me.TabWindream, "TabWindream")
|
resources.ApplyResources(Me.TabWindream, "TabWindream")
|
||||||
'
|
'
|
||||||
|
'GridControlDocSearch
|
||||||
|
'
|
||||||
|
resources.ApplyResources(Me.GridControlDocSearch, "GridControlDocSearch")
|
||||||
|
Me.GridControlDocSearch.MainView = Me.GridViewDoc_Search
|
||||||
|
Me.GridControlDocSearch.Name = "GridControlDocSearch"
|
||||||
|
Me.GridControlDocSearch.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.GridViewDoc_Search})
|
||||||
|
'
|
||||||
|
'GridViewDoc_Search
|
||||||
|
'
|
||||||
|
Me.GridViewDoc_Search.GridControl = Me.GridControlDocSearch
|
||||||
|
Me.GridViewDoc_Search.Name = "GridViewDoc_Search"
|
||||||
|
'
|
||||||
'AxObjectListControl
|
'AxObjectListControl
|
||||||
'
|
'
|
||||||
Me.AxObjectListControl.AllowDrop = True
|
Me.AxObjectListControl.AllowDrop = True
|
||||||
@@ -977,6 +1007,8 @@ Partial Class frmConstructor_Main
|
|||||||
Me.TabDetails.ResumeLayout(False)
|
Me.TabDetails.ResumeLayout(False)
|
||||||
Me.TabWindream.ResumeLayout(False)
|
Me.TabWindream.ResumeLayout(False)
|
||||||
Me.TabWindream.PerformLayout()
|
Me.TabWindream.PerformLayout()
|
||||||
|
CType(Me.GridControlDocSearch, System.ComponentModel.ISupportInitialize).EndInit()
|
||||||
|
CType(Me.GridViewDoc_Search, System.ComponentModel.ISupportInitialize).EndInit()
|
||||||
CType(Me.AxObjectListControl, System.ComponentModel.ISupportInitialize).EndInit()
|
CType(Me.AxObjectListControl, System.ComponentModel.ISupportInitialize).EndInit()
|
||||||
Me.ToolStripDokumente.ResumeLayout(False)
|
Me.ToolStripDokumente.ResumeLayout(False)
|
||||||
Me.ToolStripDokumente.PerformLayout()
|
Me.ToolStripDokumente.PerformLayout()
|
||||||
@@ -1123,4 +1155,8 @@ Partial Class frmConstructor_Main
|
|||||||
Friend WithEvents ImageCollection1 As DevExpress.Utils.ImageCollection
|
Friend WithEvents ImageCollection1 As DevExpress.Utils.ImageCollection
|
||||||
Friend WithEvents ToolTipController As DevExpress.Utils.ToolTipController
|
Friend WithEvents ToolTipController As DevExpress.Utils.ToolTipController
|
||||||
Friend WithEvents tslblLocked As System.Windows.Forms.ToolStripLabel
|
Friend WithEvents tslblLocked As System.Windows.Forms.ToolStripLabel
|
||||||
|
Friend WithEvents GridControlDocSearch As DevExpress.XtraGrid.GridControl
|
||||||
|
Friend WithEvents GridViewDoc_Search As DevExpress.XtraGrid.Views.Grid.GridView
|
||||||
|
Friend WithEvents ToolStripSeparator6 As System.Windows.Forms.ToolStripSeparator
|
||||||
|
Friend WithEvents tsmi_RecordDelete As System.Windows.Forms.ToolStripMenuItem
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -264,8 +264,17 @@
|
|||||||
<data name="DatenNeuLadenToolStripMenuItem.Text" xml:space="preserve">
|
<data name="DatenNeuLadenToolStripMenuItem.Text" xml:space="preserve">
|
||||||
<value>Daten neu laden</value>
|
<value>Daten neu laden</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="ToolStripSeparator6.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>229, 6</value>
|
||||||
|
</data>
|
||||||
|
<data name="tsmi_RecordDelete.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>232, 22</value>
|
||||||
|
</data>
|
||||||
|
<data name="tsmi_RecordDelete.Text" xml:space="preserve">
|
||||||
|
<value>Record löschen</value>
|
||||||
|
</data>
|
||||||
<data name="ContextMenuGrid.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="ContextMenuGrid.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>233, 170</value>
|
<value>233, 198</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>ContextMenuGrid.Name" xml:space="preserve">
|
<data name=">>ContextMenuGrid.Name" xml:space="preserve">
|
||||||
<value>ContextMenuGrid</value>
|
<value>ContextMenuGrid</value>
|
||||||
@@ -402,8 +411,29 @@
|
|||||||
<data name="TCDetails.TabIndex" type="System.Int32, mscorlib">
|
<data name="TCDetails.TabIndex" type="System.Int32, mscorlib">
|
||||||
<value>1</value>
|
<value>1</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="AxObjectListControl.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
<data name="GridControlDocSearch.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
<value>Fill</value>
|
<value>3, 160</value>
|
||||||
|
</data>
|
||||||
|
<data name="GridControlDocSearch.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>1066, 153</value>
|
||||||
|
</data>
|
||||||
|
<data name="GridControlDocSearch.TabIndex" type="System.Int32, mscorlib">
|
||||||
|
<value>7</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>GridControlDocSearch.Name" xml:space="preserve">
|
||||||
|
<value>GridControlDocSearch</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>GridControlDocSearch.Type" xml:space="preserve">
|
||||||
|
<value>DevExpress.XtraGrid.GridControl, DevExpress.XtraGrid.v15.1, Version=15.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>GridControlDocSearch.Parent" xml:space="preserve">
|
||||||
|
<value>TabWindream</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>GridControlDocSearch.ZOrder" xml:space="preserve">
|
||||||
|
<value>0</value>
|
||||||
|
</data>
|
||||||
|
<data name="AxObjectListControl.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||||
|
<value>Top, Bottom, Left, Right</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="AxObjectListControl.Enabled" type="System.Boolean, mscorlib">
|
<data name="AxObjectListControl.Enabled" type="System.Boolean, mscorlib">
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
@@ -416,11 +446,11 @@
|
|||||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACFTeXN0
|
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACFTeXN0
|
||||||
ZW0uV2luZG93cy5Gb3Jtcy5BeEhvc3QrU3RhdGUBAAAABERhdGEHAgIAAAAJAwAAAA8DAAAAJQAAAAIB
|
ZW0uV2luZG93cy5Gb3Jtcy5BeEhvc3QrU3RhdGUBAAAABERhdGEHAgIAAAAJAwAAAA8DAAAAJQAAAAIB
|
||||||
AAAAAQAAAAAAAAAAAAAAABAAAAAAAAEAy24AABMeAAAAAAAACw==
|
AAAAAQAAAAAAAAAAAAAAABAAAAAAAAEAy24AAFUNAAAAAAAACw==
|
||||||
</value>
|
</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="AxObjectListControl.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="AxObjectListControl.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>1072, 291</value>
|
<value>1072, 129</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="AxObjectListControl.TabIndex" type="System.Int32, mscorlib">
|
<data name="AxObjectListControl.TabIndex" type="System.Int32, mscorlib">
|
||||||
<value>6</value>
|
<value>6</value>
|
||||||
@@ -435,7 +465,7 @@
|
|||||||
<value>TabWindream</value>
|
<value>TabWindream</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>AxObjectListControl.ZOrder" xml:space="preserve">
|
<data name=">>AxObjectListControl.ZOrder" xml:space="preserve">
|
||||||
<value>0</value>
|
<value>1</value>
|
||||||
</data>
|
</data>
|
||||||
<metadata name="ToolStripDokumente.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="ToolStripDokumente.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>1157, 15</value>
|
<value>1157, 15</value>
|
||||||
@@ -499,7 +529,7 @@
|
|||||||
<value>TabWindream</value>
|
<value>TabWindream</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>ToolStripDokumente.ZOrder" xml:space="preserve">
|
<data name=">>ToolStripDokumente.ZOrder" xml:space="preserve">
|
||||||
<value>1</value>
|
<value>2</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TabWindream.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="TabWindream.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>1072, 316</value>
|
<value>1072, 316</value>
|
||||||
@@ -2246,6 +2276,18 @@
|
|||||||
<data name=">>DatenNeuLadenToolStripMenuItem.Type" xml:space="preserve">
|
<data name=">>DatenNeuLadenToolStripMenuItem.Type" xml:space="preserve">
|
||||||
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name=">>ToolStripSeparator6.Name" xml:space="preserve">
|
||||||
|
<value>ToolStripSeparator6</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>ToolStripSeparator6.Type" xml:space="preserve">
|
||||||
|
<value>System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>tsmi_RecordDelete.Name" xml:space="preserve">
|
||||||
|
<value>tsmi_RecordDelete</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>tsmi_RecordDelete.Type" xml:space="preserve">
|
||||||
|
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</data>
|
||||||
<data name=">>grvwGrid.Name" xml:space="preserve">
|
<data name=">>grvwGrid.Name" xml:space="preserve">
|
||||||
<value>grvwGrid</value>
|
<value>grvwGrid</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -2264,6 +2306,12 @@
|
|||||||
<data name=">>grvwTiles.Type" xml:space="preserve">
|
<data name=">>grvwTiles.Type" xml:space="preserve">
|
||||||
<value>DevExpress.XtraGrid.Views.Tile.TileView, DevExpress.XtraGrid.v15.1, Version=15.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
<value>DevExpress.XtraGrid.Views.Tile.TileView, DevExpress.XtraGrid.v15.1, Version=15.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name=">>GridViewDoc_Search.Name" xml:space="preserve">
|
||||||
|
<value>GridViewDoc_Search</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>GridViewDoc_Search.Type" xml:space="preserve">
|
||||||
|
<value>DevExpress.XtraGrid.Views.Grid.GridView, DevExpress.XtraGrid.v15.1, Version=15.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||||
|
</data>
|
||||||
<data name=">>tslblWindreamView.Name" xml:space="preserve">
|
<data name=">>tslblWindreamView.Name" xml:space="preserve">
|
||||||
<value>tslblWindreamView</value>
|
<value>tslblWindreamView</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -211,7 +211,7 @@ Public Class frmConstructor_Main
|
|||||||
If File.Exists(XMLPath) Then
|
If File.Exists(XMLPath) Then
|
||||||
grvwGridPos.RestoreLayoutFromXml(XMLPath)
|
grvwGridPos.RestoreLayoutFromXml(XMLPath)
|
||||||
'grvwGrid.ClearGrouping()
|
'grvwGrid.ClearGrouping()
|
||||||
grvwGridPos.ClearSelection()
|
' grvwGridPos.ClearSelection()
|
||||||
grvwGridPos.OptionsView.ShowPreview = False
|
grvwGridPos.OptionsView.ShowPreview = False
|
||||||
End If
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
@@ -728,6 +728,7 @@ Public Class frmConstructor_Main
|
|||||||
tsButtonEdit.Enabled = False
|
tsButtonEdit.Enabled = False
|
||||||
tsButtonSave.Enabled = False
|
tsButtonSave.Enabled = False
|
||||||
tsButtonDelete.Enabled = False
|
tsButtonDelete.Enabled = False
|
||||||
|
tsmi_RecordDelete.Enabled = False
|
||||||
tslblLocked.Visible = True
|
tslblLocked.Visible = True
|
||||||
RecordKopierenToolStripMenuItem.Enabled = False
|
RecordKopierenToolStripMenuItem.Enabled = False
|
||||||
TabFollowUp.PageEnabled = False
|
TabFollowUp.PageEnabled = False
|
||||||
@@ -1153,6 +1154,9 @@ Public Class frmConstructor_Main
|
|||||||
Me.Cursor = Cursors.WaitCursor
|
Me.Cursor = Cursors.WaitCursor
|
||||||
Try
|
Try
|
||||||
If TCDetails.SelectedTabPage.Text.StartsWith("Pos") = False Then
|
If TCDetails.SelectedTabPage.Text.StartsWith("Pos") = False Then
|
||||||
|
SELECTED_RECORD_ID = 0
|
||||||
|
CURRENT_RECORD_ID = 0
|
||||||
|
RECORD_ID = 0
|
||||||
Lock_RecordControls(False)
|
Lock_RecordControls(False)
|
||||||
tsButtonShowWorkflowTasks.Enabled = True
|
tsButtonShowWorkflowTasks.Enabled = True
|
||||||
CURRENT_PARENT_ID = PARENT_ID
|
CURRENT_PARENT_ID = PARENT_ID
|
||||||
@@ -1164,6 +1168,8 @@ Public Class frmConstructor_Main
|
|||||||
EDIT_STATE = EditState.Insert
|
EDIT_STATE = EditState.Insert
|
||||||
RECORD_CHANGED = True
|
RECORD_CHANGED = True
|
||||||
tsslblRecord.Text = "Adding record ......"
|
tsslblRecord.Text = "Adding record ......"
|
||||||
|
RIGHT_ONLY_READ = False
|
||||||
|
tslblLocked.Visible = False
|
||||||
End If
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
MsgBox("Unexpected Error in Insert: " & ex.Message)
|
MsgBox("Unexpected Error in Insert: " & ex.Message)
|
||||||
@@ -1317,8 +1323,7 @@ Public Class frmConstructor_Main
|
|||||||
Me.Cursor = Cursors.Default
|
Me.Cursor = Cursors.Default
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
Sub Delete_Record()
|
||||||
Private Sub tsButtonDelete_Click(sender As Object, e As EventArgs) Handles tsButtonDelete.Click
|
|
||||||
Dim msg = "Sind Sie sicher, dass Sie diesen Record/Datensatz löschen wollen?"
|
Dim msg = "Sind Sie sicher, dass Sie diesen Record/Datensatz löschen wollen?"
|
||||||
If USER_LANGUAGE <> "de-DE" Then
|
If USER_LANGUAGE <> "de-DE" Then
|
||||||
msg = "Are You sure You want to delete the selected record?"
|
msg = "Are You sure You want to delete the selected record?"
|
||||||
@@ -1360,7 +1365,9 @@ Public Class frmConstructor_Main
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
End Sub
|
||||||
|
Private Sub tsButtonDelete_Click(sender As Object, e As EventArgs) Handles tsButtonDelete.Click
|
||||||
|
Delete_Record()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub tsButtonEditMode_Click(sender As Object, e As EventArgs) Handles tsButtonEdit.Click
|
Private Sub tsButtonEditMode_Click(sender As Object, e As EventArgs) Handles tsButtonEdit.Click
|
||||||
@@ -1382,10 +1389,11 @@ Public Class frmConstructor_Main
|
|||||||
Dim EditingUser = ClassRecordState.IsRecordLocked(SELECTED_RECORD_ID)
|
Dim EditingUser = ClassRecordState.IsRecordLocked(SELECTED_RECORD_ID)
|
||||||
' Überprüfen, ob der Record gerade bearbeitet wird
|
' Überprüfen, ob der Record gerade bearbeitet wird
|
||||||
If Not IsNothing(EditingUser) Then
|
If Not IsNothing(EditingUser) Then
|
||||||
|
tslblLocked.Visible = True
|
||||||
If USER_LANGUAGE = "de-DE" Then
|
If USER_LANGUAGE = "de-DE" Then
|
||||||
MsgBox(String.Format("Dieser Datensatz wird gerade vom Benutzer {0} bearbeitet und kann nur lesend abgerufen werden.", EditingUser), MsgBoxStyle.Exclamation)
|
MsgBox(String.Format("Dieser Datensatz wird gerade vom Benutzer '{0}' bearbeitet und kann nur lesend abgerufen werden.", EditingUser), MsgBoxStyle.Exclamation)
|
||||||
Else
|
Else
|
||||||
MsgBox(String.Format("This Record is currently being edited by User {0} and only available in Read-Only mode.", EditingUser), MsgBoxStyle.Exclamation)
|
MsgBox(String.Format("This Record is currently being edited by User '{0}' and only available in Read-Only mode.", EditingUser), MsgBoxStyle.Exclamation)
|
||||||
End If
|
End If
|
||||||
' Wenn Record bearbeitet wird, EnableEditMode abbrechen!
|
' Wenn Record bearbeitet wird, EnableEditMode abbrechen!
|
||||||
Exit Sub
|
Exit Sub
|
||||||
@@ -1397,7 +1405,7 @@ Public Class frmConstructor_Main
|
|||||||
|
|
||||||
|
|
||||||
Lock_RecordControls(False)
|
Lock_RecordControls(False)
|
||||||
Me.tsButtonDelete.Enabled = True
|
tsmi_RecordDelete.Enabled = True
|
||||||
Me.tsButtonAdd.Enabled = True
|
Me.tsButtonAdd.Enabled = True
|
||||||
Me.tsButtonSave.Enabled = True
|
Me.tsButtonSave.Enabled = True
|
||||||
Dim stg As String
|
Dim stg As String
|
||||||
@@ -1532,6 +1540,7 @@ Public Class frmConstructor_Main
|
|||||||
tsButtonAdd.Visible = True
|
tsButtonAdd.Visible = True
|
||||||
tsButtonEdit.Visible = True
|
tsButtonEdit.Visible = True
|
||||||
tsButtonDelete.Visible = True
|
tsButtonDelete.Visible = True
|
||||||
|
tsmi_RecordDelete.Enabled = True
|
||||||
|
|
||||||
If RIGHT_ADD_R = False Then
|
If RIGHT_ADD_R = False Then
|
||||||
tsButtonAdd.Visible = False
|
tsButtonAdd.Visible = False
|
||||||
@@ -1544,6 +1553,7 @@ Public Class frmConstructor_Main
|
|||||||
End If
|
End If
|
||||||
If RIGHT_DELETE_R = False Then
|
If RIGHT_DELETE_R = False Then
|
||||||
tsButtonDelete.Visible = False
|
tsButtonDelete.Visible = False
|
||||||
|
tsmi_RecordDelete.Enabled = False
|
||||||
End If
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
MsgBox("Error in GetSet_Rights:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
MsgBox("Error in GetSet_Rights:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||||
@@ -3238,7 +3248,7 @@ Public Class frmConstructor_Main
|
|||||||
MsgBox(msg, MsgBoxStyle.Information)
|
MsgBox(msg, MsgBoxStyle.Information)
|
||||||
Next
|
Next
|
||||||
Else
|
Else
|
||||||
Dim msg = "Es wurden keine Dateien für diesen Datensatz gefunden!"
|
Dim msg = "Es wurden keine Dateien für diesen Datensatz gefunden!"
|
||||||
If USER_LANGUAGE <> "de-DE" Then
|
If USER_LANGUAGE <> "de-DE" Then
|
||||||
msg = "No files found for record!"
|
msg = "No files found for record!"
|
||||||
End If
|
End If
|
||||||
@@ -3257,6 +3267,257 @@ Public Class frmConstructor_Main
|
|||||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> Run WD Delete Docs took " & Format(elapsed, "0.000000000") & " seconds", False)
|
If LogErrorsOnly = False Then ClassLogger.Add(" >> Run WD Delete Docs took " & Format(elapsed, "0.000000000") & " seconds", False)
|
||||||
Cursor = Cursors.Default
|
Cursor = Cursors.Default
|
||||||
End Sub
|
End Sub
|
||||||
|
Private Sub RUN_WDSEARCH_GRID()
|
||||||
|
Dim sw As New Stopwatch
|
||||||
|
sw.Start()
|
||||||
|
Dim elapsed As Double
|
||||||
|
Dim Basesearch As String
|
||||||
|
Try
|
||||||
|
Dim windream_temp_search
|
||||||
|
If Not windream_Docshow = True Or Sett_LoadWD_Docs = False Then
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
Cursor = Cursors.WaitCursor
|
||||||
|
Dim DTWD As DataTable
|
||||||
|
Dim sql = "SELECT WINDREAM_SEARCH,SEARCH_PATTERN1,SEARCH_PATTERN2,SEARCH_PATTERN3,SEARCH_PATTERN4,SEARCH_PATTERN5 FROM TBPMO_FORM_VIEW WHERE WINDREAM_SEARCH <> '' AND FORM_ID = " & ENTITY_ID
|
||||||
|
DTWD = ClassDatabase.Return_Datatable(sql)
|
||||||
|
If DTWD.Rows.Count = 1 Then
|
||||||
|
If IsDBNull(DTWD.Rows(0).Item(0)) Then
|
||||||
|
Cursor = Cursors.Default
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
Cursor = Cursors.Default
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
'Die SearchPatterns durchlaufen und zwischenspeichern
|
||||||
|
If IsDBNull(DTWD.Rows(0).Item(0)) Then
|
||||||
|
Cursor = Cursors.Default
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
Basesearch = DTWD.Rows(0).Item(0)
|
||||||
|
SP1 = DTWD.Rows(0).Item(1)
|
||||||
|
If IsDBNull(DTWD.Rows(0).Item(2)) Then
|
||||||
|
SP2 = ""
|
||||||
|
Else
|
||||||
|
SP2 = DTWD.Rows(0).Item(2)
|
||||||
|
End If
|
||||||
|
If IsDBNull(DTWD.Rows(0).Item(3)) Then
|
||||||
|
SP3 = ""
|
||||||
|
Else
|
||||||
|
SP3 = DTWD.Rows(0).Item(3)
|
||||||
|
End If
|
||||||
|
If IsDBNull(DTWD.Rows(0).Item(4)) Then
|
||||||
|
SP4 = ""
|
||||||
|
Else
|
||||||
|
SP4 = DTWD.Rows(0).Item(4)
|
||||||
|
End If
|
||||||
|
If IsDBNull(DTWD.Rows(0).Item(5)) Then
|
||||||
|
SP5 = ""
|
||||||
|
Else
|
||||||
|
SP5 = DTWD.Rows(0).Item(5)
|
||||||
|
End If
|
||||||
|
|
||||||
|
'Eine tempfile generieren
|
||||||
|
Dim tempFilename1 = My.Computer.FileSystem.GetTempFileName()
|
||||||
|
'Nur den Filenamen ohne Erweiterung
|
||||||
|
Dim tempName = Path.GetFileNameWithoutExtension(tempFilename1)
|
||||||
|
'tempfile lsöchen
|
||||||
|
If My.Computer.FileSystem.FileExists(tempFilename1) Then
|
||||||
|
My.Computer.FileSystem.DeleteFile(tempFilename1)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim temppath = Path.GetTempPath
|
||||||
|
|
||||||
|
Dim EncodingFormat As Encoding
|
||||||
|
Dim WDUnicode = ClassDatabase.Execute_Scalar("SELECT WD_UNICODE FROM TBPMO_KONFIGURATION WHERE GUID = 1")
|
||||||
|
If WDUnicode = True Then
|
||||||
|
EncodingFormat = Encoding.GetEncoding(1252) '1252
|
||||||
|
If LogErrorsOnly = False Then ClassLogger.Add(" >> Unicode is used (Encoding.GetEncoding(1252))", False)
|
||||||
|
Else
|
||||||
|
If LogErrorsOnly = False Then ClassLogger.Add(" >> UTF8 (Encoding.GetEncoding(65001))", False)
|
||||||
|
EncodingFormat = Encoding.GetEncoding(65001)
|
||||||
|
End If
|
||||||
|
Dim fileContents As String
|
||||||
|
If LogErrorsOnly = False Then ClassLogger.Add(" >> ReadAlltext: " & windream_temp_search, False)
|
||||||
|
fileContents = My.Computer.FileSystem.ReadAllText(Basesearch, EncodingFormat) ', System.Text.Encoding.Unicode
|
||||||
|
If LogErrorsOnly = False Then ClassLogger.Add(" >> fileContents geladen", False)
|
||||||
|
fileContents = fileContents.Replace("Í", "Ö")
|
||||||
|
Dim _sp1 = SP1
|
||||||
|
Dim _sp2 = SP2
|
||||||
|
Dim _sp3 = SP3
|
||||||
|
Dim _sp4 = SP4
|
||||||
|
Dim _sp5 = SP5
|
||||||
|
|
||||||
|
If _sp1.ToString <> String.Empty Then
|
||||||
|
_sp1 = Return_SearchPattern(_sp1.ToString)
|
||||||
|
fileContents = fileContents.Replace("%pattern1%", _sp1)
|
||||||
|
fileContents = fileContents.Replace("471101", _sp1)
|
||||||
|
End If
|
||||||
|
If _sp2.ToString <> String.Empty Then
|
||||||
|
_sp2 = Return_SearchPattern(_sp2.ToString)
|
||||||
|
If _sp2 = 0 Then
|
||||||
|
_sp2 = ""
|
||||||
|
End If
|
||||||
|
fileContents = fileContents.Replace("%pattern2%", _sp2)
|
||||||
|
fileContents = fileContents.Replace("471102", _sp2)
|
||||||
|
End If
|
||||||
|
If _sp3.ToString <> String.Empty Then
|
||||||
|
_sp3 = Return_SearchPattern(_sp3.ToString)
|
||||||
|
If _sp3 = 0 Then
|
||||||
|
_sp3 = ""
|
||||||
|
End If
|
||||||
|
fileContents = fileContents.Replace("%pattern3%", _sp3)
|
||||||
|
fileContents = fileContents.Replace("471103", _sp3)
|
||||||
|
End If
|
||||||
|
If _sp4.ToString <> String.Empty Then
|
||||||
|
_sp4 = Return_SearchPattern(_sp4.ToString)
|
||||||
|
If _sp4 = 0 Then
|
||||||
|
_sp4 = ""
|
||||||
|
End If
|
||||||
|
fileContents = fileContents.Replace("%pattern4%", _sp4)
|
||||||
|
fileContents = fileContents.Replace("471104", _sp4)
|
||||||
|
End If
|
||||||
|
If _sp5.ToString <> String.Empty Then
|
||||||
|
_sp5 = Return_SearchPattern(_sp5.ToString)
|
||||||
|
If _sp5 = 0 Then
|
||||||
|
_sp5 = ""
|
||||||
|
End If
|
||||||
|
fileContents = fileContents.Replace("%pattern5%", _sp5)
|
||||||
|
fileContents = fileContents.Replace("471105", _sp5)
|
||||||
|
End If
|
||||||
|
'Die windream File zusammensetzen
|
||||||
|
windream_temp_search = temppath & tempName & ".wdf"
|
||||||
|
TEMP_FILES.Add(windream_temp_search)
|
||||||
|
'Die File schreiben
|
||||||
|
My.Computer.FileSystem.WriteAllText(windream_temp_search, fileContents, False, EncodingFormat)
|
||||||
|
My.Computer.FileSystem.WriteAllText(temppath & "SEARCH_COPY.wdf", fileContents, False, EncodingFormat)
|
||||||
|
' XML-Datei öffnen und laden
|
||||||
|
Dim Stream As New IO.StreamReader(CStr(windream_temp_search), EncodingFormat)
|
||||||
|
Dim Reader As New System.Xml.XmlTextReader(Stream)
|
||||||
|
' XML-Datei initialisieren
|
||||||
|
Dim xml As New System.Xml.XmlDocument()
|
||||||
|
' XML-Datei öffnen und laden
|
||||||
|
xml.Load(Reader)
|
||||||
|
Reader.Close()
|
||||||
|
xml.Save(windream_temp_search)
|
||||||
|
If LogErrorsOnly = False Then ClassLogger.Add(" >> Xml Generiert: " & windream_temp_search, False)
|
||||||
|
Dim windreamSucheErgebnisse As WINDREAMLib.WMObjects
|
||||||
|
Try
|
||||||
|
windreamSucheErgebnisse = ClassWindream.GetSearchDocuments(windream_temp_search)
|
||||||
|
Catch ex As Exception
|
||||||
|
MsgBox("Error in windreamSucheErgebnisse:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||||
|
End Try
|
||||||
|
elapsed = sw.Elapsed.TotalSeconds
|
||||||
|
If LogErrorsOnly = False Then ClassLogger.Add(" >> GetSearchDocuments took " & Format(elapsed, "0.000000000") & " seconds", False)
|
||||||
|
Dim DTGrid As New DataTable
|
||||||
|
If windreamSucheErgebnisse.Count > 0 Then 'Es gibt Suchergebnisse
|
||||||
|
Dim stg As String
|
||||||
|
If USER_LANGUAGE = "de-DE" Then
|
||||||
|
stg = "windream-Dateien"
|
||||||
|
Else
|
||||||
|
stg = "windream-files"
|
||||||
|
End If
|
||||||
|
TabWindream.Text = stg & " (" & windreamSucheErgebnisse.Count & ")"
|
||||||
|
Dim sql_ResultList = "select * from TBPMO_WINDREAM_RESULTLIST_CONFIG where guid = 2"
|
||||||
|
Dim DT As DataTable = ClassDatabase.Return_Datatable(sql_ResultList, "GET RESULTLIST KONFIG")
|
||||||
|
Dim ColArray As New List(Of String)
|
||||||
|
Try
|
||||||
|
|
||||||
|
If Not DT Is Nothing And DT.Rows.Count = 1 Then
|
||||||
|
Dim ColCount As Integer = 1
|
||||||
|
For Each Column As DataColumn In DT.Columns
|
||||||
|
If Column.ColumnName.StartsWith("COLUMN") And Column.ColumnName.EndsWith("WIDTH") = False Then
|
||||||
|
Dim sql1 = String.Format("select {0} from TBPMO_WINDREAM_RESULTLIST_CONFIG Where GUID = 2", Column.ColumnName)
|
||||||
|
Dim ColumnName = ClassDatabase.Execute_Scalar(sql1, True)
|
||||||
|
If Not IsDBNull(ColumnName) Then
|
||||||
|
If Not IsDBNull(ColumnName) Or IsNothing(ColumnName) Or ColumnName <> "" Or ColumnName <> "{}" Then
|
||||||
|
'Jetzt die Spalten aus Array hinzufügen und Breite konfigurieren
|
||||||
|
sql1 = String.Format("select COLUMN{0}_WIDTH from TBPMO_WINDREAM_RESULTLIST_CONFIG Where GUID = 2", ColCount)
|
||||||
|
Dim Width = ClassDatabase.Execute_Scalar(sql1, True)
|
||||||
|
If IsNothing(Width) Or IsDBNull(Width) Then
|
||||||
|
Width = 200
|
||||||
|
End If
|
||||||
|
'Die Spalte definieren
|
||||||
|
DTGrid.Columns.Add(ColumnName)
|
||||||
|
ColCount += 1
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
'Jetzt das Array zusammenbauen um die Spaltenwerte zu erhalten
|
||||||
|
ColCount = 1
|
||||||
|
For Each Column As DataColumn In DT.Columns
|
||||||
|
If Column.ColumnName = String.Format("COLUMN{0}", ColCount) Then
|
||||||
|
Dim sql1 = String.Format("select {0} from TBPMO_WINDREAM_RESULTLIST_CONFIG Where GUID = 2", Column.ColumnName)
|
||||||
|
Dim ColumnName = ClassDatabase.Execute_Scalar(sql1, True)
|
||||||
|
If Not IsDBNull(ColumnName) Then
|
||||||
|
If Not IsDBNull(ColumnName) Or IsNothing(ColumnName) Or ColumnName <> "" Or ColumnName <> "{}" Then
|
||||||
|
'Jetzt die Spalten aus Array hinzufügen und Breite konfigurieren
|
||||||
|
ColArray.Add(Column.ColumnName)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
ColCount += 1
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
MsgBox("Unexpected Error in Construct Datatable for GridResult: " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||||
|
End Try
|
||||||
|
If DTGrid.Columns.Count > 0 Then
|
||||||
|
If LogErrorsOnly = False Then ClassLogger.Add(" >> Datatable Grid created!", False)
|
||||||
|
For Each dok As WMObject In windreamSucheErgebnisse
|
||||||
|
Dim fullpath = "W:" & dok.aPath
|
||||||
|
Dim Folderpath = Path.GetDirectoryName(fullpath)
|
||||||
|
Dim filename = Path.GetFileName(fullpath)
|
||||||
|
Try
|
||||||
|
Dim NewRow As DataRow
|
||||||
|
NewRow = DTGrid.NewRow()
|
||||||
|
Dim i = 0
|
||||||
|
For Each Column As String In ColArray
|
||||||
|
Dim Indexname = DT.Rows(0).Item(Column)
|
||||||
|
Dim idxvalue
|
||||||
|
Try
|
||||||
|
idxvalue = dok.GetVariableValue(Indexname)
|
||||||
|
If LogErrorsOnly = False Then ClassLogger.Add(" >> idxvalue from windream: '" & idxvalue.ToString & "'", False)
|
||||||
|
Catch ex As Exception
|
||||||
|
ClassLogger.Add("Unexpected Error in GetVariableValue for Index '" & Indexname & "- Error: " & ex.Message)
|
||||||
|
idxvalue = "Error getting indexvalue"
|
||||||
|
End Try
|
||||||
|
NewRow.Item(i) = idxvalue.ToString
|
||||||
|
i += 1
|
||||||
|
Next
|
||||||
|
|
||||||
|
DTGrid.Rows.Add(NewRow)
|
||||||
|
Catch ex As Exception
|
||||||
|
ClassLogger.Add("Unexpected Error in CreateRow for doc '" & filename & "- Error: " & ex.Message)
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
If DTGrid.Rows.Count > 0 Then
|
||||||
|
GridControlDocSearch.DataSource = DTGrid
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
Dim msg = "Windream-Dokumente für Record: " & RECORD_ID & " - Keine Dateien gefunden"
|
||||||
|
If USER_LANGUAGE <> "de-DE" Then
|
||||||
|
msg = "windream-files for record: " & RECORD_ID & " - no files found"
|
||||||
|
End If
|
||||||
|
tslblWindreamView.Text = "Windream-Dokumente für Record: " & RECORD_ID & " - Keine Dateien gefunden"
|
||||||
|
Clear_Windream_ResultList()
|
||||||
|
End If
|
||||||
|
|
||||||
|
Cursor = Cursors.Default
|
||||||
|
Catch ex As Exception
|
||||||
|
MsgBox("Error in RUN_WDSEARCH_GRID:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||||
|
ClassLogger.Add("Unexpected Error in RUN_WDSEARCH_GRID: " & ex.Message)
|
||||||
|
End Try
|
||||||
|
elapsed = sw.Elapsed.TotalSeconds
|
||||||
|
sw.Stop()
|
||||||
|
sw.Reset()
|
||||||
|
If LogErrorsOnly = False Then ClassLogger.Add(" >> Run RUN_WDSEARCH_GRID took " & Format(elapsed, "0.000000000") & " seconds", False)
|
||||||
|
Cursor = Cursors.Default
|
||||||
|
End Sub
|
||||||
Private Function Return_SearchPattern(ByVal content As String)
|
Private Function Return_SearchPattern(ByVal content As String)
|
||||||
Select Case content.ToUpper
|
Select Case content.ToUpper
|
||||||
Case "@Record-ID".ToUpper
|
Case "@Record-ID".ToUpper
|
||||||
@@ -3415,6 +3676,7 @@ Public Class frmConstructor_Main
|
|||||||
RUN_WD_SEARCH(WD_Suche, "ENTITY")
|
RUN_WD_SEARCH(WD_Suche, "ENTITY")
|
||||||
Else
|
Else
|
||||||
RUN_WD_SEARCH(WD_Suche, "RECORD")
|
RUN_WD_SEARCH(WD_Suche, "RECORD")
|
||||||
|
RUN_WDSEARCH_GRID()
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
If TCDetails.SelectedTabPage.Text.ToLower.StartsWith("wieder") Or TCDetails.SelectedTabPage.Text.ToLower.StartsWith("follo") Then
|
If TCDetails.SelectedTabPage.Text.ToLower.StartsWith("wieder") Or TCDetails.SelectedTabPage.Text.ToLower.StartsWith("follo") Then
|
||||||
@@ -4349,4 +4611,18 @@ Public Class frmConstructor_Main
|
|||||||
Private Sub AxObjectListControl_Validated(sender As Object, e As EventArgs) Handles AxObjectListControl.Validated
|
Private Sub AxObjectListControl_Validated(sender As Object, e As EventArgs) Handles AxObjectListControl.Validated
|
||||||
Console.WriteLine("Validated")
|
Console.WriteLine("Validated")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub tslblLocked_VisibleChanged(sender As Object, e As EventArgs) Handles tslblLocked.VisibleChanged
|
||||||
|
If tslblLocked.Visible = True Then
|
||||||
|
Dim msg = "Nur lesenden Zugriff"
|
||||||
|
If USER_LANGUAGE <> "de-DE" Then
|
||||||
|
msg = "Record is read only"
|
||||||
|
End If
|
||||||
|
tslblLocked.Text = msg
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub tsmi_RecordDelete_Click(sender As Object, e As EventArgs) Handles tsmi_RecordDelete.Click
|
||||||
|
Delete_Record()
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
Reference in New Issue
Block a user