How to call TextView from ActivityDataSource

0

I have a query to see that the article code is not repeated but I can not find a way to call the TextView of the other class'introduce the code here. I tried to do the query in the Activity but I can not call dbRead (SQLiteDatabase)

public boolean ComprobarCodiArticulo(long id){
    boolean Existe = true;

    Cursor resultadoSelect = dbRead.rawQuery("SELECT " + ARTICLES_codiArticulo + " FROM " + table_ARTICLES + " WHERE " + ARTICLES_codiArticulo + "=" + LLAMAR A TEXTVIEW, null);

    if(resultadoSelect.getCount()<=0){
        Existe =false;
    }
    else{
        Existe =true;
    }
    return Existe ;
}
if(bd.ComprobarCodiArticulo(idTask) == true){
                Toast.makeText(this, "Este codigo ya existe", Toast.LENGTH_SHORT).show();
            }

'

    
asked by Lluís 18.01.2018 в 20:48
source

0 answers