Facebook
From Soft Bat, 5 Years ago, written in Java.
Embed
Download Paste or View Raw
Hits: 238
  1. private void registerAccount() {
  2.  
  3.  
  4.         if (!isEmpty()) {
  5.             if(!toSame()) {
  6.                 if(!checkName()) {
  7.                     if(!checkEmail()) {
  8.                             mDatabaseHelper.addUser(editTextNameRegistration.getText().toString(), editTextSurnameRegistration.getText().toString(),editTextLoginRegistration.getText().toString(), editTextPasswordRegistration.getText().toString(), editTextPin.getText().toString(), editTextMailRegistration.getText().toString());
  9.                             Toast.makeText(this, "Stworzono konto", Toast.LENGTH_SHORT).show();
  10.                             Intent intent = new Intent(OpenRegistration.this, MainActivity.class);
  11.                             startActivity(intent);
  12.  
  13.                     }else{
  14.                             Toast.makeText(this, "Mail już użyty", Toast.LENGTH_SHORT).show();}
  15.  
  16.                 } else {
  17.                         Toast.makeText(this, "Login już użyty", Toast.LENGTH_SHORT).show();}
  18.  
  19.             } else {
  20.                 Toast.makeText(this, "Różne hasła", Toast.LENGTH_SHORT).show();}
  21.  
  22.         } else {
  23.             Toast.makeText(this, "Puste pola", Toast.LENGTH_SHORT).show();}
  24.  
  25.     }