mirror of
https://github.com/jfoucry/Pilldroid.git
synced 2024-11-10 07:51:20 +01:00
Add debug code
This commit is contained in:
parent
6f06c4986e
commit
911dfb5a99
1 changed files with 8 additions and 2 deletions
|
@ -262,7 +262,7 @@ class DBHelper extends SQLiteOpenHelper {
|
||||||
*/
|
*/
|
||||||
public void updateDrug(Medicament medicament) {
|
public void updateDrug(Medicament medicament) {
|
||||||
|
|
||||||
Log.d(TAG, "Update Drug == " + medicament.toString());
|
Log.d(TAG, "Update Drug == " + medicament);
|
||||||
|
|
||||||
// Get reference to writable DB
|
// Get reference to writable DB
|
||||||
SQLiteDatabase db = this.getWritableDatabase();
|
SQLiteDatabase db = this.getWritableDatabase();
|
||||||
|
@ -276,6 +276,7 @@ class DBHelper extends SQLiteOpenHelper {
|
||||||
values.put(KEY_PRES, medicament.getPresentation());
|
values.put(KEY_PRES, medicament.getPresentation());
|
||||||
values.put(KEY_STOCK, medicament.getStock());
|
values.put(KEY_STOCK, medicament.getStock());
|
||||||
|
|
||||||
|
Log.d(TAG, "values are " +values.toString());
|
||||||
// Update row
|
// Update row
|
||||||
int i = db.update(TABLE_DRUG, // table
|
int i = db.update(TABLE_DRUG, // table
|
||||||
values, // column/value
|
values, // column/value
|
||||||
|
@ -286,6 +287,11 @@ class DBHelper extends SQLiteOpenHelper {
|
||||||
// Close DB
|
// Close DB
|
||||||
db.close();
|
db.close();
|
||||||
|
|
||||||
|
// DEBUG
|
||||||
|
Medicament toto = getDrug(medicament.getId());
|
||||||
|
Log.d(TAG, "toto stock== " + toto.getStock());
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -305,7 +311,7 @@ class DBHelper extends SQLiteOpenHelper {
|
||||||
db.close();
|
db.close();
|
||||||
|
|
||||||
// log
|
// log
|
||||||
Log.d(TAG, "delete drug "+medicament.toString());
|
Log.d(TAG, "delete drug "+medicament);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue