MS_Dec2015
This commit is contained in:
parent
343fffe9ca
commit
3bcfde3a6f
@ -323,12 +323,12 @@ Public Class ClassControlCommandsUI
|
||||
|
||||
Private Sub InsertAllControls(FormID As Integer, RecordID As Integer, controls As Control.ControlCollection)
|
||||
For Each ctrl As Control In controls
|
||||
Dim CONTROL_ID As Integer = GetControlID_for_Name(ctrl.Name, FormID)
|
||||
Dim CONTROL_ID As Integer = ctrl.Tag 'GetControlID_for_Name(ctrl.Name, FormID)
|
||||
Dim CONTROL_VALUE As String = Nothing
|
||||
|
||||
If TypeOf ctrl Is PictureBox Then
|
||||
Dim id As Integer = GetControlID_for_Name(ctrl.Name, FormID)
|
||||
UpsertImage(id, RecordID, ctrl.BackgroundImage)
|
||||
'Dim id As Integer = GetControlID_for_Name(ctrl.Name, FormID)
|
||||
UpsertImage(CONTROL_ID, RecordID, ctrl.BackgroundImage)
|
||||
Continue For
|
||||
End If
|
||||
|
||||
@ -464,12 +464,12 @@ Public Class ClassControlCommandsUI
|
||||
Private Sub UpdateAllControls(FormID As Integer, RecordID As Integer, controls As Control.ControlCollection)
|
||||
Try
|
||||
For Each ctrl As Control In controls
|
||||
Dim CONTROL_ID As Integer = GetControlID_for_RecordID(ctrl.Name, RecordID)
|
||||
Dim CONTROL_ID As Integer = ctrl.Tag 'GetControlID_for_RecordID(ctrl.Name, RecordID)
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(">> CONTROL_ID: " & CONTROL_ID, False)
|
||||
Dim CONTROL_VALUE As String = Nothing
|
||||
|
||||
If TypeOf ctrl Is PictureBox Then
|
||||
Dim id As Integer = GetControlID_for_Name(ctrl.Name, FormID)
|
||||
Dim id As Integer = ctrl.Tag 'GetControlID_for_Name(ctrl.Name, FormID)
|
||||
UpsertImage(id, RecordID, ctrl.BackgroundImage)
|
||||
Continue For
|
||||
End If
|
||||
@ -491,6 +491,9 @@ Public Class ClassControlCommandsUI
|
||||
InsertControlValue(ctrlid, RecordID, CONTROL_VALUE)
|
||||
End If
|
||||
Else ' Control Updaten
|
||||
If ctrl.Tag = 556 Then
|
||||
Console.WriteLine("CheckedLB")
|
||||
End If
|
||||
CONTROL_VALUE = GetControlValue(ctrl)
|
||||
' Kein Bekanntes Control oder Groupbox
|
||||
If IsNothing(CONTROL_VALUE) Then
|
||||
@ -510,8 +513,9 @@ Public Class ClassControlCommandsUI
|
||||
End Sub
|
||||
|
||||
Function GetControlValue(ctrl As Control) As String
|
||||
|
||||
Dim type = ctrl.GetType().Name
|
||||
Dim CONTROL_ID As Integer = GetControlID_for_RecordID(ctrl.Name, CURRENT_RECORD_ID)
|
||||
Dim CONTROL_ID As Integer = ctrl.Tag ' GetControlID_for_RecordID(ctrl.Name, CURRENT_RECORD_ID)
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(">> GetControlValue CONTROL_ID: " & CONTROL_ID, False)
|
||||
Dim CONTROL_VALUE As String = Nothing
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(">> type = " & type.ToString, False)
|
||||
@ -528,17 +532,13 @@ Public Class ClassControlCommandsUI
|
||||
Case "DateEdit"
|
||||
Return DirectCast(ctrl, DevExpress.XtraEditors.DateEdit).DateTime.ToString("yyyy-MM-dd")
|
||||
Case "PictureBox"
|
||||
|
||||
|
||||
|
||||
|
||||
'Return "PictureBox" 'Es ist egal was für ein String hier zurückgegeben wird, hauptsache nicht Nothing
|
||||
Case "CheckedListBoxControl"
|
||||
Dim chklbx As DevExpress.XtraEditors.CheckedListBoxControl
|
||||
chklbx = DirectCast(ctrl, DevExpress.XtraEditors.CheckedListBoxControl)
|
||||
|
||||
'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_string As String
|
||||
|
||||
@ -566,7 +566,7 @@ Public Class ClassControlCommandsUI
|
||||
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-Eintrag nach Deselect CheckedListBox gelöscht", False)
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(">> TBPMO_RECORD_CONNECT-Entry after 'deselect CheckedListBox' deleted", False)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
@ -574,26 +574,43 @@ Public Class ClassControlCommandsUI
|
||||
Next
|
||||
|
||||
'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_string As String
|
||||
|
||||
For Each item As Object In DirectCast(ctrl, DevExpress.XtraEditors.CheckedListBoxControl).CheckedItems
|
||||
Dim row As DataRowView = CType(item, DataRowView)
|
||||
Try
|
||||
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
|
||||
ConnectRecord(CURRENT_RECORD_ID, CInt(row(0)), "CheckedListBox;" & ctrl.Name)
|
||||
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
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add("Error in CheckedListBoxGetControlValue: " & ex.Message, True)
|
||||
End Try
|
||||
|
||||
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
|
||||
Return checked_result_string
|
||||
Else
|
||||
'In jedem Fall Nothing zurückgeben
|
||||
Return Nothing
|
||||
End If
|
||||
|
||||
|
||||
|
||||
'In jedem Fall Nothing zurückgeben
|
||||
Return Nothing
|
||||
Case "ListBoxControl"
|
||||
Dim listbox As DevExpress.XtraEditors.ListBoxControl = DirectCast(ctrl, DevExpress.XtraEditors.ListBoxControl)
|
||||
Return listbox.SelectedValue
|
||||
|
||||
@ -4,37 +4,42 @@ Public Class ClassControlValues
|
||||
Private Shared Function LoadControlAutoValue(ControlID As Integer, RecordID As Integer, control As Control) As String
|
||||
|
||||
If TypeOf control Is Label Then
|
||||
Dim SQL As String = "SELECT CONTROL_TYPE_ID FROM TBPMO_CONTROL WHERE GUID = " & ControlID
|
||||
Dim type As Integer = ClassDatabase.Execute_Scalar(SQL)
|
||||
|
||||
'If ControlID = 320 Then
|
||||
' MsgBox("")
|
||||
'End If
|
||||
' Dim SQL As String = "SELECT CONTROL_TYPE_ID FROM TBPMO_CONTROL WHERE GUID = " & ControlID
|
||||
' Dim type As Integer = ClassDatabase.Execute_Scalar(SQL)
|
||||
Dim SQL
|
||||
' Wenn kein/leerer Wert gefunden, suche nach einem SQL Command für Automatischen Wert
|
||||
If type = 1 Then
|
||||
Dim autoValue
|
||||
SQL = "SELECT SQL_COMMAND_1 FROM TBPMO_CONTROL WHERE GUID = " & ControlID
|
||||
Dim result = ClassDatabase.Execute_Scalar(SQL)
|
||||
result = result.Replace("@FORM_ID", CURRENT_FORM_ID)
|
||||
result = result.Replace("@RECORD_ID", CURRENT_RECORD_ID)
|
||||
result = result.Replace("@RECORDID", CURRENT_RECORD_ID)
|
||||
result = result.Replace("@PARENTRECORD_ID", CURRENT_PARENTID)
|
||||
' Wenn das SQL Command leer ist, hat dieses Control kein SQL Command
|
||||
' Gib den ursprünlichen Text zurück
|
||||
If result = "" Then
|
||||
Return control.Text
|
||||
Else
|
||||
autoValue = ClassDatabase.Execute_Scalar(result)
|
||||
'If type = 1 Then
|
||||
Dim autoValue
|
||||
SQL = "SELECT SQL_COMMAND_1 FROM TBPMO_CONTROL WHERE GUID = " & ControlID
|
||||
Dim result = ClassDatabase.Execute_Scalar(SQL)
|
||||
result = result.Replace("@FORM_ID", CURRENT_FORM_ID)
|
||||
result = result.Replace("@RECORD_ID", CURRENT_RECORD_ID)
|
||||
result = result.Replace("@RECORDID", CURRENT_RECORD_ID)
|
||||
result = result.Replace("@PARENTRECORD_ID", CURRENT_PARENTID)
|
||||
' Wenn das SQL Command leer ist, hat dieses Control kein SQL Command
|
||||
' Gib den ursprünlichen Text zurück
|
||||
If result = "" Then
|
||||
Return control.Text
|
||||
Else
|
||||
autoValue = ClassDatabase.Execute_Scalar(result)
|
||||
|
||||
' Wenn das SQL Command DBNull zurück gibt,
|
||||
' Überschreibe den alten Wert mit " " (Leerzeichen)
|
||||
If IsDBNull(autoValue) Then
|
||||
SQL = "SELECT CONTROL_TEXT FROM TBPMO_CONTROL_SCREEN WHERE CONTROL_ID = " & ControlID
|
||||
Dim value = ClassDatabase.Execute_Scalar(SQL)
|
||||
Return value
|
||||
Else
|
||||
Return autoValue
|
||||
End If
|
||||
' Wenn das SQL Command DBNull zurück gibt,
|
||||
' Überschreibe den alten Wert mit " " (Leerzeichen)
|
||||
If IsDBNull(autoValue) Then
|
||||
SQL = "SELECT CONTROL_TEXT FROM TBPMO_CONTROL_SCREEN WHERE CONTROL_ID = " & ControlID
|
||||
Dim value = ClassDatabase.Execute_Scalar(SQL)
|
||||
Return value
|
||||
Else
|
||||
Return autoValue
|
||||
End If
|
||||
End If
|
||||
'End If
|
||||
|
||||
'Return Nothing
|
||||
Else
|
||||
Return Nothing
|
||||
End If
|
||||
|
||||
@ -42,6 +47,7 @@ Public Class ClassControlValues
|
||||
|
||||
Public Shared Sub LoadControlValue(RecordID As Integer, ControlID As Integer, control As Control)
|
||||
Try
|
||||
' Dim DT1 As DataTable = ClassDatabase.Return_Datatable()
|
||||
Dim DT As DataTable = ClassDatabase.Return_Datatable("SELECT * FROM VWPMO_VALUES WHERE RECORD_ID = " & RecordID & " and CONTROL_ID = " & ControlID, "LaodControlValue: ReturnValues")
|
||||
If DT.Rows.Count = 0 Then
|
||||
Dim autoValue = LoadControlAutoValue(ControlID, RecordID, control)
|
||||
@ -128,7 +134,7 @@ Public Class ClassControlValues
|
||||
ClassLogger.Add(" >> Achtung, der Value für Control-ID: " & ControlID & " ist DBNull", False)
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in LoadControlValue:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
End Try
|
||||
@ -138,30 +144,108 @@ Public Class ClassControlValues
|
||||
Public Shared Sub LoadControlValuesNeu(RecordId As Integer, FormId As Integer, controls As Control.ControlCollection)
|
||||
|
||||
ClearControlValues(controls)
|
||||
|
||||
Dim SQL As String = String.Format("SELECT * FROM VWPMO_VALUES WHERE RECORD_ID = {0}", RecordId)
|
||||
Dim DT_ControlValues As DataTable = ClassDatabase.Return_Datatable(SQL, "LoadControlValues")
|
||||
|
||||
For Each control As Control In controls
|
||||
Dim ControlId As Integer = CInt(control.Tag)
|
||||
|
||||
' Wert per LINQ aus DT_ControlValues suchen der zur aktuellen controlId passt
|
||||
Dim value = (From row In DT_ControlValues.AsEnumerable()
|
||||
Where row.Item("CONTROL_ID") = ControlId
|
||||
Select row.Item("VALUE")).SingleOrDefault()
|
||||
|
||||
If IsNothing(value) Then
|
||||
Continue For
|
||||
Try
|
||||
' Dim SQL As String = String.Format("SELECT * FROM VWPMO_VALUES WHERE VALUE <> '' AND RECORD_ID = {0}", RecordId)
|
||||
' Dim DT_ControlValues As DataTable = ClassDatabase.Return_Datatable(SQL, "LoadControlValues")
|
||||
If controls.Count = 0 Then
|
||||
ClassLogger.Add("the control-Collection in LoadControlValuesNeu is empty!", True)
|
||||
End If
|
||||
For Each control As Control In controls
|
||||
Dim ControlId As Integer = CInt(control.Tag)
|
||||
Dim SQL1 As String = String.Format("SELECT VALUE FROM VWPMO_VALUES WHERE CONTROL_ID = {0} AND VALUE <> '' AND RECORD_ID = {1}", ControlId, RecordId)
|
||||
Dim value = ClassDatabase.Execute_Scalar(SQL1)
|
||||
|
||||
If TypeOf control Is GroupBox Then
|
||||
Dim groupbox As GroupBox = DirectCast(control, GroupBox)
|
||||
LoadControlValuesNeu(RecordId, FormId, groupbox.Controls)
|
||||
Else
|
||||
LoadControlValueNeu(RecordId, ControlId, control, value)
|
||||
End If
|
||||
'' Wert per LINQ aus DT_ControlValues suchen der zur aktuellen controlId passt
|
||||
'Dim value = (From row In DT_ControlValues.AsEnumerable()
|
||||
' Where row.Item("CONTROL_ID") = ControlId
|
||||
' Select row.Item("VALUE")).SingleOrDefault()
|
||||
|
||||
Next
|
||||
If Not IsNothing(value) Then
|
||||
' Continue For
|
||||
If TypeOf control Is GroupBox Then
|
||||
Dim groupbox As GroupBox = DirectCast(control, GroupBox)
|
||||
LoadControlValuesNeu(RecordId, FormId, groupbox.Controls)
|
||||
Else
|
||||
LoadControlValueNeu(RecordId, ControlId, control, value)
|
||||
End If
|
||||
Else
|
||||
If TypeOf control Is DevExpress.XtraEditors.CheckedListBoxControl Then
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(">> control DevExpress.XtraEditors.CheckedListBoxControl", False)
|
||||
Dim chklbx As DevExpress.XtraEditors.CheckedListBoxControl
|
||||
chklbx = DirectCast(control, DevExpress.XtraEditors.CheckedListBoxControl)
|
||||
|
||||
Dim chklbSql As String = "SELECT SQL_COMMAND_1 FROM TBPMO_CONTROL WHERE GUID = " & ControlId
|
||||
' chklbSql = ClassDatabase.Execute_Scalar(chklbSql)
|
||||
' If Not (chklbSql Is Nothing Or chklbSql = String.Empty) Then
|
||||
' If chklbSql.ToString.Contains("@") Then
|
||||
' chklbSql = chklbSql.ToString.Replace("@RECORDID", CURRENT_RECORD_ID)
|
||||
' chklbSql = chklbSql.ToString.Replace("@RECORD_ID", CURRENT_RECORD_ID)
|
||||
' chklbSql = chklbSql.ToString.Replace("@PARENTRECORD_ID", CURRENT_PARENTID)
|
||||
' If LogErrorsOnly = False Then ClassLogger.Add(">> SQL CheckedListBox: " & chklbSql, False)
|
||||
' 'SQL-Command vorhanden also Ausführen des SQL
|
||||
' Dim DT_ListBox As DataTable = ClassDatabase.Return_Datatable(chklbSql, "LoadControlValues: CheckedListBox")
|
||||
' If DT_ListBox Is Nothing = False Then
|
||||
' chklbx.DataSource = DT_ListBox
|
||||
' Select Case DT_ListBox.Columns.Count
|
||||
' Case 2
|
||||
' chklbx.DisplayMember = DT_ListBox.Columns(1).ColumnName
|
||||
' chklbx.ValueMember = DT_ListBox.Columns(0).ColumnName
|
||||
' Case 1
|
||||
' chklbx.DisplayMember = DT_ListBox.Columns(0).ColumnName
|
||||
' chklbx.ValueMember = DT_ListBox.Columns(0).ColumnName
|
||||
' End Select
|
||||
|
||||
' End If
|
||||
' End If
|
||||
|
||||
' ElseIf (chklbSql = String.Empty) Then
|
||||
' ' Wenn keine SQL Command ein leerer String ist,
|
||||
' ' lade das Control ohne Datenbank, da es wahrscheinlich eine Static List ist
|
||||
' chklbSql = "SELECT VALUE FROM VWPMO_VALUES WHERE CONTROL_ID = " & CONTROL_ID & " AND RECORD_ID = " & RecordID
|
||||
' Dim result As String = ClassDatabase.Execute_Scalar(chklbSql)
|
||||
|
||||
' If Not IsNothing(result) Then
|
||||
' If result.ToString <> String.Empty Then
|
||||
' Dim entries() As String = result.Split(";")
|
||||
' For Each entry As String In entries
|
||||
' Dim position = chklbx.FindStringExact(entry)
|
||||
' chklbx.SetItemCheckState(position, CheckState.Checked)
|
||||
' Next
|
||||
' End If
|
||||
' End If
|
||||
|
||||
' Continue For
|
||||
' Else
|
||||
' If LogErrorsOnly = False Then ClassLogger.Add(">> chklbSql is nothing", False)
|
||||
' End If
|
||||
|
||||
' chklbx.UnCheckAll()
|
||||
' 'Recorddatensätze durchlaufen und überprüfen ob angehakt??
|
||||
' Dim index As Integer = 0
|
||||
' For i As Integer = 0 To chklbx.ItemCount - 1
|
||||
' Dim item = chklbx.GetItem(i)
|
||||
' Dim row As DataRowView = CType(item, DataRowView)
|
||||
' If CInt(row(0)) > 0 Then
|
||||
' 'Überprüfen ob es den Record gibt
|
||||
' 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
|
||||
' chklbx.SetItemChecked(i, True)
|
||||
' End If
|
||||
' End If
|
||||
|
||||
' Next
|
||||
ElseIf TypeOf control Is Label Then
|
||||
LoadControlValueNeu(RecordId, ControlId, control, value)
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Next
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in LoadControlValuesNeu:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
Private Shared Sub LoadControlValueNeu(recordId As Integer, controlId As Integer, control As Control, value As Object)
|
||||
@ -200,11 +284,23 @@ Public Class ClassControlValues
|
||||
listbox.SelectedIndex = listbox.FindStringExact(value)
|
||||
Case GetType(PictureBox)
|
||||
LoadImage(recordId, controlId, control)
|
||||
Case GetType(DevExpress.XtraEditors.CheckedListBoxControl)
|
||||
Dim chklbx As DevExpress.XtraEditors.CheckedListBoxControl
|
||||
chklbx = DirectCast(control, DevExpress.XtraEditors.CheckedListBoxControl)
|
||||
If Not IsNothing(value) Then
|
||||
If value.ToString <> String.Empty Then
|
||||
Dim entries() As String = value.Split(";")
|
||||
For Each entry As String In entries
|
||||
Dim position = chklbx.FindStringExact(entry)
|
||||
chklbx.SetItemCheckState(position, CheckState.Checked)
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
Case Else
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(">> Sub LoadControlValue - Control-Type nicht berücksichtigt: " & GetType(Control).ToString(), False)
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(">> Sub LoadControlValueNeu - Control-Type is not being worked: " & GetType(Control).ToString(), False)
|
||||
End Select
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in LoadControlValue:" & vbNewLine & ex.Message)
|
||||
MsgBox("Error in LoadControlValueNeu:" & vbNewLine & ex.Message)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
@ -254,282 +350,285 @@ Public Class ClassControlValues
|
||||
|
||||
|
||||
|
||||
Public Shared Sub LoadControlValues(RecordID As Integer, FormID As Integer, controls As Control.ControlCollection)
|
||||
Try
|
||||
Dim CONTROL_ID As Integer
|
||||
'Public Shared Sub LoadControlValues(RecordID As Integer, FormID As Integer, controls As Control.ControlCollection)
|
||||
' Try
|
||||
' Dim CONTROL_ID As Integer
|
||||
|
||||
ClearControlValues(controls)
|
||||
' ClearControlValues(controls)
|
||||
|
||||
For Each control As Control In controls
|
||||
'Überhaupt Columns in Grid?
|
||||
CONTROL_ID = GetControlID_for_RecordID(control.Name, RecordID)
|
||||
If CONTROL_ID = -1 Then
|
||||
CONTROL_ID = GetControlID_for_Name(control.Name, FormID)
|
||||
End If
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(">> CONTROL_ID:" & CONTROL_ID, False)
|
||||
ClearControlValue(control)
|
||||
If TypeOf control Is ComboBox Then
|
||||
LoadControlValue_forControl(RecordID, FormID, DirectCast(control, ComboBox), CONTROL_ID)
|
||||
'LoadControlValues(RecordID, FormID, DirectCast(control, ComboBox).Controls)
|
||||
ElseIf TypeOf control Is GroupBox Then
|
||||
'LoadControlValue_forControl(RecordID, FormID, DirectCast(control, GroupBox), CONTROL_ID)
|
||||
LoadControlValues(RecordID, FormID, DirectCast(control, GroupBox).Controls)
|
||||
ElseIf TypeOf control Is PictureBox Then
|
||||
LoadImage(RecordID, CONTROL_ID, control)
|
||||
Else
|
||||
LoadControlValue(RecordID, CONTROL_ID, control)
|
||||
End If
|
||||
''EINE CheckedListBoxControl
|
||||
'If TypeOf control Is DevExpress.XtraEditors.CheckedListBoxControl Then
|
||||
' If LogErrorsOnly = False Then ClassLogger.Add(">> control DevExpress.XtraEditors.CheckedListBoxControl", False)
|
||||
' Dim chklbx As DevExpress.XtraEditors.CheckedListBoxControl
|
||||
' chklbx = DirectCast(control, DevExpress.XtraEditors.CheckedListBoxControl)
|
||||
' For Each control As Control In controls
|
||||
' 'Überhaupt Columns in Grid?
|
||||
' CONTROL_ID = GetControlID_for_RecordID(control.Name, RecordID)
|
||||
' If CONTROL_ID = -1 Then
|
||||
' CONTROL_ID = GetControlID_for_Name(control.Name, FormID)
|
||||
' End If
|
||||
' If LogErrorsOnly = False Then ClassLogger.Add(">> CONTROL_ID:" & CONTROL_ID, False)
|
||||
' ClearControlValue(control)
|
||||
' If TypeOf control Is ComboBox Then
|
||||
' LoadControlValue_forControl(RecordID, FormID, DirectCast(control, ComboBox), CONTROL_ID)
|
||||
' 'LoadControlValues(RecordID, FormID, DirectCast(control, ComboBox).Controls)
|
||||
' ElseIf TypeOf control Is GroupBox Then
|
||||
' 'LoadControlValue_forControl(RecordID, FormID, DirectCast(control, GroupBox), CONTROL_ID)
|
||||
' LoadControlValues(RecordID, FormID, DirectCast(control, GroupBox).Controls)
|
||||
' ElseIf TypeOf control Is PictureBox Then
|
||||
' LoadImage(RecordID, CONTROL_ID, control)
|
||||
' Else
|
||||
' LoadControlValue(RecordID, CONTROL_ID, control)
|
||||
' End If
|
||||
' ''EINE CheckedListBoxControl
|
||||
' 'If TypeOf control Is DevExpress.XtraEditors.CheckedListBoxControl Then
|
||||
' ' If LogErrorsOnly = False Then ClassLogger.Add(">> control DevExpress.XtraEditors.CheckedListBoxControl", False)
|
||||
' ' Dim chklbx As DevExpress.XtraEditors.CheckedListBoxControl
|
||||
' ' chklbx = DirectCast(control, DevExpress.XtraEditors.CheckedListBoxControl)
|
||||
|
||||
' Dim chklbSql As String = "SELECT SQL_COMMAND_1 FROM TBPMO_CONTROL WHERE GUID = " & CONTROL_ID
|
||||
' chklbSql = ClassDatabase.Execute_Scalar(chklbSql)
|
||||
' If Not (chklbSql Is Nothing Or chklbSql = String.Empty) Then
|
||||
' If chklbSql.ToString.Contains("@") Then
|
||||
' chklbSql = chklbSql.ToString.Replace("@RECORDID", CURRENT_RECORD_ID)
|
||||
' chklbSql = chklbSql.ToString.Replace("@RECORD_ID", CURRENT_RECORD_ID)
|
||||
' chklbSql = chklbSql.ToString.Replace("@PARENTRECORD_ID", CURRENT_PARENTID)
|
||||
' If LogErrorsOnly = False Then ClassLogger.Add(">> SQL CheckedListBox: " & chklbSql, False)
|
||||
' 'SQL-Command vorhanden also Ausführen des SQL
|
||||
' Dim DT_ListBox As DataTable = ClassDatabase.Return_Datatable(chklbSql, "LoadControlValues: CheckedListBox")
|
||||
' If DT_ListBox Is Nothing = False Then
|
||||
' chklbx.DataSource = DT_ListBox
|
||||
' Select Case DT_ListBox.Columns.Count
|
||||
' Case 2
|
||||
' chklbx.DisplayMember = DT_ListBox.Columns(1).ColumnName
|
||||
' chklbx.ValueMember = DT_ListBox.Columns(0).ColumnName
|
||||
' Case 1
|
||||
' chklbx.DisplayMember = DT_ListBox.Columns(0).ColumnName
|
||||
' chklbx.ValueMember = DT_ListBox.Columns(0).ColumnName
|
||||
' End Select
|
||||
' ' Dim chklbSql As String = "SELECT SQL_COMMAND_1 FROM TBPMO_CONTROL WHERE GUID = " & CONTROL_ID
|
||||
' ' chklbSql = ClassDatabase.Execute_Scalar(chklbSql)
|
||||
' ' If Not (chklbSql Is Nothing Or chklbSql = String.Empty) Then
|
||||
' ' If chklbSql.ToString.Contains("@") Then
|
||||
' ' chklbSql = chklbSql.ToString.Replace("@RECORDID", CURRENT_RECORD_ID)
|
||||
' ' chklbSql = chklbSql.ToString.Replace("@RECORD_ID", CURRENT_RECORD_ID)
|
||||
' ' chklbSql = chklbSql.ToString.Replace("@PARENTRECORD_ID", CURRENT_PARENTID)
|
||||
' ' If LogErrorsOnly = False Then ClassLogger.Add(">> SQL CheckedListBox: " & chklbSql, False)
|
||||
' ' 'SQL-Command vorhanden also Ausführen des SQL
|
||||
' ' Dim DT_ListBox As DataTable = ClassDatabase.Return_Datatable(chklbSql, "LoadControlValues: CheckedListBox")
|
||||
' ' If DT_ListBox Is Nothing = False Then
|
||||
' ' chklbx.DataSource = DT_ListBox
|
||||
' ' Select Case DT_ListBox.Columns.Count
|
||||
' ' Case 2
|
||||
' ' chklbx.DisplayMember = DT_ListBox.Columns(1).ColumnName
|
||||
' ' chklbx.ValueMember = DT_ListBox.Columns(0).ColumnName
|
||||
' ' Case 1
|
||||
' ' chklbx.DisplayMember = DT_ListBox.Columns(0).ColumnName
|
||||
' ' chklbx.ValueMember = DT_ListBox.Columns(0).ColumnName
|
||||
' ' End Select
|
||||
|
||||
' End If
|
||||
' End If
|
||||
' ' End If
|
||||
' ' End If
|
||||
|
||||
' ElseIf (chklbSql = String.Empty) Then
|
||||
' ' Wenn keine SQL Command ein leerer String ist,
|
||||
' ' lade das Control ohne Datenbank, da es wahrscheinlich eine Static List ist
|
||||
' chklbSql = "SELECT VALUE FROM VWPMO_VALUES WHERE CONTROL_ID = " & CONTROL_ID & " AND RECORD_ID = " & RecordID
|
||||
' Dim result As String = ClassDatabase.Execute_Scalar(chklbSql)
|
||||
' ' ElseIf (chklbSql = String.Empty) Then
|
||||
' ' ' Wenn keine SQL Command ein leerer String ist,
|
||||
' ' ' lade das Control ohne Datenbank, da es wahrscheinlich eine Static List ist
|
||||
' ' chklbSql = "SELECT VALUE FROM VWPMO_VALUES WHERE CONTROL_ID = " & CONTROL_ID & " AND RECORD_ID = " & RecordID
|
||||
' ' Dim result As String = ClassDatabase.Execute_Scalar(chklbSql)
|
||||
|
||||
' If Not IsNothing(result) Then
|
||||
' If result.ToString <> String.Empty Then
|
||||
' Dim entries() As String = result.Split(";")
|
||||
' For Each entry As String In entries
|
||||
' Dim position = chklbx.FindStringExact(entry)
|
||||
' chklbx.SetItemCheckState(position, CheckState.Checked)
|
||||
' Next
|
||||
' End If
|
||||
' End If
|
||||
' ' If Not IsNothing(result) Then
|
||||
' ' If result.ToString <> String.Empty Then
|
||||
' ' Dim entries() As String = result.Split(";")
|
||||
' ' For Each entry As String In entries
|
||||
' ' Dim position = chklbx.FindStringExact(entry)
|
||||
' ' chklbx.SetItemCheckState(position, CheckState.Checked)
|
||||
' ' Next
|
||||
' ' End If
|
||||
' ' End If
|
||||
|
||||
' Continue For
|
||||
' Else
|
||||
' If LogErrorsOnly = False Then ClassLogger.Add(">> chklbSql is nothing", False)
|
||||
' End If
|
||||
' ' Continue For
|
||||
' ' Else
|
||||
' ' If LogErrorsOnly = False Then ClassLogger.Add(">> chklbSql is nothing", False)
|
||||
' ' End If
|
||||
|
||||
' chklbx.UnCheckAll()
|
||||
' 'Recorddatensätze durchlaufen und überprüfen ob angehakt??
|
||||
' Dim index As Integer = 0
|
||||
' For i As Integer = 0 To chklbx.ItemCount - 1
|
||||
' Dim item = chklbx.GetItem(i)
|
||||
' Dim row As DataRowView = CType(item, DataRowView)
|
||||
' If CInt(row(0)) > 0 Then
|
||||
' 'Überprüfen ob es den Record gibt
|
||||
' 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
|
||||
' chklbx.SetItemChecked(i, True)
|
||||
' End If
|
||||
' End If
|
||||
' ' chklbx.UnCheckAll()
|
||||
' ' 'Recorddatensätze durchlaufen und überprüfen ob angehakt??
|
||||
' ' Dim index As Integer = 0
|
||||
' ' For i As Integer = 0 To chklbx.ItemCount - 1
|
||||
' ' Dim item = chklbx.GetItem(i)
|
||||
' ' Dim row As DataRowView = CType(item, DataRowView)
|
||||
' ' If CInt(row(0)) > 0 Then
|
||||
' ' 'Überprüfen ob es den Record gibt
|
||||
' ' 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
|
||||
' ' chklbx.SetItemChecked(i, True)
|
||||
' ' End If
|
||||
' ' End If
|
||||
|
||||
' Next
|
||||
'ElseIf TypeOf control Is DevExpress.XtraEditors.ListBoxControl Then
|
||||
' If LogErrorsOnly = False Then ClassLogger.Add(">> control DevExpress.XtraEditors.ListBoxControl", False)
|
||||
' Dim lbx As DevExpress.XtraEditors.ListBoxControl
|
||||
' lbx = DirectCast(control, DevExpress.XtraEditors.ListBoxControl)
|
||||
' Dim lbSql As String = "SELECT SQL_COMMAND_1 FROM TBPMO_CONTROL WHERE GUID = " & CONTROL_ID
|
||||
' lbSql = ClassDatabase.Execute_Scalar(lbSql)
|
||||
' If Not (lbSql Is Nothing Or lbSql = String.Empty) Then
|
||||
' If lbSql.ToString.Contains("@") Then
|
||||
' lbSql = lbSql.ToString.Replace("@RECORDID".ToUpper, CURRENT_RECORD_ID)
|
||||
' lbSql = lbSql.ToString.Replace("@RECORD_ID".ToUpper, CURRENT_RECORD_ID)
|
||||
' lbSql = lbSql.ToString.Replace("@PARENTRECORD_ID".ToUpper, CURRENT_PARENTID)
|
||||
' If LogErrorsOnly = False Then ClassLogger.Add(">> SQL ListBox: " & lbSql, False)
|
||||
' 'SQL-Command vorhanden also Ausführen des SQL
|
||||
' Dim DT_ListBox As DataTable = ClassDatabase.Return_Datatable(lbSql, "LoadControlValues: ListBoxControl")
|
||||
' If DT_ListBox Is Nothing = False Then
|
||||
' lbx.DataSource = DT_ListBox
|
||||
' Select Case DT_ListBox.Columns.Count
|
||||
' Case 2
|
||||
' lbx.DisplayMember = DT_ListBox.Columns(1).ColumnName
|
||||
' lbx.ValueMember = DT_ListBox.Columns(0).ColumnName
|
||||
' Case 1
|
||||
' lbx.DisplayMember = DT_ListBox.Columns(0).ColumnName
|
||||
' lbx.ValueMember = DT_ListBox.Columns(0).ColumnName
|
||||
' End Select
|
||||
' If DT_ListBox.Columns.Count > 1 Then
|
||||
' ' Next
|
||||
' 'ElseIf TypeOf control Is DevExpress.XtraEditors.ListBoxControl Then
|
||||
' ' If LogErrorsOnly = False Then ClassLogger.Add(">> control DevExpress.XtraEditors.ListBoxControl", False)
|
||||
' ' Dim lbx As DevExpress.XtraEditors.ListBoxControl
|
||||
' ' lbx = DirectCast(control, DevExpress.XtraEditors.ListBoxControl)
|
||||
' ' Dim lbSql As String = "SELECT SQL_COMMAND_1 FROM TBPMO_CONTROL WHERE GUID = " & CONTROL_ID
|
||||
' ' lbSql = ClassDatabase.Execute_Scalar(lbSql)
|
||||
' ' If Not (lbSql Is Nothing Or lbSql = String.Empty) Then
|
||||
' ' If lbSql.ToString.Contains("@") Then
|
||||
' ' lbSql = lbSql.ToString.Replace("@RECORDID".ToUpper, CURRENT_RECORD_ID)
|
||||
' ' lbSql = lbSql.ToString.Replace("@RECORD_ID".ToUpper, CURRENT_RECORD_ID)
|
||||
' ' lbSql = lbSql.ToString.Replace("@PARENTRECORD_ID".ToUpper, CURRENT_PARENTID)
|
||||
' ' If LogErrorsOnly = False Then ClassLogger.Add(">> SQL ListBox: " & lbSql, False)
|
||||
' ' 'SQL-Command vorhanden also Ausführen des SQL
|
||||
' ' Dim DT_ListBox As DataTable = ClassDatabase.Return_Datatable(lbSql, "LoadControlValues: ListBoxControl")
|
||||
' ' If DT_ListBox Is Nothing = False Then
|
||||
' ' lbx.DataSource = DT_ListBox
|
||||
' ' Select Case DT_ListBox.Columns.Count
|
||||
' ' Case 2
|
||||
' ' lbx.DisplayMember = DT_ListBox.Columns(1).ColumnName
|
||||
' ' lbx.ValueMember = DT_ListBox.Columns(0).ColumnName
|
||||
' ' Case 1
|
||||
' ' lbx.DisplayMember = DT_ListBox.Columns(0).ColumnName
|
||||
' ' lbx.ValueMember = DT_ListBox.Columns(0).ColumnName
|
||||
' ' End Select
|
||||
' ' If DT_ListBox.Columns.Count > 1 Then
|
||||
|
||||
' End If
|
||||
' ' End If
|
||||
|
||||
' Else
|
||||
' If LogErrorsOnly = False Then ClassLogger.Add(">> DT_ListBox is nothing", False)
|
||||
' End If
|
||||
' Else
|
||||
' If LogErrorsOnly = False Then ClassLogger.Add(">> lbSql.ToString NOT Contains(@)", False)
|
||||
' End If
|
||||
' ElseIf (lbSql = String.Empty) Then
|
||||
' ' Wenn keine SQL Command ein leerer String ist,
|
||||
' ' lade das Control ohne Datenbank, da es wahrscheinlich eine Static List ist
|
||||
' LoadControlValue(RecordID, CONTROL_ID, control)
|
||||
' Continue For
|
||||
' Else
|
||||
' If LogErrorsOnly = False Then ClassLogger.Add(">> lbSql is nothing", False)
|
||||
' End If
|
||||
'ElseIf CONTROL_ID <> -1 Then
|
||||
' 'If LogErrorsOnly = False Then ClassLogger.Add(">> LoadControlValues CONTROL_ID: " & CONTROL_ID, False)
|
||||
' LoadControlValue(RecordID, CONTROL_ID, control)
|
||||
'End If
|
||||
Next
|
||||
Catch ex As Exception
|
||||
MsgBox("Unexpected Error in LoadControlValues:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
End Try
|
||||
' ' Else
|
||||
' ' If LogErrorsOnly = False Then ClassLogger.Add(">> DT_ListBox is nothing", False)
|
||||
' ' End If
|
||||
' ' Else
|
||||
' ' If LogErrorsOnly = False Then ClassLogger.Add(">> lbSql.ToString NOT Contains(@)", False)
|
||||
' ' End If
|
||||
' ' ElseIf (lbSql = String.Empty) Then
|
||||
' ' ' Wenn keine SQL Command ein leerer String ist,
|
||||
' ' ' lade das Control ohne Datenbank, da es wahrscheinlich eine Static List ist
|
||||
' ' LoadControlValue(RecordID, CONTROL_ID, control)
|
||||
' ' Continue For
|
||||
' ' Else
|
||||
' ' If LogErrorsOnly = False Then ClassLogger.Add(">> lbSql is nothing", False)
|
||||
' ' End If
|
||||
' 'ElseIf CONTROL_ID <> -1 Then
|
||||
' ' 'If LogErrorsOnly = False Then ClassLogger.Add(">> LoadControlValues CONTROL_ID: " & CONTROL_ID, False)
|
||||
' ' LoadControlValue(RecordID, CONTROL_ID, control)
|
||||
' 'End If
|
||||
' Next
|
||||
' Catch ex As Exception
|
||||
' MsgBox("Unexpected Error in LoadControlValues:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
' End Try
|
||||
|
||||
End Sub
|
||||
Public Shared Sub LoadControlValue_forControl(RecordID As Integer, FormID As Integer, control As System.Windows.Forms.Control, CONTROL_ID As Integer)
|
||||
Try
|
||||
'EINE CheckedListBoxControl
|
||||
If TypeOf control Is DevExpress.XtraEditors.CheckedListBoxControl Then
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(">> control DevExpress.XtraEditors.CheckedListBoxControl", False)
|
||||
Dim chklbx As DevExpress.XtraEditors.CheckedListBoxControl
|
||||
chklbx = DirectCast(control, DevExpress.XtraEditors.CheckedListBoxControl)
|
||||
'End Sub
|
||||
'Public Shared Sub LoadControlValue_forControl(RecordID As Integer, FormID As Integer, control As System.Windows.Forms.Control, CONTROL_ID As Integer)
|
||||
' Try
|
||||
' 'EINE CheckedListBoxControl
|
||||
' If TypeOf control Is DevExpress.XtraEditors.CheckedListBoxControl Then
|
||||
' If LogErrorsOnly = False Then ClassLogger.Add(">> control DevExpress.XtraEditors.CheckedListBoxControl", False)
|
||||
' Dim chklbx As DevExpress.XtraEditors.CheckedListBoxControl
|
||||
' chklbx = DirectCast(control, DevExpress.XtraEditors.CheckedListBoxControl)
|
||||
|
||||
Dim chklbSql As String = "SELECT SQL_COMMAND_1 FROM TBPMO_CONTROL WHERE GUID = " & CONTROL_ID
|
||||
chklbSql = ClassDatabase.Execute_Scalar(chklbSql)
|
||||
If Not (chklbSql Is Nothing Or chklbSql = String.Empty) Then
|
||||
If chklbSql.ToString.Contains("@") Then
|
||||
chklbSql = chklbSql.ToString.Replace("@RECORDID", CURRENT_RECORD_ID)
|
||||
chklbSql = chklbSql.ToString.Replace("@RECORD_ID", CURRENT_RECORD_ID)
|
||||
chklbSql = chklbSql.ToString.Replace("@PARENTRECORD_ID", CURRENT_PARENTID)
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(">> SQL CheckedListBox: " & chklbSql, False)
|
||||
'SQL-Command vorhanden also Ausführen des SQL
|
||||
Dim DT_ListBox As DataTable = ClassDatabase.Return_Datatable(chklbSql, "LoadControlValue_forControl: CheckedListBox")
|
||||
If DT_ListBox Is Nothing = False Then
|
||||
chklbx.DataSource = DT_ListBox
|
||||
Select Case DT_ListBox.Columns.Count
|
||||
Case 2
|
||||
chklbx.DisplayMember = DT_ListBox.Columns(1).ColumnName
|
||||
chklbx.ValueMember = DT_ListBox.Columns(0).ColumnName
|
||||
Case 1
|
||||
chklbx.DisplayMember = DT_ListBox.Columns(0).ColumnName
|
||||
chklbx.ValueMember = DT_ListBox.Columns(0).ColumnName
|
||||
End Select
|
||||
' Dim chklbSql As String = "SELECT SQL_COMMAND_1 FROM TBPMO_CONTROL WHERE GUID = " & CONTROL_ID
|
||||
' chklbSql = ClassDatabase.Execute_Scalar(chklbSql)
|
||||
' If Not (chklbSql Is Nothing Or chklbSql = String.Empty) Then
|
||||
' If chklbSql.ToString.Contains("@") Then
|
||||
' chklbSql = chklbSql.ToString.Replace("@RECORDID", CURRENT_RECORD_ID)
|
||||
' chklbSql = chklbSql.ToString.Replace("@RECORD_ID", CURRENT_RECORD_ID)
|
||||
' chklbSql = chklbSql.ToString.Replace("@PARENTRECORD_ID", CURRENT_PARENTID)
|
||||
' If LogErrorsOnly = False Then ClassLogger.Add(">> SQL CheckedListBox: " & chklbSql, False)
|
||||
' 'SQL-Command vorhanden also Ausführen des SQL
|
||||
' Dim DT_ListBox As DataTable = ClassDatabase.Return_Datatable(chklbSql, "LoadControlValue_forControl: CheckedListBox")
|
||||
' If DT_ListBox Is Nothing = False Then
|
||||
' chklbx.DataSource = DT_ListBox
|
||||
' Select Case DT_ListBox.Columns.Count
|
||||
' Case 2
|
||||
' chklbx.DisplayMember = DT_ListBox.Columns(1).ColumnName
|
||||
' chklbx.ValueMember = DT_ListBox.Columns(0).ColumnName
|
||||
' Case 1
|
||||
' chklbx.DisplayMember = DT_ListBox.Columns(0).ColumnName
|
||||
' chklbx.ValueMember = DT_ListBox.Columns(0).ColumnName
|
||||
' End Select
|
||||
|
||||
End If
|
||||
End If
|
||||
ElseIf (chklbSql = String.Empty) Then
|
||||
' Wenn keine SQL Command ein leerer String ist,
|
||||
' lade das Control ohne Datenbank, da es wahrscheinlich eine Static List ist
|
||||
chklbSql = "SELECT VALUE FROM VWPMO_VALUES WHERE CONTROL_ID = " & CONTROL_ID & " AND RECORD_ID = " & RecordID
|
||||
Dim result As String = ClassDatabase.Execute_Scalar(chklbSql)
|
||||
' End If
|
||||
' End If
|
||||
' ElseIf (chklbSql = String.Empty) Then
|
||||
' ' Wenn keine SQL Command ein leerer String ist,
|
||||
' ' lade das Control ohne Datenbank, da es wahrscheinlich eine Static List ist
|
||||
' chklbSql = "SELECT VALUE FROM VWPMO_VALUES WHERE CONTROL_ID = " & CONTROL_ID & " AND RECORD_ID = " & RecordID
|
||||
' Dim result As String = ClassDatabase.Execute_Scalar(chklbSql)
|
||||
|
||||
If Not IsNothing(result) Then
|
||||
If result.ToString <> String.Empty Then
|
||||
Dim entries() As String = result.Split(";")
|
||||
For Each entry As String In entries
|
||||
Dim position = chklbx.FindStringExact(entry)
|
||||
chklbx.SetItemCheckState(position, CheckState.Checked)
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(">> chklbSql is nothing", False)
|
||||
End If
|
||||
' If Not IsNothing(result) Then
|
||||
' If result.ToString <> String.Empty Then
|
||||
' Dim entries() As String = result.Split(";")
|
||||
' For Each entry As String In entries
|
||||
' Dim position = chklbx.FindStringExact(entry)
|
||||
' chklbx.SetItemCheckState(position, CheckState.Checked)
|
||||
' Next
|
||||
' End If
|
||||
' End If
|
||||
' Else
|
||||
' If LogErrorsOnly = False Then ClassLogger.Add(">> chklbSql is nothing", False)
|
||||
' End If
|
||||
|
||||
chklbx.UnCheckAll()
|
||||
'Recorddatensätze durchlaufen und überprüfen ob angehakt??
|
||||
Dim index As Integer = 0
|
||||
For i As Integer = 0 To chklbx.ItemCount - 1
|
||||
Dim item = chklbx.GetItem(i)
|
||||
Dim row As DataRowView = CType(item, DataRowView)
|
||||
If CInt(row(0)) > 0 Then
|
||||
'Überprüfen ob es den Record gibt
|
||||
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
|
||||
chklbx.SetItemChecked(i, True)
|
||||
End If
|
||||
End If
|
||||
' chklbx.UnCheckAll()
|
||||
' 'Recorddatensätze durchlaufen und überprüfen ob angehakt??
|
||||
' Dim index As Integer = 0
|
||||
' For i As Integer = 0 To chklbx.ItemCount - 1
|
||||
' Dim item = chklbx.GetItem(i)
|
||||
' Dim row As DataRowView = CType(item, DataRowView)
|
||||
' If CInt(row(0)) > 0 Then
|
||||
' 'Überprüfen ob es den Record gibt
|
||||
' 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
|
||||
' chklbx.SetItemChecked(i, True)
|
||||
' End If
|
||||
' End If
|
||||
|
||||
Next
|
||||
ElseIf TypeOf control Is DevExpress.XtraEditors.ListBoxControl Then
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(">> control DevExpress.XtraEditors.ListBoxControl", False)
|
||||
Dim lbx As DevExpress.XtraEditors.ListBoxControl
|
||||
lbx = DirectCast(control, DevExpress.XtraEditors.ListBoxControl)
|
||||
Dim lbSql As String = "SELECT SQL_COMMAND_1 FROM TBPMO_CONTROL WHERE GUID = " & CONTROL_ID
|
||||
lbSql = ClassDatabase.Execute_Scalar(lbSql)
|
||||
If Not (lbSql Is Nothing Or lbSql = String.Empty) Then
|
||||
If lbSql.ToString.Contains("@") Then
|
||||
lbSql = lbSql.ToString.Replace("@RECORDID".ToUpper, CURRENT_RECORD_ID)
|
||||
lbSql = lbSql.ToString.Replace("@RECORD_ID".ToUpper, CURRENT_RECORD_ID)
|
||||
lbSql = lbSql.ToString.Replace("@PARENTRECORD_ID".ToUpper, CURRENT_PARENTID)
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(">> SQL ListBox: " & lbSql, False)
|
||||
'SQL-Command vorhanden also Ausführen des SQL
|
||||
Dim DT_ListBox As DataTable = ClassDatabase.Return_Datatable(lbSql, "LoadControlValue_forControl: ListBoxControl")
|
||||
If DT_ListBox Is Nothing = False Then
|
||||
lbx.DataSource = DT_ListBox
|
||||
Select Case DT_ListBox.Columns.Count
|
||||
Case 2
|
||||
lbx.DisplayMember = DT_ListBox.Columns(1).ColumnName
|
||||
lbx.ValueMember = DT_ListBox.Columns(0).ColumnName
|
||||
Case 1
|
||||
lbx.DisplayMember = DT_ListBox.Columns(0).ColumnName
|
||||
lbx.ValueMember = DT_ListBox.Columns(0).ColumnName
|
||||
End Select
|
||||
If DT_ListBox.Columns.Count > 1 Then
|
||||
' Next
|
||||
' ElseIf TypeOf control Is DevExpress.XtraEditors.ListBoxControl Then
|
||||
' If LogErrorsOnly = False Then ClassLogger.Add(">> control DevExpress.XtraEditors.ListBoxControl", False)
|
||||
' Dim lbx As DevExpress.XtraEditors.ListBoxControl
|
||||
' lbx = DirectCast(control, DevExpress.XtraEditors.ListBoxControl)
|
||||
' Dim lbSql As String = "SELECT SQL_COMMAND_1 FROM TBPMO_CONTROL WHERE GUID = " & CONTROL_ID
|
||||
' lbSql = ClassDatabase.Execute_Scalar(lbSql)
|
||||
' If Not (lbSql Is Nothing Or lbSql = String.Empty) Then
|
||||
' If lbSql.ToString.Contains("@") Then
|
||||
' lbSql = lbSql.ToString.Replace("@RECORDID".ToUpper, CURRENT_RECORD_ID)
|
||||
' lbSql = lbSql.ToString.Replace("@RECORD_ID".ToUpper, CURRENT_RECORD_ID)
|
||||
' lbSql = lbSql.ToString.Replace("@PARENTRECORD_ID".ToUpper, CURRENT_PARENTID)
|
||||
' If LogErrorsOnly = False Then ClassLogger.Add(">> SQL ListBox: " & lbSql, False)
|
||||
' 'SQL-Command vorhanden also Ausführen des SQL
|
||||
' Dim DT_ListBox As DataTable = ClassDatabase.Return_Datatable(lbSql, "LoadControlValue_forControl: ListBoxControl")
|
||||
' If DT_ListBox Is Nothing = False Then
|
||||
' lbx.DataSource = DT_ListBox
|
||||
' Select Case DT_ListBox.Columns.Count
|
||||
' Case 2
|
||||
' lbx.DisplayMember = DT_ListBox.Columns(1).ColumnName
|
||||
' lbx.ValueMember = DT_ListBox.Columns(0).ColumnName
|
||||
' Case 1
|
||||
' lbx.DisplayMember = DT_ListBox.Columns(0).ColumnName
|
||||
' lbx.ValueMember = DT_ListBox.Columns(0).ColumnName
|
||||
' End Select
|
||||
' If DT_ListBox.Columns.Count > 1 Then
|
||||
|
||||
End If
|
||||
' End If
|
||||
|
||||
Else
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(">> DT_ListBox is nothing", False)
|
||||
End If
|
||||
Else
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(">> lbSql.ToString NOT Contains(@)", False)
|
||||
End If
|
||||
ElseIf (lbSql = String.Empty) Then
|
||||
' Wenn keine SQL Command ein leerer String ist,
|
||||
' lade das Control ohne Datenbank, da es wahrscheinlich eine Static List ist
|
||||
LoadControlValue(RecordID, CONTROL_ID, control)
|
||||
Else
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(">> lbSql is nothing", False)
|
||||
End If
|
||||
ElseIf CONTROL_ID <> -1 Then
|
||||
'If LogErrorsOnly = False Then ClassLogger.Add(">> LoadControlValue_forControl CONTROL_ID: " & CONTROL_ID, False)
|
||||
LoadControlValue(RecordID, CONTROL_ID, control)
|
||||
End If
|
||||
' Else
|
||||
' If LogErrorsOnly = False Then ClassLogger.Add(">> DT_ListBox is nothing", False)
|
||||
' End If
|
||||
' Else
|
||||
' If LogErrorsOnly = False Then ClassLogger.Add(">> lbSql.ToString NOT Contains(@)", False)
|
||||
' End If
|
||||
' ElseIf (lbSql = String.Empty) Then
|
||||
' ' Wenn keine SQL Command ein leerer String ist,
|
||||
' ' lade das Control ohne Datenbank, da es wahrscheinlich eine Static List ist
|
||||
' LoadControlValue(RecordID, CONTROL_ID, control)
|
||||
' Else
|
||||
' If LogErrorsOnly = False Then ClassLogger.Add(">> lbSql is nothing", False)
|
||||
' End If
|
||||
' ElseIf CONTROL_ID <> -1 Then
|
||||
' 'If LogErrorsOnly = False Then ClassLogger.Add(">> LoadControlValue_forControl CONTROL_ID: " & CONTROL_ID, False)
|
||||
' LoadControlValue(RecordID, CONTROL_ID, control)
|
||||
' End If
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox("Unexpected Error in LoadControlValue_forControl:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
End Try
|
||||
' Catch ex As Exception
|
||||
' MsgBox("Unexpected Error in LoadControlValue_forControl:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
' End Try
|
||||
|
||||
End Sub
|
||||
'End Sub
|
||||
|
||||
Public Shared Sub LoadControlValuesList(RecordID As Integer, FormID As Integer, controls As Control.ControlCollection)
|
||||
Try
|
||||
|
||||
If controls.Count = 0 Then
|
||||
MsgBox("Control.ControlCollection is unexpected empty!", MsgBoxStyle.Exclamation)
|
||||
End If
|
||||
Dim SW As Stopwatch = Stopwatch.StartNew()
|
||||
|
||||
For Each Ctrl As Control In controls
|
||||
If TypeOf Ctrl Is ComboBox Then
|
||||
Dim ControlId = Ctrl.Tag
|
||||
Dim swInner As Stopwatch = Stopwatch.StartNew()
|
||||
|
||||
Dim Combobox = DirectCast(Ctrl, ComboBox)
|
||||
|
||||
Dim SQL As String = String.Format("SELECT SQL_COMMAND_1 FROM TBPMO_CONTROL WHERE FORM_ID = {0} AND NAME = '{1}'", CURRENT_FORM_ID, Ctrl.Name)
|
||||
Dim SQL As String = String.Format("SELECT SQL_COMMAND_1 FROM TBPMO_CONTROL WHERE GUID = {0}", ControlId) 'CURRENT_FORM_ID, Ctrl.Name)
|
||||
Dim SQL2 As String = ClassDatabase.Execute_Scalar(SQL)
|
||||
|
||||
If SQL2 = "" Then
|
||||
Exit Sub
|
||||
Continue For
|
||||
End If
|
||||
If SQL2.ToString.ToUpper.Contains("@") Then
|
||||
SQL2 = SQL2.ToString.Replace("@RECORDID", CURRENT_RECORD_ID)
|
||||
@ -538,7 +637,7 @@ Public Class ClassControlValues
|
||||
' If LogErrorsOnly = False Then ClassLogger.Add(">> SQL Combobox: " & cmbSql, False)
|
||||
End If
|
||||
|
||||
Dim controlId As Integer = GetControlID_for_Name(Combobox.Name, FormID)
|
||||
'Dim controlId As Integer = GetControlID_for_Name(Combobox.Name, FormID)
|
||||
'Dim DT_Combobox As DataTable = ClassDatabase.Return_Datatable(SQL2)
|
||||
|
||||
' Zuerst versuchen, DataTable aus dem Cache zu laden
|
||||
@ -573,8 +672,8 @@ Public Class ClassControlValues
|
||||
Combobox.DropDownWidth = Math.Max(iWidestWidth, Combobox.Width)
|
||||
End If
|
||||
|
||||
LoadControlValue(RecordID, controlId, Ctrl)
|
||||
|
||||
LoadControlValue(RecordID, ControlId, Ctrl)
|
||||
'LoadControlValueNeu(RecordID, ControlId, Ctrl, "")
|
||||
End If
|
||||
|
||||
swInner.Stop()
|
||||
@ -649,9 +748,9 @@ Public Class ClassControlValues
|
||||
DirectCast(control, PictureBox).BackgroundImage = Nothing
|
||||
Case "CheckedListBoxControl"
|
||||
Dim chklbx As DevExpress.XtraEditors.CheckedListBoxControl = DirectCast(control, DevExpress.XtraEditors.CheckedListBoxControl)
|
||||
If IsNothing(chklbx.DataSource) Then
|
||||
chklbx.UnCheckAll()
|
||||
End If
|
||||
'If IsNothing(chklbx.DataSource) Then
|
||||
chklbx.UnCheckAll()
|
||||
'End If
|
||||
'Case "ListBoxControl"
|
||||
' Dim lbx As DevExpress.XtraEditors.ListBoxControl
|
||||
' lbx = DirectCast(control, DevExpress.XtraEditors.ListBoxControl)
|
||||
@ -669,7 +768,7 @@ Public Class ClassControlValues
|
||||
Dim i = 0
|
||||
For Each control As Control In controls
|
||||
|
||||
CONTROL_ID = GetControlID_for_Name(control.Name, FormID)
|
||||
CONTROL_ID = control.Tag ' GetControlID_for_Name(control.Name, FormID)
|
||||
If Not (TypeOf control Is Label) Then
|
||||
i += 1
|
||||
End If
|
||||
|
||||
116
app/DD-Record-Organiser/ClassFolderWatcher.vb
Normal file
116
app/DD-Record-Organiser/ClassFolderWatcher.vb
Normal file
@ -0,0 +1,116 @@
|
||||
Imports System.IO
|
||||
Imports Independentsoft
|
||||
Imports System.Threading
|
||||
|
||||
Public Class ClassFolderWatcher
|
||||
Public Shared FolderWatcher_SCAN As FileSystemWatcher
|
||||
Public Shared Function Restart_FolderWatchSCAN()
|
||||
If FolderWatcher_SCAN.EnableRaisingEvents = True Then
|
||||
'Gestartet also Stoppen
|
||||
FolderWatcher_SCAN.EnableRaisingEvents = False
|
||||
FWSCAN_started = False
|
||||
'FolderWatch neu instanzieren
|
||||
FolderWatcher_SCAN = New System.IO.FileSystemWatcher(CURRENT_SCAN_FOLDERWATCH, "*.*")
|
||||
ClassLogger.Add(" >> FolderWatchScan neu instanziert", False)
|
||||
FolderWatcher_SCAN.IncludeSubdirectories = False
|
||||
FolderWatcher_SCAN.EnableRaisingEvents = True
|
||||
AddHandler FolderWatcher_SCAN.Created, AddressOf OnCreated
|
||||
FWSCAN_started = True
|
||||
SaveMySettingsValue("FWSCAN_started", "True", "ConfigMain")
|
||||
|
||||
End If
|
||||
End Function
|
||||
Public Shared Function StartStop_FolderWatchSCAN()
|
||||
Try
|
||||
If CURRENT_SCAN_FOLDERWATCH = "" Then
|
||||
MsgBox("Bitte definieren Sie einen Überwachungsordner für Scan-Eingänge:", MsgBoxStyle.Exclamation)
|
||||
Return False
|
||||
End If
|
||||
If FolderWatcher_SCAN Is Nothing Then
|
||||
FolderWatcher_SCAN = New System.IO.FileSystemWatcher(CURRENT_SCAN_FOLDERWATCH, "*.*")
|
||||
ClassLogger.Add(" >> FolderWatch Scan Gestartet", False)
|
||||
FolderWatcher_SCAN.IncludeSubdirectories = False
|
||||
FolderWatcher_SCAN.EnableRaisingEvents = True
|
||||
AddHandler FolderWatcher_SCAN.Created, AddressOf OnCreated
|
||||
FWSCAN_started = True
|
||||
SaveMySettingsValue("FWSCAN_started", "True", "ConfigMain")
|
||||
Return 1
|
||||
End If
|
||||
If FolderWatcher_SCAN.EnableRaisingEvents = False Then
|
||||
' Dim watcher As New FileSystemWatcher()
|
||||
' watcher.Path = CURRENT_FOLDERWATCH
|
||||
FolderWatcher_SCAN = New System.IO.FileSystemWatcher(CURRENT_SCAN_FOLDERWATCH, "*.*")
|
||||
ClassLogger.Add(" >> FolderWatch Scan Gestartet", False)
|
||||
FolderWatcher_SCAN.IncludeSubdirectories = False
|
||||
FolderWatcher_SCAN.EnableRaisingEvents = True
|
||||
AddHandler FolderWatcher_SCAN.Created, AddressOf OnCreated
|
||||
FWSCAN_started = True
|
||||
SaveMySettingsValue("FWSCAN_started", "True", "ConfigMain")
|
||||
Return 1
|
||||
Else
|
||||
'Gestartet also Stoppen
|
||||
FolderWatcher_SCAN.EnableRaisingEvents = False
|
||||
FWSCAN_started = False
|
||||
ClassLogger.Add(" >> FolderWatch Scan gestoppt", False)
|
||||
SaveMySettingsValue("FWSCAN_started", "False", "ConfigMain")
|
||||
Return 0
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in StartStop_FolderWatchSCAN:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
Return 99
|
||||
End Try
|
||||
End Function
|
||||
Private Shared Sub OnCreated(source As Object, e As FileSystemEventArgs)
|
||||
Try
|
||||
For Each row As DataRow In DTEXCLUDE_FILES.Rows
|
||||
Dim content As String = row.Item(0).ToString.ToLower
|
||||
If e.FullPath.ToLower.Contains(content) Then
|
||||
Exit Sub
|
||||
End If
|
||||
Next
|
||||
|
||||
Dim handleType As String
|
||||
If e.FullPath.EndsWith(".msg") Then
|
||||
handleType = "@SCAN_OUTLOOK_MESSAGE@"
|
||||
Else
|
||||
handleType = "@SCAN@"
|
||||
End If
|
||||
'Die Datei übergeben
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(">> OnCreated-File:" & e.FullPath, False)
|
||||
If FileExistsinDropTable(CURRENT_FILENAME) = False Then
|
||||
Insert_SCAN_File(e.FullPath, handleType)
|
||||
Else
|
||||
Console.WriteLine("File existiert bereits")
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler bei folder_watch_Created")
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
Public Shared Function FileExistsinDropTable(Filename As String)
|
||||
Dim check As String
|
||||
Try
|
||||
check = "SELECT COUNT(*) FROM TBGI_FILES_USER WHERE UPPER(FILENAME2WORK) = UPPER('" & Filename & "') AND WORKED = 0"
|
||||
Dim result = ClassDatabase.Execute_Scalar(check, True)
|
||||
Return result
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in FileExistsinDropTable - Error-Message:" & vbNewLine & ex.Message & vbNewLine & "SQL-Command:" & vbNewLine & check, MsgBoxStyle.Critical)
|
||||
Return Nothing
|
||||
End Try
|
||||
|
||||
End Function
|
||||
Private Shared Function Insert_SCAN_File(filename As String, handleType As String)
|
||||
Try
|
||||
Dim filename_only As String = Path.GetFileName(filename)
|
||||
|
||||
Dim ins As String = String.Format("INSERT INTO TBPMO_FILES_USER (FILENAME2WORK, USER@WORK,HANDLE_TYPE,FILENAME_ONLY) VALUES ('{0}','{1}','{2}','{3}')", filename, Environment.UserName, handleType, filename_only)
|
||||
Return ClassDatabase.Execute_non_Query(ins, True)
|
||||
Catch ex As Exception
|
||||
MsgBox("Unexpected Error in Insert Scan-File: " & ex.Message, MsgBoxStyle.Critical)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
End Class
|
||||
@ -8,11 +8,16 @@ Public Class ClassInit
|
||||
ClassLogger.Init("", Environment.UserName)
|
||||
End Sub
|
||||
|
||||
Public Sub InitDatabase()
|
||||
Public Function InitDatabase()
|
||||
Try
|
||||
Dim dbResult As Boolean
|
||||
|
||||
MySettings_Load()
|
||||
|
||||
If LoadFileExclusion() = False Then
|
||||
MsgBox("The Exclude File Structure for files in Folderwatch could not be initialized!", MsgBoxStyle.Information)
|
||||
End If
|
||||
|
||||
If MyConnectionString <> String.Empty Then
|
||||
dbResult = ClassDatabase.Init()
|
||||
Else
|
||||
@ -25,10 +30,10 @@ Public Class ClassInit
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox("Unexpected Error in Init Database:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
|
||||
Return False
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
End Function
|
||||
|
||||
Public Sub InitWindream()
|
||||
Try
|
||||
|
||||
@ -243,6 +243,7 @@
|
||||
<ItemGroup>
|
||||
<Compile Include="ClassControlValueCache.vb" />
|
||||
<Compile Include="ClassControlValuesConverter.vb" />
|
||||
<Compile Include="ClassFolderWatcher.vb" />
|
||||
<Compile Include="ClassLicence.vb" />
|
||||
<Compile Include="frmAbout.designer.vb">
|
||||
<DependentUpon>frmAbout.vb</DependentUpon>
|
||||
@ -289,6 +290,12 @@
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>DD_ECMAdmin.xsd</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="frmCockpit.Designer.vb">
|
||||
<DependentUpon>frmCockpit.vb</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="frmCockpit.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="frmConfiguration_Basic.Designer.vb">
|
||||
<DependentUpon>frmConfiguration_Basic.vb</DependentUpon>
|
||||
</Compile>
|
||||
@ -570,6 +577,9 @@
|
||||
<EmbeddedResource Include="frmAbout.resx">
|
||||
<DependentUpon>frmAbout.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="frmCockpit.resx">
|
||||
<DependentUpon>frmCockpit.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="frmConfiguration_Basic.resx">
|
||||
<DependentUpon>frmConfiguration_Basic.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
@ -1052,6 +1062,8 @@
|
||||
<None Include="Resources\application_view_tile.png" />
|
||||
<None Include="Resources\application_view_detail.png" />
|
||||
<None Include="Resources\checkbox_16xLG.png" />
|
||||
<None Include="Resources\bell_delete.png" />
|
||||
<None Include="Resources\bell_go.png" />
|
||||
<Content Include="Resources\cube.ico" />
|
||||
<Content Include="Resources\138_PushPin_32x42_72.png" />
|
||||
<None Include="Resources\PropertyGridEditorPart_6041.png" />
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
Imports System.Xml
|
||||
|
||||
Module ModuleMySettings
|
||||
Public PATH_FileExclusions As String = Path.Combine(Application.UserAppDataPath(), "FileExclusions.xml")
|
||||
Dim ConfigPath As String = Path.Combine(Application.UserAppDataPath(), "UserConfig.xml")
|
||||
|
||||
Public MyConnectionString As String = ""
|
||||
@ -29,7 +30,62 @@ Module ModuleMySettings
|
||||
|
||||
Public sql_UserID As String = "SELECT GUID FROM TBDD_USER WHERE (LOWER(USERNAME) = LOWER('@user'))"
|
||||
|
||||
Public FWSCAN_started As Boolean = False
|
||||
|
||||
Dim rowresult As String = ""
|
||||
Public Function LoadFileExclusion()
|
||||
Dim rowresult As String = ""
|
||||
Try
|
||||
'if file doesn't exist, create the file with its default xml table
|
||||
If Not File.Exists(path_FileExclusions) Then
|
||||
DTEXCLUDE_FILES = CreateExclusionTable()
|
||||
DTEXCLUDE_FILES.WriteXml(path_FileExclusions)
|
||||
End If
|
||||
DTEXCLUDE_FILES = GetTablefromXML(PATH_FileExclusions)
|
||||
|
||||
'For Each Row As DataRow In DT.Rows
|
||||
' rowresult &= Row.Item("FILE_CONTAIN")
|
||||
' Select Case Row.Item("FILE_CONTAIN")
|
||||
|
||||
' End Select
|
||||
|
||||
'Next
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in LoadFileExclusion" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
Return False
|
||||
End Try
|
||||
Return True
|
||||
|
||||
End Function
|
||||
Private Function CreateExclusionTable() As DataTable
|
||||
Try
|
||||
' Create sample Customers table, in order
|
||||
' to demonstrate the behavior of the DataTableReader.
|
||||
Dim table As New DataTable
|
||||
table.TableName = "TBEXCLUSION"
|
||||
|
||||
' Create two columns, ID and Name.
|
||||
table.Columns.Add("FILE_CONTAIN", GetType(System.String))
|
||||
Dim newRow As DataRow = table.NewRow()
|
||||
newRow("FILE_CONTAIN") = "Thumbs"
|
||||
table.Rows.Add(newRow)
|
||||
Dim newRow1 As DataRow = table.NewRow()
|
||||
newRow1("FILE_CONTAIN") = "\~$"
|
||||
table.Rows.Add(newRow1)
|
||||
Dim newRow2 As DataRow = table.NewRow()
|
||||
newRow2("FILE_CONTAIN") = ".db"
|
||||
table.Rows.Add(newRow2)
|
||||
Dim newRow3 As DataRow = table.NewRow()
|
||||
newRow3("FILE_CONTAIN") = "desktop.ini"
|
||||
table.Rows.Add(newRow3)
|
||||
table.AcceptChanges()
|
||||
Return table
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in CreateExclusionTable" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
Public Function MySettings_Load()
|
||||
Try
|
||||
Dim DT As DataTable
|
||||
@ -40,7 +96,7 @@ Module ModuleMySettings
|
||||
DT.WriteXml(ConfigPath)
|
||||
ClassLogger.Add(">> Standardwerte wurden gespeichert.", False)
|
||||
End If
|
||||
DT = GetTablefromXML()
|
||||
DT = GetTablefromXML(ConfigPath)
|
||||
If DT Is Nothing Then
|
||||
MsgBox("Konfiguration konnte nicht geladen werden. Check LogFile!", MsgBoxStyle.Critical)
|
||||
Return False
|
||||
@ -100,6 +156,8 @@ Module ModuleMySettings
|
||||
WD_ShowDocs = CBool(Row.Item("Value"))
|
||||
Case "Sett_ConstructorStart"
|
||||
Sett_ConstructorStart = CInt(Row.Item("Value"))
|
||||
Case "FWSCAN_started"
|
||||
FWSCAN_started = CBool(Row.Item("Value"))
|
||||
End Select
|
||||
Next
|
||||
'update 1.1
|
||||
@ -117,6 +175,13 @@ Module ModuleMySettings
|
||||
DT.Rows.Add(newRow)
|
||||
DT.WriteXml(ConfigPath)
|
||||
End If
|
||||
If rowresult.Contains("FWSCAN_started") = False Then
|
||||
Dim newRow As DataRow = DT.NewRow()
|
||||
newRow("ConfigName") = "FWSCAN_started"
|
||||
newRow("Value") = "False"
|
||||
DT.Rows.Add(newRow)
|
||||
DT.WriteXml(ConfigPath)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in LoadMyConfig" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
ClassLogger.Add("Error in LoadMyConfig: " & ex.Message, True)
|
||||
@ -125,19 +190,20 @@ Module ModuleMySettings
|
||||
Return True
|
||||
|
||||
End Function
|
||||
Private Function GetTablefromXML()
|
||||
Private Function GetTablefromXML(path As String)
|
||||
Try
|
||||
Dim DS As New DataSet
|
||||
DS.ReadXml(ConfigPath)
|
||||
DS.ReadXml(path)
|
||||
Return DS.Tables(0)
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in GetTablefromXML" & vbNewLine & ex.Message & vbNewLine & "ConfigPath: " & vbNewLine & ConfigPath, MsgBoxStyle.Critical)
|
||||
MsgBox("Error in GetTablefromXML" & vbNewLine & ex.Message & vbNewLine & "ConfigPath: " & vbNewLine & path, MsgBoxStyle.Critical)
|
||||
ClassLogger.Add("Error in GetTablefromXML: " & ex.Message, True)
|
||||
ClassLogger.Add(">> ConfigPath: " & ConfigPath, False)
|
||||
Return Nothing
|
||||
End Try
|
||||
|
||||
End Function
|
||||
|
||||
Private Function CreateConfigTable() As DataTable
|
||||
Try
|
||||
' Create sample Customers table, in order
|
||||
@ -195,6 +261,12 @@ Module ModuleMySettings
|
||||
Dim newRow9 As DataRow = table.NewRow()
|
||||
newRow9("ConfigName") = "Sett_ConstructorStart"
|
||||
newRow9("Value") = "0"
|
||||
Dim newRow10 As DataRow = table.NewRow()
|
||||
newRow10("ConfigName") = "FWSCAN_started"
|
||||
newRow10("Value") = "False"
|
||||
table.Rows.Add(newRow10)
|
||||
|
||||
|
||||
table.Rows.Add(newRow9)
|
||||
table.AcceptChanges()
|
||||
ClassLogger.Add(">> Tabelle wurde erzeugt...", False)
|
||||
@ -204,10 +276,16 @@ Module ModuleMySettings
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
Public Function SaveMySettingsValue(name As String, value As String)
|
||||
Public Function SaveMySettingsValue(name As String, value As String, type As String)
|
||||
Try
|
||||
Dim DT As DataTable
|
||||
DT = GetTablefromXML()
|
||||
If type = "ConfigMain" Then
|
||||
DT = GetTablefromXML(ConfigPath)
|
||||
End If
|
||||
If type = "ExcludeFilter" Then
|
||||
DT = GetTablefromXML(PATH_FileExclusions)
|
||||
End If
|
||||
|
||||
If Not DT Is Nothing Then
|
||||
For Each Row As DataRow In DT.Rows
|
||||
If Row.Item("ConfigName") = name Then
|
||||
@ -219,7 +297,7 @@ Module ModuleMySettings
|
||||
Else
|
||||
MsgBox("Setting konnte nicht gespeichert werden! Prüfen Sie dei logfile.", MsgBoxStyle.Critical)
|
||||
End If
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in SaveConfigValue" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
Return False
|
||||
|
||||
@ -50,4 +50,7 @@
|
||||
|
||||
Public CONNECTION_CHANGED As Boolean = False
|
||||
|
||||
Public CURRENT_SCAN_FOLDERWATCH As String
|
||||
Public DTEXCLUDE_FILES As DataTable
|
||||
|
||||
End Module
|
||||
|
||||
@ -290,6 +290,26 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property bell_delete() As System.Drawing.Bitmap
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("bell_delete", resourceCulture)
|
||||
Return CType(obj,System.Drawing.Bitmap)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property bell_go() As System.Drawing.Bitmap
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("bell_go", resourceCulture)
|
||||
Return CType(obj,System.Drawing.Bitmap)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
|
||||
'''</summary>
|
||||
|
||||
@ -172,6 +172,9 @@
|
||||
<data name="database_add" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\database_add.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="key_go1" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\key_go1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="add" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\add.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
@ -187,6 +190,9 @@
|
||||
<data name="userAccounts" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\userAccounts.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="key_go" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\key_go.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="user_green" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\user_green.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
@ -232,9 +238,6 @@
|
||||
<data name="page_excel" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\page_excel.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="database_delete" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\database_delete.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="dtp" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\dtp.PNG;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
@ -289,12 +292,12 @@
|
||||
<data name="page_copy" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\page_copy.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="AddTable_5632" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\AddTable_5632.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="arrow_refresh" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\arrow_refresh.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Works Finished (nonXP)" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Works Finished (nonXP).ico;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="lightbulb" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\lightbulb.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
@ -307,8 +310,8 @@
|
||||
<data name="arrow_Forward_16xLG" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\arrow_Forward_16xLG.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="005_Task_32x42_72" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\005_Task_32x42_72.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="view_16xLG" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\view_16xLG.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="module_32xMD" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\module_32xMD.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
@ -316,8 +319,8 @@
|
||||
<data name="Property_501" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Property_501.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Works Finished (nonXP)" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Works Finished (nonXP).ico;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="005_Task_32x42_72" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\005_Task_32x42_72.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="shield_go" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\shield_go.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
@ -385,8 +388,8 @@
|
||||
<data name="ico858" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ico858.ico;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="view_16xLG" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\view_16xLG.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="database_delete" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\database_delete.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="txt" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\txt.PNG;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
@ -397,8 +400,8 @@
|
||||
<data name="database_key" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\database_key.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="key_go" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\key_go.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="AddTable_5632" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\AddTable_5632.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="windream-Logo-transparent" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\windream-Logo-transparent.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
@ -550,7 +553,10 @@
|
||||
<data name="action_Cancel_16xLG" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\action_Cancel_16xLG.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="key_go1" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\key_go1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
<data name="bell_delete" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\bell_delete.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="bell_go" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\bell_go.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
||||
BIN
app/DD-Record-Organiser/Resources/bell_delete.png
Normal file
BIN
app/DD-Record-Organiser/Resources/bell_delete.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 824 B |
BIN
app/DD-Record-Organiser/Resources/bell_go.png
Normal file
BIN
app/DD-Record-Organiser/Resources/bell_go.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 836 B |
37
app/DD-Record-Organiser/frmCockpit.Designer.vb
generated
Normal file
37
app/DD-Record-Organiser/frmCockpit.Designer.vb
generated
Normal file
@ -0,0 +1,37 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class frmCockpit
|
||||
Inherits System.Windows.Forms.Form
|
||||
|
||||
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
Finally
|
||||
MyBase.Dispose(disposing)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Wird vom Windows Form-Designer benötigt.
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
|
||||
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
|
||||
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'frmCockpit
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(994, 546)
|
||||
Me.Name = "frmCockpit"
|
||||
Me.Text = "frmCockpit"
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
120
app/DD-Record-Organiser/frmCockpit.resx
Normal file
120
app/DD-Record-Organiser/frmCockpit.resx
Normal file
@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
3
app/DD-Record-Organiser/frmCockpit.vb
Normal file
3
app/DD-Record-Organiser/frmCockpit.vb
Normal file
@ -0,0 +1,3 @@
|
||||
Public Class frmCockpit
|
||||
|
||||
End Class
|
||||
117
app/DD-Record-Organiser/frmConfig_Basic.Designer.vb
generated
117
app/DD-Record-Organiser/frmConfig_Basic.Designer.vb
generated
@ -22,6 +22,7 @@ Partial Class frmConfig_Basic
|
||||
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmConfig_Basic))
|
||||
Me.TabControl1 = New System.Windows.Forms.TabControl()
|
||||
Me.TabPage1 = New System.Windows.Forms.TabPage()
|
||||
@ -53,18 +54,29 @@ Partial Class frmConfig_Basic
|
||||
Me.Button1 = New System.Windows.Forms.Button()
|
||||
Me.btnApplicationFolder = New System.Windows.Forms.Button()
|
||||
Me.LinkLabel1 = New System.Windows.Forms.LinkLabel()
|
||||
Me.TabPage3 = New System.Windows.Forms.TabPage()
|
||||
Me.Label9 = New System.Windows.Forms.Label()
|
||||
Me.DataGridView1 = New System.Windows.Forms.DataGridView()
|
||||
Me.btnSaveExclusionFiles = New System.Windows.Forms.Button()
|
||||
Me.Button2 = New System.Windows.Forms.Button()
|
||||
Me.txtScanFolderWatch = New System.Windows.Forms.TextBox()
|
||||
Me.Label8 = New System.Windows.Forms.Label()
|
||||
Me.btnstartstop2 = New System.Windows.Forms.Button()
|
||||
Me.TabControl1.SuspendLayout()
|
||||
Me.TabPage1.SuspendLayout()
|
||||
Me.TabPage2.SuspendLayout()
|
||||
Me.GroupBox3.SuspendLayout()
|
||||
Me.GroupBox2.SuspendLayout()
|
||||
Me.GroupBox1.SuspendLayout()
|
||||
Me.TabPage3.SuspendLayout()
|
||||
CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'TabControl1
|
||||
'
|
||||
Me.TabControl1.Controls.Add(Me.TabPage1)
|
||||
Me.TabControl1.Controls.Add(Me.TabPage2)
|
||||
Me.TabControl1.Controls.Add(Me.TabPage3)
|
||||
Me.TabControl1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.TabControl1.Location = New System.Drawing.Point(0, 0)
|
||||
Me.TabControl1.Name = "TabControl1"
|
||||
@ -378,6 +390,100 @@ Partial Class frmConfig_Basic
|
||||
Me.LinkLabel1.TabStop = True
|
||||
Me.LinkLabel1.Text = "Link zu Support-Tool Digital Data"
|
||||
'
|
||||
'TabPage3
|
||||
'
|
||||
Me.TabPage3.Controls.Add(Me.Label9)
|
||||
Me.TabPage3.Controls.Add(Me.DataGridView1)
|
||||
Me.TabPage3.Controls.Add(Me.btnSaveExclusionFiles)
|
||||
Me.TabPage3.Controls.Add(Me.Button2)
|
||||
Me.TabPage3.Controls.Add(Me.txtScanFolderWatch)
|
||||
Me.TabPage3.Controls.Add(Me.Label8)
|
||||
Me.TabPage3.Controls.Add(Me.btnstartstop2)
|
||||
Me.TabPage3.Location = New System.Drawing.Point(4, 22)
|
||||
Me.TabPage3.Name = "TabPage3"
|
||||
Me.TabPage3.Padding = New System.Windows.Forms.Padding(3)
|
||||
Me.TabPage3.Size = New System.Drawing.Size(687, 261)
|
||||
Me.TabPage3.TabIndex = 2
|
||||
Me.TabPage3.Text = "Hot Folder - Scan"
|
||||
Me.TabPage3.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Label9
|
||||
'
|
||||
Me.Label9.AutoSize = True
|
||||
Me.Label9.ImeMode = System.Windows.Forms.ImeMode.NoControl
|
||||
Me.Label9.Location = New System.Drawing.Point(8, 86)
|
||||
Me.Label9.Name = "Label9"
|
||||
Me.Label9.Size = New System.Drawing.Size(611, 13)
|
||||
Me.Label9.TabIndex = 17
|
||||
Me.Label9.Text = "Definieren Sie hier Inhalte von Dateinamen welche von der Folderwatch-Überwachung" & _
|
||||
" ausgenommen werden sollen:"
|
||||
'
|
||||
'DataGridView1
|
||||
'
|
||||
DataGridViewCellStyle1.BackColor = System.Drawing.Color.Aqua
|
||||
Me.DataGridView1.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
|
||||
Me.DataGridView1.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
|
||||
Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.DataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
|
||||
Me.DataGridView1.Location = New System.Drawing.Point(11, 102)
|
||||
Me.DataGridView1.Name = "DataGridView1"
|
||||
Me.DataGridView1.Size = New System.Drawing.Size(192, 113)
|
||||
Me.DataGridView1.TabIndex = 15
|
||||
'
|
||||
'btnSaveExclusionFiles
|
||||
'
|
||||
Me.btnSaveExclusionFiles.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
Me.btnSaveExclusionFiles.ImeMode = System.Windows.Forms.ImeMode.NoControl
|
||||
Me.btnSaveExclusionFiles.Location = New System.Drawing.Point(209, 102)
|
||||
Me.btnSaveExclusionFiles.Name = "btnSaveExclusionFiles"
|
||||
Me.btnSaveExclusionFiles.Size = New System.Drawing.Size(94, 29)
|
||||
Me.btnSaveExclusionFiles.TabIndex = 16
|
||||
Me.btnSaveExclusionFiles.Text = "Speichern"
|
||||
Me.btnSaveExclusionFiles.TextAlign = System.Drawing.ContentAlignment.MiddleRight
|
||||
Me.btnSaveExclusionFiles.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Button2
|
||||
'
|
||||
Me.Button2.ImeMode = System.Windows.Forms.ImeMode.NoControl
|
||||
Me.Button2.Location = New System.Drawing.Point(616, 28)
|
||||
Me.Button2.Name = "Button2"
|
||||
Me.Button2.Size = New System.Drawing.Size(49, 22)
|
||||
Me.Button2.TabIndex = 14
|
||||
Me.Button2.Text = "..."
|
||||
Me.Button2.UseVisualStyleBackColor = True
|
||||
'
|
||||
'txtScanFolderWatch
|
||||
'
|
||||
Me.txtScanFolderWatch.BackColor = System.Drawing.Color.LemonChiffon
|
||||
Me.txtScanFolderWatch.Location = New System.Drawing.Point(11, 28)
|
||||
Me.txtScanFolderWatch.Name = "txtScanFolderWatch"
|
||||
Me.txtScanFolderWatch.Size = New System.Drawing.Size(602, 22)
|
||||
Me.txtScanFolderWatch.TabIndex = 12
|
||||
'
|
||||
'Label8
|
||||
'
|
||||
Me.Label8.AutoSize = True
|
||||
Me.Label8.ImeMode = System.Windows.Forms.ImeMode.NoControl
|
||||
Me.Label8.Location = New System.Drawing.Point(8, 12)
|
||||
Me.Label8.Name = "Label8"
|
||||
Me.Label8.Size = New System.Drawing.Size(392, 13)
|
||||
Me.Label8.TabIndex = 11
|
||||
Me.Label8.Text = "Definieren Sie hier den Ordner der für Scan2Folder verwendet werden soll:"
|
||||
'
|
||||
'btnstartstop2
|
||||
'
|
||||
Me.btnstartstop2.Image = Global.DD_Record_Organiser.My.Resources.Resources.bell_go
|
||||
Me.btnstartstop2.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
Me.btnstartstop2.ImeMode = System.Windows.Forms.ImeMode.NoControl
|
||||
Me.btnstartstop2.Location = New System.Drawing.Point(408, 55)
|
||||
Me.btnstartstop2.Margin = New System.Windows.Forms.Padding(4)
|
||||
Me.btnstartstop2.Name = "btnstartstop2"
|
||||
Me.btnstartstop2.Size = New System.Drawing.Size(205, 25)
|
||||
Me.btnstartstop2.TabIndex = 13
|
||||
Me.btnstartstop2.Text = "Überwachung starten"
|
||||
Me.btnstartstop2.TextAlign = System.Drawing.ContentAlignment.MiddleRight
|
||||
Me.btnstartstop2.UseVisualStyleBackColor = True
|
||||
'
|
||||
'frmConfig_Basic
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
@ -402,6 +508,9 @@ Partial Class frmConfig_Basic
|
||||
Me.GroupBox2.PerformLayout()
|
||||
Me.GroupBox1.ResumeLayout(False)
|
||||
Me.GroupBox1.PerformLayout()
|
||||
Me.TabPage3.ResumeLayout(False)
|
||||
Me.TabPage3.PerformLayout()
|
||||
CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
@ -435,4 +544,12 @@ Partial Class frmConfig_Basic
|
||||
Friend WithEvents CheckBox1 As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents Label7 As System.Windows.Forms.Label
|
||||
Friend WithEvents cmbConstructor As System.Windows.Forms.ComboBox
|
||||
Friend WithEvents TabPage3 As System.Windows.Forms.TabPage
|
||||
Friend WithEvents Button2 As System.Windows.Forms.Button
|
||||
Friend WithEvents txtScanFolderWatch As System.Windows.Forms.TextBox
|
||||
Friend WithEvents Label8 As System.Windows.Forms.Label
|
||||
Friend WithEvents btnstartstop2 As System.Windows.Forms.Button
|
||||
Friend WithEvents Label9 As System.Windows.Forms.Label
|
||||
Friend WithEvents DataGridView1 As System.Windows.Forms.DataGridView
|
||||
Friend WithEvents btnSaveExclusionFiles As System.Windows.Forms.Button
|
||||
End Class
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
Dim pw As String = cipherText
|
||||
con = "Server=" & Me.txtServer.Text & ";Database=" & Me.cmbDatenbank.Text & ";User Id=" & Me.txtUser.Text & ";Password=" & pw & ";"
|
||||
End If
|
||||
SaveMySettingsValue("MyConnectionString", con)
|
||||
SaveMySettingsValue("MyConnectionString", con, "ConfigMain")
|
||||
Dim csb As New SqlClient.SqlConnectionStringBuilder
|
||||
csb.ConnectionString = MyConnectionString
|
||||
Dim constr = connection.ConnectionString
|
||||
@ -81,7 +81,7 @@
|
||||
End Sub
|
||||
|
||||
Private Sub frmConfig_Basic_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing
|
||||
SaveMySettingsValue("WDResultListCount", txtwdSearch_Count.Text)
|
||||
SaveMySettingsValue("WDResultListCount", txtwdSearch_Count.Text, "ConfigMain")
|
||||
End Sub
|
||||
|
||||
Private Sub frmConfig_Basic_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
@ -132,7 +132,7 @@
|
||||
|
||||
Private Sub chkbxloadWDDocs_CheckedChanged(sender As Object, e As EventArgs) Handles chkbxloadWDDocs.CheckedChanged
|
||||
Sett_LoadWD_Docs = chkbxloadWDDocs.Checked
|
||||
SaveMySettingsValue("Sett_LoadWD_Docs", Sett_LoadWD_Docs)
|
||||
SaveMySettingsValue("Sett_LoadWD_Docs", Sett_LoadWD_Docs, "ConfigMain")
|
||||
End Sub
|
||||
|
||||
Private Sub LinkLabel1_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles LinkLabel1.LinkClicked
|
||||
@ -152,17 +152,17 @@
|
||||
|
||||
Private Sub chkLogErrorsOnly_CheckedChanged(sender As Object, e As EventArgs) Handles chkLogErrorsOnly.CheckedChanged
|
||||
LogErrorsOnly = chkLogErrorsOnly.Checked
|
||||
SaveMySettingsValue("LogErrorsOnly", LogErrorsOnly)
|
||||
SaveMySettingsValue("LogErrorsOnly", LogErrorsOnly, "ConfigMain")
|
||||
End Sub
|
||||
|
||||
Private Sub chkboxQuickMenue_CheckedChanged(sender As Object, e As EventArgs) Handles chkboxQuickMenue.CheckedChanged
|
||||
Sett_ShowQuickMenue = chkboxQuickMenue.Checked
|
||||
SaveMySettingsValue("Sett_ShowQuickMenue", Sett_ShowQuickMenue)
|
||||
SaveMySettingsValue("Sett_ShowQuickMenue", Sett_ShowQuickMenue, "ConfigMain")
|
||||
End Sub
|
||||
|
||||
Private Sub CheckBoxWD_ShowEnitityDocs_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBoxWD_ShowEnitityDocs.CheckedChanged
|
||||
WD_ShowEnitityDocs = CheckBoxWD_ShowEnitityDocs.Checked
|
||||
SaveMySettingsValue("WD_ShowEnitityDocs", WD_ShowEnitityDocs)
|
||||
SaveMySettingsValue("WD_ShowEnitityDocs", WD_ShowEnitityDocs, "ConfigMain")
|
||||
End Sub
|
||||
|
||||
Private Sub CheckBox1_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox1.CheckedChanged
|
||||
@ -173,7 +173,7 @@
|
||||
If cmbConstructor.SelectedIndex <> -1 And formloaded = True Then
|
||||
If Sett_ConstructorStart <> cmbConstructor.SelectedValue Then
|
||||
Sett_ConstructorStart = cmbConstructor.SelectedValue
|
||||
SaveMySettingsValue("Sett_ConstructorStart", Sett_ConstructorStart)
|
||||
SaveMySettingsValue("Sett_ConstructorStart", Sett_ConstructorStart, "ConfigMain")
|
||||
End If
|
||||
|
||||
End If
|
||||
@ -186,7 +186,121 @@
|
||||
Private Sub TabControl1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles TabControl1.SelectedIndexChanged
|
||||
Select Case TabControl1.SelectedIndex
|
||||
Case 1
|
||||
Case 2
|
||||
Dim SCAN_folderwatch = ClassDatabase.Execute_Scalar("SELECT FOLDER_PATH FROM TBPMO_FOLDERWATCH_USER WHERE FOLDER_TYPE = 'SCAN' AND USER_ID = " & USER_GUID, True)
|
||||
If Not SCAN_folderwatch Is Nothing Then
|
||||
CURRENT_SCAN_FOLDERWATCH = SCAN_folderwatch
|
||||
End If
|
||||
Me.txtScanFolderWatch.Text = CURRENT_SCAN_FOLDERWATCH
|
||||
|
||||
If Not ClassFolderWatcher.FolderWatcher_SCAN Is Nothing Then
|
||||
If ClassFolderWatcher.FolderWatcher_SCAN.EnableRaisingEvents = True Then
|
||||
'If USER_LANGUAGE = "de-DE" Then
|
||||
btnstartstop2.Text = "Überwachung stoppen"
|
||||
'Else
|
||||
' btnstartstop2.Text = "Stop hotfolder"
|
||||
'End If
|
||||
|
||||
btnstartstop2.Image = My.Resources.bell_delete
|
||||
Else
|
||||
' If USER_LANGUAGE = "de-DE" Then
|
||||
btnstartstop2.Text = "Überwachung starten"
|
||||
'Else
|
||||
'btnstartstop2.Text = "Stop hotfolder"
|
||||
'End If
|
||||
|
||||
btnstartstop2.Image = My.Resources.bell_go
|
||||
End If
|
||||
Else
|
||||
' If USER_LANGUAGE = "de-DE" Then
|
||||
btnstartstop2.Text = "Überwachung starten"
|
||||
'Else
|
||||
' btnstartstop2.Text = "Stop hotfolder"
|
||||
'End If
|
||||
|
||||
btnstartstop2.Image = My.Resources.bell_go
|
||||
End If
|
||||
Me.DataGridView1.DataSource = DTEXCLUDE_FILES
|
||||
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
|
||||
Dim fbdialog As New FolderBrowserDialog
|
||||
If fbdialog.ShowDialog() = DialogResult.OK Then
|
||||
CheckScanFolder(fbdialog.SelectedPath)
|
||||
End If
|
||||
End Sub
|
||||
Sub CheckScanFolder(mypath As String)
|
||||
Try
|
||||
Try
|
||||
If (Not System.IO.Directory.Exists(mypath)) Then
|
||||
System.IO.Directory.CreateDirectory(mypath)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add(" >> Fehler beim Erstellen des Folderwatchordners: " & mypath, False)
|
||||
ClassLogger.Add(" >> " & ex.Message, False)
|
||||
|
||||
MsgBox("Error in creating Hotfolder: " & mypath & vbNewLine & "Please check the rights!" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
|
||||
|
||||
Exit Sub
|
||||
End Try
|
||||
|
||||
Dim folderwatch = ClassDatabase.Execute_Scalar("SELECT GUID FROM TBPMO_FOLDERWATCH_USER WHERE USER_ID = " & USER_GUID & " AND FOLDER_TYPE = 'SCAN'", True)
|
||||
Dim sql As String
|
||||
If folderwatch Is Nothing Then
|
||||
sql = "INSERT INTO TBPMO_FOLDERWATCH_USER (USER_ID, FOLDER_PATH, FOLDER_TYPE, ADDED_WHO) VALUES (" & USER_GUID & ",'" & mypath & "','SCAN','" & Environment.UserName & "')"
|
||||
Else
|
||||
sql = "UPDATE TBPMO_FOLDERWATCH_USER SET FOLDER_PATH = '" & mypath & "', CHANGED_WHO = '" & Environment.UserName & "' where GUID = " & folderwatch
|
||||
End If
|
||||
If ClassDatabase.Execute_non_Query(sql) Then
|
||||
folderwatch = ClassDatabase.Execute_Scalar("SELECT FOLDER_PATH FROM TBPMO_FOLDERWATCH_USER WHERE USER_ID = " & USER_GUID & " AND FOLDER_TYPE = 'SCAN'", True)
|
||||
|
||||
CURRENT_SCAN_FOLDERWATCH = folderwatch
|
||||
Me.txtScanFolderWatch.Text = CURRENT_SCAN_FOLDERWATCH
|
||||
End If
|
||||
If FWSCAN_started = True Then
|
||||
ClassFolderWatcher.Restart_FolderWatchSCAN()
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error in CheckFolder:")
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub btnSaveExclusionFiles_Click(sender As Object, e As EventArgs) Handles btnSaveExclusionFiles.Click
|
||||
Try
|
||||
DTEXCLUDE_FILES.AcceptChanges()
|
||||
DTEXCLUDE_FILES.WriteXml(PATH_FileExclusions)
|
||||
MsgBox("Changes saved.", MsgBoxStyle.Information)
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error in Saving Exclusion files:")
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub btnstartstop2_Click(sender As Object, e As EventArgs) Handles btnstartstop2.Click
|
||||
If CURRENT_SCAN_FOLDERWATCH <> "" Then
|
||||
CheckFWSCAN_State()
|
||||
End If
|
||||
End Sub
|
||||
Sub CheckFWSCAN_State()
|
||||
Select Case ClassFolderWatcher.StartStop_FolderWatchSCAN()
|
||||
Case 1
|
||||
'If USER_LANGUAGE = "de-DE" Then
|
||||
btnstartstop2.Text = "Überwachung stoppen"
|
||||
' Else
|
||||
'btnstartstop2.Text = "Stop Hotfolder"
|
||||
' End If
|
||||
btnstartstop2.Image = My.Resources.bell_delete
|
||||
Case 0
|
||||
' If USER_LANGUAGE = "de-DE" Then
|
||||
btnstartstop2.Text = "Überwachung starten"
|
||||
'Else
|
||||
' btnstartstop2.Text = "Start Hotfolder"
|
||||
'End If
|
||||
btnstartstop2.Image = My.Resources.bell_go
|
||||
End Select
|
||||
End Sub
|
||||
End Class
|
||||
@ -1119,7 +1119,7 @@ Public Class frmForm_Constructor
|
||||
Load_Entity_Data_Only()
|
||||
Search_RowHandle(CURRENT_RECORD_ID)
|
||||
'Die Daten auf dem Panel laden
|
||||
ClassControlValues.LoadControlValues(CURRENT_RECORD_ID, CURRENT_FORM_ID, CtrlBuilder.AllControls)
|
||||
ClassControlValues.LoadControlValuesNeu(CURRENT_RECORD_ID, CURRENT_FORM_ID, CtrlBuilder.AllControls)
|
||||
ClassControlValues.LoadControlValuesList(CURRENT_RECORD_ID, CURRENT_FORM_ID, CtrlBuilder.AllControls)
|
||||
pnlDetails.Enabled = True
|
||||
End If
|
||||
@ -1645,7 +1645,7 @@ Public Class frmForm_Constructor
|
||||
If EDIT_STATE = "none" Then
|
||||
'TabPageDetails.Text = "Detaileingabe zu '" & ACT_EBENE_STRING & "' - Record(" & SelectedRecordID & ")"
|
||||
'Die Daten auf dem Panel laden
|
||||
ClassControlValues.LoadControlValues(SelectedRecordID, CURRENT_FORM_ID, CtrlBuilder.AllControls)
|
||||
ClassControlValues.LoadControlValuesNeu(SelectedRecordID, CURRENT_FORM_ID, CtrlBuilder.AllControls)
|
||||
ClassControlValues.LoadControlValuesList(SelectedRecordID, CURRENT_FORM_ID, CtrlBuilder.AllControls)
|
||||
'Load_Control_Values(CtrlBuilder.AllControls)
|
||||
'Refresh_Treeview_SelectedData()
|
||||
@ -2361,7 +2361,7 @@ Public Class frmForm_Constructor
|
||||
Select Case TCDetails.SelectedTabPageIndex
|
||||
Case 0
|
||||
If RECORD_NEEDS_REFRESH = True Then
|
||||
ClassControlValues.LoadControlValues(SelectedRecordID, CURRENT_FORM_ID, CtrlBuilder.AllControls)
|
||||
ClassControlValues.LoadControlValuesNeu(SelectedRecordID, CURRENT_FORM_ID, CtrlBuilder.AllControls)
|
||||
ClassControlValues.LoadControlValuesList(SelectedRecordID, CURRENT_FORM_ID, CtrlBuilder.AllControls)
|
||||
UpdRECORD_NEEDS_REFRESH(False)
|
||||
End If
|
||||
|
||||
@ -822,7 +822,7 @@ Public Class frmForm_Constructor_Main
|
||||
Load_Entity_Data_Only()
|
||||
Get_Grid_Row_Handle(CURRENT_RECORD_ID)
|
||||
'Die Daten auf dem Panel laden
|
||||
ClassControlValues.LoadControlValues(CURRENT_RECORD_ID, CURRENT_FORM_ID, CtrlBuilder.AllControls)
|
||||
ClassControlValues.LoadControlValuesNeu(CURRENT_RECORD_ID, CURRENT_FORM_ID, CtrlBuilder.AllControls)
|
||||
pnlDetails.Enabled = True
|
||||
End If
|
||||
|
||||
@ -1521,7 +1521,7 @@ Public Class frmForm_Constructor_Main
|
||||
If EDIT_STATE = EditState.None Then
|
||||
'TabPageDetails.Text = "Detaileingabe zu '" & ACT_EBENE_STRING & "' - Record(" & SelectedRecordID & ")"
|
||||
'Die Daten auf dem Panel laden
|
||||
ClassControlValues.LoadControlValues(SELECTED_RECORD_ID, CURRENT_FORM_ID, CtrlBuilder.AllControls)
|
||||
ClassControlValues.LoadControlValuesNeu(SELECTED_RECORD_ID, CURRENT_FORM_ID, CtrlBuilder.AllControls)
|
||||
'Load_Control_Values(CtrlBuilder.AllControls)
|
||||
'Refresh_Treeview_SelectedData()
|
||||
RECORD_CHANGED = False
|
||||
|
||||
@ -957,7 +957,7 @@ Public Class frmForm_Constructor_Main_2
|
||||
Try
|
||||
Dim Control As Control = sender
|
||||
Dim ControlName As String = Control.Name
|
||||
Dim ControlId As Integer = GetControlID_for_Name(ControlName, CURRENT_FORM_ID)
|
||||
Dim ControlId As Integer = Control.Tag ' GetControlID_for_Name(ControlName, CURRENT_FORM_ID)
|
||||
|
||||
Dim dr As DataRow = ClassFunctionCommands.LoadFunction(ControlId)
|
||||
|
||||
@ -1030,7 +1030,7 @@ Public Class frmForm_Constructor_Main_2
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
'Update aller Control-Werte
|
||||
Dim ResultMessage = Update_Record_OnChange()
|
||||
Dim recid As Integer
|
||||
Update_Status_Label(True, ResultMessage, EDIT_STATE)
|
||||
@ -1467,75 +1467,80 @@ Public Class frmForm_Constructor_Main_2
|
||||
GridControlMain.Visible = True
|
||||
|
||||
Dim DTEntity As DataTable = ClassDatabase.Return_Datatable(CURRENT_ENTITYSQL, "LoadEntityData - Get DTEntity")
|
||||
Dim primaryKey(1) As DataColumn
|
||||
primaryKey(0) = DTEntity.Columns("Record-ID")
|
||||
DTEntity.PrimaryKey = primaryKey
|
||||
DT_SELECTION = DTEntity
|
||||
LoadGrid_Selection()
|
||||
If IsNothing(DTEntity) Then
|
||||
MsgBox("Unexpected Error in getting Entity-Data - Check Logfile", MsgBoxStyle.Critical)
|
||||
Else
|
||||
Dim primaryKey(1) As DataColumn
|
||||
primaryKey(0) = DTEntity.Columns("Record-ID")
|
||||
DTEntity.PrimaryKey = primaryKey
|
||||
DT_SELECTION = DTEntity
|
||||
LoadGrid_Selection()
|
||||
|
||||
If GRID_TYPE = GridType.Grid Then
|
||||
grvwGrid.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.None
|
||||
grvwGrid.OptionsBehavior.Editable = False
|
||||
grvwGrid.OptionsSelection.EnableAppearanceFocusedCell = False
|
||||
grvwGrid.OptionsSelection.EnableAppearanceFocusedRow = False
|
||||
grvwGrid.OptionsSelection.EnableAppearanceHideSelection = False
|
||||
ElseIf GRID_TYPE = GridType.Carousel Then
|
||||
grvwCarousel.OptionsBehavior.Editable = False
|
||||
ElseIf GRID_TYPE = GridType.Tiles Then
|
||||
grvwTiles.FocusedRowHandle = -1
|
||||
grvwTiles.OptionsBehavior.Editable = False
|
||||
grvwTiles.FocusedRowHandle = -1
|
||||
grvwTiles.OptionsTiles.HighlightFocusedTileOnGridLoad = False
|
||||
End If
|
||||
If GRID_TYPE = GridType.Grid Then
|
||||
grvwGrid.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.None
|
||||
grvwGrid.OptionsBehavior.Editable = False
|
||||
grvwGrid.OptionsSelection.EnableAppearanceFocusedCell = False
|
||||
grvwGrid.OptionsSelection.EnableAppearanceFocusedRow = False
|
||||
grvwGrid.OptionsSelection.EnableAppearanceHideSelection = False
|
||||
ElseIf GRID_TYPE = GridType.Carousel Then
|
||||
grvwCarousel.OptionsBehavior.Editable = False
|
||||
ElseIf GRID_TYPE = GridType.Tiles Then
|
||||
grvwTiles.FocusedRowHandle = -1
|
||||
grvwTiles.OptionsBehavior.Editable = False
|
||||
grvwTiles.FocusedRowHandle = -1
|
||||
grvwTiles.OptionsTiles.HighlightFocusedTileOnGridLoad = False
|
||||
End If
|
||||
|
||||
If LOAD_DIRECT = True Then
|
||||
Load_Record_Direct()
|
||||
If LOAD_DIRECT = True Then
|
||||
Load_Record_Direct()
|
||||
|
||||
End If
|
||||
If ENTITY_RECORD_COUNT = 1 Then
|
||||
Load_Record_Direct()
|
||||
End If
|
||||
' Dim sql1 = CURRENT_ENTITYSQL
|
||||
' sql1.Replace("T.*", "TOP 1 [Record-ID]")
|
||||
' Dim id = ClassDatabase.Execute_Scalar(sql1, True)
|
||||
' If Not id Is Nothing Then
|
||||
' If LogErrorsOnly = False Then ClassLogger.Add(">> Load Record directly - RecordID: " & CURRENT_RECORD_ID, False)
|
||||
' Load_Record_Data()
|
||||
' End If
|
||||
'End If
|
||||
'Überprüfen ob es für diese Entität Wiedervorlagen gibt?
|
||||
Check_FOLLOWUP_IsConfigured(CURRENT_FORM_ID)
|
||||
Load_Grid_Layout()
|
||||
Load_Splitter_Layout()
|
||||
End If
|
||||
If ENTITY_RECORD_COUNT = 1 Then
|
||||
Load_Record_Direct()
|
||||
If POS_ENTITY > 0 Then
|
||||
TabDetails.Text = "Kopfdaten"
|
||||
TabPos.PageVisible = True
|
||||
Else
|
||||
TabDetails.Text = "Detailansicht"
|
||||
TabPos.PageVisible = False
|
||||
End If
|
||||
' Dim sql1 = CURRENT_ENTITYSQL
|
||||
' sql1.Replace("T.*", "TOP 1 [Record-ID]")
|
||||
' Dim id = ClassDatabase.Execute_Scalar(sql1, True)
|
||||
' If Not id Is Nothing Then
|
||||
' If LogErrorsOnly = False Then ClassLogger.Add(">> Load Record directly - RecordID: " & CURRENT_RECORD_ID, False)
|
||||
' Load_Record_Data()
|
||||
' End If
|
||||
'End If
|
||||
'Überprüfen ob es für diese Entität Wiedervorlagen gibt?
|
||||
Check_FOLLOWUP_IsConfigured(CURRENT_FORM_ID)
|
||||
Load_Grid_Layout()
|
||||
Load_Splitter_Layout()
|
||||
Load_Templates()
|
||||
|
||||
'For Each column As DevExpress.XtraGrid.Columns.GridColumn In grvwGrid.Columns
|
||||
' column.MinWidth = 100
|
||||
'Next
|
||||
|
||||
Dim firstRow As System.Data.DataRowView = GridControlMain.MainView.GetRow(0)
|
||||
Dim firstRecordId As Integer = firstRow.Row.Item("Record-ID")
|
||||
ClassControlValues.LoadControlValuesList(firstRecordId, CURRENT_FORM_ID, CtrlBuilder.MasterPanel.Controls)
|
||||
|
||||
'Zurücksetzen
|
||||
ENTITY_LOADED = True
|
||||
End If
|
||||
If POS_ENTITY > 0 Then
|
||||
TabDetails.Text = "Kopfdaten"
|
||||
TabPos.PageVisible = True
|
||||
Else
|
||||
TabDetails.Text = "Detailansicht"
|
||||
TabPos.PageVisible = False
|
||||
End If
|
||||
Load_Templates()
|
||||
|
||||
'For Each column As DevExpress.XtraGrid.Columns.GridColumn In grvwGrid.Columns
|
||||
' column.MinWidth = 100
|
||||
'Next
|
||||
|
||||
Dim firstRow As System.Data.DataRowView = GridControlMain.MainView.GetRow(0)
|
||||
Dim firstRecordId As Integer = firstRow.Row.Item("Record-ID")
|
||||
ClassControlValues.LoadControlValuesList(firstRecordId, CURRENT_FORM_ID, CtrlBuilder.MasterPanel.Controls)
|
||||
|
||||
'Zurücksetzen
|
||||
ENTITY_LOADED = True
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in Load_Entity_Data:" & vbNewLine & ex.Message, MsgBoxStyle.Exclamation)
|
||||
Me.Cursor = Cursors.Default
|
||||
Finally
|
||||
Me.Cursor = Cursors.Default
|
||||
End Try
|
||||
|
||||
ENTITY_LOADED = True
|
||||
End Try
|
||||
Me.Cursor = Cursors.Default
|
||||
|
||||
End Sub
|
||||
Sub Load_Record_Direct()
|
||||
@ -1550,8 +1555,8 @@ Public Class frmForm_Constructor_Main_2
|
||||
SELECTED_RECORD_ID = Grid_RecordID
|
||||
CURRENT_RECORD_ID = Grid_RecordID
|
||||
'Daten zu Record in jedem Fall laden
|
||||
ClassControlValues.LoadControlValues(SELECTED_RECORD_ID, CURRENT_FORM_ID, CtrlBuilder.AllControls)
|
||||
'ClassControlValues.LoadControlValuesNeu(SELECTED_RECORD_ID, CURRENT_FORM_ID, CtrlBuilder.AllControls)
|
||||
'ClassControlValues.LoadControlValues(SELECTED_RECORD_ID, CURRENT_FORM_ID, CtrlBuilder.AllControls)
|
||||
ClassControlValues.LoadControlValuesNeu(SELECTED_RECORD_ID, CURRENT_FORM_ID, CtrlBuilder.AllControls)
|
||||
' Laden der Daten bedeutet nicht dass Daten vom Benutzer geändert wurden!
|
||||
RECORD_CHANGED = False
|
||||
Update_Record_Label(Grid_RecordID)
|
||||
@ -1584,7 +1589,10 @@ Public Class frmForm_Constructor_Main_2
|
||||
Dim i As Integer = 0
|
||||
Dim j As Integer = 0
|
||||
Dim DT As DataTable = DirectCast(DT_SELECTION, DataTable)
|
||||
|
||||
If DT Is Nothing Then
|
||||
MsgBox("Daten können nicht geladen werden - Datatable SELECTION is empty", MsgBoxStyle.Critical)
|
||||
Exit Sub
|
||||
End If
|
||||
Dim PrimaryFont As New Font("Segoe UI", 12, FontStyle.Bold)
|
||||
Dim SecondaryFont As New Font("Segoe UI", 10)
|
||||
Dim WhiteBackground As Color = System.Drawing.Color.FromArgb(230, Color.White)
|
||||
@ -1592,10 +1600,7 @@ Public Class frmForm_Constructor_Main_2
|
||||
' Datatable laden
|
||||
GridControlMain.DataSource = DT
|
||||
|
||||
If DT Is Nothing Then
|
||||
MsgBox("Daten können nicht geladen werden")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
grvwTiles.TileTemplate.Clear()
|
||||
|
||||
@ -1691,8 +1696,8 @@ Public Class frmForm_Constructor_Main_2
|
||||
cbobx.Enabled = True
|
||||
End If
|
||||
End If
|
||||
If (Control.GetType() Is GetType(DateTimePicker)) Then
|
||||
Dim dtp As DateTimePicker = CType(Control, DateTimePicker)
|
||||
If (Control.GetType() Is GetType(DevExpress.XtraEditors.DateEdit)) Then
|
||||
Dim dtp As DevExpress.XtraEditors.DateEdit = CType(Control, DevExpress.XtraEditors.DateEdit)
|
||||
If state = True Then
|
||||
dtp.Enabled = False
|
||||
Else
|
||||
@ -1700,6 +1705,23 @@ Public Class frmForm_Constructor_Main_2
|
||||
End If
|
||||
|
||||
End If
|
||||
If (Control.GetType() Is GetType(DevExpress.XtraEditors.CheckedListBoxControl)) Then
|
||||
Dim chlb As DevExpress.XtraEditors.CheckedListBoxControl = CType(Control, DevExpress.XtraEditors.CheckedListBoxControl)
|
||||
If state = True Then
|
||||
chlb.Enabled = False
|
||||
Else
|
||||
chlb.Enabled = True
|
||||
End If
|
||||
|
||||
End If
|
||||
If (Control.GetType() Is GetType(Button)) Then
|
||||
Dim btn As Button = CType(Control, Button)
|
||||
If state = True Then
|
||||
btn.Enabled = False
|
||||
Else
|
||||
btn.Enabled = True
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
@ -1766,47 +1788,6 @@ Public Class frmForm_Constructor_Main_2
|
||||
Return True
|
||||
End Function
|
||||
|
||||
'Private Function GET_GROUP_OR_SINGLE_RECORD(PARENT_ID As Integer)
|
||||
' 'Dim sqlRecord As String = String.Format("SELECT T.RECORD2_ID FROM TBPMO_RECORD_CONNECT T, TBPMO_RECORD T1 WHERE T.RECORD2_ID = T1.GUID AND T.RECORD1_ID = {0} AND T1.FORM_ID = (SELECT PARENT_ID FROM TBPMO_FORM WHERE GUID = {1})", LINKED_RECORD, CURRENT_FORM_ID)
|
||||
' Dim sqlRecord As String = String.Format("SELECT T.RECORD2_ID FROM TBPMO_RECORD_CONNECT T, TBPMO_RECORD T1 WHERE T.RECORD2_ID = T1.GUID AND T.RECORD1_ID = {0} and T1.FORM_ID = {1}", PARENT_ID, CURRENT_FORM_ID)
|
||||
' Dim recid = ClassDatabase.Execute_Scalar(sqlRecord, True)
|
||||
' If IsNothing(recid) Then
|
||||
' If ClassControlCommandsUI.CreateRecord(CURRENT_FORM_ID) = True Then
|
||||
' recid = ClassControlCommandsUI.GetLastRecord
|
||||
' If Not IsNothing(recid) Then
|
||||
' 'Die neue Record-ID setzen
|
||||
' CURRENT_RECORD_ID = recid
|
||||
' SELECTED_RECORD_ID = CURRENT_RECORD_ID
|
||||
' ClassControlCommandsUI.ConnectRecord(PARENT_ID, CURRENT_RECORD_ID, "PARENT_LINK (Group/Single-Record) for Entity " & CURRENT_FORM_ID.ToString)
|
||||
' Else
|
||||
' Return False
|
||||
' End If
|
||||
' Else
|
||||
' Return False
|
||||
' End If
|
||||
' Else
|
||||
' Try
|
||||
' CURRENT_RECORD_ID = CInt(recid)
|
||||
' SELECTED_RECORD_ID = CURRENT_RECORD_ID
|
||||
' Catch ex As Exception
|
||||
' MsgBox("Error while getting CURRENT_RECORDID: " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
' Return False
|
||||
' End Try
|
||||
' End If
|
||||
|
||||
' Select Case ACT_EBENE '#### Hier muss nun der Parent-Record gesetzt werden ####
|
||||
' Case 1
|
||||
' EBENE1_RECID = CURRENT_RECORD_ID
|
||||
' Case 2
|
||||
' EBENE2_RECID = CURRENT_RECORD_ID
|
||||
' Case 3
|
||||
' EBENE3_RECID = CURRENT_RECORD_ID
|
||||
' End Select
|
||||
|
||||
|
||||
' Update_Record_Label(CURRENT_RECORD_ID)
|
||||
' Return True
|
||||
'End Function
|
||||
Private Function GET_LINKED_RECORD(RECORDID As Integer, ENTITY_ID As Integer)
|
||||
Try
|
||||
|
||||
@ -2052,8 +2033,8 @@ Public Class frmForm_Constructor_Main_2
|
||||
End If
|
||||
If TCDetails.SelectedTabPage.Text.StartsWith("Detail") Or TCDetails.SelectedTabPage.Text.StartsWith("Kopf") Then
|
||||
'Daten zu Record in jedem Fall laden
|
||||
ClassControlValues.LoadControlValues(SELECTED_RECORD_ID, CURRENT_FORM_ID, CtrlBuilder.AllControls)
|
||||
'ClassControlValues.LoadControlValuesNeu(SELECTED_RECORD_ID, CURRENT_FORM_ID, CtrlBuilder.AllControls)
|
||||
'ClassControlValues.LoadControlValues(SELECTED_RECORD_ID, CURRENT_FORM_ID, CtrlBuilder.AllControls)
|
||||
ClassControlValues.LoadControlValuesNeu(SELECTED_RECORD_ID, CURRENT_FORM_ID, CtrlBuilder.AllControls)
|
||||
End If
|
||||
If TCDetails.SelectedTabPage.Text.ToLower.StartsWith("wieder") Then
|
||||
tsButtonEditMode.Enabled = False
|
||||
@ -2633,7 +2614,7 @@ Public Class frmForm_Constructor_Main_2
|
||||
Sub Clear_Windream_ResultList()
|
||||
AxObjectListControl.RemoveAllColumnHeader()
|
||||
Me.AxObjectListControl.ClearResultList()
|
||||
TabWindream.Text = "windream-Dateien - Noch nicht geladen"
|
||||
TabWindream.Text = "windream-Dateien"
|
||||
End Sub
|
||||
Sub CheckDocView()
|
||||
Dim _index = AxObjectListControl.GetFirstSelectedObject
|
||||
@ -2810,18 +2791,19 @@ Public Class frmForm_Constructor_Main_2
|
||||
End If
|
||||
|
||||
Next
|
||||
TBPMO_FILES_USERTableAdapter.Fill(DD_DMSDataSet.TBPMO_FILES_USER, Environment.UserName)
|
||||
For Each Filerow As DataRow In DD_DMSDataSet.TBPMO_FILES_USER.Rows
|
||||
Dim worked = ClassDatabase.Execute_Scalar("SELECT WORKED FROM TBPMO_FILES_USER WHERE GUID = " & Filerow.Item("GUID"))
|
||||
If worked = False Then
|
||||
'Dim datei = Str.ToString.Replace("@DROPFROMFSYSTEM@", "")
|
||||
CURRENT_FILEID = Filerow.Item(0)
|
||||
frmWD_Index_Dokart.ShowDialog()
|
||||
RUN_WD_SEARCH(WD_Suche, "RECORD")
|
||||
Dim sql = String.Format("SELECT GUID, FILENAME2WORK, USER_WORK, HANDLE_TYPE, WORKED, ADDED_WHEN FROM TBPMO_FILES_USER WHERE (UPPER(USER_WORK) = UPPER('{0}')) AND WORKED = 0", Environment.UserName)
|
||||
Dim DT As DataTable = ClassDatabase.Return_Datatable(sql)
|
||||
If Not IsNothing(DT) Then
|
||||
If DT.Rows.Count > 0 Then
|
||||
For Each Filerow As DataRow In DT.Rows
|
||||
'Dim datei = Str.ToString.Replace("@DROPFROMFSYSTEM@", "")
|
||||
CURRENT_FILEID = Filerow.Item(0)
|
||||
frmWD_Index_Dokart.ShowDialog()
|
||||
RUN_WD_SEARCH(WD_Suche, "RECORD")
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
Next
|
||||
Catch ex As Exception
|
||||
MsgBox("Check_Dropped_Files: " & ex.Message, MsgBoxStyle.Critical)
|
||||
End Try
|
||||
|
||||
@ -409,7 +409,7 @@ Public Class frmFormInput
|
||||
' SelectedFormID = RowView.Item(1)
|
||||
RefreshRecordByID(SelectedRecordID)
|
||||
|
||||
ClassControlValues.LoadControlValues(SelectedRecordID, thisformid, pnlView.Controls)
|
||||
ClassControlValues.LoadControlValuesNeu(SelectedRecordID, thisformid, pnlView.Controls)
|
||||
End If
|
||||
load_Documents()
|
||||
End If
|
||||
|
||||
@ -65,7 +65,9 @@ Public NotInheritable Class frmSplash
|
||||
System.Threading.Thread.Sleep(500)
|
||||
|
||||
bw.ReportProgress(CalcProgress(2), "Initialisiere Datenbank")
|
||||
Init.InitDatabase()
|
||||
If Init.InitDatabase() = False Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
System.Threading.Thread.Sleep(500)
|
||||
|
||||
|
||||
@ -65,7 +65,7 @@
|
||||
|
||||
Private Sub chkinFront_CheckedChanged(sender As Object, e As EventArgs) Handles chkinFront.CheckedChanged
|
||||
Sett_TaskOverviewKeepInFront = chkinFront.Checked
|
||||
SaveMySettingsValue("Sett_TaskOverviewKeepInFront", Sett_TaskOverviewKeepInFront)
|
||||
SaveMySettingsValue("Sett_TaskOverviewKeepInFront", Sett_TaskOverviewKeepInFront, "ConfigMain")
|
||||
If chkinFront.Checked Then
|
||||
chkinFront.Text = "TaskOverview gepinnt"
|
||||
Else
|
||||
|
||||
@ -65,7 +65,7 @@ Public Class frmUserKonfig_AddUsers
|
||||
Dim usersAdded As Integer = 0
|
||||
|
||||
If items.Count = 0 Then
|
||||
MsgBox("Keine Benutzer ausgewählt")
|
||||
MsgBox("Keine Benutzer ausgewählt!", MsgBoxStyle.Information)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
@ -223,7 +223,7 @@ Public Class frmWD_Index_Dokart
|
||||
Sub Indexing_File()
|
||||
Try
|
||||
Me.Cursor = Cursors.WaitCursor
|
||||
SaveMySettingsValue("WD_IndexDeleteDocs", WD_IndexDeleteDocs)
|
||||
SaveMySettingsValue("WD_IndexDeleteDocs", WD_IndexDeleteDocs, "ConfigMain")
|
||||
|
||||
If cmbDokumentart.SelectedIndex <> -1 Then
|
||||
My.Settings.WD_INDEXDOKART_SAVE = cmbDokumentart.Text
|
||||
@ -383,7 +383,7 @@ Public Class frmWD_Index_Dokart
|
||||
|
||||
Private Sub chkdelete_origin_CheckedChanged(sender As Object, e As EventArgs) Handles chkdelete_origin.CheckedChanged
|
||||
WD_IndexDeleteDocs = chkdelete_origin.Checked
|
||||
SaveMySettingsValue("WD_IndexDeleteDocs", WD_IndexDeleteDocs)
|
||||
SaveMySettingsValue("WD_IndexDeleteDocs", WD_IndexDeleteDocs, "ConfigMain")
|
||||
End Sub
|
||||
|
||||
Private Sub frmWD_Index_Dokart_Shown(sender As Object, e As EventArgs) Handles Me.Shown
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
Private Sub CheckBox1_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBoxWD_ShowDocs.CheckedChanged
|
||||
WD_ShowDocs = CheckBoxWD_ShowDocs.Checked
|
||||
SaveMySettingsValue("WD_ShowDocs", WD_ShowDocs)
|
||||
SaveMySettingsValue("WD_ShowDocs", WD_ShowDocs, "ConfigMain")
|
||||
End Sub
|
||||
|
||||
Private Sub frmwindreamView_Config_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user