| @@ -12,55 +12,55 @@ import java.io.IOException; | ||||
|  | ||||
| public class SingUpController { | ||||
|     @FXML | ||||
|     private TextField tfName; | ||||
|     private TextField tfLastName; | ||||
|     @FXML | ||||
|     private TextField tfVorname; | ||||
|     private TextField tfFirstName; | ||||
|     @FXML | ||||
|     private TextField tfEmail; | ||||
|     @FXML | ||||
|     private PasswordField pfPasswort; | ||||
|     private PasswordField pfPassword; | ||||
|     @FXML | ||||
|     private TextField tfPLZ; | ||||
|     private TextField tfPostCode; | ||||
|     @FXML | ||||
|     private TextField tfStadt; | ||||
|     private TextField tfCity; | ||||
|  | ||||
|     @FXML | ||||
|     private TextField tfStrasse; | ||||
|     private TextField tfStreet; | ||||
|     @FXML | ||||
|     private TextField tfHausnummer; | ||||
|     private TextField tfHouseNumber; | ||||
|     @FXML | ||||
|     private void onKontoErstellenBtClick(){ | ||||
|         String name = tfName.getText(); | ||||
|         String vorname = tfVorname.getText(); | ||||
|         String lastName = tfLastName.getText(); | ||||
|         String firstName = tfFirstName.getText(); | ||||
|         String email = tfEmail.getText(); | ||||
|         String passwort = pfPasswort.getText(); | ||||
|         String plz = tfPLZ.getText(); | ||||
|         String stadt = tfStadt.getText(); | ||||
|         String strasse = tfStrasse.getText(); | ||||
|         String hausnummer = tfHausnummer.getText(); | ||||
|         String password = pfPassword.getText(); | ||||
|         String postCode = tfPostCode.getText(); | ||||
|         String city = tfCity.getText(); | ||||
|         String street = tfStreet.getText(); | ||||
|         String houseNumber = tfHouseNumber.getText(); | ||||
|         Alert alert; | ||||
|         if(name.isEmpty() || vorname.isEmpty() || email.isEmpty() || passwort.isEmpty() || plz.isEmpty() || | ||||
|                 stadt.isEmpty() || strasse.isEmpty() || hausnummer.isEmpty()){ | ||||
|         if(lastName.isEmpty() || firstName.isEmpty() || email.isEmpty() || password.isEmpty() || postCode.isEmpty() || | ||||
|                 city.isEmpty() || street.isEmpty() || houseNumber.isEmpty()){ | ||||
|  | ||||
|             if(name.isEmpty()){ | ||||
|             if(lastName.isEmpty()){ | ||||
|                 alert = new Alert(Alert.AlertType.ERROR," Die Eingabefeld 'Name'  ist leer."); | ||||
|                 alert.showAndWait(); | ||||
|             } else if (vorname.isEmpty()) { | ||||
|             } else if (firstName.isEmpty()) { | ||||
|                 alert = new Alert(Alert.AlertType.ERROR," Die Eingabefeld  'Vorname' ist leer."); | ||||
|                 alert.showAndWait(); | ||||
|             } else if (email.isEmpty()) { | ||||
|                 alert = new Alert(Alert.AlertType.ERROR," Die Eingabefeld 'E-Mail' ist leer."); | ||||
|                 alert.showAndWait(); | ||||
|             } else if (passwort.isEmpty()) { | ||||
|             } else if (password.isEmpty()) { | ||||
|                 alert = new Alert(Alert.AlertType.ERROR," Die Eingabefeld 'Passwort' ist leer."); | ||||
|                 alert.showAndWait(); | ||||
|             } else if (plz.isEmpty()) { | ||||
|             } else if (postCode.isEmpty()) { | ||||
|                 alert = new Alert(Alert.AlertType.ERROR," Die Eingabefeld 'Postleitzahl' ist leer."); | ||||
|                 alert.showAndWait(); | ||||
|             } else if (stadt.isEmpty()) { | ||||
|             } else if (city.isEmpty()) { | ||||
|                 alert = new Alert(Alert.AlertType.ERROR," Die Eingabefeld 'Stadt' ist leer."); | ||||
|                 alert.showAndWait(); | ||||
|             } else if (strasse.isEmpty()) { | ||||
|             } else if (street.isEmpty()) { | ||||
|                 alert = new Alert(Alert.AlertType.ERROR," Die Eingabefeld  'Straße' ist leer."); | ||||
|                 alert.showAndWait(); | ||||
|             }else { | ||||
| @@ -69,8 +69,8 @@ public class SingUpController { | ||||
|             } | ||||
|  | ||||
|         }else { | ||||
|             Address newAdresse = new Address(strasse,hausnummer,plz,stadt); | ||||
|             User newUser = new User(name,vorname,passwort,email,newAdresse); | ||||
|             Address newAdresse = new Address(street,houseNumber,postCode,city); | ||||
|             User newUser = new User(lastName,firstName,password,email,newAdresse); | ||||
|             if(StartViewApplication.firstLaunch){ | ||||
|                 long id = AccountMgr.createWorker(new Worker(newUser)); | ||||
|                 if(id < 1) { | ||||
| @@ -91,14 +91,14 @@ public class SingUpController { | ||||
|                 alert = new Alert(Alert.AlertType.CONFIRMATION,"Eltern Account erfolgreich erstellt"); | ||||
|                 alert.showAndWait(); | ||||
|             } | ||||
|             tfName.setText(""); | ||||
|             tfVorname.setText(""); | ||||
|             tfLastName.setText(""); | ||||
|             tfFirstName.setText(""); | ||||
|             tfEmail.setText(""); | ||||
|             pfPasswort.setText(""); | ||||
|             tfPLZ.setText(""); | ||||
|             tfStadt.setText(""); | ||||
|             tfStrasse.setText(""); | ||||
|             tfHausnummer.setText(""); | ||||
|             pfPassword.setText(""); | ||||
|             tfPostCode.setText(""); | ||||
|             tfCity.setText(""); | ||||
|             tfStreet.setText(""); | ||||
|             tfHouseNumber.setText(""); | ||||
|         } | ||||
|  | ||||
|     } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user