Advertisement
Guest User

Untitled

a guest
Jul 18th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1.  
  2. Dim sql2 As String = "select count(*) from Usuaris where Correu=@Correu and Pass=@Pass "
  3. Dim city As String = TextBox1.Text
  4. Dim Pass As String = TextBox2.Text
  5.  
  6. ' Pass = DesencriptarMD5(TextBox2.Text)
  7.  
  8. ' TextBox2.Text = inici.DesencriptarMD5(TextBox2.Text, Pass)
  9.  
  10. Using cmd As New SqlCommand(sql2, conexion)
  11. conexion.Open()
  12. cmd.Parameters.AddWithValue("@Correu", TextBox1.Text)
  13. cmd.Parameters.AddWithValue("@Pass", TextBox2.Text)
  14. Dim value = cmd.ExecuteScalar()
  15. If value > 0 Then
  16.  
  17. 'desencriptar, si son correctes pasa
  18.  
  19.  
  20.  
  21. MessageBox.Show("Login Correcte!")
  22. Dim Homee = New Homee()
  23. Homee.lblCorreu.Text = TextBox1.Text
  24.  
  25. Me.Hide()
  26. Homee.Show()
  27. Else
  28. MessageBox.Show("Login Incorrecte!")
  29. End If
  30. End Using
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement