MS V2.7 .Net Logger etc
This commit is contained in:
@@ -63,8 +63,8 @@ Public Class frmSAP_FuBa
|
||||
Me.Cursor = Cursors.Default
|
||||
'Try
|
||||
' Me.Cursor = Cursors.WaitCursor
|
||||
' If LogErrorsOnly = False Then ClassLogger.Add("", False)
|
||||
' If LogErrorsOnly = False Then ClassLogger.Add(" >> SAP Connect started:", False)
|
||||
' LOGGER.Debug("")
|
||||
' LOGGER.Debug("SAP Connect started:")
|
||||
' ERPConnect.LIC.SetLic("W86DWC992C")
|
||||
' con.Host = HostTextBox.Text
|
||||
' con.SystemNumber = SystemNumberTextBox.Text
|
||||
@@ -72,10 +72,10 @@ Public Class frmSAP_FuBa
|
||||
' con.Password = PasswordTextBox.Text
|
||||
' con.Client = ClientTextBox.Text
|
||||
' con.Language = LanguageTextBox.Text
|
||||
' If LogErrorsOnly = False Then ClassLogger.Add(" >> HOST: " & HostTextBox.Text & " |SystemNumber: " & SystemNumberTextBox.Text & " |UserName: " & UserNameTextBox.Text & " |Password: " & PasswordTextBox.Text & " |Client: " & ClientTextBox.Text & " |Language: " & LanguageTextBox.Text, False)
|
||||
' LOGGER.Debug("HOST: " & HostTextBox.Text & " |SystemNumber: " & SystemNumberTextBox.Text & " |UserName: " & UserNameTextBox.Text & " |Password: " & PasswordTextBox.Text & " |Client: " & ClientTextBox.Text & " |Language: " & LanguageTextBox.Text)
|
||||
' con.Open(False)
|
||||
' If LogErrorsOnly = False Then ClassLogger.Add(" >> SAP-Connection erfolgreich aufgebaut!", False)
|
||||
' If LogErrorsOnly = False Then ClassLogger.Add("", False)
|
||||
' LOGGER.Debug("SAP-Connection erfolgreich aufgebaut!")
|
||||
' LOGGER.Debug("")
|
||||
' lblConnectionopen.Visible = True
|
||||
' Me.Cursor = Cursors.Default
|
||||
'Catch ex As Exception
|
||||
@@ -146,7 +146,7 @@ Public Class frmSAP_FuBa
|
||||
lblSave.Visible = False
|
||||
GridControl2.DataSource = Nothing
|
||||
GridView2.Columns.Clear()
|
||||
ClassLogger.Add(">> SAPResulttable is nothing", False)
|
||||
LOGGER.Warn("SAPResulttable is nothing")
|
||||
Exit Sub
|
||||
End If
|
||||
'######
|
||||
@@ -165,12 +165,12 @@ Public Class frmSAP_FuBa
|
||||
Next
|
||||
createtablesql += ")"
|
||||
''Die Tabelle anlegen
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> Create Table: " & createtablesql, False)
|
||||
LOGGER.Debug("Create Table: " & createtablesql)
|
||||
If ClassDatabase.Execute_non_Query_withConn(createtablesql, 1) = False Then
|
||||
MsgBox("Error in creating TempTable: Check log", MsgBoxStyle.Critical)
|
||||
Exit Sub
|
||||
End If
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> table has been created", False)
|
||||
LOGGER.Debug("table has been created")
|
||||
|
||||
Dim alter = String.Format("ALTER TABLE {0} ADD GUID INTEGER NOT NULL IDENTITY(1,1)", tablename)
|
||||
ClassDatabase.Execute_non_Query_withConn(alter, 1)
|
||||
@@ -215,7 +215,7 @@ Public Class frmSAP_FuBa
|
||||
End Using
|
||||
SQLconnect.Close()
|
||||
Me.Cursor = Cursors.Default
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> Create table from SAP FuBa was successfull " & SAPResulttable.Rows.Count & " Rows were inserted to table '" & tablename & "'!", False)
|
||||
LOGGER.Debug("Create table from SAP FuBa was successfull " & SAPResulttable.Rows.Count & " Rows were inserted to table '" & tablename & "'!")
|
||||
MsgBox("Create table was successfull! " & vbNewLine & SAPResulttable.Rows.Count & " Rows were inserted to table '" & tablename & "'!", MsgBoxStyle.Information)
|
||||
Catch ex As Exception
|
||||
MsgBox("Unexpected Error in SQL bulkCopy: " & ex.Message, MsgBoxStyle.Critical)
|
||||
@@ -286,7 +286,7 @@ Public Class frmSAP_FuBa
|
||||
GridControl2.DataSource = Nothing
|
||||
GridView2.Columns.Clear()
|
||||
sw.Stop()
|
||||
ClassLogger.Add(">> SAPResulttable is nothing", False)
|
||||
LOGGER.Warn("SAPResulttable is nothing")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
@@ -324,7 +324,7 @@ Public Class frmSAP_FuBa
|
||||
lblSave.Visible = False
|
||||
GridControl2.DataSource = Nothing
|
||||
GridView2.Columns.Clear()
|
||||
ClassLogger.Add(">> Unexpected Error in GridControl2 >> DataTable 2: " & ex.Message, False)
|
||||
LOGGER.Warn("Unexpected Error in GridControl2 >> DataTable 2: " & ex.Message)
|
||||
MsgBox("Error in GridControl2 >> DataTable: " & ex.Message, MsgBoxStyle.Critical)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Reference in New Issue
Block a user