fixes still needed
This commit is contained in:
parent
995142d117
commit
8750d55198
3 changed files with 8 additions and 6 deletions
|
@ -74,7 +74,7 @@ public class EditProfile extends AppCompatActivity {
|
|||
) {
|
||||
|
||||
dbHelper.updateUserInfo(username, password.getText().toString(), firstname.getText().toString(), lastname.getText().toString(),
|
||||
address.getText().toString(), phonenumber.getText().toString(), companyname.getText().toString(), licensed.isChecked());
|
||||
address.getText().toString(), phonenumber.getText().toString(), companyname.getText().toString(), new Boolean(licensed.isChecked()));
|
||||
Toast.makeText(this, "Profile has been updated", Toast.LENGTH_LONG).show();
|
||||
}
|
||||
else{
|
||||
|
|
|
@ -54,7 +54,7 @@ public class ServiceProviderServicesList extends AppCompatActivity implements De
|
|||
DBHelper dbHelper = new DBHelper(this);
|
||||
|
||||
//grid
|
||||
List<String[]> serviceslist2 = dbHelper.getAllServices();
|
||||
List<String[]> serviceslist2 = dbHelper.getAllServicesProvidedByUser(username);
|
||||
Service[] services2 = new Service[(serviceslist2.size())];
|
||||
Iterator iter2 = serviceslist2.iterator();
|
||||
for (int i=0; i<serviceslist2.size();i++){
|
||||
|
@ -129,10 +129,12 @@ public class ServiceProviderServicesList extends AppCompatActivity implements De
|
|||
*
|
||||
* @param view View object contains the generated list and buttons
|
||||
*/
|
||||
public void addService(View view, String name) {
|
||||
MaterialSpinner spinner = findViewById(R.id.RoleInput);
|
||||
public void addService(View view) {
|
||||
MaterialSpinner spinner = findViewById(R.id.ServicesInput);
|
||||
String servicename = spinner.getText().toString();
|
||||
//add service to service provider if doesn't already exist
|
||||
DBHelper dbHelper = new DBHelper(this);
|
||||
dbHelper.addServiceProvidedByUser(servicename, username);
|
||||
this.recreate();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ public class SignUp extends AppCompatActivity {
|
|||
String lastname = ((EditText) findViewById(R.id.LastNameInput)).getText().toString();
|
||||
MaterialSpinner spinner = findViewById(R.id.RoleInput);
|
||||
|
||||
if(username.length()>=5 && password.length()>5 && firstname.length()>0 && lastname.length()>0 && username.matches("[a-zA-Z0-9]*") && password.matches("[a-zA-Z0-9]*")
|
||||
if(username.length()>=5 && password.length()>=5 && firstname.length()>0 && lastname.length()>0 && username.matches("[a-zA-Z0-9]*") && password.matches("[a-zA-Z0-9]*")
|
||||
&& firstname.matches("[a-zA-Z]*") && lastname.matches("[a-zA-Z]*")){
|
||||
DBHelper dbHelper = new DBHelper(this);
|
||||
Intent intent = new Intent(getApplicationContext(),LogIn.class);
|
||||
|
|
Loading…
Reference in a new issue