Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dim sql2 As String = "select count(*) from Usuaris where Correu=@Correu and Pass=@Pass "
- Dim city As String = TextBox1.Text
- Dim Pass As String = TextBox2.Text
- ' Pass = DesencriptarMD5(TextBox2.Text)
- ' TextBox2.Text = inici.DesencriptarMD5(TextBox2.Text, Pass)
- Using cmd As New SqlCommand(sql2, conexion)
- conexion.Open()
- cmd.Parameters.AddWithValue("@Correu", TextBox1.Text)
- cmd.Parameters.AddWithValue("@Pass", TextBox2.Text)
- Dim value = cmd.ExecuteScalar()
- If value > 0 Then
- 'desencriptar, si son correctes pasa
- MessageBox.Show("Login Correcte!")
- Dim Homee = New Homee()
- Homee.lblCorreu.Text = TextBox1.Text
- Me.Hide()
- Homee.Show()
- Else
- MessageBox.Show("Login Incorrecte!")
- End If
- End Using
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement