If myConn.State = ConnectionState.Closed Then
myConn.Open()
End If
Dim sqlstr As String
If Pwdstr = "" Then
sqlstr = "select * from manage where manageid='" + Userstr.Trim + "' and Pass is null"
Else
sqlstr = "select * from manage where manageid='" + Userstr.Trim + "' and Pass='" + Pwdstr + "'"
End If
Fill(sqlstr)
If ds.Tables(0).Rows.Count = 0 Then
Close()
Return -1
End If
ds.Clear()
Close()
Return 1
End Function
Public Sub Open()
myConn.Open()
End Sub
Public Sub Close()
myConn.Close()
End Sub
Public Sub Fill(ByVal sqlstr As String)
myAdapter = New SqlDataAdapter(sqlstr, myConn)
ds = New DataSet
myAdapter.Fill(ds)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
If CheckUserberInfo(TextBox1.Text, TextBox2.Text) = 1 Then
Session("UserID") = TextBox1.Text.ToString
Response.Redirect("delete.aspx")
Else
Response.Write("<script>javascript:alert('登陆失败!!!');</script>")
Response.Write("javascript:window.location='user.aspx'")
End If
End Sub
End Class
<< 上一页 [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] ... 下一页 >>