SHARE
TWEET

Untitled

a guest Mar 20th, 2017 139 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     Sub LoginUser()
  2.         Console.WriteLine("Enter username: ")
  3.  
  4.         Dim searchCriteria As String = Console.ReadLine
  5.         Console.WriteLine("Enter Password: ")
  6.  
  7.         Dim searchcriteria2 As String = Console.ReadLine
  8.         For i = 0 To userdb.Length - 1
  9.             If userdb(i).password = searchcriteria2 And userdb(i).username = searchCriteria Then
  10.                 Console.WriteLine(userdb(i).id.ToString + ": " + userdb(i).username)
  11.             End If
  12.  
  13.         Next
  14.         Console.WriteLine("Which form; enter id: ")
  15.         activeUser = userdb(Console.ReadLine())
  16.         For i = 0 To userdb.Length - 1
  17.  
  18.         Next
  19.         Dim counter As Integer = 0
  20.         If counter = 0 Then
  21.             Console.WriteLine("Nothing found")
  22.  
  23.         End If
  24.         If counter = 1 Then
  25.             Exit Sub
  26.             activeUser = userdb(Console.ReadLine())
  27.         End If
  28.         If counter > 1 Then
  29.             Console.WriteLine("Which user: ")
  30.             activeUser = userdb(Console.ReadLine())
  31.         End If
  32.     End Sub
  33.     Sub Loginform()
  34.         Console.WriteLine("Enter username: ")
  35.  
  36.         Dim searchCriteria As String = Console.ReadLine
  37.         For j = 0 To formdb.Length - 1
  38.             If searchCriteria = formdb(j).name Then
  39.                 Console.WriteLine("Enter Password: ")
  40.  
  41.                 Dim searchcriteria2 As String = Console.ReadLine
  42.                 If searchcriteria2 = formdb(j).password Then
  43.  
  44.                     For i = 0 To formdb.Length - 1
  45.                         If formdb(i).password = searchcriteria2 And formdb(i).name = searchCriteria Then
  46.                             Console.WriteLine(formdb(i).id.ToString + ": " + formdb(i).name)
  47.                         End If
  48.  
  49.                     Next
  50.                 Else
  51.  
  52.  
  53.                 End If
  54.             End If
  55.         Next
  56.         Console.WriteLine("Which form; enter id: ")
  57.         formuser = formdb(Console.ReadLine())
  58.         For i = 0 To formdb.Length - 1
  59.  
  60.         Next
  61.     End Sub
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top