Exemplo n.º 1
0
  public int updateWeeklytask(WeeklyTD weeklyTD) {
    SQLiteDatabase db = this.getWritableDatabase();

    ContentValues values = new ContentValues();
    values.put(NAME, weeklyTD.getName());
    values.put(TIME, weeklyTD.getTime());

    return db.update(
        TABLE_NAME_WEEKLY_TASKS,
        values,
        ID + " = ?",
        new String[] {String.valueOf(weeklyTD.getID())});
  }
Exemplo n.º 2
0
 public void deleteWeeklyTask(WeeklyTD contact) {
   SQLiteDatabase db = this.getWritableDatabase();
   db.delete(TABLE_NAME_WEEKLY_TASKS, ID + " = ?", new String[] {String.valueOf(contact.getID())});
   db.close();
 }