mv studentcouncil

This commit is contained in:
stubbfel
2013-10-01 13:51:15 +02:00
parent 5de000ef17
commit 80d05b9c45
5 changed files with 2 additions and 171 deletions

View File

@@ -198,8 +198,6 @@
<Compile Include="Model\MainModel.cs" />
<Compile Include="Model\Openinghours\OpeninghoursInstitutionWp8Model.cs" />
<Compile Include="Model\Openinghours\OpeninghoursWp8Model.cs" />
<Compile Include="Model\StudentCouncil\StudentCouncilListModel.cs" />
<Compile Include="Model\StudentCouncil\StudentCouncilModel.cs" />
<Compile Include="Model\XmlModel.cs" />
<Compile Include="Pages\Campusmap\CampusMapPage.xaml.cs">
<DependentUpon>CampusMapPage.xaml</DependentUpon>

View File

@@ -10,7 +10,7 @@ namespace CampusAppWP8.Feed.StudentCouncil
using System;
using System.IO;
using CampusAppWP8.Model;
using CampusAppWP8.Model.StudentCouncil;
using CampusAppWPortalLib8.Model.StudentCouncil;
using CampusAppWP8.Resources;
using CampusAppWP8.Utility;
using CampusAppWPortalLib8.Model;

View File

@@ -1,81 +0,0 @@
//-----------------------------------------------------------------------
// <copyright file="StudentCouncilListModel.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>02.07.2013</sience>
//----------------------------------------------------------------------
namespace CampusAppWP8.Model.StudentCouncil
{
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Xml.Serialization;
/// <summary>
/// Model for menus in one week
/// </summary>
[XmlRoot("root")]
public class StudentCouncilListModel
{
#region Members
/// <summary>
/// Time when the model was created
/// </summary>
private readonly DateTime createTime;
#endregion
#region Constructor
/// <summary>
/// Initializes a new instance of the <see cref="StudentCouncilListModel" /> class.
/// </summary>
public StudentCouncilListModel()
{
this.createTime = DateTime.Now;
}
#endregion
#region Proberty
/// <summary>
/// Gets or sets the StudentCouncils
/// </summary>
[XmlArray("data")]
[XmlArrayItem("studentcouncil")]
public ObservableCollection<StudentCouncilModel> StudentCouncils { get; set; }
/// <summary>
/// Gets the creation time of the model
/// </summary>
public DateTime CreateTime
{
get
{
return this.createTime;
}
}
#endregion
#region Method
/// <summary>
/// Method group the StudentCouncilList by Faculty
/// </summary>
/// <returns>a Dictionary, where the Key is name of the Faculty und the value is a List of StudentCouncil</returns>
public Dictionary<string, List<StudentCouncilModel>> GetStudentCouncilsGroupByFaculty()
{
List<IGrouping<string, StudentCouncilModel>> tmpList = this.StudentCouncils.GroupBy(p => p.Faculty).ToList();
Dictionary<string, List<StudentCouncilModel>> itemMap = new Dictionary<string, List<StudentCouncilModel>>();
foreach (IGrouping<string, StudentCouncilModel> group in tmpList)
{
Dictionary<string, List<StudentCouncilModel>> tempDic = new Dictionary<string, List<StudentCouncilModel>>();
itemMap.Add(group.Key, group.ToList());
}
return itemMap;
}
#endregion
}
}

View File

@@ -1,86 +0,0 @@
//-----------------------------------------------------------------------------
// <copyright file="StudentCouncilModel.cs" company="BTU/IIT">
// Company copyright tag.
// </copyright>
// <author>stubbfel</author>
// <sience>02.07.2013</sience>
//-----------------------------------------------------------------------------
namespace CampusAppWP8.Model.StudentCouncil
{
using System.Xml.Serialization;
using CampusAppWP8.Resources;
/// <summary>
/// Model for menu
/// </summary>
public class StudentCouncilModel
{
#region Member
/// <summary>
/// name of the faculty.
/// </summary>
private string faculty;
#endregion
#region Constructor
/// <summary>
/// Initializes a new instance of the <see cref="StudentCouncilModel" /> class.
/// </summary>
public StudentCouncilModel()
{
}
#endregion
#region Property
/// <summary>
/// Gets or sets the faculty of the StudentCouncil.
/// </summary>
[XmlAttribute("faculty")]
public string Faculty
{
get
{
return this.faculty;
}
set
{
if (value != this.faculty)
{
this.faculty = value;
int num;
if (int.TryParse(this.faculty, out num))
{
this.faculty = CampusAppWPortalLib8.Resources.AppResources.Faculty + " " + num;
}
}
}
}
/// <summary>
/// Gets or sets the name of the StudentCouncil.
/// </summary>
[XmlAttribute("name")]
public string Name { get; set; }
/// <summary>
/// Gets or sets the webpage-url of the StudentCouncil.
/// </summary>
[XmlAttribute("url")]
public string Url { get; set; }
/// <summary>
/// Gets or sets the email-address of the StudentCouncil.
/// </summary>
[XmlAttribute("email")]
public string Email { get; set; }
#endregion
}
}

View File

@@ -60,7 +60,7 @@ namespace CampusAppWP8.Pages.StudentCouncil
}
this.ProgressBar.Visibility = System.Windows.Visibility.Visible;
this.feed.LoadData(Utilities.GetLoadModus<Model.StudentCouncil.StudentCouncilListModel>());
this.feed.LoadData(Utilities.GetLoadModus<CampusAppWPortalLib8.Model.StudentCouncil.StudentCouncilListModel>());
}
/// <summary>