private void updateTran(Transaction trans) { db.beginTransaction(); try { ContentValues newValue = tranValues(trans); String[] args = {Integer.toString(trans.ID)}; db.update("trans", newValue, "_id=?", args); db.setTransactionSuccessful(); } finally { db.endTransaction(); } }
private void updateAccount(Account acct) { db.beginTransaction(); try { ContentValues newValue = acctValues(acct); String[] args = {Integer.toString(acct.ID)}; db.update("acct", newValue, "_id=?", args); db.setTransactionSuccessful(); } finally { db.endTransaction(); } }