fix GetNextRunningNumber when no running exists yet

This commit is contained in:
Jonathan Jenne 2020-10-13 14:22:31 +02:00
parent c515ca075a
commit 6155a9365a

View File

@ -127,7 +127,7 @@ Public Class Winline
Dim oNewRunningNumber = Integer.Parse(oDbResult) + 1 Dim oNewRunningNumber = Integer.Parse(oDbResult) + 1
Return oNewRunningNumber.ToString.PadLeft(3, "0") Return oNewRunningNumber.ToString.PadLeft(3, "0")
ElseIf IsNothing(oDbResult) OrElse IsDBNull(oDbResult) Then ElseIf IsNothing(oDbResult) OrElse IsDBNull(oDbResult) Then
Throw New ApplicationException(NO_RUNNING_NUMBER_FOUND) Return 1.ToString.PadLeft(3, "0")
Else Else
Throw New ApplicationException(UNKNOWN_ERROR) Throw New ApplicationException(UNKNOWN_ERROR)
End If End If