using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel;
using EMIS.ViewModel.CacheManage;
namespace EMIS.ViewModel.MinorManage.MinorPlanManage
{
public class MinorSpecialtyView
{
///
/// 主键ID
///
public Guid GrademinorID { get; set; }
public Guid? GradeMinorApplicationID { get; set; }
///
/// 年级
///
[Required]
[DisplayName("年级")]
public int? YearID { get; set; }
///
/// 专业代码
///
[Required]
[DisplayName("专业代码")]
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 StandardName
{
get
{
return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Standard.ToString())
.Where(x => x.Value == StandardID)
.Select(x => x.Name).FirstOrDefault();
}
}
///
/// 院系所
///
[Required]
[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 CollegeNo { get; set; }
///
/// 院系所
///
[Display(ResourceType = typeof(EMIS.Resources.DataAnnotations.Label), Name = "College")]
public string CollegeName { get; set; }
///
/// 学年学期ID
///
[DisplayName("学年学期")]
public Guid? SchoolyearID { get; set; }
public string SchoolyearCode { get; set; }
///
/// 人数上限
///
[DisplayName("人数上限")]
public int? StudentLimit { get; set; }
///
/// 已报名人数
///
[DisplayName("已报名人数")]
public int? StudentCount { get; set; }
///
/// 开放状态
///
[DisplayName("开放状态")]
public int? OpenStatus { get; set; }
///
/// 开放状态
///
[DisplayName("开放状态")]
public string OpenStatusStr
{
get
{
return IdNameExt.GetDictionaryItem(DictionaryItem.CF_GrademinorStatus.ToString())
.Where(x => x.Value == OpenStatus)
.Select(x => x.Name).FirstOrDefault();
}
}
///
/// 备注
///
[DisplayName("备注")]
public string Remarks { get; set; }
///
/// 创建人
///
[DisplayName("创建人")]
public Guid? CreateUserID { get; set; }
///
/// 创建人姓名
///
[DisplayName("创建人姓名")]
public string CreateUserName { get; set; }
///
/// 创建时间
///
[DisplayName("创建时间")]
public DateTime? CreateTime { get; set; }
}
}