diff --git a/OlympusServices/app/src/main/java/com/uottawa/olympus/olympusservices/DBHelper.java b/OlympusServices/app/src/main/java/com/uottawa/olympus/olympusservices/DBHelper.java index eadb140..f188be4 100644 --- a/OlympusServices/app/src/main/java/com/uottawa/olympus/olympusservices/DBHelper.java +++ b/OlympusServices/app/src/main/java/com/uottawa/olympus/olympusservices/DBHelper.java @@ -290,12 +290,13 @@ public class DBHelper extends SQLiteOpenHelper { String phonenumber = cursor.getString(6); String companyname = cursor.getString(7); boolean licensed = Boolean.parseBoolean(cursor.getString(8)); + String description = cursor.getString(9); if (cursor.getString(4) .equals("Admin")){ usertype = new Admin(); } else if (cursor.getString(4) .equals("ServiceProvider")){ - ServiceProvider serviceProvider = new ServiceProvider(username, password, firstname, lastname, address, phonenumber, companyname, licensed); + ServiceProvider serviceProvider = new ServiceProvider(username, password, firstname, lastname, address, phonenumber, companyname, licensed, description); getAllServicesProvidedByUser(serviceProvider); getAvailabilities(serviceProvider); usertype = serviceProvider; diff --git a/OlympusServices/app/src/main/java/com/uottawa/olympus/olympusservices/SignUpPart2.java b/OlympusServices/app/src/main/java/com/uottawa/olympus/olympusservices/SignUpPart2.java index 48ab789..e135746 100644 --- a/OlympusServices/app/src/main/java/com/uottawa/olympus/olympusservices/SignUpPart2.java +++ b/OlympusServices/app/src/main/java/com/uottawa/olympus/olympusservices/SignUpPart2.java @@ -32,6 +32,7 @@ public class SignUpPart2 extends AppCompatActivity { String phonenumber = ((EditText) findViewById(R.id.PhoneNumberInput)).getText().toString(); String address = ((EditText) findViewById(R.id.AddressInput)).getText().toString(); boolean licensed = ((CheckBox) findViewById(R.id.LicensedInput)).isChecked(); + String description = ((EditText) findViewById(R.id.DescriptionInput)).getText().toString(); if(companyname.length()>0 && address.length()>0 && phonenumber.length()>0 && companyname.matches("^[a-zA-Z0-9_ ]*$") && address.matches("^[a-zA-Z0-9_ ]*$") @@ -40,7 +41,7 @@ public class SignUpPart2 extends AppCompatActivity { && address.replaceAll("\\s+","").length()>0) { ServiceProvider serviceProvider = new ServiceProvider(username, password, firstname, lastname, - address, phonenumber, companyname, licensed); + address, phonenumber, companyname, licensed, description); if(dbHelper.addUser(serviceProvider)){ startActivity(intent); finish();