1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
|
public ArrayList<String> getRecupModif() {
ArrayList<String> output = new ArrayList<String>();
String[] colonnesBRecup = new String[] { "nom", "date_jour", "num_stock", "num_chassis",
"type", "serie", "couleur", "pneus", "portes", "km_compteur", "radio",
"cles", "version", "cde_client" ,"reserve_gare", "nota"};
Cursor cursorResults = db.query(TABLE_TRAVAIL, colonnesBRecup,
"nom ='"+val1+"'"+" and "+"num_chassis ='"+val2+"'", null, null, null, null,null);
if (null != cursorResults) {
if (cursorResults.moveToFirst()) {
do {
int columnIdxNom = cursorResults.getColumnIndex("nom");
int columnIdxDate_jour = cursorResults.getColumnIndex("date_jour");
int columnIdxNumstock = cursorResults.getColumnIndex("num_stock");
int columnIdxNumchassis = cursorResults.getColumnIndex("num_chassis");
int columnIdxType = cursorResults.getColumnIndex("type");
int columnIdxSerie = cursorResults.getColumnIndex("serie");
int columnIdxCouleur = cursorResults.getColumnIndex("couleur");
int columnIdxPneus = cursorResults.getColumnIndex("pneus");
int columnIdxPortes = cursorResults.getColumnIndex("portes");
int columnIdxKm_compteur = cursorResults.getColumnIndex("km_compteur");
int columnIdxRadio = cursorResults.getColumnIndex("radio");
int columnIdxCles = cursorResults.getColumnIndex("cles");
int columnIdxVersion = cursorResults.getColumnIndex("version");
int columnIdxCde_client = cursorResults.getColumnIndex("cde_client");
int columnIdxReserve_gare = cursorResults.getColumnIndex("reserve_gare");
int columnIdxNota = cursorResults.getColumnIndex("nota");
String nom = cursorResults.getString(columnIdxNom);
String date_jour = cursorResults.getString(columnIdxDate_jour);
String numstock = cursorResults.getString(columnIdxNumstock);
String numchassis = cursorResults.getString(columnIdxNumchassis);
String type = cursorResults.getString(columnIdxType);
String serie = cursorResults.getString(columnIdxSerie);
String couleur = cursorResults.getString(columnIdxCouleur);
String pneus = cursorResults.getString(columnIdxPneus);
String portes = cursorResults.getString(columnIdxPortes);
String km_compteur = cursorResults.getString(columnIdxKm_compteur);
String radio = cursorResults.getString(columnIdxRadio);
String cles = cursorResults.getString(columnIdxCles);
String version = cursorResults.getString(columnIdxVersion);
String cde_client = cursorResults.getString(columnIdxCde_client);
String reserve_gare = cursorResults.getString(columnIdxReserve_gare);
String nota = cursorResults.getString(columnIdxNota);
output.add(nom);
output.add(date_jour);
output.add(numstock);
output.add(numchassis);
output.add(type);
output.add(serie);
output.add(couleur);
output.add(pneus);
output.add(portes);
output.add(km_compteur);
output.add(radio);
output.add(cles);
output.add(version);
output.add(cde_client);
output.add(reserve_gare);
output.add(nota);
} while (cursorResults.moveToNext());
}
}
return output;
} |
Partager