using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using EMIS.ViewModel.CacheManage;
namespace EMIS.ViewModel.MinorManage.MinorApply
{
public class GrademinorView
{
///
/// 主键ID
///
public Guid GrademinorID { get; set; }
///
/// 辅修专业申请ID
///
[DisplayName("辅修专业申请ID")]
public Guid? GradeMinorApplicationID { get; set; }
///
/// 年级
///
[DisplayName("年级")]
public int? YearID { get; set; }
///
/// 专业代码
///
[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();
}
}
public string LookCoursematerial {
get {
return "查看课程";
}
}
///
/// 院系所
///
[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? 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; }
///
/// 已报人数
///
[DisplayName("已报人数")]
public int? ApplyNumber { get; set; }
///
/// 辅修控制信息ID
///
[DisplayName("辅修控制信息ID")]
public Guid? MinorControlID { get; set; }
///
/// 开始时间
///
[DisplayName("开始时间")]
public DateTime? StartDate { get; set; }
///
/// 结束时间
///
[DisplayName("结束时间")]
public DateTime? EndDate { get; set; }
///
/// 报名状态
///
[DisplayName("报名状态")]
public bool? ApplyStatus { get; set; }
///
/// 报名状态
///
[DisplayName("报名状态")]
public string ApplyStatusName
{
get
{
return ApplyStatus == true ? "是" : "否";
}
}
///
/// 修读门数
///
[DisplayName("修读门数")]
public int? CourseCount { get; set; }
///
/// 操作状态
///
[DisplayName("操作状态")]
public bool? CanSelect { get; set; }
///
/// 操作状态
///
public string OperateText
{
get
{
if (ApplyStatus.Value)
{
return "已报名";
}
if (ApplyNumber != null && StudentLimit != 0 && ApplyNumber.Value >= StudentLimit.Value)
{
return "已报满";
}
return "立即报名";
}
}
///
/// 学生报名审核状态
///
[DisplayName("学生报名审核状态")]
public int? RecordStatus { get; set; }
///
/// 审核状态
///
[DisplayName("审核状态")]
public string RecordStatusStr { get; set; }
/////
///// 辅修专业状态
/////
//[DisplayName("辅修专业状态")]
//public int? GrademinorRecordStatus { get; set; }
/////
///// 辅修专业状态
/////
//[DisplayName("辅修专业状态")]
//public string GrademinorRecordStatusStr { get; set; }
}
}