MS V2.7 .Net Logger etc
This commit is contained in:
@@ -41,7 +41,7 @@ Public Class ClassWindreamDocGrid
|
||||
DT_RESULTFILES = table
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add("Unexpected Error in Initting TableResult Docs: " & ex.Message, True)
|
||||
LOGGER.Warn("Unexpected Error in Initting TableResult Docs: " & ex.Message)
|
||||
DT_RESULTFILES = Nothing
|
||||
Return False
|
||||
End Try
|
||||
@@ -66,6 +66,23 @@ Public Class ClassWindreamDocGrid
|
||||
newRow("DOC_ID") = 0
|
||||
SELECTED_DOC_ID = 0
|
||||
End Try
|
||||
|
||||
Try
|
||||
newRow("INWORK") = False
|
||||
SELECTED_INWORK = False
|
||||
Dim oSQL = "Select IN_WORK,IN_WORK_USER FROM TBPMO_DOCRESULT_LIST where DocID = " + SELECTED_DOC_ID
|
||||
Dim oDT As DataTable = ClassDatabase.Return_Datatable(oSQL)
|
||||
If Not IsNothing(oDT) Then
|
||||
If oDT.Rows.Count = 1 Then
|
||||
newRow("INWORK") = CBool(oDT.Rows(0).Item("IN_WORK"))
|
||||
SELECTED_INWORK = CBool(oDT.Rows(0).Item("IN_WORK"))
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
newRow("INWORK") = False
|
||||
SELECTED_INWORK = False
|
||||
End Try
|
||||
|
||||
Try
|
||||
SELECTED_DOC_RIGHT = gridView.GetRowCellValue(row, "ACCESS_RIGHT")
|
||||
newRow("ACCESS_RIGHT") = gridView.GetRowCellValue(row, SELECTED_DOC_RIGHT)
|
||||
@@ -83,13 +100,7 @@ Public Class ClassWindreamDocGrid
|
||||
Catch ex As Exception
|
||||
newRow("OBJECTTYPE") = ""
|
||||
End Try
|
||||
Try
|
||||
newRow("INWORK") = gridView.GetRowCellValue(row, "in work?")
|
||||
SELECTED_INWORK = gridView.GetRowCellValue(row, "in work?")
|
||||
Catch ex As Exception
|
||||
newRow("INWORK") = False
|
||||
SELECTED_INWORK = False
|
||||
End Try
|
||||
|
||||
Try
|
||||
Dim dpn = gridView.GetRowCellValue(row, "Displayname")
|
||||
If IsDBNull(dpn) Or IsNothing(dpn) Then
|
||||
@@ -134,13 +145,7 @@ Public Class ClassWindreamDocGrid
|
||||
Catch ex As Exception
|
||||
newRow("OBJECTTYPE") = ""
|
||||
End Try
|
||||
Try
|
||||
newRow("INWORK") = gridView.GetFocusedRowCellValue(gridView.Columns("in work?"))
|
||||
SELECTED_INWORK = gridView.GetFocusedRowCellValue(gridView.Columns("in work?"))
|
||||
Catch ex As Exception
|
||||
newRow("INWORK") = False
|
||||
SELECTED_INWORK = False
|
||||
End Try
|
||||
|
||||
Try
|
||||
Dim dpn = gridView.GetFocusedRowCellValue(gridView.Columns("Displayname"))
|
||||
If IsDBNull(dpn) Or IsNothing(dpn) Then
|
||||
@@ -229,7 +234,7 @@ Public Class ClassWindreamDocGrid
|
||||
Try
|
||||
value = ClassDatabase.Execute_Scalar(String.Format("SELECT VALUE FROM TBPMO_DOC_VALUES WHERE CONFIG_ID = {0} AND DocID = {1} AND RECORD_ID = {2}", configId, docId, RECORD_ID))
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add(String.Format(">> Attention: Could not get Value from TBPMO_DOC_VALUES for ConfigId[{0}], DocId[{1}]: ", configId, docId) & ex.Message, False)
|
||||
LOGGER.Warn(String.Format("Attention: Could not get Value from TBPMO_DOC_VALUES for ConfigId[{0}], DocId[{1}]: ", configId, docId) & ex.Message)
|
||||
End Try
|
||||
|
||||
row.Item(colName) = value
|
||||
@@ -237,16 +242,16 @@ Public Class ClassWindreamDocGrid
|
||||
Next
|
||||
Next
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add(">> Attention: Could not load values from TBPMO_DOC_VALUES: " & ex.Message, False)
|
||||
LOGGER.Warn("Attention: Could not load values from TBPMO_DOC_VALUES: " & ex.Message)
|
||||
End Try
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> Values loaded...", False)
|
||||
LOGGER.Debug("Values loaded...")
|
||||
Try
|
||||
' Tabellen zum DataSet hinzufügen
|
||||
ds.Tables.Add(DT_RESULT)
|
||||
ds.Tables.Add(DT_DETAILS)
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> tables added to ds.Tables...", False)
|
||||
LOGGER.Debug("tables added to ds.Tables...")
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add(">> Attention: Could not Add tables to ds.Tables: " & ex.Message, False)
|
||||
LOGGER.Warn("Attention: Could not Add tables to ds.Tables: " & ex.Message)
|
||||
End Try
|
||||
|
||||
Try
|
||||
@@ -264,9 +269,9 @@ Public Class ClassWindreamDocGrid
|
||||
' Parameter `createConstraints` auf false setzen, um erstellung eines unsinnigen
|
||||
' `foreignKeyConstraints` zu verhindern
|
||||
ds.Relations.Add("docIdDetails", parentColumn, childColumn, False)
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> relationdocIdDetails created...", False)
|
||||
LOGGER.Debug("relationdocIdDetails created...")
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add(">> Could not set master-detail Relation DocSearch: " & ex.Message, False)
|
||||
LOGGER.Warn("Could not set master-detail Relation DocSearch: " & ex.Message)
|
||||
End Try
|
||||
|
||||
Dim gridControl As GridControl = gridView.GridControl
|
||||
@@ -291,7 +296,7 @@ Public Class ClassWindreamDocGrid
|
||||
gridControl.LevelTree.Nodes.Add("docIdDetails", grvwDetail)
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in FillColumns: " & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
ClassLogger.Add(">> Attention: Could not load converted datatable DocSearch: " & ex.Message, False)
|
||||
LOGGER.Warn("Attention: Could not load converted datatable DocSearch: " & ex.Message)
|
||||
End Try
|
||||
|
||||
AddHandler gridView.MasterRowExpanded, AddressOf gridView_MasterRowExpanded
|
||||
@@ -429,7 +434,7 @@ Public Class ClassWindreamDocGrid
|
||||
e.Column.OptionsColumn.AllowEdit = False
|
||||
End If
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add("Error in detailView_CustomRowCellEdit: " & ex.Message, False)
|
||||
LOGGER.Warn("Error in detailView_CustomRowCellEdit: " & ex.Message)
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
@@ -469,7 +474,7 @@ Public Class ClassWindreamDocGrid
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add("Unexpected error in gridView_CustomColumnDisplayText: " & ex.Message, False, False)
|
||||
LOGGER.Warn("Unexpected error in gridView_CustomColumnDisplayText: " & ex.Message)
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
@@ -521,7 +526,7 @@ Public Class ClassWindreamDocGrid
|
||||
End If
|
||||
AddHandler detailView.CustomRowCellEdit, AddressOf detailView_CustomRowCellEdit
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add("Unexpected error in gridView_MasterRowExpanded: " & ex.Message, False, False)
|
||||
LOGGER.Warn("Unexpected error in gridView_MasterRowExpanded: " & ex.Message)
|
||||
MsgBox("Unexpected error in gridView_MasterRowExpanded: " & ex.Message, MsgBoxStyle.Critical)
|
||||
End Try
|
||||
|
||||
|
||||
Reference in New Issue
Block a user