DepartmentModel.cs CampusAppWP8::Model::Departments::DepartmentModel CampusAppWP8::Model::Departments System::Collections::ObjectModel //----------------------------------------------------------------------- //<copyrightfile="DepartmentModel.cs"company="BTU/IIT"> //Companycopyrighttag. //</copyright> //<author>fiedlchr</author> //<sience>24.06.2013</sience> //---------------------------------------------------------------------- namespaceCampusAppWP8.Model.Departments { usingSystem; usingSystem.Collections.ObjectModel; usingSystem.Xml.Serialization; [XmlRoot("root")] publicclassDepartmentModel { privateDateTimecreateTime; privateObservableCollection<FacultyModel>faculties; publicDepartmentModel() { this.Faculties=newObservableCollection<FacultyModel>(); this.createTime=DateTime.Now; } [XmlArray("professorships")] [XmlArrayItem("faculty")] publicObservableCollection<FacultyModel>Faculties { get { returnthis.faculties; } set { if(value!=this.faculties) { this.faculties=value; } } } publicDateTimeCreateTime { get { returnthis.createTime; } } publicboolHasChanged() { boolretValue=false; foreach(FacultyModeltempinthis.Faculties) { if((temp.HasChanged()==true)&&(retValue==false)) { retValue=true; } } returnretValue; } } }