MS_31.03
This commit is contained in:
@@ -272,14 +272,14 @@ Public Class ClassControlValues
|
||||
|
||||
Public Shared Sub LoadControlValuesList(FormID As Integer, controls As Control.ControlCollection)
|
||||
Try
|
||||
Dim sw As New Stopwatch
|
||||
sw.Start()
|
||||
|
||||
If controls.Count = 0 Then
|
||||
'MsgBox("LoadControlValuesList: Control.ControlCollection is unexpected empty!", MsgBoxStyle.Exclamation)
|
||||
ClassLogger.Add("LoadControlValuesList: Control.ControlCollection is unexpected empty!")
|
||||
Exit Sub
|
||||
End If
|
||||
Dim SW As Stopwatch = Stopwatch.StartNew()
|
||||
|
||||
|
||||
Dim swsql As Stopwatch = Stopwatch.StartNew()
|
||||
|
||||
' Zuerst alle SQL Commands für FormID finden
|
||||
@@ -288,7 +288,7 @@ Public Class ClassControlValues
|
||||
Dim dt As DataTable = ClassDatabase.Return_Datatable(SQL)
|
||||
|
||||
swsql.Stop()
|
||||
Console.WriteLine("LoadControlValuesList - Database took {0} milliseconds to load", swsql.ElapsedMilliseconds)
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(String.Format(">>LoadControlValuesList - Database took {0} milliseconds to load", swsql.ElapsedMilliseconds), False)
|
||||
|
||||
If dt.Rows.Count = 0 Then
|
||||
Exit Sub
|
||||
@@ -327,12 +327,15 @@ Public Class ClassControlValues
|
||||
End Select
|
||||
|
||||
swcontrol.Stop()
|
||||
Console.WriteLine("LoadControlValuesList Loading {0} took {1} milliseconds to load", Ctrl.Name, swcontrol.ElapsedMilliseconds)
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(String.Format(">> LoadControlValuesList Loading '{0}' took {1} milliseconds to load", Ctrl.Name, swcontrol.ElapsedMilliseconds), False)
|
||||
Next
|
||||
|
||||
SW.Stop()
|
||||
Console.WriteLine("LoadControlValuesList took {0} milliseconds to load", SW.ElapsedMilliseconds)
|
||||
|
||||
Dim elapsed As Double
|
||||
elapsed = SW.Elapsed.TotalSeconds
|
||||
SW.Stop()
|
||||
SW.Reset()
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(">> LoadControlValuesList took " & Format(elapsed, "0.000000000") & " seconds", False)
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add("Unexpected Error in LoadControlValuesList: " & ex.Message, True)
|
||||
MsgBox("Unexpected Error in LoadControlValuesList:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
|
||||
Reference in New Issue
Block a user