Fix therehold not save bug

This commit is contained in:
jacques 2021-05-16 19:54:50 +02:00
parent 4b4d15c9fc
commit 8a205163b4
2 changed files with 3 additions and 6 deletions

View file

@ -316,6 +316,8 @@ class DBHelper extends SQLiteOpenHelper {
values.put(KEY_PRES, drug.getPresentation());
values.put(KEY_STOCK, drug.getStock());
values.put(KEY_TAKE, drug.getTake());
values.put(KEY_THRESHOLD_WARN, drug.getWarnThreshold());
values.put(KEY_THRESHOLD_ALERT, drug.getAlertThreshold());
values.put(KEY_LAST_UPDATE, drug.getDateLastUpdate());
String[] selectionArgs = { String.valueOf(drug.getId()) };

View file

@ -238,12 +238,7 @@ public class DrugListActivity extends AppCompatActivity {
if (requestCode == CUSTOMIZED_REQUEST_CODE) {
Toast.makeText(this, "REQUEST_CODE = " + requestCode + "RESULT_CODE = " + resultCode, Toast.LENGTH_LONG).show();
Log.d(TAG, "REQUEST_CODE = " + requestCode + " RESULT_CODE = " + resultCode);
if (resultCode == 1) {
constructDrugsList();
} else {
Toast.makeText(this, "What are you doing here?", Toast.LENGTH_SHORT).show();
Log.d(TAG, "What are you doing here?");
}
constructDrugsList();
} else {
IntentResult result = IntentIntegrator.parseActivityResult(resultCode, data);