-
Notifications
You must be signed in to change notification settings - Fork 0
/
Index.aspx.vb
29 lines (25 loc) · 1 KB
/
Index.aspx.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Partial Class Index_
Inherits System.Web.UI.Page
Protected Sub ImageButton1_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) Handles ImageButton1.Click
Dim obj As New libreria
Dim texto As String = "SELECT * FROM usuarios WHERE usuario = '" & TextBox1.Text & "' and pass = '" & TextBox2.Text & "'"
obj.Inicia()
obj.Obtener(texto)
If obj.Arreglo.HasRows = True Then
obj.Arreglo.Read()
Session("cliente") = obj.Arreglo("Nombre") & ""
Session("pase") = "Om3g@"
Session("nivel") = obj.Arreglo("cargo")
Session("user") = obj.Arreglo("usuario")
obj.cerrar()
Response.Redirect("Panel.aspx")
Else
MsgBox("Usuario no registrados")
Response.Redirect("Index.aspx")
End If
End Sub
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
Response.Write(Session.SessionID.ToString())
End Sub
End Class