调用VB.NET Sub After Function

时间:2017-12-10 23:53:48

标签: vb.net

我有一个VB.NET子程序,它调用2个函数,然后调用另一个子函数。调用子GetFirstLineGradeAndSecondLineUser()中的前两个函数并返回值,但在第二个函数Ge​​tRandomSecondLineUser被调用之后,代码不会继续并调用最终的子AssignSecondLineRefund。我想知道我是不正确地构造代码还是违反了VB工作的一些基本的基本方式?谢谢

Sub GetFirstLineGradeAndSecondLineUser(ByVal RefundID As Integer, ByVal strFirstLineUserID As String)
    Dim strFirstLineGrade As String
    Dim strSecondLineUserID As String

    'First step is to get the first line users grade passing in FirstLineUserID
    strFirstLineGrade = GetFirstLineUserGrade(strFirstLineUserID)

    'Next assign the second line user name to this variable passing the first line user's grade value
    strSecondLineUserID = GetRandomSecondLineUser(strFirstLineGrade)

    'Now use the 2 values above to assign the second to the second line user
    AssignSecondLineRefund(RefundID, strSecondLineUserID)
End Sub

 Private Function GetFirstLineUserGrade(ByVal UserID As String) As String
    .....
    Return UserID
End Function

Private Function GetRandomSecondLineUser(ByVal Grade As String) As String
    ....
    Return UserID
End Function

Sub AssignSecondLineRefund(ByVal RefundID As Integer, ByVal strSecondLineUserID As String)
   'Subroutine here
End Sub

0 个答案:

没有答案