using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EMIS.ViewModel.CacheManage;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
namespace EMIS.ViewModel.RetakeManage
{
public class RetakeStudentListView : RetakeStudentView
{
///
/// 重修计划ID
///
[DisplayName("重修计划ID")]
public Guid RetakePlanID { get; set; }
///
/// 重修类型
///
[Required]
[DisplayName("重修类型")]
public int? RetakeTypeID { get; set; }
///
/// 重修类型
///
[DisplayName("重修类型")]
public string RetakeTypeName
{
get
{
return IdNameExt.GetDictionaryItem(DictionaryItem.ER_RetakeType.ToString())
.Where(x => x.Value == RetakeTypeID)
.Select(x => x.Name).FirstOrDefault();
}
}
///
/// 重修班级名称
///
[DisplayName("重修班级名称")]
public string ClassName { get; set; }
///
/// 重修计划名单ID
///
[DisplayName("重修计划名单ID")]
public Guid RetakePlanStudentID { get; set; }
///
/// 最终成绩ID
///
[DisplayName("最终成绩ID")]
public Guid FinallyScoreID { get; set; }
///
/// 最终成绩IDs(重修生成时,将选择的FinallyScoreID传入后台)
///
[DisplayName("最终成绩IDs")]
public string FinallyScoreIDs { get; set; }
///
/// 学年学期
///
[DisplayName("学年学期")]
public string SchoolyearCode { get; set; }
///
/// 开课教研室ID
///
[DisplayName("开课教研室ID")]
public Guid? DepartmentID { get; set; }
///
/// 开课教研室代码
///
[DisplayName("开课教研室代码")]
public string DepartmentCode { get; set; }
///
/// 开课教研室
///
[DisplayName("开课教研室")]
public string DepartmentName { get; set; }
///
/// 学号
///
[DisplayName("学号")]
public string LoginID { get; set; }
///
/// 姓名
///
[DisplayName("姓名")]
public string UserName { get; set; }
///
/// 性别
///
[DisplayName("性别")]
public int? SexID { get; set; }
///
/// 性别
///
[DisplayName("性别")]
public string SexName
{
get
{
return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Sex.ToString())
.Where(x => x.Value == SexID)
.Select(x => x.Name).FirstOrDefault();
}
}
///
/// 在校状态
///
[DisplayName("在校状态")]
public int? InSchoolStatusID { get; set; }
///
/// 在校状态
///
[DisplayName("在校状态")]
public string InSchoolStatusName
{
get
{
return IdNameExt.GetDictionaryItem(DictionaryItem.CF_InschoolStatus.ToString())
.Where(x => x.Value == InSchoolStatusID)
.Select(x => x.Name).FirstOrDefault();
}
}
///
/// 学籍状态
///
[DisplayName("学籍状态")]
public int? StudentStatusID { get; set; }
///
/// 学籍状态
///
[DisplayName("学籍状态")]
public string StudentStatusName
{
get
{
return IdNameExt.GetDictionaryItem(DictionaryItem.CF_StudentStatus.ToString())
.Where(x => x.Value == StudentStatusID).Select(x => x.Name).FirstOrDefault();
}
}
///
/// 班级信息ID
///
[DisplayName("班级信息ID")]
public Guid? ClassmajorID { get; set; }
///
/// 班级编号
///
[DisplayName("班级编号")]
public string ClassmajorCode { get; set; }
///
/// 班级名称
///
[DisplayName("班级名称")]
public string ClassmajorName { get; set; }
///
/// 年级专业ID
///
[DisplayName("年级专业ID")]
public Guid? GrademajorID { get; set; }
///
/// 年级专业编号
///
[DisplayName("年级专业编号")]
public string GrademajorCode { get; set; }
///
/// 年级专业名称
///
[DisplayName("年级专业名称")]
public string GrademajorName { get; set; }
///
/// 院系所ID
///
[Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeID")]
public Guid? CollegeID { get; set; }
///
/// 院系所代码
///
[Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "CollegeCode")]
public string CollegeNo { get; set; }
///
/// 院系所名称
///
[Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")]
public string CollegeName { get; set; }
///
/// 年级
///
[DisplayName("年级")]
public int? Gradeyear { get; set; }
///
/// 专业ID(Value)
///
[DisplayName("专业ID(Value)")]
public int? StandardID { get; set; }
///
/// 专业代码
///
[DisplayName("专业代码")]
public string StandardCode
{
get
{
var inistStandardCode = IdNameExt.GetDictionaryItem(DictionaryItem.CF_Standard.ToString())
.Where(x => x.Value == StandardID)
.Select(x => x.Code).FirstOrDefault();
return (inistStandardCode != null ? inistStandardCode.PadLeft(6, '0') : "");
}
}
///
/// 专业名称
///
[DisplayName("专业名称")]
public string StandardDesc
{
get
{
return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Standard.ToString())
.Where(x => x.Value == StandardID)
.Select(x => x.Name).FirstOrDefault();
}
}
///
/// 培养层次
///
[Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "EducationID")]
public int? EducationID { get; set; }
///
/// 培养层次
///
[Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "EducationName")]
public string EducationName
{
get
{
return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Education.ToString())
.Where(x => x.Value == EducationID)
.Select(x => x.Name).FirstOrDefault();
}
}
///
/// 培养层次
///
[Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "EducationName")]
public string EducationStr { get; set; }
///
/// 学习形式
///
[DisplayName("学习形式")]
public int? LearningformID { get; set; }
///
/// 学习形式
///
[DisplayName("学习形式")]
public string LearningformName
{
get
{
return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Learningform.ToString())
.Where(x => x.Value == LearningformID)
.Select(x => x.Name).FirstOrDefault();
}
}
///
/// 学习形式
///
[DisplayName("学习形式")]
public string LearningformStr { get; set; }
///
/// 学制
///
[DisplayName("学制")]
public decimal? LearnSystem { get; set; }
///
/// 考试性质
///
[DisplayName("考试性质")]
public int? ExamsCategoryID { get; set; }
///
/// 考试性质
///
[DisplayName("考试性质")]
public string ExamsCategoryDesc
{
get
{
return IdNameExt.GetDictionaryItem(DictionaryItem.CF_ExamsCategory.ToString())
.Where(x => x.Value == ExamsCategoryID)
.Select(x => x.Name).FirstOrDefault();
}
}
///
/// 考试状态
///
[DisplayName("考试状态")]
public int? ExamsStateID { get; set; }
///
/// 考试状态
///
[DisplayName("考试状态")]
public string ExamsStateDesc
{
get
{
return IdNameExt.GetDictionaryItem(DictionaryItem.CF_ExamsState.ToString())
.Where(x => x.Value == ExamsStateID)
.Select(x => x.Name).FirstOrDefault();
}
}
///
/// 理论学时
///
[DisplayName("理论学时")]
[RegularExpression(@"^[0-9]+([.]{1}[0-9]+){0,1}$", ErrorMessage = "请输入数字")]
public int? TheoryCourse { get; set; }
///
/// 实践学时
///
[DisplayName("实践学时")]
[RegularExpression(@"^[0-9]+([.]{1}[0-9]+){0,1}$", ErrorMessage = "请输入数字")]
public int? Practicehours { get; set; }
///
/// 实验学时
///
[DisplayName("实验学时")]
[RegularExpression(@"^[0-9]+([.]{1}[0-9]+){0,1}$", ErrorMessage = "请输入数字")]
public int? Trialhours { get; set; }
///
/// 总学时
///
[Required]
[DisplayName("总学时")]
[RegularExpression(@"^[0-9]+([.]{1}[0-9]+){0,1}$", ErrorMessage = "请输入数字")]
public int? Totalhours
{
get
{
//return ((TheoryCourse ?? 0) + (Practicehours ?? 0) + (Trialhours ?? 0));
return ((TheoryCourse ?? 0) + (Practicehours ?? 0));
}
}
///
/// 不及格门数
///
[DisplayName("不及格门数")]
public int? NoPassCount { get; set; }
///
/// 欠费金额
///
[DisplayName("欠费金额")]
public decimal? AmountSum { get; set; }
///
/// 缴费状态
///
[DisplayName("缴费状态")]
public bool IsNoArrears { get; set; }
///
/// 缴费状态
///
[DisplayName("缴费状态")]
public string IsNoArrearsDesc
{
get
{
if (AmountSum == 0 || AmountSum == null)
{
return "否";
}
return IsNoArrears ? "是" : "否";
}
}
///
/// 报名状态
///
[DisplayName("报名状态")]
public bool ApplyStatus { get; set; }
///
/// 报名状态
///
[DisplayName("报名状态")]
public string ApplyStatusName
{
get
{
return ApplyStatus == true ? "是" : "否";
}
}
///
/// 状态
///
public Nullable RecordStatus { get; set; }
///
/// 重修任务状态
///
[DisplayName("状态")]
public string RecordStatusCode
{
get
{
return IdNameExt.GetDictionaryItem(DictionaryItem.ER_RetakePlanStatus.ToString())
.Where(x => x.Value == RecordStatus)
.Select(x => x.Code).FirstOrDefault();
}
}
///
/// 重修任务状态
///
[DisplayName("状态")]
public string RecordStatusName
{
get
{
return IdNameExt.GetDictionaryItem(DictionaryItem.ER_RetakePlanStatus.ToString())
.Where(x => x.Value == RecordStatus)
.Select(x => x.Name).FirstOrDefault();
}
}
}
}