MS
This commit is contained in:
@@ -309,13 +309,13 @@ Public Class ClassControlBuilder
|
|||||||
MsgBox("Error in Enable Controls - " & CONTROL_ID.ToString & ": " & ex.Message, MsgBoxStyle.Critical)
|
MsgBox("Error in Enable Controls - " & CONTROL_ID.ToString & ": " & ex.Message, MsgBoxStyle.Critical)
|
||||||
End Try
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
Public Sub Depending_Controls(control As Control, TableResult As DataTable, value As String)
|
Public Function Depending_Controls(control As Control, TableResult As DataTable, value As String)
|
||||||
Try
|
Try
|
||||||
If TableResult.Rows.Count = 0 Then
|
If TableResult.Rows.Count = 0 Then
|
||||||
Exit Sub
|
Return 2
|
||||||
End If
|
End If
|
||||||
If CURRENT_RECORD_ID = 0 Or CONTROL_ID = 0 Then
|
If CURRENT_RECORD_ID = 0 Or CONTROL_ID = 0 Then
|
||||||
Exit Sub
|
Return 2
|
||||||
End If
|
End If
|
||||||
If IsNothing(value) Then 'Kein Value also abhängige Controls auf "Leer" setzen
|
If IsNothing(value) Then 'Kein Value also abhängige Controls auf "Leer" setzen
|
||||||
Try
|
Try
|
||||||
@@ -342,10 +342,10 @@ Public Class ClassControlBuilder
|
|||||||
End Select
|
End Select
|
||||||
|
|
||||||
Next
|
Next
|
||||||
Exit Sub
|
Return 2
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
MsgBox("Unexpected error in DependingControls (For Each row As DataRow In TableResult.Rows)- " & CONTROL_ID.ToString & ": " & ex.Message, MsgBoxStyle.Critical)
|
MsgBox("Unexpected error in DependingControls (For Each row As DataRow In TableResult.Rows)- " & CONTROL_ID.ToString & ": " & ex.Message, MsgBoxStyle.Critical)
|
||||||
Exit Sub
|
Return 0
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
|
|
||||||
@@ -372,6 +372,7 @@ Public Class ClassControlBuilder
|
|||||||
|
|
||||||
If ClassControlCommandsUI.UpdateControlValue(CONTROL_ID, CURRENT_RECORD_ID, value.ToString, CURRENT_ENTITY_ID) = False Then
|
If ClassControlCommandsUI.UpdateControlValue(CONTROL_ID, CURRENT_RECORD_ID, value.ToString, CURRENT_ENTITY_ID) = False Then
|
||||||
ClassLogger.Add(String.Format(" >> ClassControlCommandsUI.UpdateControlValue (1) was not successfull - ControlID: {0},RecordID: {1},value: {2}'", CONTROL_ID, CURRENT_RECORD_ID, value), False)
|
ClassLogger.Add(String.Format(" >> ClassControlCommandsUI.UpdateControlValue (1) was not successfull - ControlID: {0},RecordID: {1},value: {2}'", CONTROL_ID, CURRENT_RECORD_ID, value), False)
|
||||||
|
Return 0
|
||||||
Else
|
Else
|
||||||
' & upd & "'")
|
' & upd & "'")
|
||||||
End If
|
End If
|
||||||
@@ -380,6 +381,7 @@ Public Class ClassControlBuilder
|
|||||||
If CURRENT_RECORD_ID <> 0 Then
|
If CURRENT_RECORD_ID <> 0 Then
|
||||||
If ClassControlCommandsUI.InsertControlValue(CONTROL_ID, CURRENT_RECORD_ID, value, CURRENT_ENTITY_ID) = False Then
|
If ClassControlCommandsUI.InsertControlValue(CONTROL_ID, CURRENT_RECORD_ID, value, CURRENT_ENTITY_ID) = False Then
|
||||||
ClassLogger.Add(String.Format(" >> ClassControlCommandsUI.InsertControlValue (1) was not successfull - ControlID: {0},RecordID: {1},value: {2}'", CONTROL_ID, CURRENT_RECORD_ID, value), False)
|
ClassLogger.Add(String.Format(" >> ClassControlCommandsUI.InsertControlValue (1) was not successfull - ControlID: {0},RecordID: {1},value: {2}'", CONTROL_ID, CURRENT_RECORD_ID, value), False)
|
||||||
|
Return 0
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -468,8 +470,8 @@ Public Class ClassControlBuilder
|
|||||||
' Hier werden nun evtl schon gesetzte Werte für CheckedListBox angehakt
|
' Hier werden nun evtl schon gesetzte Werte für CheckedListBox angehakt
|
||||||
' Wert per LINQ aus DT_ControlValues suchen der zur aktuellen controlId passt
|
' Wert per LINQ aus DT_ControlValues suchen der zur aktuellen controlId passt
|
||||||
Dim values As List(Of Object) = (From row1 In CURRENT_CONTROL_VALUES.AsEnumerable()
|
Dim values As List(Of Object) = (From row1 In CURRENT_CONTROL_VALUES.AsEnumerable()
|
||||||
Where row1.Item("CONTROL_ID") = dependingControlId
|
Where row1.Item("CONTROL_ID") = dependingControlId
|
||||||
Select row1.Item("VALUE")).ToList()
|
Select row1.Item("VALUE")).ToList()
|
||||||
|
|
||||||
ControlLoader.CheckedListBox.LoadValue(checkedlistbox, values)
|
ControlLoader.CheckedListBox.LoadValue(checkedlistbox, values)
|
||||||
If IsEdit Or IsInsert Then
|
If IsEdit Or IsInsert Then
|
||||||
@@ -530,8 +532,8 @@ Public Class ClassControlBuilder
|
|||||||
ControlLoader.DataGridViewCheckable.SetDataSource(gridControl, dt)
|
ControlLoader.DataGridViewCheckable.SetDataSource(gridControl, dt)
|
||||||
|
|
||||||
Dim values As List(Of Object) = (From row1 In CURRENT_CONTROL_VALUES.AsEnumerable()
|
Dim values As List(Of Object) = (From row1 In CURRENT_CONTROL_VALUES.AsEnumerable()
|
||||||
Where row1.Item("CONTROL_ID") = dependingControlId
|
Where row1.Item("CONTROL_ID") = dependingControlId
|
||||||
Select row1.Item("VALUE")).ToList()
|
Select row1.Item("VALUE")).ToList()
|
||||||
|
|
||||||
ControlLoader.DataGridViewCheckable.LoadValue(gridControl, values)
|
ControlLoader.DataGridViewCheckable.LoadValue(gridControl, values)
|
||||||
End Select
|
End Select
|
||||||
@@ -539,10 +541,12 @@ Public Class ClassControlBuilder
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
Return 1
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
MsgBox("Unexpected error in DependingControls - " & CONTROL_ID.ToString & ": " & ex.Message, MsgBoxStyle.Critical)
|
MsgBox("Unexpected error in DependingControls - " & CONTROL_ID.ToString & ": " & ex.Message, MsgBoxStyle.Critical)
|
||||||
|
Return 0
|
||||||
End Try
|
End Try
|
||||||
End Sub
|
End Function
|
||||||
Public Sub OnDateTimeValueChanged(sender As Object, ByVal e As EventArgs)
|
Public Sub OnDateTimeValueChanged(sender As Object, ByVal e As EventArgs)
|
||||||
If CURRENT_RECORD_ENABLED = False Then Exit Sub
|
If CURRENT_RECORD_ENABLED = False Then Exit Sub
|
||||||
|
|
||||||
|
|||||||
@@ -76,6 +76,7 @@ Public Class ClassDatabase
|
|||||||
SQLcommand.CommandTimeout = 180
|
SQLcommand.CommandTimeout = 180
|
||||||
Dim adapter1 As SqlClient.SqlDataAdapter = New SqlClient.SqlDataAdapter(SQLcommand)
|
Dim adapter1 As SqlClient.SqlDataAdapter = New SqlClient.SqlDataAdapter(SQLcommand)
|
||||||
Dim dt As DataTable = New DataTable()
|
Dim dt As DataTable = New DataTable()
|
||||||
|
|
||||||
adapter1.Fill(dt)
|
adapter1.Fill(dt)
|
||||||
SQLconnect.Close()
|
SQLconnect.Close()
|
||||||
|
|
||||||
@@ -84,8 +85,12 @@ Public Class ClassDatabase
|
|||||||
Return dt
|
Return dt
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
MsgBox("Error in Return_Datatable: " & ex.Message & vbNewLine & vbNewLine & Select_anweisung, MsgBoxStyle.Critical)
|
MsgBox("Error in Return_Datatable: " & ex.Message & vbNewLine & vbNewLine & Select_anweisung, MsgBoxStyle.Critical)
|
||||||
|
ClassHelper.InsertEssential_Log(CURRENT_RECORD_ID, "RECORD-ID", ex.Message & " - SQL: " & Select_anweisung
|
||||||
ClassLogger.Add("Error in Return_Datatable: " & ex.Message, True)
|
ClassLogger.Add("Error in Return_Datatable: " & ex.Message, True)
|
||||||
ClassLogger.Add(">> SQL: " & Select_anweisung, False)
|
ClassLogger.Add(">> SQL: " & Select_anweisung, False)
|
||||||
|
If (ex.Message.Contains("Ungültiger Objektname") Or ex.Message.Contains("Invalid Object Name")) And DD_LIB_Standards.clsDatabase.DB_PROXY_INITIALIZED Then
|
||||||
|
MsgBox("A database-object could not be found but synchronization of Proxyserver might be in action! So please try again in a few seconds/minutes!", MsgBoxStyle.Exclamation)
|
||||||
|
End If
|
||||||
Return Nothing
|
Return Nothing
|
||||||
End Try
|
End Try
|
||||||
End Function
|
End Function
|
||||||
@@ -217,6 +222,7 @@ Public Class ClassDatabase
|
|||||||
'End If
|
'End If
|
||||||
ClassLogger.Add("Error in Execute_non_Query: " & ex.Message)
|
ClassLogger.Add("Error in Execute_non_Query: " & ex.Message)
|
||||||
ClassLogger.Add("SQL: " & ExecuteCMD)
|
ClassLogger.Add("SQL: " & ExecuteCMD)
|
||||||
|
|
||||||
Return False
|
Return False
|
||||||
End Try
|
End Try
|
||||||
End Function
|
End Function
|
||||||
|
|||||||
@@ -45,26 +45,35 @@ Public Class frmWD_IndexFile
|
|||||||
End If
|
End If
|
||||||
sw.Done()
|
sw.Done()
|
||||||
sw = New SW("CheckFileExists")
|
sw = New SW("CheckFileExists")
|
||||||
|
Dim existsonlyasMaster = False
|
||||||
If clsWD_GET.WDFile_exists(CURRENT_NEWFILENAME.Substring(2), clsDatabase.DB_PROXY_INITIALIZED, ClassProxy.MyLinkedServer) = True Then
|
If clsWD_GET.WDFile_exists(CURRENT_NEWFILENAME.Substring(2), clsDatabase.DB_PROXY_INITIALIZED, ClassProxy.MyLinkedServer, True) = True Then
|
||||||
sw.Done()
|
sw.Done()
|
||||||
Dim msg = "Eine Datei mit identischem Namen existiert bereits! Wollen Sie die bestehende Datei ersetzen?"
|
If clsWD_GET.WDFile_exists(CURRENT_NEWFILENAME.Substring(2), clsDatabase.DB_PROXY_INITIALIZED, ClassProxy.MyLinkedServer) = True Then
|
||||||
If USER_LANGUAGE <> "de-DE" Then
|
ClassHelper.InsertEssential_Log(CURRENT_RECORD_ID, "RECORD-ID", "FILE ALREADY EXISTED WITH NON-USER RIGHTS: " & CURRENT_NEWFILENAME)
|
||||||
msg = "There is already a file with the same name! Would You like to replace the file?"
|
existsonlyasMaster = True
|
||||||
End If
|
End If
|
||||||
Dim result As MsgBoxResult
|
If existsonlyasMaster = True Then
|
||||||
result = MessageBox.Show(msg, "File alredy exists:", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
|
|
||||||
If result = MsgBoxResult.Yes Then
|
|
||||||
If clsWD_SET.Delete_WDFile(CURRENT_NEWFILENAME.Substring(2)) = False Then
|
|
||||||
Return False
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
CURRENT_NEWFILENAME = ClassHelper.Versionierung_Datei(CURRENT_NEWFILENAME)
|
CURRENT_NEWFILENAME = ClassHelper.Versionierung_Datei(CURRENT_NEWFILENAME)
|
||||||
End If
|
ClassHelper.InsertEssential_Log(CURRENT_RECORD_ID, "RECORD-ID", "NEW FILENAME: " & CURRENT_NEWFILENAME)
|
||||||
Else
|
Else
|
||||||
sw.Done()
|
Dim msg = "Eine Datei mit identischem Namen existiert bereits! Wollen Sie die bestehende Datei ersetzen?"
|
||||||
End If
|
If USER_LANGUAGE <> "de-DE" Then
|
||||||
|
msg = "There is already a file with the same name! Would You like to replace the file?"
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim result As MsgBoxResult
|
||||||
|
result = MessageBox.Show(msg, "File alredy exists:", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
|
||||||
|
If result = MsgBoxResult.Yes Then
|
||||||
|
If clsWD_SET.Delete_WDFile(CURRENT_NEWFILENAME.Substring(2)) = False Then
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
CURRENT_NEWFILENAME = ClassHelper.Versionierung_Datei(CURRENT_NEWFILENAME)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
sw.Done()
|
||||||
'#################################################################
|
'#################################################################
|
||||||
'Stream File to windream
|
'Stream File to windream
|
||||||
'#################################################################
|
'#################################################################
|
||||||
|
|||||||
Reference in New Issue
Block a user