actually fixed license this time

This commit is contained in:
IvanaE 2018-11-13 22:14:51 -05:00
parent a88a575e7c
commit 4a7c058c5f
3 changed files with 2 additions and 3 deletions

View file

@ -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+" = ?",

View file

@ -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{