diff --git a/CampusAppWP8/CampusAppWP8/Model/Person/PersonListWp8Model.cs b/CampusAppWP8/CampusAppWP8/Model/Person/PersonListWp8Model.cs
index 4a95dcb9..fe47181e 100644
--- a/CampusAppWP8/CampusAppWP8/Model/Person/PersonListWp8Model.cs
+++ b/CampusAppWP8/CampusAppWP8/Model/Person/PersonListWp8Model.cs
@@ -21,10 +21,21 @@ namespace CampusAppWP8.Model.Person
/// Stubbfel, 05.09.2013.
/// The identifier.
/// The person.
- public new PersonWp8Model GetPerson(string id)
+ /// Gets a person.
+ /// Stubbfel, 05.09.2013.
+ /// The identifier.
+ /// The person.
+ public override PersonWp8Model GetPerson(string id)
{
- IPersonModel tmpPerson = base.GetPerson(id);
- return tmpPerson as PersonWp8Model;
+ foreach (PersonWp8Model tmpPerson in this.Persons)
+ {
+ if (tmpPerson.ID.Equals(id))
+ {
+ return tmpPerson;
+ }
+ }
+
+ return null;
}
@@ -46,5 +57,15 @@ namespace CampusAppWP8.Model.Person
this.Persons.Remove(removePerson);
}
}
+
+ /// Sets person identifier to function.
+ /// Stubbfel, 05.09.2013.
+ public override void SetPersonIdToFunction()
+ {
+ foreach (PersonWp8Model person in this.Persons)
+ {
+ person.SetPersonIdToFunction();
+ }
+ }
}
}
diff --git a/CampusAppWP8/CampusAppWPortalLib8/Model/Person/PersonListModel.cs b/CampusAppWP8/CampusAppWPortalLib8/Model/Person/PersonListModel.cs
index ade93416..bed28637 100644
--- a/CampusAppWP8/CampusAppWPortalLib8/Model/Person/PersonListModel.cs
+++ b/CampusAppWP8/CampusAppWPortalLib8/Model/Person/PersonListModel.cs
@@ -31,40 +31,13 @@ namespace CampusAppWPortalLib8.Model.Person
/// Sets person identifier to function.
/// Stubbfel, 05.09.2013.
- public void SetPersonIdToFunction()
- {
- foreach (T item in this.Persons)
- {
- IPersonModel person = item as IPersonModel;
- if (person != null)
- {
- person.SetPersonIdToFunction();
- }
- }
- }
+ public abstract void SetPersonIdToFunction();
/// Gets a person.
/// Stubbfel, 05.09.2013.
/// The identifier.
/// The person.
- public IPersonModel GetPerson(string id)
- {
- foreach (T item in this.Persons)
- {
- IPersonModel tmpPerson = item as IPersonModel;
- if (tmpPerson == null)
- {
- continue;
- }
-
- if (tmpPerson.ID.Equals(id))
- {
- return tmpPerson;
- }
- }
-
- return default(IPersonModel);
- }
+ public abstract T GetPerson(string id);
/// Removes the non function and set identifiers person.
/// Stubbfel, 05.09.2013.