public static SprintUser SprintGebruiker(User gebruiker, Sprint sprint, SprintRole sprintRol) { SprintUser sprintGebruiker = new SprintUser(gebruiker, sprint, sprintRol); Project project = Project(); project.AddSprint(sprint); return Persist(sprintGebruiker); }
public static SprintGebruiker SprintGebruiker(Gebruiker gebruiker, Sprint sprint, SprintRol sprintRol) { SprintGebruiker sprintGebruiker = new SprintGebruiker(gebruiker, sprint, sprintRol); Project project = Project(); project.VoegSprintToe(sprint); return Persist(sprintGebruiker); }
public override void SetUp() { project = new Project(); sprint = new Sprint(); base.SetUp(); }
/// <summary> /// Berekent de totaal geschatten tijd /// </summary> /// <returns></returns> public TimeSpan TotaalGeschatteTijd(Sprint sprint) { TimeSpan totaal = new TimeSpan(); foreach (SprintStory sprintStory in sprint.SprintStories) { totaal += sprintStory.Schatting; } return totaal; }
/// <summary> /// Maak een sprintgebruiker op basis van de gegeven gebruiker, sprint en sprintrol. /// </summary> /// <param name="gebruiker">De gebruiker.</param> /// <param name="sprint">De sprint.</param> public SprintGebruiker(Gebruiker gebruiker, Sprint sprint, SprintRol sprintRol) { if (gebruiker == null) throw new ArgumentNullException("gebruiker", "De gebruiker mag niet null zijn."); if (sprint == null) throw new ArgumentNullException("sprint", "De sprint mag niet null zijn."); gebruiker.VoegSprintGebruikerToe(this); sprint.VoegSprintGebruikerToe(this); this.sprintRol = sprintRol; }
/// <summary> /// Initializes a new instance of the <see cref="SprintUser"/> class for the given user, sprint and role. /// </summary> /// <param name="user">The user.</param> /// <param name="sprint">The sprint.</param> /// <param name="role">The role.</param> public SprintUser(User user, Sprint sprint, SprintRole role) { if (user == null) throw new ArgumentNullException("user", "The user can not be null."); if (sprint == null) throw new ArgumentNullException("sprint", "The sprint can not be null."); user.AddSprintUser(this); sprint.AddSprintUser(this); this.sprintRole = role; }
public override void SetUp() { project = new Project(); sprint = new Sprint(); project.VoegSprintToe(sprint); story = new Story(project, new Gebruiker(), null, StoryType.UserStory); task = new Task(); task2 = new Task(); base.SetUp(); }
/// <summary> /// Initializes a new instance of the <see cref="SprintStory"/> class. /// </summary> /// <param name="sprint">The sprint.</param> /// <param name="story">The story.</param> /// <param name="schatting">The schatting.</param> public SprintStory(Sprint sprint, Story story, TimeSpan schatting) { if (sprint == null) throw new ArgumentNullException("sprint", "De sprint mag niet null zijn."); if (story == null) throw new ArgumentNullException("story", "De story mag niet null zijn."); sprint.AddSprintStory(this); story.AddSprintStory(this); this.estimation = schatting; }
public override void SetUp() { project = new Project(); sprint = new Sprint(); project.AddSprint(sprint); story = new Story(project, new User(), null, StoryType.UserStory); story2 = new Story(project, new User(), null, StoryType.UserStory); sprintStory = new SprintStory(); task = new Task(story); task2 = new Task(story2); base.SetUp(); }
public override void SetUp() { project = new Project(); task = new Task(); gebruiker = new User(); sprint = new Sprint(); project.AddSprint(sprint); tijd = new TimeSpan(1, 30, 00); //1,5 uur story = new Story(project, gebruiker, null, StoryType.UserStory); story.AddTask(task); base.SetUp(); }
/// <summary> /// Initializes a new instance of the <see cref="TimeRegistration"/> class. /// </summary> /// <param name="user">The user.</param> /// <param name="date">The date.</param> /// <param name="sprint">The sprint.</param> /// <param name="task">The task.</param> /// <param name="time">The time.</param> public TimeRegistration(User user, DateTime date, Sprint sprint, Task task, TimeSpan time) { if (time.TotalMilliseconds == 0) throw new ArgumentOutOfRangeException("time", "A timeregistration should contain time."); if (user == null) throw new ArgumentNullException("user", "The user can not be null."); if (sprint== null) throw new ArgumentNullException("sprint", "The sprint can not be null."); if (task == null) throw new ArgumentNullException("task", "The task can not be null."); this.user = user; this.sprint = sprint; this.task = task; this.date = date; this.time = time; }
/// <summary> /// Initializes a new instance of the <see cref="TijdRegistratie"/> class. /// </summary> /// <param name="gebruiker">The gebruiker.</param> /// <param name="datum">The datum.</param> /// <param name="sprint">The sprint.</param> /// <param name="task">The task.</param> /// <param name="tijd">The tijd.</param> public TijdRegistratie(Gebruiker gebruiker, DateTime datum, Sprint sprint, Task task, TimeSpan tijd) { if (tijd.TotalMilliseconds == 0) throw new ArgumentOutOfRangeException("tijd", "Een tijdregistratie moet wel tijd bevatten."); if (gebruiker == null) throw new ArgumentNullException("gebruiker", "De gebruiker is null."); if (sprint== null) throw new ArgumentNullException("sprint", "De sprint is null."); if (task == null) throw new ArgumentNullException("task", "De task is null."); this.gebruiker = gebruiker; this.sprint = sprint; this.task = task; this.datum = datum; this.tijd = tijd; }
/// <summary> /// Voeg een sprint toe aan dit project. /// </summary> /// <param name="sprint">De sprint.</param> public virtual void VoegSprintToe(Sprint sprint) { if (!sprints.Contains(sprint)) sprints.Add(sprint); sprint.Project = this; }
/// <summary> /// voorheen AantaldagenTotNu /// </summary> /// <param name="sprint"></param> /// <returns></returns> public int AantalWerkdagenTotNu(Sprint sprint) { return CalculateWerkdagen(sprint, DateTime.Today); }
/// <summary> /// Voorheen TotaalSprintTijd /// </summary> /// <param name="sprint"></param> /// <returns></returns> public int AantalWerkdagenSprint(Sprint sprint) { return CalculateWerkdagen(sprint, null); }
private double TotaalGewerkteUrenVanNietAfgerondeStoriesVoorDatum(DateTime dateTime, Sprint sprint) { //We gaan hier de gewerkte uren terug geven van de opgegeven datum //Dit doen we zolang de storie nog niet is afgesloten of tot aan de datum dat hij afgesloten is. //Zijn er meer uren gewerkt dan geschat dan geven we de schatting terug. Het teveel aan gewerkte uren wordt verwerkt in een andere functie. double totaalGewerkteTijd = 0; foreach (SprintStory sprintStory in sprint.SprintStories) { if (sprintStory.Status == Status.Afgesloten && dateTime.Date < sprintStory.Story.DatumAfgesloten.Value.Date) { //Als er meer werk is gedaan dan dat er is geschat, sturen we de schatting mee. het teveel aan uren zal in rood worden weergegeven. if (sprintStory.Story.TotaalBestedeTijd(sprint.StartDatum, dateTime) < sprintStory.Schatting) { totaalGewerkteTijd += TimeSpanHelper.TimeSpanInMinuten(sprintStory.Story.TotaalBestedeTijd(sprint.StartDatum, dateTime)); } else { //er is meer tijd gewerkt dan geschat dus we gaan de schatting terug geven. totaalGewerkteTijd += TimeSpanHelper.TimeSpanInMinuten(sprintStory.Schatting); } } else if (sprintStory.Status != Status.Afgesloten) { //Hier gaan we als de story nog niet is afgesloten. if (sprintStory.Story.TotaalBestedeTijd(sprint.StartDatum, dateTime) < sprintStory.Schatting) { totaalGewerkteTijd += TimeSpanHelper.TimeSpanInMinuten(sprintStory.Story.TotaalBestedeTijd(sprint.StartDatum, dateTime)); } else { //er is meer tijd gewerkt dan geschat dus we gaan de schatting terug geven. totaalGewerkteTijd += TimeSpanHelper.TimeSpanInMinuten(sprintStory.Schatting); } } } return totaalGewerkteTijd; }
private double TeveelGewerkteUrenAanStoriesVoorDatum(DateTime dateTime, Sprint sprint) { double totaalTeVeelGewerkteTijd = 0; foreach (SprintStory sprintStory in sprint.SprintStories) { /* if (sprintStory.Status == Status.Afgesloten && dateTime.Date < sprintStory.Story.DatumAfgesloten.Value.Date) { //Als er meer werk is gedaan dan dat er is geschat, sturen we de schatting mee. het teveel aan uren zal in rood worden weergegeven. if (sprintStory.Story.TotaalBestedeTijd(sprint.StartDatum, dateTime) > sprintStory.Schatting) { totaalTeVeelGewerkteTijd += TimeSpanHelper.TimeSpanInMinuten(sprintStory.Story.TotaalBestedeTijd(sprint.StartDatum, dateTime) - sprintStory.Schatting); } } else if (sprintStory.Status != Status.Afgesloten) {*/ //Hier gaan we als de story nog niet is afgesloten. if (sprintStory.Story.TotaalBestedeTijd(sprint.StartDatum, dateTime) > sprintStory.Schatting) { totaalTeVeelGewerkteTijd += TimeSpanHelper.TimeSpanInMinuten(sprintStory.Story.TotaalBestedeTijd(sprint.StartDatum, dateTime) - sprintStory.Schatting); } //} } return totaalTeVeelGewerkteTijd; }
private double GewonnenUrenAanStoriesVoorDatum(DateTime dateTime, Sprint sprint) { double gewonnenUren = 0; foreach (SprintStory sprintStory in sprint.SprintStories) { if (sprintStory.Status == Status.Afgesloten && dateTime.Date >= sprintStory.Story.DatumAfgesloten.Value.Date && sprintStory.Story.TotaalBestedeTijd(sprint.StartDatum, dateTime) < sprintStory.Schatting) { //Als het werk sneller is afgerond voor afgesloten stories betekend dit dat we extra ruimte hebben verkregen om te ontwikkellen. gewonnenUren += TimeSpanHelper.TimeSpanInMinuten(sprintStory.Schatting - sprintStory.Story.TotaalBestedeTijd(sprint.StartDatum, dateTime)); } } return gewonnenUren; }
private static Sprint Persist(Sprint sprint) { return sprintRepository.Save(sprint); }
private int CalculateWerkdagen(Sprint sprint, DateTime? date) { if (date == null) { date = sprint.EindDatum.Date; } int dayCount = 0; DateTime temp = sprint.StartDatum; while (temp <= date) { if (temp.DayOfWeek != DayOfWeek.Saturday && temp.DayOfWeek != DayOfWeek.Sunday) { dayCount += 1; } temp = temp.AddDays(1); } return dayCount; }
public void TestVoegTijdRegistratiesVanVerschillendeSprintsToe() { Sprint sprint2 = new Sprint(); project.AddSprint(sprint2); task.RegisterTime(gebruiker, DateTime.Now, sprint, tijd); task.RegisterTime(gebruiker, DateTime.Now, sprint2, tijd); Assert.IsTrue(task.TimeRegistrations[0].Sprint != task.TimeRegistrations[1].Sprint); }
/// <summary> /// Verwijder deze gebruiker uit een sprint, door de sprintgebruiker los te koppelen van deze gebruiker en de gegeven sprint. /// </summary> /// <param name="sprint"></param> public virtual void VerwijderUitSprint(Sprint sprint) { if (sprint == null) throw new ArgumentNullException("sprint"); SprintGebruiker sprintGebruiker = sprint.GeefSprintGebruikerVoor(this); if (sprintGebruiker == null) return; sprintGebruiker.KoppelSprintGebruikerLos(); }
/// <summary> /// Gets all timeregistrations of the given user for the given sprint and date. /// </summary> /// <param name="user">The user.</param> /// <param name="sprint">The sprint.</param> /// <param name="date">The date.</param> /// <returns></returns> public virtual IList<TimeRegistration> GetTimeRegistrationsFor(User user, Sprint sprint, DateTime date) { IList<TimeRegistration> userTimeRegistrations = new List<TimeRegistration>(); foreach (TimeRegistration timeRegistration in timeRegistrations) { if (timeRegistration.User == user && timeRegistration.Sprint == sprint && timeRegistration.Date.ToShortDateString() == date.ToShortDateString()) { userTimeRegistrations.Add(timeRegistration); } } return userTimeRegistrations; }
/// <summary> /// Geef alle registraties terug van een gebruiker voor een bepaalde datum /// </summary> /// <param name="gebruiker">gebruiker</param> /// <param name="sprint">sprint</param> /// <param name="date">datum</param> /// <returns></returns> public virtual IList<TijdRegistratie> GeeftTijdregistratievanGebruiker(Gebruiker gebruiker, Sprint sprint, DateTime date) { IList<TijdRegistratie> userTijdRegistraties = new List<TijdRegistratie>(); foreach (TijdRegistratie registratie in tijdRegistraties) { if (registratie.Gebruiker == gebruiker && registratie.Sprint == sprint && registratie.Datum.ToShortDateString() == date.ToShortDateString()) { userTijdRegistraties.Add(registratie); } } return userTijdRegistraties; }
/// <summary> /// Hier worde de datapoint voor de burndown berekent /// </summary> /// <param name="sprint"></param> /// <returns></returns> public IDictionary<DateTime, double> Werk(Sprint sprint) { TotaalBestedenTijdOpSprintQuery query = new TotaalBestedenTijdOpSprintQuery(); query.sprint = sprint; ICriteria crit = query.GetQuery(ActiveRecordMediator.GetSessionFactoryHolder().CreateSession(typeof(ModelBase))); crit.AddOrder(Order.Asc("Datum")); IList result = crit.List(); IDictionary<DateTime, double> dataPoints = new SortedDictionary<DateTime, double>(); double totaal = TotaalGeschatteTijd(sprint).TotalHours; foreach (TijdRegistratie registratie in result) { if (!dataPoints.ContainsKey(registratie.Datum.Date)) { dataPoints.Add(registratie.Datum.Date, totaal); } totaal -= registratie.Tijd.TotalHours; dataPoints[registratie.Datum.Date] = totaal; } DateTime temp = sprint.StartDatum; while (temp <= sprint.EindDatum) { if (temp.Date <= DateTime.Today) { if (temp <= sprint.StartDatum && !dataPoints.ContainsKey(temp.Date)) { //Als er de eerste dag niet gewerkt is en hij probeer de dag er voor te pakken heb je een infinte loop.. dataPoints.Add(temp.Date, TotaalGeschatteTijd(sprint).TotalHours); } if (temp.DayOfWeek != DayOfWeek.Saturday && temp.DayOfWeek != DayOfWeek.Sunday) { if (!dataPoints.ContainsKey(temp.Date)) { dataPoints.Add(temp.Date, laatsteWaarde(temp, dataPoints)); } } } temp = temp.AddDays(1); } return dataPoints; }
/// private string GenereerJavascript(Sprint sprint) { DateTime startdatum = sprint.StartDatum; DateTime einddatum = sprint.EindDatum; DateTime temp = startdatum; IList<DateTime> werkdagen = new List<DateTime>(); while (temp <= einddatum) { if (temp.DayOfWeek != DayOfWeek.Saturday && temp.DayOfWeek != DayOfWeek.Sunday) { werkdagen.Add(temp); } temp = temp.AddDays(1); } //Zaken voor de balkjes AlleTijdregistratiesTussenDatumsPerSprint alleTijdregistratiesTussenDatumsPerSprint = new AlleTijdregistratiesTussenDatumsPerSprint(); alleTijdregistratiesTussenDatumsPerSprint.startDate = startdatum; alleTijdregistratiesTussenDatumsPerSprint.endDate = einddatum; alleTijdregistratiesTussenDatumsPerSprint.sprint = sprint; ICriteria crit = alleTijdregistratiesTussenDatumsPerSprint.GetQuery(ActiveRecordMediator.GetSessionFactoryHolder().CreateSession(typeof(ModelBase))); IList<TijdRegistratie> tijdregistraties = crit.List<TijdRegistratie>(); IDictionary<DateTime, TimeSpan> totaleTijdPerDag = new Dictionary<DateTime, TimeSpan>(); foreach (TijdRegistratie registratie in tijdregistraties) { if (!totaleTijdPerDag.ContainsKey(registratie.Datum.Date)) { totaleTijdPerDag.Add(registratie.Datum.Date, TimeSpan.Zero); } totaleTijdPerDag[registratie.Datum.Date] += registratie.Tijd; } TimeSpan totaalbestedeTijd = new TimeSpan(); //Zaken voor de ideale lijn double totaalTijd = sprint.GeefTijdTotaalAlleStories().TotalHours; double urenPerDag = totaalTijd / (werkdagen.Count - 1); double aantalNogTeBestedenUren = totaalTijd; StringBuilder stringbuilder = new StringBuilder(); StringBuilder arrayString = new StringBuilder(); StringBuilder arrayTicks = new StringBuilder(); StringBuilder arrayDone = new StringBuilder(); StringBuilder tabelMetGegevens = new StringBuilder(); int i = 0; if (totaalTijd > 0) { int chartWidth = ((werkdagen.Count - 1)*40); double chartHeight = Math.Round((totaalTijd*2) + 150, 0); if (chartWidth < 500) chartWidth = 500; if (chartHeight < 300) chartHeight = 300; stringbuilder.AppendLine("swfobject.embedSWF('/Content/open-flash-chart.swf', 'burndown_chart', '" + chartWidth + "', '" + (chartHeight) + "', '9.0.0');"); stringbuilder.AppendLine("function open_flash_chart_data()"); stringbuilder.AppendLine("{"); stringbuilder.AppendLine("return JSON.stringify(data_1);"); stringbuilder.AppendLine("}"); stringbuilder.Append("var data_1 = {'tooltip': { 'mouse': 2}, 'elements': [{'type': 'line','values':"); arrayString.Append("["); double vandaagBestedeUren = 0; double teveelBestedeUrenVandaag = 0; double afhalenVanNietAfgeslotenUren = 0; double gewonnenTijd = 0; double resterendeUren = 0; double reductieTijdTeVeel = 0; tabelMetGegevens.Append("<table class=\"tablesorter\">"); tabelMetGegevens.Append("<thead>"); tabelMetGegevens.Append("<tr><th>Datum</th><th>Resterende uren</th><th>nietAfgerond</th><th>Afhalen</th><th>Teveel</th><th>gewonnen</th><th>gewerkte uren</th></tr>"); tabelMetGegevens.Append("</thead>"); tabelMetGegevens.Append("<tbody>"); foreach (DateTime werkdag in werkdagen) { //IDEALE LIJN arrayTicks.Append("'" + werkdag.DayOfWeek + " " + werkdag.ToShortDateString() + "'"); arrayString.Append("" + Math.Round(totaalTijd, 0) + ""); totaalTijd = totaalTijd - urenPerDag; //Hier gaan we de bars opbouwen. vandaagBestedeUren = TotaalGewerkteUrenVanNietAfgerondeStoriesVoorDatum(werkdag.Date, sprint);//Groen //Rodebalk gewonnenTijd = GewonnenUrenAanStoriesVoorDatum(werkdag.Date, sprint); teveelBestedeUrenVandaag = TeveelGewerkteUrenAanStoriesVoorDatum(werkdag.Date, sprint);//Rood if(gewonnenTijd > teveelBestedeUrenVandaag) { reductieTijdTeVeel = 0;//We zetten teveel besteed op 0 omdat er meer is gewonnen dan teveel is gewerkt. afhalenVanNietAfgeslotenUren = vandaagBestedeUren;// + reductieTijd; } else if(gewonnenTijd < teveelBestedeUrenVandaag) { reductieTijdTeVeel = teveelBestedeUrenVandaag - gewonnenTijd; afhalenVanNietAfgeslotenUren = vandaagBestedeUren + reductieTijdTeVeel; } else { afhalenVanNietAfgeslotenUren = vandaagBestedeUren ; } //Nu gaan we de blauwe balk opbouwen resterendeUren = Math.Round(sprint.GeefNietAfgeslotenStoriesTotaalSchattingTotEnMetDatum(werkdag).TotalHours - afhalenVanNietAfgeslotenUren); //Blauw tabelMetGegevens.Append("<tr><td>" + werkdag.DayOfWeek + " " + werkdag.ToShortDateString() + "</td><td>" + resterendeUren + "</td><td>" + sprint.GeefNietAfgeslotenStoriesTotaalSchattingTotEnMetDatum(werkdag).TotalHours + "</td><td>" + afhalenVanNietAfgeslotenUren + "</td><td>" + teveelBestedeUrenVandaag + "</td><td>" + gewonnenTijd + "</td><td>" + vandaagBestedeUren + "</td></tr>"); arrayDone.Append("[" + resterendeUren + "," + Math.Round(reductieTijdTeVeel) + "," + Math.Round(vandaagBestedeUren) + "]"); //Rest if (werkdag != werkdagen[werkdagen.Count - 1]) { arrayString.Append(","); arrayTicks.Append(","); arrayDone.Append(","); } } tabelMetGegevens.Append("</tbody>"); tabelMetGegevens.Append("</table>"); arrayString.Append("]}"); stringbuilder.Append(arrayString); stringbuilder.Append(",{'type': 'bar_stack', 'colours': [ '#6699ff', '#ff3333' , '#66cc33' ], 'values': [" + arrayDone + "]"); stringbuilder.Append(", 'keys': [ { 'colour': '#6699ff', 'text': 'Nog uit te voeren uren werk', 'font-size': 14 }, { 'colour': '#ff3333', 'text': 'Niet ingeschat werk (overshoot)', 'font-size': 14 }, { 'colour': '#66cc33', 'text': 'Gewerkte uren', 'font-size': 14 } ]"); stringbuilder.Append("}"); stringbuilder.Append("], 'x_axis': { 'labels': { 'rotate': 300, 'labels': [" + arrayTicks + "]} }, 'y_axis': {'min': 0,'max': " + Math.Round((sprint.GeefTijdTotaalAlleStories().TotalHours), 0) + ", 'steps' : 10, 'offset': 300}, 'bg_colour': '#FFFFFF', 'title': { 'text': 'Burndown chart', 'style': 'font-size: 20px;' }"); stringbuilder.Append("};"); } else { stringbuilder.AppendLine("$('#burndown_chart').html('Er is geen schatting ingevuld bij de stories, er kan dus geen burndown gemaakt worden.');"); } //Deze kan je aanzetten om meer inzicht te krijgen in wat er in de burndown gebeurd //stringbuilder.AppendLine("$('#burndown_uitleg').html('" + tabelMetGegevens + "');"); return stringbuilder.ToString(); }
/// <summary> /// /// </summary> /// <param name="dateTime"></param> /// <param name="sprint"></param> /// <returns></returns> private double BerekenReedsBestedeUren(DateTime dateTime, Sprint sprint) { double totaalUren = 0; foreach (SprintStory sprintStory in sprint.SprintStories) { } return totaalUren; }
/// <summary> /// Maak een tijdregistratie. /// </summary> /// <param name="gebruiker">De gebruiker.</param> /// <param name="datum">De datum.</param> /// <param name="sprint">De sprint.</param> /// <param name="tijd">De tijd.</param> public virtual void MaakTijdRegistratie(Gebruiker gebruiker, DateTime datum, Sprint sprint, TimeSpan tijd) { if (!story.Project.Sprints.Contains(sprint)) { throw new ArgumentException("De gegeven sprint hoort niet bij dit project.", "sprint"); } foreach (TijdRegistratie registratie in GeeftTijdregistratievanGebruiker(gebruiker, sprint, datum)) { VerwijderTijdRegistratie(registratie); } //als de tijdregistratie 0 seconden is, dan hoeven we geen nieuwe tijdregistratie toe te voegen if (tijd.TotalSeconds == 0) return; TijdRegistratie tijdRegistratie = new TijdRegistratie(gebruiker, datum, sprint, this, tijd); VoegTijdRegistratieToe(tijdRegistratie); }
/// <summary> /// Register time spent on this task. /// </summary> /// <param name="user">The user.</param> /// <param name="date">The date.</param> /// <param name="sprint">De sprint.</param> /// <param name="time">The time.</param> public virtual void RegisterTime(User user, DateTime date, Sprint sprint, TimeSpan time) { if (!story.Project.Sprints.Contains(sprint)) { throw new ArgumentException("The given sprint does not belong to this project.", "sprint"); } foreach (TimeRegistration registratie in GetTimeRegistrationsFor(user, sprint, date)) { RemoveTimeRegistration(registratie); } //only add timeregistrations that actually contain time if (time.TotalSeconds == 0) return; TimeRegistration timeRegistration = new TimeRegistration(user, date, sprint, this, time); AddTimeRegistration(timeRegistration); }
///// <summary> ///// Voeg een sprint toe. ///// </summary> ///// <value>toe te voegen sprint.</value> //public virtual void VoegSprintToe(Sprint sprint) //{ // //TODO dit fixen met de nieuwe assocatie // //if (sprints.Contains(sprint) == false) // //{ // // sprints.Add(sprint); // //} // //if (sprint.Gebruikers.Contains(this) == false) // //{ // // sprint.Gebruikers.Add(this); // //} //} ///// <summary> ///// Verwijder een sprint. ///// </summary> ///// <value>Te verwijderen sprint.</value> //public virtual void VerwijderSprint(Sprint sprint) //{ // //TODO dit fixen met de nieuwe assocatie // //sprints.Remove(sprint); // //sprint.Gebruikers.Remove(this); //} /// <summary> /// Geeft de sprintgebruiker van deze gebruiker in de gegeven sprint. /// </summary> /// <param name="sprint">De sprint.</param> /// <returns>De sprintgebruiker</returns> public SprintGebruiker GeefSprintGebruikerVoor(Sprint sprint) { foreach (SprintGebruiker sprintGebruiker in sprintGebruikers) { if (sprintGebruiker.Sprint == sprint) return sprintGebruiker; } return null; }