Revert "MS19042016"
This reverts commit fa5397cd240efd22c865bb0c410ff6794e9f3cce.
This commit is contained in:
parent
fa5397cd24
commit
c9fc63e237
@ -76,6 +76,7 @@ Public Class ClassControlBuilder
|
|||||||
|
|
||||||
Public Sub MouseHover(sender As Object, e As EventArgs)
|
Public Sub MouseHover(sender As Object, e As EventArgs)
|
||||||
Dim onMouseHoverHandler As EventHandler = CType(Me.Events(_onMouseHoverName), EventHandler)
|
Dim onMouseHoverHandler As EventHandler = CType(Me.Events(_onMouseHoverName), EventHandler)
|
||||||
|
|
||||||
If onMouseHoverHandler IsNot Nothing Then
|
If onMouseHoverHandler IsNot Nothing Then
|
||||||
onMouseHoverHandler.Invoke(sender, e)
|
onMouseHoverHandler.Invoke(sender, e)
|
||||||
End If
|
End If
|
||||||
|
|||||||
@ -562,11 +562,9 @@ Public Class ClassControlCommandsUI
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Function GetControlValue(ctrl As Control) As String
|
Function GetControlValue(ctrl As Control) As String
|
||||||
Dim CONTROL_ID As Integer
|
|
||||||
Try
|
|
||||||
Dim type = ctrl.GetType().Name
|
|
||||||
CONTROL_ID = DirectCast(ctrl.Tag, ClassControlMetadata).Id ' GetControlID_for_RecordID(ctrl.Name, CURRENT_RECORD_ID)
|
|
||||||
|
|
||||||
|
Dim type = ctrl.GetType().Name
|
||||||
|
Dim CONTROL_ID As Integer = DirectCast(ctrl.Tag, ClassControlMetadata).Id ' GetControlID_for_RecordID(ctrl.Name, CURRENT_RECORD_ID)
|
||||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> GetControlValue CONTROL_ID: " & CONTROL_ID, False)
|
If LogErrorsOnly = False Then ClassLogger.Add(" >> GetControlValue CONTROL_ID: " & CONTROL_ID, False)
|
||||||
Dim CONTROL_VALUE As String = Nothing
|
Dim CONTROL_VALUE As String = Nothing
|
||||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> type = " & type.ToString, False)
|
If LogErrorsOnly = False Then ClassLogger.Add(" >> type = " & type.ToString, False)
|
||||||
@ -610,10 +608,6 @@ Public Class ClassControlCommandsUI
|
|||||||
Return result_string
|
Return result_string
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim SQL_Datasource = "SELECT SQL_COMMAND_1 FROM TBPMO_CONTROL WHERE GUID = " & CONTROL_ID
|
|
||||||
SQL_Datasource = ClassDatabase.Execute_Scalar(SQL_Datasource)
|
|
||||||
|
|
||||||
If SQL_Datasource.ToUpper.Contains("SELECT [RECORD-ID],") Then
|
|
||||||
'Alle Recorddatensätze durchlaufen und überprüfen ob nicht angehakt
|
'Alle Recorddatensätze durchlaufen und überprüfen ob nicht angehakt
|
||||||
'Wenn nicht angehakt dann Record löschen
|
'Wenn nicht angehakt dann Record löschen
|
||||||
Dim index As Integer = 0
|
Dim index As Integer = 0
|
||||||
@ -633,18 +627,11 @@ Public Class ClassControlCommandsUI
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
'Für jeden gecheckten Eintrag den Record der Stammentität mit dem selektierten linken
|
'Für jeden gecheckten Eintrag den Record der Stammentität mit dem selektierten linken
|
||||||
Dim checked_result As New List(Of String)
|
Dim checked_result As New List(Of String)
|
||||||
Dim checked_result_string As String
|
Dim checked_result_string As String
|
||||||
Dim checked_Count As Integer = 0
|
|
||||||
For Each item As Object In DirectCast(ctrl, DevExpress.XtraEditors.CheckedListBoxControl).CheckedItems
|
|
||||||
checked_Count += 1
|
|
||||||
Next
|
|
||||||
|
|
||||||
If SQL_Datasource.ToUpper.Contains("SELECT [RECORD-ID],") Then
|
|
||||||
For Each item As Object In DirectCast(ctrl, DevExpress.XtraEditors.CheckedListBoxControl).CheckedItems
|
For Each item As Object In DirectCast(ctrl, DevExpress.XtraEditors.CheckedListBoxControl).CheckedItems
|
||||||
Dim row As DataRowView = CType(item, DataRowView)
|
Dim row As DataRowView = CType(item, DataRowView)
|
||||||
Try
|
Try
|
||||||
@ -670,21 +657,11 @@ Public Class ClassControlCommandsUI
|
|||||||
End Try
|
End Try
|
||||||
|
|
||||||
Next
|
Next
|
||||||
Else
|
|
||||||
For Each item As Object In DirectCast(ctrl, DevExpress.XtraEditors.CheckedListBoxControl).CheckedItems
|
|
||||||
Dim row As DataRowView = CType(item, DataRowView)
|
|
||||||
Dim checked_value = row(1)
|
|
||||||
checked_result.Add(checked_value)
|
|
||||||
checked_result_string = String.Join(";", checked_result)
|
|
||||||
Next
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
' Hier wird ein String zurückgegeben, der als VALUE gespeichert werden soll
|
' Hier wird ein String zurückgegeben, der als VALUE gespeichert werden soll
|
||||||
' Überspringt den Rest der funktion
|
' Überspringt den Rest der funktion
|
||||||
If Not IsNothing(checked_result_string) Then
|
If Not IsNothing(checked_result_string) Then
|
||||||
Dim sql = String.Format("select count(*) from TBPMO_CONTROL_VALUE where CONTROL_ID = {0} and RECORD_ID = {1}", CONTROL_ID, CURRENT_RECORD_ID)
|
Dim sql = String.Format("select count(*) from TBPMO_CONTROL_VALUE where CONTROL_ID = {0} and RECORD_ID = {1}", CONTROL_ID, CURRENT_RECORD_ID)
|
||||||
If ClassDatabase.Execute_Scalar(sql) = 0 And checked_Count > 0 Then
|
If ClassDatabase.Execute_Scalar(sql) = 0 Then
|
||||||
InsertControlValue(CONTROL_ID, CURRENT_RECORD_ID, "")
|
InsertControlValue(CONTROL_ID, CURRENT_RECORD_ID, "")
|
||||||
End If
|
End If
|
||||||
Return checked_result_string
|
Return checked_result_string
|
||||||
@ -714,11 +691,6 @@ Public Class ClassControlCommandsUI
|
|||||||
Case Else
|
Case Else
|
||||||
Return Nothing
|
Return Nothing
|
||||||
End Select
|
End Select
|
||||||
Catch ex As Exception
|
|
||||||
ClassLogger.Add("Unexpected error in GetControlValue for Control-ID: " & CONTROL_ID & " - error: " & ex.Message)
|
|
||||||
Return Nothing
|
|
||||||
End Try
|
|
||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Shared Function InsertControlValue(ControlID As Integer, RecordID As Integer, Value As String)
|
Public Shared Function InsertControlValue(ControlID As Integer, RecordID As Integer, Value As String)
|
||||||
|
|||||||
@ -15,13 +15,9 @@
|
|||||||
'End Function
|
'End Function
|
||||||
|
|
||||||
Public Shared Function LoadAutoValue(control As Windows.Forms.Control, RecordId As Integer, ParentRecordId As Integer, entity_ID As Integer)
|
Public Shared Function LoadAutoValue(control As Windows.Forms.Control, RecordId As Integer, ParentRecordId As Integer, entity_ID As Integer)
|
||||||
Dim ControlId As Integer
|
|
||||||
Try
|
Try
|
||||||
If ControlId = 810 Then
|
|
||||||
Console.WriteLine("Obacht")
|
|
||||||
End If
|
|
||||||
Dim AutoValue As String = String.Empty
|
Dim AutoValue As String = String.Empty
|
||||||
ControlId = DirectCast(control.Tag, ClassControlMetadata).Id
|
Dim ControlId As Integer = DirectCast(control.Tag, ClassControlMetadata).Id
|
||||||
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)
|
||||||
@ -43,7 +39,7 @@
|
|||||||
|
|
||||||
Return AutoValue
|
Return AutoValue
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
ClassLogger.Add("Unexpected Error in LoadAutoValue - Control-ID: " & ControlId.ToString & " - ERROR: " & ex.Message, True)
|
ClassLogger.Add("Unexpected Error in LoadAutoValue: " & ex.Message, True)
|
||||||
Return Nothing
|
Return Nothing
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
@ -56,9 +52,7 @@
|
|||||||
|
|
||||||
Public Shared Function GetDynamicValue(controlId As Integer, formId As Integer, connID As Object, sqlCommand As String) As DynamicValue
|
Public Shared Function GetDynamicValue(controlId As Integer, formId As Integer, connID As Object, sqlCommand As String) As DynamicValue
|
||||||
Dim returnValue As DynamicValue
|
Dim returnValue As DynamicValue
|
||||||
If controlId = 810 Then
|
|
||||||
Console.WriteLine("Obacht")
|
|
||||||
End If
|
|
||||||
returnValue.StaticList = CheckForStaticList(controlId)
|
returnValue.StaticList = CheckForStaticList(controlId)
|
||||||
returnValue.DataTable = GetSqlList(controlId, formId, connID, sqlCommand)
|
returnValue.DataTable = GetSqlList(controlId, formId, connID, sqlCommand)
|
||||||
|
|
||||||
@ -85,9 +79,6 @@
|
|||||||
|
|
||||||
Public Shared Function GetSqlList(controlId As Integer, formId As Integer, connection_Id As Object, sqlCommand As String) As DataTable
|
Public Shared Function GetSqlList(controlId As Integer, formId As Integer, connection_Id As Object, sqlCommand As String) As DataTable
|
||||||
Try
|
Try
|
||||||
If controlId = 810 Then
|
|
||||||
Console.WriteLine("Obacht")
|
|
||||||
End If
|
|
||||||
If sqlCommand Is Nothing Or sqlCommand = String.Empty Then
|
If sqlCommand Is Nothing Or sqlCommand = String.Empty Then
|
||||||
Return Nothing
|
Return Nothing
|
||||||
End If
|
End If
|
||||||
@ -117,68 +108,36 @@
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Overloads Shared Sub SetDataSource(control As CustomComboBox, dt As DataTable)
|
Overloads Shared Sub SetDataSource(control As CustomComboBox, dt As DataTable)
|
||||||
Try
|
Dim sw As Stopwatch = Stopwatch.StartNew()
|
||||||
If control.Name = "cmbverantwortlich" Then
|
|
||||||
Console.WriteLine("Obacht")
|
|
||||||
End If
|
|
||||||
Dim Name1 = dt.Columns(0).ColumnName.ToString
|
|
||||||
Dim Name2
|
|
||||||
Try
|
|
||||||
Name2 = dt.Columns(1).ColumnName.ToString
|
|
||||||
Catch ex As Exception
|
|
||||||
Name2 = dt.Columns(0).ColumnName.ToString
|
|
||||||
End Try
|
|
||||||
Dim columnCount As Integer = dt.Columns.Count
|
Dim columnCount As Integer = dt.Columns.Count
|
||||||
|
|
||||||
control.BeginUpdate()
|
control.BeginUpdate()
|
||||||
|
|
||||||
' Damit beim Setzen von DisplayMember und ValueMember kein Fehler auftritt,
|
' Damit beim Setzen von DisplayMember und ValueMember kein Fehler auftritt,
|
||||||
' muss die Datasource zunächst geleert werden und der selected index auf -1 gesetzt werden.
|
' muss die Datasource zunächst geleert werden und der selected index auf -1 gesetzt werden.
|
||||||
control.DataSource = Nothing
|
control.DataSource = Nothing
|
||||||
control.SelectedIndex = -1
|
control.SelectedIndex = -1
|
||||||
ClassControlValues.ClearControlValue(control)
|
|
||||||
|
|
||||||
' Es ist wichtig, dass DisplayMember und ValueMember VOR der DataSource festgelegt werden,
|
' Es ist wichtig, dass DisplayMember und ValueMember VOR der DataSource festgelegt werden,
|
||||||
' Dadurch ist das Laden der Datasource um einiges SCHNELLER
|
' Dadurch ist das Laden der Datasource um einiges SCHNELLER
|
||||||
If columnCount = 1 Then
|
If columnCount = 1 Then
|
||||||
For Each row As DataRow In dt.Rows
|
control.DisplayMember = dt.Columns(0).ColumnName
|
||||||
control.Items.Add(row.Item(0).ToString)
|
control.ValueMember = dt.Columns(0).ColumnName
|
||||||
Next
|
|
||||||
'control.ValueMember = Name1
|
|
||||||
'control.DisplayMember = Name1
|
|
||||||
ElseIf columnCount = 2 Then
|
ElseIf columnCount = 2 Then
|
||||||
'If control.Name = "cmbverantwortlich" Then
|
control.DisplayMember = dt.Columns(1).ColumnName
|
||||||
' control.ValueMember = Name1
|
control.ValueMember = dt.Columns(0).ColumnName
|
||||||
' control.DisplayMember = Name2
|
|
||||||
'Else
|
|
||||||
For Each row As DataRow In dt.Rows
|
|
||||||
control.Items.Add(row.Item(1).ToString)
|
|
||||||
Next
|
|
||||||
'End If
|
|
||||||
|
|
||||||
'If control.Name = "cmbverantwortlich" Then
|
|
||||||
|
|
||||||
'Else
|
|
||||||
' control.ValueMember = Name1
|
|
||||||
' control.DisplayMember = Name2
|
|
||||||
'End If
|
|
||||||
End If
|
End If
|
||||||
' Als Erstes setzen wir die DataSource
|
|
||||||
'If control.Name = "cmbverantwortlich" Then
|
|
||||||
' control.DataSource = dt
|
|
||||||
'End If
|
|
||||||
|
|
||||||
'control.DataSource = dt
|
' Als letztes setzen wir die DataSource
|
||||||
|
control.DataSource = dt
|
||||||
|
|
||||||
control.EndUpdate()
|
control.EndUpdate()
|
||||||
Catch ex As Exception
|
|
||||||
ClassLogger.Add("unexpected Error in SetDataSource for ControlName: " & control.Name & " - Error: " & ex.Message)
|
|
||||||
End Try
|
|
||||||
|
|
||||||
|
sw.Stop()
|
||||||
|
Console.WriteLine("SetDataSource for {0} took {1}ms", control.Name, sw.ElapsedMilliseconds)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Overloads Shared Sub SetDataSource(control As DevExpress.XtraEditors.CheckedListBoxControl, dt As DataTable)
|
Overloads Shared Sub SetDataSource(control As DevExpress.XtraEditors.CheckedListBoxControl, dt As DataTable)
|
||||||
Try
|
|
||||||
If control.Name = "cmbverantwortlich" Then
|
|
||||||
Console.WriteLine("Obacht")
|
|
||||||
End If
|
|
||||||
Dim columnCount As Integer = dt.Columns.Count
|
Dim columnCount As Integer = dt.Columns.Count
|
||||||
|
|
||||||
' Damit beim Setzen von DisplayMember und ValueMember kein Fehler auftritt,
|
' Damit beim Setzen von DisplayMember und ValueMember kein Fehler auftritt,
|
||||||
@ -186,7 +145,6 @@
|
|||||||
control.DataSource = Nothing
|
control.DataSource = Nothing
|
||||||
control.SelectedIndex = -1
|
control.SelectedIndex = -1
|
||||||
|
|
||||||
|
|
||||||
' Es ist wichtig, dass DisplayMember und ValueMember VOR der DataSource festgelegt werden,
|
' Es ist wichtig, dass DisplayMember und ValueMember VOR der DataSource festgelegt werden,
|
||||||
' Dadurch ist das Laden der Datasource um einiges SCHNELLER
|
' Dadurch ist das Laden der Datasource um einiges SCHNELLER
|
||||||
If columnCount = 1 Then
|
If columnCount = 1 Then
|
||||||
@ -196,20 +154,12 @@
|
|||||||
control.DisplayMember = dt.Columns(1).ColumnName
|
control.DisplayMember = dt.Columns(1).ColumnName
|
||||||
control.ValueMember = dt.Columns(0).ColumnName
|
control.ValueMember = dt.Columns(0).ColumnName
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' Als letztes setzen wir die DataSource
|
' Als letztes setzen wir die DataSource
|
||||||
control.DataSource = dt
|
control.DataSource = dt
|
||||||
control.EndUpdate()
|
|
||||||
Catch ex As Exception
|
|
||||||
ClassLogger.Add("unexpected Error in SetDataSource2 for ControlName: " & control.Name & " - Error: " & ex.Message)
|
|
||||||
End Try
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Overloads Shared Sub SetDataSource(control As DevExpress.XtraEditors.ListBoxControl, dt As DataTable)
|
Overloads Shared Sub SetDataSource(control As DevExpress.XtraEditors.ListBoxControl, dt As DataTable)
|
||||||
Try
|
|
||||||
If control.Name = "cmbverantwortlich" Then
|
|
||||||
Console.WriteLine("Obacht")
|
|
||||||
End If
|
|
||||||
Dim columnCount As Integer = dt.Columns.Count
|
Dim columnCount As Integer = dt.Columns.Count
|
||||||
|
|
||||||
' Damit beim Setzen von DisplayMember und ValueMember kein Fehler auftritt,
|
' Damit beim Setzen von DisplayMember und ValueMember kein Fehler auftritt,
|
||||||
@ -221,7 +171,7 @@
|
|||||||
' Dadurch ist das Laden der Datasource um einiges SCHNELLER
|
' Dadurch ist das Laden der Datasource um einiges SCHNELLER
|
||||||
If columnCount = 1 Then
|
If columnCount = 1 Then
|
||||||
control.DisplayMember = dt.Columns(0).ColumnName
|
control.DisplayMember = dt.Columns(0).ColumnName
|
||||||
'control.ValueMember = dt.Columns(0).ColumnName
|
control.ValueMember = dt.Columns(0).ColumnName
|
||||||
ElseIf columnCount = 2 Then
|
ElseIf columnCount = 2 Then
|
||||||
control.DisplayMember = dt.Columns(1).ColumnName
|
control.DisplayMember = dt.Columns(1).ColumnName
|
||||||
control.ValueMember = dt.Columns(0).ColumnName
|
control.ValueMember = dt.Columns(0).ColumnName
|
||||||
@ -229,20 +179,10 @@
|
|||||||
|
|
||||||
' Als letztes setzen wir die DataSource
|
' Als letztes setzen wir die DataSource
|
||||||
control.DataSource = dt
|
control.DataSource = dt
|
||||||
Catch ex As Exception
|
|
||||||
ClassLogger.Add("unexpected Error in SetDataSource3 for ControlName: " & control.Name & " - Error: " & ex.Message)
|
|
||||||
End Try
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Overloads Shared Sub SetDataSource(control As Windows.Forms.DataGridView, dt As DataTable)
|
Overloads Shared Sub SetDataSource(control As Windows.Forms.DataGridView, dt As DataTable)
|
||||||
Try
|
|
||||||
If control.Name = "cmbverantwortlich" Then
|
|
||||||
Console.WriteLine("Obacht")
|
|
||||||
End If
|
|
||||||
control.DataSource = dt
|
control.DataSource = dt
|
||||||
Catch ex As Exception
|
|
||||||
ClassLogger.Add("unexpected Error in SetDataSource4 for ControlName: " & control.Name & " - Error: " & ex.Message)
|
|
||||||
End Try
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
@ -357,17 +297,11 @@
|
|||||||
Public Class Combobox : Inherits _ListControl
|
Public Class Combobox : Inherits _ListControl
|
||||||
|
|
||||||
Public Shared Sub LoadValue(control As CustomComboBox, recordId As Integer, parentRecordId As Integer, value As String)
|
Public Shared Sub LoadValue(control As CustomComboBox, recordId As Integer, parentRecordId As Integer, value As String)
|
||||||
If control.Name = "cmbverantwortlich" Then
|
|
||||||
Console.WriteLine("Obacht")
|
|
||||||
End If
|
|
||||||
control.Text = value
|
control.Text = value
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Shared Sub LoadList(control As CustomComboBox, formId As Integer, connID As Object, SQLCommand As String)
|
Public Shared Sub LoadList(control As CustomComboBox, formId As Integer, connID As Object, SQLCommand As String)
|
||||||
Try
|
Try
|
||||||
If control.Name = "cmbverantwortlich" Then
|
|
||||||
Console.WriteLine("Obacht")
|
|
||||||
End If
|
|
||||||
Dim dynamic As DynamicValue = GetDynamicValue(DirectCast(control.Tag, ClassControlMetadata).Id, formId, connID, SQLCommand)
|
Dim dynamic As DynamicValue = GetDynamicValue(DirectCast(control.Tag, ClassControlMetadata).Id, formId, connID, SQLCommand)
|
||||||
|
|
||||||
If dynamic.StaticList IsNot Nothing Then
|
If dynamic.StaticList IsNot Nothing Then
|
||||||
@ -385,9 +319,6 @@
|
|||||||
|
|
||||||
Private Shared Sub CalculateDropdownWidth(control As CustomComboBox, dt As DataTable)
|
Private Shared Sub CalculateDropdownWidth(control As CustomComboBox, dt As DataTable)
|
||||||
Try
|
Try
|
||||||
If control.Name = "cmbverantwortlich" Then
|
|
||||||
Console.WriteLine("Obacht")
|
|
||||||
End If
|
|
||||||
Const WIDEST_WIDTH As Integer = 300
|
Const WIDEST_WIDTH As Integer = 300
|
||||||
Dim FinalWidth As Integer = WIDEST_WIDTH
|
Dim FinalWidth As Integer = WIDEST_WIDTH
|
||||||
Dim index As Integer = 1
|
Dim index As Integer = 1
|
||||||
@ -428,8 +359,6 @@
|
|||||||
control.SetItemCheckState(pos, CheckState.Checked)
|
control.SetItemCheckState(pos, CheckState.Checked)
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
control.Refresh()
|
|
||||||
' control.Invoke(control)
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Shared Sub LoadList(control As DevExpress.XtraEditors.CheckedListBoxControl, formId As Integer, conn_Id As Object, SQLCommand As String)
|
Public Shared Sub LoadList(control As DevExpress.XtraEditors.CheckedListBoxControl, formId As Integer, conn_Id As Object, SQLCommand As String)
|
||||||
@ -461,9 +390,7 @@
|
|||||||
If IsNothing(value) Then
|
If IsNothing(value) Then
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
If control.Name = "cmbverantwortlich" Then
|
|
||||||
Console.WriteLine("Obacht")
|
|
||||||
End If
|
|
||||||
control.SelectedIndex = control.FindStringExact(value)
|
control.SelectedIndex = control.FindStringExact(value)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@ -163,9 +163,7 @@ Public Class ClassControlValues
|
|||||||
|
|
||||||
For Each control As Control In controls
|
For Each control As Control In controls
|
||||||
Dim ControlId As Integer = DirectCast(control.Tag, ClassControlMetadata).Id
|
Dim ControlId As Integer = DirectCast(control.Tag, ClassControlMetadata).Id
|
||||||
If ControlId = 810 Then
|
|
||||||
Console.WriteLine("Obacht")
|
|
||||||
End If
|
|
||||||
' Wert per LINQ aus DT_ControlValues suchen der zur aktuellen controlId passt
|
' Wert per LINQ aus DT_ControlValues suchen der zur aktuellen controlId passt
|
||||||
Dim values As List(Of Object) = (From row In DT_ControlValues.AsEnumerable()
|
Dim values As List(Of Object) = (From row In DT_ControlValues.AsEnumerable()
|
||||||
Where row.Item("CONTROL_ID") = ControlId
|
Where row.Item("CONTROL_ID") = ControlId
|
||||||
@ -225,9 +223,7 @@ Public Class ClassControlValues
|
|||||||
Try
|
Try
|
||||||
' Für die meisten Controls wird nur das erste Element der Liste benötigt
|
' Für die meisten Controls wird nur das erste Element der Liste benötigt
|
||||||
Dim value As String = Nothing
|
Dim value As String = Nothing
|
||||||
If controlId = 810 Then
|
|
||||||
Console.WriteLine("Obacht")
|
|
||||||
End If
|
|
||||||
If values.Count > 0 Then
|
If values.Count > 0 Then
|
||||||
value = values.Item(0)
|
value = values.Item(0)
|
||||||
End If
|
End If
|
||||||
@ -277,7 +273,7 @@ Public Class ClassControlValues
|
|||||||
ClassLogger.Add(" >> Sub LoadControlValue - Control-Type nicht berücksichtigt: " & GetType(Control).ToString(), False)
|
ClassLogger.Add(" >> Sub LoadControlValue - Control-Type nicht berücksichtigt: " & GetType(Control).ToString(), False)
|
||||||
End Select
|
End Select
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
ClassLogger.Add("Unexpected Error in LoadControlValue - ControlID: " & controlId.ToString & " - Error: " & ex.Message, True)
|
ClassLogger.Add("Unexpected Error in LoadControlValue: " & ex.Message, True)
|
||||||
MsgBox("Error in LoadControlValue:" & vbNewLine & ex.Message)
|
MsgBox("Error in LoadControlValue:" & vbNewLine & ex.Message)
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
@ -458,7 +454,7 @@ Public Class ClassControlValues
|
|||||||
Case GetType(CustomComboBox)
|
Case GetType(CustomComboBox)
|
||||||
Dim combo As CustomComboBox = DirectCast(control, CustomComboBox)
|
Dim combo As CustomComboBox = DirectCast(control, CustomComboBox)
|
||||||
combo.SelectedIndex = -1
|
combo.SelectedIndex = -1
|
||||||
' combo.Text = String.Empty
|
combo.Text = String.Empty
|
||||||
|
|
||||||
Case GetType(CheckBox)
|
Case GetType(CheckBox)
|
||||||
DirectCast(control, CheckBox).Checked = False
|
DirectCast(control, CheckBox).Checked = False
|
||||||
|
|||||||
@ -22,7 +22,6 @@ Partial Class frmConstructor_Main
|
|||||||
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||||
<System.Diagnostics.DebuggerStepThrough()> _
|
<System.Diagnostics.DebuggerStepThrough()> _
|
||||||
Private Sub InitializeComponent()
|
Private Sub InitializeComponent()
|
||||||
Me.components = New System.ComponentModel.Container()
|
|
||||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmConstructor_Main))
|
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmConstructor_Main))
|
||||||
Dim GridLevelNode1 As DevExpress.XtraGrid.GridLevelNode = New DevExpress.XtraGrid.GridLevelNode()
|
Dim GridLevelNode1 As DevExpress.XtraGrid.GridLevelNode = New DevExpress.XtraGrid.GridLevelNode()
|
||||||
Dim GridLevelNode2 As DevExpress.XtraGrid.GridLevelNode = New DevExpress.XtraGrid.GridLevelNode()
|
Dim GridLevelNode2 As DevExpress.XtraGrid.GridLevelNode = New DevExpress.XtraGrid.GridLevelNode()
|
||||||
@ -30,12 +29,12 @@ Partial Class frmConstructor_Main
|
|||||||
Me.SplitContainerMain = New DevExpress.XtraEditors.SplitContainerControl()
|
Me.SplitContainerMain = New DevExpress.XtraEditors.SplitContainerControl()
|
||||||
Me.SplitContainerTop = New DevExpress.XtraEditors.SplitContainerControl()
|
Me.SplitContainerTop = New DevExpress.XtraEditors.SplitContainerControl()
|
||||||
Me.TreeViewMain = New System.Windows.Forms.TreeView()
|
Me.TreeViewMain = New System.Windows.Forms.TreeView()
|
||||||
Me.CMSEntity = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
Me.CMSEntity = New System.Windows.Forms.ContextMenuStrip()
|
||||||
Me.ResetEbenenAuswahlToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
Me.ResetEbenenAuswahlToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
Me.DateiimportEntitätToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
Me.DateiimportEntitätToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
Me.FormDesignerToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
Me.FormDesignerToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
Me.GridControlMain = New DevExpress.XtraGrid.GridControl()
|
Me.GridControlMain = New DevExpress.XtraGrid.GridControl()
|
||||||
Me.ContextMenuGrid = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
Me.ContextMenuGrid = New System.Windows.Forms.ContextMenuStrip()
|
||||||
Me.FunktionenDataGridToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
Me.FunktionenDataGridToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
Me.ToolStripSeparator1 = New System.Windows.Forms.ToolStripSeparator()
|
Me.ToolStripSeparator1 = New System.Windows.Forms.ToolStripSeparator()
|
||||||
Me.AnsichtUmschaltenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
Me.AnsichtUmschaltenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
@ -82,7 +81,7 @@ Partial Class frmConstructor_Main
|
|||||||
Me.Panel1 = New System.Windows.Forms.Panel()
|
Me.Panel1 = New System.Windows.Forms.Panel()
|
||||||
Me.GridControlPos = New DevExpress.XtraGrid.GridControl()
|
Me.GridControlPos = New DevExpress.XtraGrid.GridControl()
|
||||||
Me.grvwGridPos = New DevExpress.XtraGrid.Views.Grid.GridView()
|
Me.grvwGridPos = New DevExpress.XtraGrid.Views.Grid.GridView()
|
||||||
Me.BindingNavigatorPOS = New System.Windows.Forms.BindingNavigator(Me.components)
|
Me.BindingNavigatorPOS = New System.Windows.Forms.BindingNavigator()
|
||||||
Me.BindingNavigatorAddNewItem = New System.Windows.Forms.ToolStripButton()
|
Me.BindingNavigatorAddNewItem = New System.Windows.Forms.ToolStripButton()
|
||||||
Me.BindingNavigatorCountItem = New System.Windows.Forms.ToolStripLabel()
|
Me.BindingNavigatorCountItem = New System.Windows.Forms.ToolStripLabel()
|
||||||
Me.BindingNavigatorDeleteItem = New System.Windows.Forms.ToolStripButton()
|
Me.BindingNavigatorDeleteItem = New System.Windows.Forms.ToolStripButton()
|
||||||
@ -124,20 +123,20 @@ Partial Class frmConstructor_Main
|
|||||||
Me.tsslblStatus = New System.Windows.Forms.ToolStripStatusLabel()
|
Me.tsslblStatus = New System.Windows.Forms.ToolStripStatusLabel()
|
||||||
Me.tsslblRecord = New System.Windows.Forms.ToolStripStatusLabel()
|
Me.tsslblRecord = New System.Windows.Forms.ToolStripStatusLabel()
|
||||||
Me.tsslblWorkflowstate = New System.Windows.Forms.ToolStripStatusLabel()
|
Me.tsslblWorkflowstate = New System.Windows.Forms.ToolStripStatusLabel()
|
||||||
Me.BindingSource_Entity = New System.Windows.Forms.BindingSource(Me.components)
|
Me.BindingSource_Entity = New System.Windows.Forms.BindingSource()
|
||||||
Me.DD_ECMAdmin = New DD_Record_Organiser.DD_ECMAdmin()
|
Me.DD_ECMAdmin = New DD_Record_Organiser.DD_ECMAdmin()
|
||||||
Me.ImageCollection1 = New DevExpress.Utils.ImageCollection(Me.components)
|
Me.ImageCollection1 = New DevExpress.Utils.ImageCollection()
|
||||||
Me.ttToolTip = New System.Windows.Forms.ToolTip(Me.components)
|
Me.ttToolTip = New System.Windows.Forms.ToolTip()
|
||||||
Me.ContextMenuDetails = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
Me.ContextMenuDetails = New System.Windows.Forms.ContextMenuStrip()
|
||||||
Me.DD_DMSDataSet = New DD_Record_Organiser.DD_DMSDataSet()
|
Me.DD_DMSDataSet = New DD_Record_Organiser.DD_DMSDataSet()
|
||||||
Me.VWPMO_WF_USER_ACTIVEBindingSource = New System.Windows.Forms.BindingSource(Me.components)
|
Me.VWPMO_WF_USER_ACTIVEBindingSource = New System.Windows.Forms.BindingSource()
|
||||||
Me.VWPMO_WF_USER_ACTIVETableAdapter = New DD_Record_Organiser.DD_DMSDataSetTableAdapters.VWPMO_WF_ACTIVETableAdapter()
|
Me.VWPMO_WF_USER_ACTIVETableAdapter = New DD_Record_Organiser.DD_DMSDataSetTableAdapters.VWPMO_WF_ACTIVETableAdapter()
|
||||||
Me.TableAdapterManager = New DD_Record_Organiser.DD_DMSDataSetTableAdapters.TableAdapterManager()
|
Me.TableAdapterManager = New DD_Record_Organiser.DD_DMSDataSetTableAdapters.TableAdapterManager()
|
||||||
Me.TBPMO_FILES_USERTableAdapter = New DD_Record_Organiser.DD_DMSDataSetTableAdapters.TBPMO_FILES_USERTableAdapter()
|
Me.TBPMO_FILES_USERTableAdapter = New DD_Record_Organiser.DD_DMSDataSetTableAdapters.TBPMO_FILES_USERTableAdapter()
|
||||||
Me.VWPMO_WF_ACTIVEBindingSource = New System.Windows.Forms.BindingSource(Me.components)
|
Me.VWPMO_WF_ACTIVEBindingSource = New System.Windows.Forms.BindingSource()
|
||||||
Me.VWPMO_WF_ACTIVETableAdapter = New DD_Record_Organiser.DD_DMSDataSetTableAdapters.VWPMO_WF_ACTIVETableAdapter()
|
Me.VWPMO_WF_ACTIVETableAdapter = New DD_Record_Organiser.DD_DMSDataSetTableAdapters.VWPMO_WF_ACTIVETableAdapter()
|
||||||
Me.TBPMO_FILES_USERBindingSource = New System.Windows.Forms.BindingSource(Me.components)
|
Me.TBPMO_FILES_USERBindingSource = New System.Windows.Forms.BindingSource()
|
||||||
Me.ToolTipController = New DevExpress.Utils.ToolTipController(Me.components)
|
Me.ToolTipController = New DevExpress.Utils.ToolTipController()
|
||||||
CType(Me.SplitContainerMain, System.ComponentModel.ISupportInitialize).BeginInit()
|
CType(Me.SplitContainerMain, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
Me.SplitContainerMain.SuspendLayout()
|
Me.SplitContainerMain.SuspendLayout()
|
||||||
CType(Me.SplitContainerTop, System.ComponentModel.ISupportInitialize).BeginInit()
|
CType(Me.SplitContainerTop, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
|
|||||||
@ -621,8 +621,6 @@ Public Class frmConstructor_Main
|
|||||||
Me.Cursor = Cursors.WaitCursor
|
Me.Cursor = Cursors.WaitCursor
|
||||||
Column_Row_Handler()
|
Column_Row_Handler()
|
||||||
Me.Cursor = Cursors.Default
|
Me.Cursor = Cursors.Default
|
||||||
Me.Refresh()
|
|
||||||
' pnlDetails.Invoke(sender, e)
|
|
||||||
'If dataloaded = True Then
|
'If dataloaded = True Then
|
||||||
' If LogErrorsOnly = False Then ClassLogger.Add(" >> grvwSelection_FocusedRowChanged - EditState: " & EDIT_STATE, False)
|
' If LogErrorsOnly = False Then ClassLogger.Add(" >> grvwSelection_FocusedRowChanged - EditState: " & EDIT_STATE, False)
|
||||||
' Dim selRecID = GetSelected_RecordID()
|
' Dim selRecID = GetSelected_RecordID()
|
||||||
@ -738,9 +736,6 @@ Public Class frmConstructor_Main
|
|||||||
End Try
|
End Try
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If TCDetails.SelectedTabPage Is Nothing Then
|
|
||||||
Exit Sub
|
|
||||||
End If
|
|
||||||
If TabPos.PageVisible = True And TCDetails.SelectedTabPage.Text.StartsWith("Posi") Then
|
If TabPos.PageVisible = True And TCDetails.SelectedTabPage.Text.StartsWith("Posi") Then
|
||||||
Clear_GridPos_View()
|
Clear_GridPos_View()
|
||||||
Dim POS_GRID_RECORD = Get_Focused_Row_Cell_Value_pos("Record-ID")
|
Dim POS_GRID_RECORD = Get_Focused_Row_Cell_Value_pos("Record-ID")
|
||||||
@ -1992,14 +1987,6 @@ Public Class frmConstructor_Main
|
|||||||
Case GetType(Windows.Forms.TextBox)
|
Case GetType(Windows.Forms.TextBox)
|
||||||
Dim txt As TextBox = CType(Control, TextBox)
|
Dim txt As TextBox = CType(Control, TextBox)
|
||||||
txt.ReadOnly = state
|
txt.ReadOnly = state
|
||||||
Case GetType(DevExpress.XtraEditors.CheckedListBoxControl)
|
|
||||||
Dim chlb As DevExpress.XtraEditors.CheckedListBoxControl = CType(Control, DevExpress.XtraEditors.CheckedListBoxControl)
|
|
||||||
If state = True Then
|
|
||||||
chlb.Enabled = False
|
|
||||||
Else
|
|
||||||
chlb.Enabled = True
|
|
||||||
End If
|
|
||||||
|
|
||||||
Case Else
|
Case Else
|
||||||
Control.Enabled = Not state
|
Control.Enabled = Not state
|
||||||
|
|
||||||
@ -3196,27 +3183,15 @@ Public Class frmConstructor_Main
|
|||||||
elapsed = sw.Elapsed.TotalSeconds
|
elapsed = sw.Elapsed.TotalSeconds
|
||||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> GetSearchDocuments took " & Format(elapsed, "0.000000000") & " seconds", False)
|
If LogErrorsOnly = False Then ClassLogger.Add(" >> GetSearchDocuments took " & Format(elapsed, "0.000000000") & " seconds", False)
|
||||||
If windreamSucheErgebnisse.Count > 0 Then
|
If windreamSucheErgebnisse.Count > 0 Then
|
||||||
Dim files_deleted As Integer = 0
|
|
||||||
For Each dok As WMObject In windreamSucheErgebnisse
|
For Each dok As WMObject In windreamSucheErgebnisse
|
||||||
Dim filename = "W:" & dok.aPath
|
Dim filename = "W:" & dok.aPath
|
||||||
Try
|
Try
|
||||||
File.Delete(filename)
|
File.Delete(filename)
|
||||||
files_deleted = +1
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
ClassLogger.Add("Unexpected Error in Delete windream-file '" & filename & "- Error: " & ex.Message)
|
ClassLogger.Add("Unexpected Error in Delete windream-file '" & filename & "- Error: " & ex.Message)
|
||||||
End Try
|
End Try
|
||||||
Dim msg = "Es wurden (" & files_deleted.ToString & ") Dateien gelöscht!"
|
|
||||||
If USER_LANGUAGE <> "de-DE" Then
|
|
||||||
msg = "(" & files_deleted.ToString & ") files were deleted!"
|
|
||||||
End If
|
|
||||||
MsgBox(msg, MsgBoxStyle.Information)
|
|
||||||
Next
|
Next
|
||||||
Else
|
|
||||||
Dim msg = "Es wurden keine Dateien für diesen Datensatz gefunden!"
|
|
||||||
If USER_LANGUAGE <> "de-DE" Then
|
|
||||||
msg = "No files found for record!"
|
|
||||||
End If
|
|
||||||
MsgBox(msg, MsgBoxStyle.Information)
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -440,6 +440,23 @@ Public Class frmFormInput
|
|||||||
System.Windows.Forms.MessageBox.Show(ex.Message)
|
System.Windows.Forms.MessageBox.Show(ex.Message)
|
||||||
End Try
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub BindingNavigatorDeleteItem_Click(sender As Object, e As EventArgs)
|
||||||
|
Dim result As MsgBoxResult
|
||||||
|
result = MessageBox.Show("Möchten Sie den Datensatz wirklich löschen?", "Bestätigung erforderlich:", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
|
||||||
|
If result = MsgBoxResult.Yes Then
|
||||||
|
Dim sql As String = "DELETE FROM TBPMO_CONTROL_VALUE WHERE RECORD_ID = " & SelectedRecordID
|
||||||
|
If ClassDatabase.Execute_non_Query(sql) = True Then ' Delete der Controls erfolgreich ausgeführt, jetzt der Record
|
||||||
|
sql = "DELETE FROM TBPMO_RECORD WHERE GUID = " & SelectedRecordID
|
||||||
|
If ClassDatabase.Execute_non_Query(sql) = True Then
|
||||||
|
LoadOverview_Grid()
|
||||||
|
ToolStrip_Notice("Der Datensatz wurde erfolgreich gelöscht - " & Now)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub tsbtnrefresh_Click(sender As Object, e As EventArgs) Handles tsbtnrefresh.Click
|
Private Sub tsbtnrefresh_Click(sender As Object, e As EventArgs) Handles tsbtnrefresh.Click
|
||||||
LoadOverview_Grid()
|
LoadOverview_Grid()
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user