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