58 lines
1.5 KiB
C#
58 lines
1.5 KiB
C#
//-----------------------------------------------------------------------
|
|
// <copyright file="LectureList.cs" company="BTU/IIT">
|
|
// Company copyright tag.
|
|
// </copyright>
|
|
// <author>stubbfel</author>
|
|
// <sience>10.06.2013</sience>
|
|
//----------------------------------------------------------------------
|
|
namespace CampusAppWP8.Model.Lecture
|
|
{
|
|
using System.Collections.ObjectModel;
|
|
using System.Linq;
|
|
using System.Xml.Serialization;
|
|
|
|
/// <summary>
|
|
/// Model for a List of LectureActivity
|
|
/// </summary>
|
|
[XmlRoot("lsf_auszug")]
|
|
public class LectureList
|
|
{
|
|
#region Constructor
|
|
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="LectureList" /> class.
|
|
/// </summary>
|
|
public LectureList()
|
|
{
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Proberty
|
|
|
|
/// <summary>
|
|
/// Gets or sets List of the activities
|
|
/// </summary>
|
|
[XmlArray("veranstaltungsliste")]
|
|
[XmlArrayItem("veranstaltung")]
|
|
public ObservableCollection<LectureActivity> Activities { get; set; }
|
|
|
|
#endregion
|
|
|
|
#region Methods
|
|
|
|
/// <summary>
|
|
/// Method return a certain activity
|
|
/// </summary>
|
|
/// <param name="id"> id of the activity</param>
|
|
/// <returns> the activity (FirstOrDefault)</returns>
|
|
public LectureActivity GetActivity(int id)
|
|
{
|
|
LectureActivity activity = this.Activities.Where(p => p.Id == id).FirstOrDefault();
|
|
return activity;
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
}
|