public void RemoveGoal(Goal goal) { foreach(Goal tmpGoal in this.goals) { if(tmpGoal.ID > goals.ID) { tmpGoal.ID -= 1; } } this.goals.Remove(goal); }
public Int32 AddGoal() { Goal goal = new Goal(); Int32 index = this.goals.Count; Int32 ret; if(index == 0) { goal.ID = 1; } else { goal.ID = ((Goal)this.goals[index - 1]).ID + 1; } ret = this.goals.Add(goal); return ret; }