mirror of
https://github.com/jfoucry/Pilldroid.git
synced 2024-11-17 18:41:37 +01:00
disabled demo mode;
Use DBHelper to updateDrug after currentStock updateed
This commit is contained in:
parent
58d709152e
commit
f90c0df17b
1 changed files with 5 additions and 3 deletions
|
@ -62,8 +62,8 @@ public class MedicamentListActivity extends AppCompatActivity {
|
|||
|
||||
// TODO: Change DEMO/DBDEMO form statci to non-static. In order to create fake data at only at launchtime
|
||||
private boolean mTwoPane;
|
||||
final static Boolean DEMO = true;
|
||||
final static Boolean DBDEMO = true;
|
||||
final Boolean DEMO = false;
|
||||
final Boolean DBDEMO = false;
|
||||
final static Random random = new Random();
|
||||
|
||||
@Override
|
||||
|
@ -232,12 +232,14 @@ public class MedicamentListActivity extends AppCompatActivity {
|
|||
public void newStockCalculation() {
|
||||
|
||||
Medicament currentMedicament;
|
||||
DBHelper dbHelper = new DBHelper();
|
||||
|
||||
for (int position = 0 ; position < this. getCount() ; position++ ) {
|
||||
currentMedicament = this.getItem(position);
|
||||
currentMedicament.newStock(currentMedicament.getStock());
|
||||
dbHelper.updateDrug(currentMedicament);
|
||||
}
|
||||
|
||||
// TODO: Must record new stock in DB
|
||||
// TODO: si un des médicaments est en rouge, on déclanche une notification visuelle pour dans 5 secondes
|
||||
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
|
|
Loading…
Reference in a new issue