62,250
社区成员




Dim request As New IB1001Request(reqBuffer)
Dim strSQL As String
Dim conn As SqlConnection = SqlConnFactory.CreateConn()
Dim cmd As SqlClient.SqlCommand
conn.Open()
Dim AccNum As String
Dim dr As SqlDataReader
If request.ACNO.Trim <> String.Empty Then
AccNum = request.ACNO.Trim
Else
If request.SETACCNO.Trim <> String.Empty Then
AccNum = request.SETACCNO.Trim
End If
End If
Try
strSQL = String.Format("select * from CPAccounts where cpa_accnum = '{0}'", AccNum)
cmd = New SqlCommand(strSQL, conn)
dr = cmd.ExecuteReader(CommandBehavior.Default)
If dr.Read() Then '查找是否已参加服务A
IS_CP = True
cp_account = dr.Item("cpa_accnum")
Else
IS_CP = False
cp_account = String.Empty
End If
dr.Close()
strSQL = String.Format("select * from AMAccounts where ama_accnum = '{0}'", AccNum)
cmd = New SqlCommand(strSQL, conn)
dr = cmd.ExecuteReader(CommandBehavior.Default)
If dr.Read() Then '查找是否已参加服务B
IS_AM = True
am_account = dr.Item("ama_accnum")
Else
IS_AM = False
am_account = String.Empty
End If
dr.Close()
strSQL = String.Format("select * from IBAccounts where iba_accnum = '{0}'", AccNum)
cmd = New SqlCommand(strSQL, conn)
dr = cmd.ExecuteReader(CommandBehavior.Default)
If dr.Read() Then '查找是否已参加服务C
IS_IB = True
ib_account = dr.Item("iba_accnum")
Else
IS_IB = False
ib_account = String.Empty
End If
Catch ex As Exception
Debug.WriteLine(ex.ToString)
Throw
Finally
dr.Close()
cmd.Dispose()
conn.Close()
End Try