using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.ComponentModel; using EMIS.ViewModel.CacheManage; using System.ComponentModel.DataAnnotations; namespace EMIS.ViewModel.ScoreManage { public class StudentScoreView { /// /// 已提交成绩ID /// [DisplayName("已提交成绩ID")] public Guid? SubmitedScoreID { get; set; } /// /// 最终成绩ID /// [DisplayName("最终成绩ID")] public Guid? FinallyScoreID { get; set; } /// /// 学年学期 /// [Required] [DisplayName("学年学期")] public Guid? SchoolyearID { get; set; } /// /// 学年学期 /// [DisplayName("学年学期")] public string SchoolyearCode { get; set; } /// /// 院系所 /// [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")] public Guid? CollegeID { get; set; } /// /// 院系所 /// [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")] public string CollegeName { get; set; } /// /// 教研室 /// [Required] [DisplayName("教研室")] public Guid? DepartmentID { get; set; } /// /// 教研室 /// [DisplayName("教研室")] public string DepartmentName { get; set; } /// /// 年级专业ID /// [DisplayName("年级专业ID")] public Guid? GrademajorID { get; set; } /// /// 年级专业代码 /// [DisplayName("年级专业代码")] public string GrademajorCode { get; set; } /// /// 年级专业名称 /// [DisplayName("年级专业名称")] public string GrademajorName { get; set; } /// /// 班级ID /// [DisplayName("班级ID")] public Guid? ClassmajorID { get; set; } /// /// 班级编号 /// [DisplayName("班级编号")] public string ClassmajorCode { get; set; } /// /// 班级名称 /// [DisplayName("班级名称")] public string ClassmajorName { get; set; } /// /// 录入班级名称 /// [Required] [DisplayName("录入班级名称")] public string ClassName { get; set; } /// /// 设定类型 /// public int? ExaminationType { get; set; } /// /// 设定类型 /// public string ExaminationTypeName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_ExaminationType.ToString()) .Where(x => x.Value == ExaminationType) .Select(x => x.Name).FirstOrDefault(); } } /// /// 考试性质 /// [Required] [DisplayName("考试性质")] public int? ExamsCategoryID { get; set; } /// /// 考试性质 /// [DisplayName("考试性质")] public string ExamsCategoryName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_ExamsCategory.ToString()) .Where(x => x.Value == ExamsCategoryID) .Select(x => x.Name).FirstOrDefault(); } } /// /// 开课学年 /// [Required] [DisplayName("开课学年")] public int? SchoolyearNumID { get; set; } /// /// 开课学年 /// [DisplayName("开课学年")] public string SchoolyearNumName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_SchoolyearNum.ToString()) .Where(x => x.Value == SchoolyearNumID) .Select(x => x.Name).FirstOrDefault(); } } /// /// 开课学期 /// [DisplayName("开课学期")] [Required] public int? StarttermID { get; set; } /// /// 开课学期 /// public string StarttermName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Startterm.ToString()) .Where(x => x.Value == StarttermID) .Select(x => x.Name).FirstOrDefault(); } } /// /// 课程代码 /// [DisplayName("课程代码")] public string CourseCode { get; set; } /// /// 课程名称 /// [Required] [DisplayName("课程名称")] public Guid? CoursematerialID { get; set; } /// /// 课程名称 /// [DisplayName("课程名称")] public string CourseName { get; set; } /// /// 课程类型 /// [Required] [DisplayName("课程类型")] public int? CourseTypeID { get; set; } /// /// 课程类型 /// [DisplayName("课程类型")] public string CourseTypeName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_CourseType.ToString()) .Where(x => x.Value == CourseTypeID) .Select(x => x.Name).FirstOrDefault(); } } /// /// 课程学分 /// [Required] [DisplayName("课程学分")] [RegularExpression(@"^\d+(\.\d{1,2})?$", ErrorMessage = "请输整数或保留2位小数")] public decimal? Credit { get; set; } /// /// 总学时 /// [DisplayName("总学时")] public int? TotalHours { get; set; } /// /// 成绩类型 /// [Required] [DisplayName("成绩类型")] public int? ResultTypeID { get; set; } /// /// 成绩类型 /// [DisplayName("成绩类型")] public string ResultTypeName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_ResultType.ToString()) .Where(x => x.Value == ResultTypeID) .Select(x => x.Name).FirstOrDefault(); } } /// /// 考试方式 /// [Required] [DisplayName("考试方式")] public int? ExaminationModeID { get; set; } /// /// 考试方式 /// [DisplayName("考试方式")] public string ExaminationModeName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_ExaminationMode.ToString()) .Where(x => x.Value == ExaminationModeID) .Select(x => x.Name).FirstOrDefault(); } } /// /// 考试日期 /// [DisplayName("考试日期")] public DateTime? ExamsDatetime { get; set; } /// /// 录入截止日期 /// [DisplayName("录入截止日期")] public DateTime? EntryDeadlineTime { get; set; } /// /// 录入人 /// [Required] [DisplayName("录入人")] public Guid? CreatorUserID { get; set; } /// /// 录入人编号 /// [DisplayName("录入人编号")] public string CreatorUserCode{ get; set; } /// /// 录入人姓名 /// [DisplayName("录入人姓名")] public string CreatorUserName { get; set; } /// /// 学生ID /// [Required] [DisplayName("学生ID")] public Guid? UserID { get; set; } /// /// 学号 /// [DisplayName("学号")] public string LoginID { get; set; } /// /// 姓名 /// [DisplayName("姓名")] public string UserName { get; set; } /// /// 考试状态 /// [DisplayName("考试状态")] [Required] public int? ExamsStateID { get; set; } /// /// 考试状态 /// public string ExamsStateName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_ExamsState.ToString()) .Where(x => x.Value == ExamsStateID) .Select(x => x.Name).FirstOrDefault(); } } /// /// 平时成绩 /// //[DisplayName("平时成绩")] [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "Peacetime")] public decimal? Pingshi { get; set; } /// /// 技术成绩 /// //[DisplayName("技术成绩")] [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "Technique")] public decimal? Jishu { get; set; } /// /// 理论成绩 /// //[DisplayName("理论成绩")] [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "Theoretical")] public decimal? Lilun { get; set; } /// /// 总成绩 /// [DisplayName("总成绩")] public decimal? TotalScore { get; set; } /// /// 总成绩 /// [DisplayName("总成绩")] public string TotalScoreStr { get; set; } /// /// 学分 /// [DisplayName("学分")] public decimal? ScoreCredit { get; set; } /// /// 绩点 /// [DisplayName("绩点")] public decimal? GradePoint { get; set; } /// /// 备注 /// [DisplayName("备注")] public string Remarks { get; set; } /// /// 备注 /// [DisplayName("备注")] public string StudentScoreRemark { get; set; } /// /// 创建时间 /// [DisplayName("创建时间")] public DateTime? CreateTime { get; set; } /// /// 创建人 /// [DisplayName("创建人")] public Guid? CreateUserID { get; set; } [DisplayName("等级明细")] public Guid? ResultTypeDetailID { get; set; } [DisplayName("等级明细")] public string ResultTypeDetailName { get; set; } [DisplayName("处理方式")] public int? HandleModeID { get; set; } [DisplayName("考试方式")] public string HandleModeName { get { return IdNameExt.GetDictionaryItem(DictionaryItem.CF_HandleMode.ToString()) .Where(x => x.Value == HandleModeID) .Select(x => x.Name).FirstOrDefault(); } } } }