Files
win8phoneApp/CampusAppWP8/CampusAppWPortalLib8/Model/Person/PersonFunctionModel.cs
2013-10-21 13:35:11 +02:00

203 lines
5.2 KiB
C#

//-----------------------------------------------------------------------
// <copyright file="PersonFunctionModel.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 person function model class</summary>
//-----------------------------------------------------------------------
namespace CampusAppWPortalLib8.Model.Person
{
using System.Xml.Serialization;
using CampusAppWPortalLib8.Utility;
/// <summary> Person function model. </summary>
/// <remarks> Stubbfel, 05.09.2013. </remarks>
/// <seealso cref="T:CampusAppWPortalLib8.Model.Person.IPersonFunctionModel"/>
public class PersonFunctionModel
{
#region Member
/// <summary> The first tel. </summary>
private string tel1;
/// <summary> The second tel. </summary>
private string tel2;
/// <summary> The fax. </summary>
private string fax;
/// <summary> The mail. </summary>
private string mail;
/// <summary> The function. </summary>
private string function;
/// <summary> The appointment. </summary>
private string appointment;
/// <summary> The building. </summary>
private string building;
#endregion
#region Property
/// <summary> Gets or sets the tel 1. </summary>
/// <value> The tel 1. </value>
[XmlAttribute("telefon")]
public string Tel1
{
get
{
return this.tel1;
}
set
{
if (value != null && value != string.Empty && value != this.tel1)
{
this.tel1 = DefaultStringManager.CreateUniTelefonNumber(value);
}
}
}
public string Tel
{
get
{
return this.Tel1;
}
set
{
this.Tel1 = value;
}
}
/// <summary> Gets or sets the tel 2. </summary>
/// <value> The tel 2. </value>
[XmlAttribute("telefon2")]
public string Tel2
{
get
{
return this.tel2;
}
set
{
if (value != null && value != string.Empty && value != this.tel2)
{
this.tel2 = DefaultStringManager.CreateUniTelefonNumber(value);
}
}
}
/// <summary> Gets or sets the fax. </summary>
/// <value> The fax. </value>
[XmlAttribute("fax")]
public string Fax
{
get
{
return this.fax;
}
set
{
if (value != null && value != string.Empty && value != this.fax)
{
this.fax = DefaultStringManager.CreateUniTelefonNumber(value);
}
}
}
/// <summary> Gets or sets the function. </summary>
/// <value> The function. </value>
[XmlAttribute("funktion")]
public string Function
{
get
{
return this.function;
}
set
{
if (value != this.function)
{
this.function = value;
}
}
}
/// <summary> Gets or sets the appointment. </summary>
/// <value> The appointment. </value>
[XmlAttribute("einrichtung")]
public string Appointment
{
get
{
return this.appointment;
}
set
{
if (value != this.appointment)
{
this.appointment = value;
}
}
}
/// <summary> Gets or sets the building. </summary>
/// <value> The building. </value>
[XmlAttribute("gebaeude")]
public string Building
{
get
{
return this.building;
}
set
{
if (value != this.building)
{
this.building = value;
}
}
}
/// <summary> Gets or sets the mail. </summary>
/// <value> The mail. </value>
[XmlAttribute("mail")]
public string Mail
{
get
{
return this.mail;
}
set
{
if (value != null && value != this.mail && DefaultStringManager.IsValidEmail(value))
{
this.mail = value;
}
}
}
/// <summary> Gets or sets the identifier of the person. </summary>
/// <seealso cref="P:CampusAppWPortalLib8.Model.Person.IPersonFunctionModel.PersonID"/>
public string PersonID { get; set; }
/// <summary> Gets or sets zero-based index of the function. </summary>
/// <seealso cref="P:CampusAppWPortalLib8.Model.Person.IPersonFunctionModel.FunctionIndex"/>
public int FunctionIndex { get; set; }
#endregion
}
}