87 lines
2.2 KiB
C#
87 lines
2.2 KiB
C#
//-----------------------------------------------------------------------
|
|
// <copyright file="MenuModel.cs" company="BTU/IIT">
|
|
// The MIT License (MIT). Copyright (c) 2013 BTU/IIT.
|
|
// </copyright>
|
|
// <author>Stubbfel</author>
|
|
// <date>15.10.2013</date>
|
|
// <summary>Implements the menu model class</summary>
|
|
//-----------------------------------------------------------------------
|
|
namespace CampusAppWPortalLib8.Model.Mensa
|
|
{
|
|
using System;
|
|
using System.Collections.ObjectModel;
|
|
using System.Xml.Serialization;
|
|
|
|
/// <summary> Model for menu. </summary>
|
|
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
|
public class MenuModel
|
|
{
|
|
#region Member
|
|
|
|
/// <summary> Name of the day. </summary>
|
|
private string dayName;
|
|
|
|
/// <summary> DateTime of the day. </summary>
|
|
private string date;
|
|
|
|
#endregion
|
|
|
|
#region Constructor
|
|
|
|
/// <summary> Initializes a new instance of the <see cref="MenuModel" /> class. </summary>
|
|
/// <remarks> Stubbfel, 15.10.2013. </remarks>
|
|
public MenuModel()
|
|
{
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Property
|
|
|
|
/// <summary> Gets or sets the menus for the week. </summary>
|
|
/// <value> The meals. </value>
|
|
[XmlElement("Meal")]
|
|
public ObservableCollection<MealModel> Meals { get; set; }
|
|
|
|
/// <summary> Gets or sets the WeekDay. </summary>
|
|
/// <value> The day. </value>
|
|
[XmlAttribute("day")]
|
|
public string Day
|
|
{
|
|
get
|
|
{
|
|
return this.dayName;
|
|
}
|
|
|
|
set
|
|
{
|
|
if (value != this.dayName)
|
|
{
|
|
this.dayName = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary> Gets or sets of Date. </summary>
|
|
/// <value> The date. </value>
|
|
[XmlAttribute("date")]
|
|
public string Date
|
|
{
|
|
get
|
|
{
|
|
return this.date.ToString();
|
|
}
|
|
|
|
set
|
|
{
|
|
if (value != this.date)
|
|
{
|
|
this.date = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
}
|