public int update(Receta r) { ContentValues valores = new ContentValues(); valores.put(Contrato.TablaReceta.NOMBRE, r.getNombre()); valores.put(Contrato.TablaReceta.FOTO, r.getFoto()); valores.put(Contrato.TablaReceta.INTRUCCION, r.getInstruccion()); String condicion = Contrato.TablaReceta._ID + "= ?"; String[] argumentos = {r.getId() + ""}; int cuenta = bd.update(Contrato.TablaReceta.TABLA, valores, condicion, argumentos); return cuenta; }
public int delete(Receta r) { return delete(r.getId()); }