MS19042016
This commit is contained in:
parent
add1a19324
commit
fa5397cd24
@ -76,7 +76,6 @@ 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,135 +562,163 @@ 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
|
If LogErrorsOnly = False Then ClassLogger.Add(" >> GetControlValue CONTROL_ID: " & CONTROL_ID, False)
|
||||||
Dim CONTROL_ID As Integer = DirectCast(ctrl.Tag, ClassControlMetadata).Id ' GetControlID_for_RecordID(ctrl.Name, CURRENT_RECORD_ID)
|
Dim CONTROL_VALUE As String = Nothing
|
||||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> GetControlValue CONTROL_ID: " & CONTROL_ID, False)
|
If LogErrorsOnly = False Then ClassLogger.Add(" >> type = " & type.ToString, False)
|
||||||
Dim CONTROL_VALUE As String = Nothing
|
Select Case type
|
||||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> type = " & type.ToString, False)
|
Case "TextBox"
|
||||||
Select Case type
|
Return DirectCast(ctrl, TextBox).Text
|
||||||
Case "TextBox"
|
Case "ComboBox"
|
||||||
Return DirectCast(ctrl, TextBox).Text
|
If LogErrorsOnly = False Then ClassLogger.Add(" >> Return Value: " & DirectCast(ctrl, CustomComboBox).Text, False)
|
||||||
Case "ComboBox"
|
Return DirectCast(ctrl, CustomComboBox).Text
|
||||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> Return Value: " & DirectCast(ctrl, CustomComboBox).Text, False)
|
Case "CheckBox"
|
||||||
Return DirectCast(ctrl, CustomComboBox).Text
|
Return DirectCast(ctrl, CheckBox).Checked.ToString()
|
||||||
Case "CheckBox"
|
Case "RadioButton"
|
||||||
Return DirectCast(ctrl, CheckBox).Checked.ToString()
|
Return DirectCast(ctrl, RadioButton).Checked.ToString()
|
||||||
Case "RadioButton"
|
Case "DateEdit"
|
||||||
Return DirectCast(ctrl, RadioButton).Checked.ToString()
|
Dim Value = DirectCast(ctrl, DevExpress.XtraEditors.DateEdit).EditValue
|
||||||
Case "DateEdit"
|
|
||||||
Dim Value = DirectCast(ctrl, DevExpress.XtraEditors.DateEdit).EditValue
|
|
||||||
|
|
||||||
If IsDBNull(Value) Then
|
If IsDBNull(Value) Then
|
||||||
Return ""
|
Return ""
|
||||||
Else
|
Else
|
||||||
Return DirectCast(ctrl, DevExpress.XtraEditors.DateEdit).DateTime.ToString("yyyy-MM-dd")
|
Return DirectCast(ctrl, DevExpress.XtraEditors.DateEdit).DateTime.ToString("yyyy-MM-dd")
|
||||||
End If
|
End If
|
||||||
Case "PictureBox"
|
Case "PictureBox"
|
||||||
'Return "PictureBox" 'Es ist egal was für ein String hier zurückgegeben wird, hauptsache nicht Nothing
|
'Return "PictureBox" 'Es ist egal was für ein String hier zurückgegeben wird, hauptsache nicht Nothing
|
||||||
Case "CheckedListBoxControl"
|
Case "CheckedListBoxControl"
|
||||||
Dim chklbx As DevExpress.XtraEditors.CheckedListBoxControl
|
Dim chklbx As DevExpress.XtraEditors.CheckedListBoxControl
|
||||||
chklbx = DirectCast(ctrl, DevExpress.XtraEditors.CheckedListBoxControl)
|
chklbx = DirectCast(ctrl, DevExpress.XtraEditors.CheckedListBoxControl)
|
||||||
|
|
||||||
'TODO: Wenn keine Datasource vorhanden, angecheckte einträge als string speichern
|
'TODO: Wenn keine Datasource vorhanden, angecheckte einträge als string speichern
|
||||||
If IsNothing(chklbx.DataSource) Then
|
If IsNothing(chklbx.DataSource) Then
|
||||||
Dim result As New List(Of String)
|
Dim result As New List(Of String)
|
||||||
Dim result_string As String
|
Dim result_string As String
|
||||||
|
|
||||||
For Each item As DevExpress.XtraEditors.Controls.CheckedListBoxItem In chklbx.CheckedItems
|
For Each item As DevExpress.XtraEditors.Controls.CheckedListBoxItem In chklbx.CheckedItems
|
||||||
result.Add(item.Value.ToString.Trim)
|
result.Add(item.Value.ToString.Trim)
|
||||||
Next
|
Next
|
||||||
|
|
||||||
result_string = String.Join(";", result)
|
result_string = String.Join(";", result)
|
||||||
|
|
||||||
' 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
|
||||||
Return result_string
|
Return result_string
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Alle Recorddatensätze durchlaufen und überprüfen ob nicht angehakt
|
Dim SQL_Datasource = "SELECT SQL_COMMAND_1 FROM TBPMO_CONTROL WHERE GUID = " & CONTROL_ID
|
||||||
'Wenn nicht angehakt dann Record löschen
|
SQL_Datasource = ClassDatabase.Execute_Scalar(SQL_Datasource)
|
||||||
Dim index As Integer = 0
|
|
||||||
For i As Integer = 0 To chklbx.ItemCount - 1
|
If SQL_Datasource.ToUpper.Contains("SELECT [RECORD-ID],") Then
|
||||||
Dim item = chklbx.GetItem(i)
|
'Alle Recorddatensätze durchlaufen und überprüfen ob nicht angehakt
|
||||||
Dim row As DataRowView = CType(item, DataRowView)
|
'Wenn nicht angehakt dann Record löschen
|
||||||
If chklbx.GetItemCheckState(i) = 0 Then
|
Dim index As Integer = 0
|
||||||
If CInt(row(0)) > 0 Then
|
For i As Integer = 0 To chklbx.ItemCount - 1
|
||||||
'Überprüfen ob es den Record gibt
|
Dim item = chklbx.GetItem(i)
|
||||||
Dim SQL = "SELECT COUNT(*) FROM TBPMO_RECORD_CONNECT WHERE RECORD1_ID = " & CURRENT_RECORD_ID & " AND RECORD2_ID = " & CInt(row(0))
|
Dim row As DataRowView = CType(item, DataRowView)
|
||||||
If ClassDatabase.Execute_Scalar(SQL) = 1 Then
|
If chklbx.GetItemCheckState(i) = 0 Then
|
||||||
SQL = "DELETE FROM TBPMO_RECORD_CONNECT WHERE RECORD1_ID = " & CURRENT_RECORD_ID & " AND RECORD2_ID = " & CInt(row(0))
|
If CInt(row(0)) > 0 Then
|
||||||
If ClassDatabase.Execute_non_Query(SQL) = True Then
|
'Überprüfen ob es den Record gibt
|
||||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> TBPMO_RECORD_CONNECT-Entry after 'deselect CheckedListBox' deleted", False)
|
Dim SQL = "SELECT COUNT(*) FROM TBPMO_RECORD_CONNECT WHERE RECORD1_ID = " & CURRENT_RECORD_ID & " AND RECORD2_ID = " & CInt(row(0))
|
||||||
|
If ClassDatabase.Execute_Scalar(SQL) = 1 Then
|
||||||
|
SQL = "DELETE FROM TBPMO_RECORD_CONNECT WHERE RECORD1_ID = " & CURRENT_RECORD_ID & " AND RECORD2_ID = " & CInt(row(0))
|
||||||
|
If ClassDatabase.Execute_non_Query(SQL) = True Then
|
||||||
|
If LogErrorsOnly = False Then ClassLogger.Add(" >> TBPMO_RECORD_CONNECT-Entry after 'deselect CheckedListBox' deleted", False)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
Next
|
||||||
End If
|
End If
|
||||||
Next
|
|
||||||
|
|
||||||
'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
|
||||||
|
|
||||||
For Each item As Object In DirectCast(ctrl, DevExpress.XtraEditors.CheckedListBoxControl).CheckedItems
|
If SQL_Datasource.ToUpper.Contains("SELECT [RECORD-ID],") Then
|
||||||
Dim row As DataRowView = CType(item, DataRowView)
|
For Each item As Object In DirectCast(ctrl, DevExpress.XtraEditors.CheckedListBoxControl).CheckedItems
|
||||||
Try
|
Dim row As DataRowView = CType(item, DataRowView)
|
||||||
If CInt(row(0)) > 0 Then
|
Try
|
||||||
Dim rid = CInt(row(0))
|
If CInt(row(0)) > 0 Then
|
||||||
|
Dim rid = CInt(row(0))
|
||||||
|
Dim checked_value = row(1)
|
||||||
|
checked_result.Add(checked_value)
|
||||||
|
checked_result_string = String.Join(";", checked_result)
|
||||||
|
Dim SQL = "SELECT COUNT(*) FROM TBPMO_RECORD_CONNECT WHERE RECORD1_ID = " & CURRENT_RECORD_ID & " AND RECORD2_ID = " & CInt(row(0))
|
||||||
|
If ClassDatabase.Execute_Scalar(SQL) = 0 Then
|
||||||
|
If CURRENT_RECORD_ID = 0 Then
|
||||||
|
MsgBox("Attention: no current record Selected!", MsgBoxStyle.Exclamation)
|
||||||
|
Else
|
||||||
|
If ConnectRecord(CURRENT_RECORD_ID, CInt(row(0)), "CheckedListBox;" & ctrl.Name) = True Then
|
||||||
|
If LogErrorsOnly = False Then ClassLogger.Add(" >> Checked ListBox record '" & rid.ToString & "' was linked successfully.", False)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
ClassLogger.Add("Error in CheckedListBoxGetControlValue: " & ex.Message, True)
|
||||||
|
End Try
|
||||||
|
|
||||||
|
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)
|
Dim checked_value = row(1)
|
||||||
checked_result.Add(checked_value)
|
checked_result.Add(checked_value)
|
||||||
checked_result_string = String.Join(";", checked_result)
|
checked_result_string = String.Join(";", checked_result)
|
||||||
Dim SQL = "SELECT COUNT(*) FROM TBPMO_RECORD_CONNECT WHERE RECORD1_ID = " & CURRENT_RECORD_ID & " AND RECORD2_ID = " & CInt(row(0))
|
Next
|
||||||
If ClassDatabase.Execute_Scalar(SQL) = 0 Then
|
End If
|
||||||
If CURRENT_RECORD_ID = 0 Then
|
|
||||||
MsgBox("Attention: no current record Selected!", MsgBoxStyle.Exclamation)
|
|
||||||
Else
|
|
||||||
If ConnectRecord(CURRENT_RECORD_ID, CInt(row(0)), "CheckedListBox;" & ctrl.Name) = True Then
|
|
||||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> Checked ListBox record '" & rid.ToString & "' was linked successfully.", False)
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
End If
|
|
||||||
|
' Hier wird ein String zurückgegeben, der als VALUE gespeichert werden soll
|
||||||
|
' Überspringt den Rest der funktion
|
||||||
|
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)
|
||||||
|
If ClassDatabase.Execute_Scalar(sql) = 0 And checked_Count > 0 Then
|
||||||
|
InsertControlValue(CONTROL_ID, CURRENT_RECORD_ID, "")
|
||||||
End If
|
End If
|
||||||
Catch ex As Exception
|
Return checked_result_string
|
||||||
ClassLogger.Add("Error in CheckedListBoxGetControlValue: " & ex.Message, True)
|
Else
|
||||||
End Try
|
'In jedem Fall Nothing zurückgeben
|
||||||
|
Return Nothing
|
||||||
Next
|
|
||||||
' Hier wird ein String zurückgegeben, der als VALUE gespeichert werden soll
|
|
||||||
' Überspringt den Rest der funktion
|
|
||||||
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)
|
|
||||||
If ClassDatabase.Execute_Scalar(sql) = 0 Then
|
|
||||||
InsertControlValue(CONTROL_ID, CURRENT_RECORD_ID, "")
|
|
||||||
End If
|
End If
|
||||||
Return checked_result_string
|
|
||||||
Else
|
|
||||||
'In jedem Fall Nothing zurückgeben
|
Case "ListBoxControl"
|
||||||
|
Dim listbox As DevExpress.XtraEditors.ListBoxControl = DirectCast(ctrl, DevExpress.XtraEditors.ListBoxControl)
|
||||||
|
Return listbox.SelectedValue
|
||||||
|
|
||||||
|
Case "DataGridView"
|
||||||
|
Dim list As New List(Of String)
|
||||||
|
Dim dgv As DataGridView = DirectCast(ctrl, DataGridView)
|
||||||
|
|
||||||
|
For Each row As DataGridViewRow In dgv.Rows
|
||||||
|
Dim cell As DataGridViewCell = row.Cells(0)
|
||||||
|
If Not IsNothing(cell.Value) Then
|
||||||
|
list.Add(cell.Value)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
Return String.Join(";", list)
|
||||||
|
|
||||||
|
Case Else
|
||||||
Return Nothing
|
Return Nothing
|
||||||
End If
|
End Select
|
||||||
|
Catch ex As Exception
|
||||||
|
ClassLogger.Add("Unexpected error in GetControlValue for Control-ID: " & CONTROL_ID & " - error: " & ex.Message)
|
||||||
|
Return Nothing
|
||||||
|
End Try
|
||||||
|
|
||||||
|
|
||||||
Case "ListBoxControl"
|
|
||||||
Dim listbox As DevExpress.XtraEditors.ListBoxControl = DirectCast(ctrl, DevExpress.XtraEditors.ListBoxControl)
|
|
||||||
Return listbox.SelectedValue
|
|
||||||
|
|
||||||
Case "DataGridView"
|
|
||||||
Dim list As New List(Of String)
|
|
||||||
Dim dgv As DataGridView = DirectCast(ctrl, DataGridView)
|
|
||||||
|
|
||||||
For Each row As DataGridViewRow In dgv.Rows
|
|
||||||
Dim cell As DataGridViewCell = row.Cells(0)
|
|
||||||
If Not IsNothing(cell.Value) Then
|
|
||||||
list.Add(cell.Value)
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
|
|
||||||
Return String.Join(";", list)
|
|
||||||
|
|
||||||
Case Else
|
|
||||||
Return Nothing
|
|
||||||
End Select
|
|
||||||
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,9 +15,13 @@
|
|||||||
'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
|
||||||
Dim ControlId As Integer = DirectCast(control.Tag, ClassControlMetadata).Id
|
ControlId = 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)
|
||||||
@ -39,7 +43,7 @@
|
|||||||
|
|
||||||
Return AutoValue
|
Return AutoValue
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
ClassLogger.Add("Unexpected Error in LoadAutoValue: " & ex.Message, True)
|
ClassLogger.Add("Unexpected Error in LoadAutoValue - Control-ID: " & ControlId.ToString & " - ERROR: " & ex.Message, True)
|
||||||
Return Nothing
|
Return Nothing
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
@ -52,7 +56,9 @@
|
|||||||
|
|
||||||
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)
|
||||||
|
|
||||||
@ -79,6 +85,9 @@
|
|||||||
|
|
||||||
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
|
||||||
@ -108,81 +117,132 @@
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Overloads Shared Sub SetDataSource(control As CustomComboBox, dt As DataTable)
|
Overloads Shared Sub SetDataSource(control As CustomComboBox, dt As DataTable)
|
||||||
Dim sw As Stopwatch = Stopwatch.StartNew()
|
Try
|
||||||
Dim columnCount As Integer = dt.Columns.Count
|
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
|
||||||
|
control.BeginUpdate()
|
||||||
|
' 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.
|
||||||
|
control.DataSource = Nothing
|
||||||
|
control.SelectedIndex = -1
|
||||||
|
ClassControlValues.ClearControlValue(control)
|
||||||
|
|
||||||
control.BeginUpdate()
|
' Es ist wichtig, dass DisplayMember und ValueMember VOR der DataSource festgelegt werden,
|
||||||
|
' Dadurch ist das Laden der Datasource um einiges SCHNELLER
|
||||||
|
If columnCount = 1 Then
|
||||||
|
For Each row As DataRow In dt.Rows
|
||||||
|
control.Items.Add(row.Item(0).ToString)
|
||||||
|
Next
|
||||||
|
'control.ValueMember = Name1
|
||||||
|
'control.DisplayMember = Name1
|
||||||
|
ElseIf columnCount = 2 Then
|
||||||
|
'If control.Name = "cmbverantwortlich" Then
|
||||||
|
' control.ValueMember = Name1
|
||||||
|
' control.DisplayMember = Name2
|
||||||
|
'Else
|
||||||
|
For Each row As DataRow In dt.Rows
|
||||||
|
control.Items.Add(row.Item(1).ToString)
|
||||||
|
Next
|
||||||
|
'End If
|
||||||
|
|
||||||
' Damit beim Setzen von DisplayMember und ValueMember kein Fehler auftritt,
|
'If control.Name = "cmbverantwortlich" Then
|
||||||
' muss die Datasource zunächst geleert werden und der selected index auf -1 gesetzt werden.
|
|
||||||
control.DataSource = Nothing
|
|
||||||
control.SelectedIndex = -1
|
|
||||||
|
|
||||||
' Es ist wichtig, dass DisplayMember und ValueMember VOR der DataSource festgelegt werden,
|
'Else
|
||||||
' Dadurch ist das Laden der Datasource um einiges SCHNELLER
|
' control.ValueMember = Name1
|
||||||
If columnCount = 1 Then
|
' control.DisplayMember = Name2
|
||||||
control.DisplayMember = dt.Columns(0).ColumnName
|
'End If
|
||||||
control.ValueMember = dt.Columns(0).ColumnName
|
End If
|
||||||
ElseIf columnCount = 2 Then
|
' Als Erstes setzen wir die DataSource
|
||||||
control.DisplayMember = dt.Columns(1).ColumnName
|
'If control.Name = "cmbverantwortlich" Then
|
||||||
control.ValueMember = dt.Columns(0).ColumnName
|
' control.DataSource = dt
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
' Als letztes setzen wir die DataSource
|
'control.DataSource = dt
|
||||||
control.DataSource = dt
|
control.EndUpdate()
|
||||||
|
Catch ex As Exception
|
||||||
|
ClassLogger.Add("unexpected Error in SetDataSource for ControlName: " & control.Name & " - Error: " & ex.Message)
|
||||||
|
End Try
|
||||||
|
|
||||||
control.EndUpdate()
|
|
||||||
|
|
||||||
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)
|
||||||
Dim columnCount As Integer = dt.Columns.Count
|
Try
|
||||||
|
If control.Name = "cmbverantwortlich" Then
|
||||||
|
Console.WriteLine("Obacht")
|
||||||
|
End If
|
||||||
|
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,
|
||||||
' 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
|
||||||
|
|
||||||
|
|
||||||
' 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
|
||||||
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
|
||||||
End If
|
End If
|
||||||
|
' Als letztes setzen wir die DataSource
|
||||||
|
control.DataSource = dt
|
||||||
|
control.EndUpdate()
|
||||||
|
Catch ex As Exception
|
||||||
|
ClassLogger.Add("unexpected Error in SetDataSource2 for ControlName: " & control.Name & " - Error: " & ex.Message)
|
||||||
|
End Try
|
||||||
|
|
||||||
' Als letztes setzen wir die DataSource
|
|
||||||
control.DataSource = dt
|
|
||||||
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)
|
||||||
Dim columnCount As Integer = dt.Columns.Count
|
Try
|
||||||
|
If control.Name = "cmbverantwortlich" Then
|
||||||
|
Console.WriteLine("Obacht")
|
||||||
|
End If
|
||||||
|
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,
|
||||||
' 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
|
||||||
|
|
||||||
' 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
|
||||||
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
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' 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)
|
||||||
control.DataSource = dt
|
Try
|
||||||
|
If control.Name = "cmbverantwortlich" Then
|
||||||
|
Console.WriteLine("Obacht")
|
||||||
|
End If
|
||||||
|
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
|
||||||
@ -297,11 +357,17 @@
|
|||||||
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
|
||||||
@ -319,6 +385,9 @@
|
|||||||
|
|
||||||
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
|
||||||
@ -359,6 +428,8 @@
|
|||||||
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)
|
||||||
@ -390,7 +461,9 @@
|
|||||||
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,7 +163,9 @@ 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
|
||||||
@ -223,7 +225,9 @@ 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
|
||||||
@ -273,7 +277,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: " & ex.Message, True)
|
ClassLogger.Add("Unexpected Error in LoadControlValue - ControlID: " & controlId.ToString & " - Error: " & ex.Message, True)
|
||||||
MsgBox("Error in LoadControlValue:" & vbNewLine & ex.Message)
|
MsgBox("Error in LoadControlValue:" & vbNewLine & ex.Message)
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
@ -454,7 +458,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,6 +22,7 @@ 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()
|
||||||
@ -29,12 +30,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.CMSEntity = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
||||||
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.ContextMenuGrid = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
||||||
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()
|
||||||
@ -81,7 +82,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.BindingNavigatorPOS = New System.Windows.Forms.BindingNavigator(Me.components)
|
||||||
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()
|
||||||
@ -123,20 +124,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.BindingSource_Entity = New System.Windows.Forms.BindingSource(Me.components)
|
||||||
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.ImageCollection1 = New DevExpress.Utils.ImageCollection(Me.components)
|
||||||
Me.ttToolTip = New System.Windows.Forms.ToolTip()
|
Me.ttToolTip = New System.Windows.Forms.ToolTip(Me.components)
|
||||||
Me.ContextMenuDetails = New System.Windows.Forms.ContextMenuStrip()
|
Me.ContextMenuDetails = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
||||||
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.VWPMO_WF_USER_ACTIVEBindingSource = New System.Windows.Forms.BindingSource(Me.components)
|
||||||
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.VWPMO_WF_ACTIVEBindingSource = New System.Windows.Forms.BindingSource(Me.components)
|
||||||
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.TBPMO_FILES_USERBindingSource = New System.Windows.Forms.BindingSource(Me.components)
|
||||||
Me.ToolTipController = New DevExpress.Utils.ToolTipController()
|
Me.ToolTipController = New DevExpress.Utils.ToolTipController(Me.components)
|
||||||
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,6 +621,8 @@ 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()
|
||||||
@ -736,6 +738,9 @@ 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")
|
||||||
@ -1987,6 +1992,14 @@ 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
|
||||||
|
|
||||||
@ -3183,15 +3196,27 @@ 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,23 +440,6 @@ 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