actually fixed license this time
This commit is contained in:
		
							parent
							
								
									65c906b1f9
								
							
						
					
					
						commit
						8408aed8f6
					
				
					 3 changed files with 2 additions and 3 deletions
				
			
		| 
						 | 
					@ -338,7 +338,7 @@ public class DBHelper extends SQLiteOpenHelper {
 | 
				
			||||||
        if (address != null && !address.equals(""))values.put(COLUMN_ADDRESS, address);
 | 
					        if (address != null && !address.equals(""))values.put(COLUMN_ADDRESS, address);
 | 
				
			||||||
        if (phonenumber != null && !phonenumber.equals(""))values.put(COLUMN_PHONE, phonenumber);
 | 
					        if (phonenumber != null && !phonenumber.equals(""))values.put(COLUMN_PHONE, phonenumber);
 | 
				
			||||||
        if (companyname != null && !companyname.equals(""))values.put(COLUMN_COMPANY, companyname);
 | 
					        if (companyname != null && !companyname.equals(""))values.put(COLUMN_COMPANY, companyname);
 | 
				
			||||||
        if (licensed != null)values.put(COLUMN_LICENSED, licensed.booleanValue());
 | 
					        if (licensed != null)values.put(COLUMN_LICENSED, Boolean.toString(licensed));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return writeDB.update(TABLE_LOGIN, values, COLUMN_USERNAME+" = ?",
 | 
					        return writeDB.update(TABLE_LOGIN, values, COLUMN_USERNAME+" = ?",
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -75,7 +75,7 @@ public class EditProfile extends AppCompatActivity {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            if(dbHelper.updateUserInfo(username, password.getText().toString(), firstname.getText().toString(), lastname.getText().toString(),
 | 
					            if(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(), licensed.isChecked())){
 | 
				
			||||||
                Toast.makeText(this, "Profile has been updated ", Toast.LENGTH_LONG).show();
 | 
					                Toast.makeText(this, "Profile has been updated", Toast.LENGTH_LONG).show();
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            else{
 | 
					            else{
 | 
				
			||||||
                Toast.makeText(this, "Could not update profile ", Toast.LENGTH_LONG).show();
 | 
					                Toast.makeText(this, "Could not update profile ", Toast.LENGTH_LONG).show();
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -40,7 +40,6 @@ public class SignUpPart2 extends AppCompatActivity {
 | 
				
			||||||
            ServiceProvider serviceProvider = new ServiceProvider(username, password, firstname, lastname,
 | 
					            ServiceProvider serviceProvider = new ServiceProvider(username, password, firstname, lastname,
 | 
				
			||||||
                    address, phonenumber, companyname, licensed);
 | 
					                    address, phonenumber, companyname, licensed);
 | 
				
			||||||
            if(dbHelper.addUser(serviceProvider)){
 | 
					            if(dbHelper.addUser(serviceProvider)){
 | 
				
			||||||
                Toast.makeText(this, licensed+":"+((ServiceProvider)dbHelper.findUserByUsername(username)).isLicensed(), Toast.LENGTH_SHORT).show();
 | 
					 | 
				
			||||||
                startActivity(intent);
 | 
					                startActivity(intent);
 | 
				
			||||||
                finish();
 | 
					                finish();
 | 
				
			||||||
            }else{
 | 
					            }else{
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue