public void save() { int id = -1; DBConnect proc = new DBConnect(); if (id < 0) { proc.addTeam(ename, edesc); //id = Convert.ToInt32(proc.getLastStuff("Team").Rows[0]["last_insert_rowid()"].ToString()); } else { proc.modifyTeam(id, ename, edesc); proc.deleteTeamProfile(id); } }
public void save() { DBConnect proc = new DBConnect(); if (this.id < 0) { proc.addTeam(nom, description); id = Convert.ToInt32(proc.getLastStuff("Team").Rows[0]["last_insert_rowid()"].ToString()); } else { proc.modifyTeam(id, nom, description); proc.deleteTeamProfile(id); } foreach (Ressource lui in profils) { proc.addTeamProfile(id, lui.getId(), -1); } }