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())}); }
public void deleteWeeklyTask(WeeklyTD contact) { SQLiteDatabase db = this.getWritableDatabase(); db.delete(TABLE_NAME_WEEKLY_TASKS, ID + " = ?", new String[] {String.valueOf(contact.getID())}); db.close(); }