123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.ComponentModel;
- using System.ComponentModel.DataAnnotations;
- using EMIS.Entities;
- using EMIS.ViewModel.CacheManage;
- namespace EMIS.ViewModel.MinorManage.MinorClass
- {
- public class MinorClassView
- {
- /// <summary>
- /// 辅修班级ID
- /// </summary>
- [DisplayName("辅修班级ID")]
- public Guid ClassminorID { get; set; }
- /// <summary>
- /// 辅修专业ID
- /// </summary>
- [Required]
- [DisplayName("辅修专业ID")]
- public Guid? GrademinorID { get; set; }
-
- /// <summary>
- /// 班级名称
- /// </summary>
- [Required]
- [DisplayName("辅修班级")]
- public string Name { get; set; }
- /// <summary>
- /// 班级简称
- /// </summary>
- [DisplayName("班级简称")]
- public string ClassAbbreviation { get; set; }
- /// <summary>
- /// 班序
- /// </summary>
- [DisplayName("班序")]
- public int? ClassNum { get; set; }
- /// <summary>
- /// 学年学期ID
- /// </summary>
- [DisplayName("学年学期")]
- public Guid? SchoolyearID { get; set; }
- /// <summary>
- /// 学年学期
- /// </summary>
- [DisplayName("学年学期")]
- public string SchoolyearCode { get; set; }
- /// <summary>
- /// 年级
- /// </summary>
- [DisplayName("年级")]
- public int? GradeYearID { get; set; }
- /// <summary>
- /// 年级
- /// </summary>
- [DisplayName("年级")]
- public string Grade
- {
- get
- {
- return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Grade.ToString()).Where(x => x.Value == GradeYearID).Select(x => x.Name).FirstOrDefault();
- }
- }
- /// <summary>
- /// 专业代码(对应字典中的Value)
- /// </summary>
- public int? StandardID { get; set; }
- /// <summary>
- /// 专业代码
- /// </summary>
- [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') : "");
- }
- }
- /// <summary>
- /// 专业名称
- /// </summary>
- [DisplayName("专业名称")]
- public string StandardName
- {
- get
- {
- return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Standard.ToString())
- .Where(x => x.Value == StandardID)
- .Select(x => x.Name).FirstOrDefault();
- }
- }
- /// <summary>
- /// 院系所ID
- /// </summary>
- [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")]
- public Guid? CollegeID { get; set; }
- /// <summary>
- /// 院系所编号
- /// </summary>
- [Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")]
- public string CollegeNo { get; set; }
- /// <summary>
- /// 开设院系
- /// </summary>
- [DisplayName("开设院系")]
- public string CollegeName { get; set; }
- /// <summary>
- /// 学生人数
- /// </summary>
- [DisplayName("人数")]
- public int? StudentNum { get; set; }
- /// <summary>
- /// 学生集合
- /// </summary>
- [DisplayName("学生集合")]
- public HashSet<CF_ClassminorStudent> CF_ClassminorStudent { get; set; }
- /// <summary>
- /// 状态
- /// </summary>
- [DisplayName("状态")]
- public int? RecordStatus { get; set; }
- /// <summary>
- /// 状态
- /// </summary>
- [DisplayName("状态")]
- public string RecordStatusStr
- {
- get
- {
- return IdNameExt.GetDictionaryItem(DictionaryItem.CF_ClassminorStatus.ToString())
- .Where(x => x.Value == RecordStatus)
- .Select(x => x.Name).FirstOrDefault();
- }
- }
- }
- }
|