public void insertPayment(Payment payment) { ContentValues values = new ContentValues(); values.put("idRide1", payment.getIdRide1()); values.put("idRide2", payment.getIdRide2()); values.put("idRide3", payment.getIdRide3()); values.put("sentWs", payment.isSentWs()); db.insert("payment", null, values); }
public void updatePayment(Payment payment) { ContentValues values = new ContentValues(); values.put("idRide1", payment.getIdRide1()); values.put("idRide2", payment.getIdRide2()); values.put("idRide3", payment.getIdRide3()); values.put("sentWs", payment.isSentWs()); db.update( "payment", values, "_id = ?", new String[] {String.valueOf("" + payment.getIdPayment())}); }