|
#region Using directives
using System;
using System.Collections.Generic;
using System.Text;
using SmartInstitute;
#endregion
namespace SmartInstitute.ObjectModel
{
[Serializable]
public class StudentModel : ItemBase
{
public StudentModel( Student profile, object parent ) : base( parent )
{
this.Profile = profile;
profile.AfterChanged += new StudentEventHandler(profile_AfterChanged);
}
void profile_AfterChanged(object sender, StudentEventArgs e)
{
base.IsDirty = true;
base.NotifyChange("Dirty");
}
private string _FullName;
public string FullName
{
get { return _FullName; }
}
private string _StudentID;
public string StudentID
{
get { return _StudentID; }
set { _StudentID = value; }
}
private Student _Profile;
public Student Profile
{
get { return _Profile; }
set {
_Profile = value;
this._StudentID = _Profile.StudentID;
this._FullName = string.Format("{0}, {1} {2}", this.Profile.LastName,
this.Profile.FirstName, this.Profile.MiddleName);
}
}
private bool _IsTerminated;
public bool IsTerminated
{
get { return _IsTerminated; }
set { _IsTerminated = value; }
}
private bool _IsInProbation;
public bool IsInProbation
{
get { return _IsInProbation; }
set { _IsInProbation = value; }
}
private bool _IsFreshman;
public bool IsFreshman
{
get { return _IsFreshman; }
set { _IsFreshman = value; }
}
//private Account[] _Accounts;
//public Account[] Accounts
//{
// get { return _Accounts; }
// set { _Accounts = value; }
//}
//private byte[] _PictureData;
//public byte[] PictureData
//{
// get { return _PictureData; }
// set { _PictureData = value; }
//}
public override string ToString()
{
return string.Format("{0} - {1}, {2} {3}", this.Profile.StudentID, this.Profile.LastName,
this.Profile.FirstName, this.Profile.MiddleName);
}
/// <summary>
/// All the courses student has taken
/// </summary>
public CourseTakenByStudent2[] AllCourses = null;
private string _LastErrorInSave;
public string LastErrorInSave
{
get { return _LastErrorInSave; }
set { _LastErrorInSave = value; }
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here