> ' Return a numeric value > ' If it is corrupted, we redirect to the main page > ' expC1 HTLM form variable > Public Function GetProcessNumeric(ByVal tcField As String) As Integer > Dim lcPrimaryKey As String = "" > Dim lnPrimaryKey As Integer = 0 > Dim lnPrimaryKeyTemp As Double = 0 > > ' If the key exists > If oProcess.IsProcess(tcField) Then > > ' Get the value > lcPrimaryKey = oProcess.GetProcess(tcField) > > ' If we have a value > If lcPrimaryKey.Length > 0 Then > > ' If we have digit only > If oProcess.oApp.IsFilter09(lcPrimaryKey) Then > > ' If we have less than 11 characters > If lcPrimaryKey.Length < 11 Then > lnPrimaryKeyTemp = Val(lcPrimaryKey) > > ' If this is under or equal 2147483647 > If lnPrimaryKeyTemp <= 2147483647 Then > lnPrimaryKey = lnPrimaryKeyTemp > Else > oProcess.RedirectMain(oProcess.cHttp) > Return 0 > End If > > Else > oProcess.RedirectMain(oProcess.cHttp) > Return 0 > End If > > Else > oProcess.RedirectMain(oProcess.cHttp) > Return 0 > End If > > Else > oProcess.RedirectMain(oProcess.cHttp) > Return 0 > End If > > End If > > Return lnPrimaryKey > End Function >>
lcPrimaryKey = oProcess.GetProcess(tcField): Dim lnPrimaryKey As Integer = 0 If Not Integer.TryParse(lcPrimaryKey, lnPrimaryKey) Then oProcess.RedirectMain(oProcess.cHttp) End If Return lnPrimaryKeyNothing else required....