85 lines
2.2 KiB
C#
85 lines
2.2 KiB
C#
//-----------------------------------------------------------------------
|
|
// <copyright file="LectureLecturer.cs" company="BTU/IIT">
|
|
// Company copyright tag.
|
|
// </copyright>
|
|
// <author>stubbfel</author>
|
|
// <sience>10.06.2013</sience>
|
|
//----------------------------------------------------------------------
|
|
namespace CampusAppWPortalLib8.Model.Lecture
|
|
{
|
|
using System.Xml.Serialization;
|
|
|
|
/// <summary>
|
|
/// Model for a lecturer
|
|
/// </summary>
|
|
public class LectureLecturer
|
|
{
|
|
#region Constructor
|
|
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="LectureLecturer" /> class.
|
|
/// </summary>
|
|
public LectureLecturer()
|
|
{
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Property
|
|
|
|
/// <summary>
|
|
/// Gets or sets the FirstName of a lecturer
|
|
/// </summary>
|
|
[XmlElement("vorname")]
|
|
public string FirstName { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the LastName of a lecturer
|
|
/// </summary>
|
|
[XmlElement("name")]
|
|
public string LastName { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the title of a lecturer
|
|
/// </summary>
|
|
[XmlElement("titel")]
|
|
public string Title { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the Responsibility of a lecturer
|
|
/// </summary>
|
|
[XmlAttribute("zustaendigkeit")]
|
|
public string Responsibility { get; set; }
|
|
|
|
#endregion
|
|
|
|
#region Method
|
|
|
|
/// <summary>
|
|
/// Method overrides the base ToString() and create an formatted string of the lecturer
|
|
/// </summary>
|
|
/// <returns>returns a string like: [Title] FirstName LastName [(Responsibility)]</returns>
|
|
public override string ToString()
|
|
{
|
|
string result = string.Empty;
|
|
|
|
if (!this.Title.Equals(string.Empty))
|
|
{
|
|
result += this.Title + " ";
|
|
}
|
|
|
|
result += this.FirstName + " ";
|
|
result += this.LastName + " ";
|
|
|
|
if (!this.Responsibility.Equals(string.Empty))
|
|
{
|
|
result += "(" + this.Responsibility + ") ";
|
|
}
|
|
|
|
return result;
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
}
|