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
| lst.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int i, long l) {
String employe = (String) parent.getAdapter().getItem(i);
int pos = lst.getCheckedItemPosition();
Intent inte = new Intent(view.getContext(),Reponse.class);
cursor = db.rawQuery("SELECT * FROM "+ ModelHelper.TABLE_EMPLOYE + " WHERE " + ModelHelper.KEY_EMPLOYE + " = ? ",new String[] {employe});
if (cursor != null)
if (cursor.getCount() > 0) {
cursor.moveToFirst();
String matri= cursor.getString(cursor.getColumnIndex(ModelHelper.KEY_MATRICULE));
String forma= cursor.getString(cursor.getColumnIndex(ModelHelper.KEY_FORMATION));
String dep = cursor.getString(cursor.getColumnIndex(ModelHelper.KEY_DEPARTEMENT));
int ID = cursor.getColumnIndex(ModelHelper.KEY_ID_EMPLOYE);
inte.putExtra("employe", employe);
inte.putExtra("matricule", matri);
inte.putExtra("forma", forma);
inte.putExtra("plan", plan);
inte.putExtra("departement", dep );
inte.putExtra("pos", pos);
inte.putExtra("position", i); |
Partager