Advertisement
Guest User

Untitled

a guest
Jul 6th, 2018
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.40 KB | None | 0 0
  1.  
  2. if (txtUsername.Text == username && txtPassword.Text == password)
  3. {
  4. MessageBox.Show("Login Successful!", "Successful", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
  5.  
  6. gbRegister.Enabled = false;
  7. gbConversion.Enabled = true;
  8. disableLogin();
  9.  
  10.  
  11. txtUsername.Clear();
  12. txtPassword.Clear();
  13. }
  14.  
  15. {
  16. for (int i = 0; i < current; i++)
  17.  
  18. if (reg[i].username == txtUsername.Text && reg[i].password == txtPassword.Text)
  19. {
  20. MessageBox.Show("Login Successful!", "Successful", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
  21. gbRegister.Enabled = false;
  22. gbConversion.Enabled = true;
  23. disableLogin();
  24.  
  25. txtFname.Clear();
  26. txtLname.Clear();
  27. txtRusername.Clear();
  28. txtRpassword.Clear();
  29.  
  30. txtUsername.Clear();
  31. txtPassword.Clear();
  32. }
  33. }
  34.  
  35. else
  36. {
  37. MessageBox.Show("Invalid Username or Password");
  38. txtUsername.Clear();
  39. txtPassword.Clear();
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement