public int updateTeam(Teams team) { SQLiteDatabase db = this.getWritableDatabase(); ContentValues values = new ContentValues(); values.put(KEY_T_NAME, team.gettname()); values.put(KEY_ABBV, team.getabbv()); values.put(KEY_C_NAME, team.getcname()); values.put(KEY_SPORT, team.getSport()); if (!_local) { _net.updateTeam(team); } return db.update( TABLE_TEAMS, values, KEY_T_ID + " = ?", new String[] {String.valueOf(team.gettid())}); }
public long createTeams(Teams team) { SQLiteDatabase db = this.getWritableDatabase(); Log.i("INTEG-EX", "starting create teams"); ContentValues values = new ContentValues(); // values.put(KEY_T_ID, team.gettid()); values.put(KEY_T_NAME, team.gettname()); values.put(KEY_ABBV, team.getabbv()); values.put(KEY_C_NAME, team.getcname()); values.put(KEY_SPORT, team.getSport()); // insert row long p_id = db.insert(TABLE_TEAMS, null, values); if (!_local) { _net.createTeams(team, p_id); } return p_id; }