student.cs
来自「本在线考试系统采用了面向对象的分析和设计」· CS 代码 · 共 70 行
CS
70 行
using System;
using System.Collections.Generic;
using System.Text;
namespace ExaminationSystem.BLL.Domain
{
public class Student:User
{
private string studentID;
public virtual string StudentID
{
get { return studentID; }
set { studentID = value; }
}
public override string LoginName
{
get
{
return StudentID;
}
set
{
StudentID = value;
}
}
public virtual Paper CurrentPaper
{
get
{
foreach (Paper paper in Papers)
{
if (paper.IsSubmited == false)
return paper;
}
return null;
}
set
{
if (CurrentPaper != null)
throw new Exception("已经有了试卷");
Papers.Add(value);
}
}
private IList<Paper> papers = new List<Paper>();
public virtual IList<Paper> Papers
{
get { return papers; }
set { papers = value; }
}
private Class cls;
public virtual Class Class
{
get { return cls; }
set { cls = value; }
}
public override int GetHashCode()
{
return (GetType().FullName + "|" +
StudentID).GetHashCode();
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?