求懂的大哥帮下弟翻译一下 这是一段接收编码后的post数据 logname=abcdefg下面是处理流程 我不懂Public Class BLL_MemberManage
Public Function QueryMemberByLogname(paras As String) As String
Dim result As String = Nothing
If Not String.IsNullOrEmpty(paras) Then
Try
Dim desKey As String = paras.Substring(12, 8)
Dim str As String = paras.Substring(20)
paras = EncryptHelper.Decrypt_DES(str, desKey)
Dim text As String = Nothing
Dim array As String() = paras.Split(New Char() { "&"c })
For Each text2 As String In array
Dim array3 As String() = text2.Split(New Char() { "="c })
If array3(0) = "logname" Then
text = array3(1)
End If
Next
Dim dataTable As DataTable = Me.memberService_DAL.QueryMemberByLogname(text)
If dataTable IsNot Nothing AndAlso dataTable.Rows.Count > 0 Then
For Each dataRow As DataRow In dataTable.[Select]()
result = dataRow("level").ToString()
Next
Else
result = "-1"
End If
Catch ex As Exception
result = "-1"
End Try
Else
result = "-1"
End If
Return result
End Function
Public Function QueryMemberByLogname(paras As String) As String
Dim result As String = Nothing
If Not String.IsNullOrEmpty(paras) Then
Try
Dim desKey As String = paras.Substring(12, 8)
Dim str As String = paras.Substring(20)
paras = EncryptHelper.Decrypt_DES(str, desKey)
Dim text As String = Nothing
Dim array As String() = paras.Split(New Char() { "&"c })
For Each text2 As String In array
Dim array3 As String() = text2.Split(New Char() { "="c })
If array3(0) = "logname" Then
text = array3(1)
End If
Next
Dim dataTable As DataTable = Me.memberService_DAL.QueryMemberByLogname(text)
If dataTable IsNot Nothing AndAlso dataTable.Rows.Count > 0 Then
For Each dataRow As DataRow In dataTable.[Select]()
result = dataRow("level").ToString()
Next
Else
result = "-1"
End If
Catch ex As Exception
result = "-1"
End Try
Else
result = "-1"
End If
Return result
End Function
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货