123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129 |
- 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.RetakeManage
- {
- public class RetakePlanStudentApplyView : RetakePlanTaskView
- {
- /// <summary>
- /// 开课学年
- /// </summary>
- [DisplayName("开课学年")]
- public int? SchoolyearNumID { get; set; }
- /// <summary>
- /// 开课学年
- /// </summary>
- [DisplayName("开课学年")]
- public string SchoolyearNumName
- {
- get
- {
- return IdNameExt.GetDictionaryItem(DictionaryItem.CF_SchoolyearNum.ToString())
- .Where(x => x.Value == SchoolyearNumID)
- .Select(x => x.Name).FirstOrDefault();
- }
- }
- /// <summary>
- /// 开课学期
- /// </summary>
- [DisplayName("开课学期")]
- public int? StarttermID { get; set; }
- /// <summary>
- /// 开课学期
- /// </summary>
- [DisplayName("开课学期")]
- public string StarttermName
- {
- get
- {
- return IdNameExt.GetDictionaryItem(DictionaryItem.CF_Startterm.ToString())
- .Where(x => x.Value == StarttermID)
- .Select(x => x.Name).FirstOrDefault();
- }
- }
- /// <summary>
- /// 重修控制信息ID
- /// </summary>
- [DisplayName("重修控制信息ID")]
- public Guid? RetakeOpenControlID { get; set; }
- /// <summary>
- /// 开始时间
- /// </summary>
- [DisplayName("开始时间")]
- public DateTime? StartDate { get; set; }
- /// <summary>
- /// 结束时间
- /// </summary>
- [DisplayName("结束时间")]
- public DateTime? EndDate { get; set; }
- /// <summary>
- /// 报名状态
- /// </summary>
- [DisplayName("报名状态")]
- public bool? ApplyStatus { get; set; }
- /// <summary>
- /// 报名状态
- /// </summary>
- [DisplayName("报名状态")]
- public string ApplyStatusName
- {
- get
- {
- return ApplyStatus == true ? "是" : "否";
- }
- }
- /// <summary>
- /// 操作状态
- /// </summary>
- [DisplayName("操作状态")]
- public bool? CanSelect { get; set; }
- /// <summary>
- /// 操作状态
- /// </summary>
- public string OperateText
- {
- get
- {
- if (RetakeOpenControlID == null || RetakeOpenControlID == Guid.Empty)
- {
- return "未开放";
- }
- else if (RetakeOpenControlID.HasValue && StartDate > DateTime.Now)
- {
- return "即将开始";
- }
- else if (RetakeOpenControlID.HasValue && EndDate < DateTime.Now)
- {
- return "已结束";
- }
- else
- {
- if (PeopleNumlimit != null && PeopleNumlimit != 0 && ApplyNumber.Value >= PeopleNumlimit.Value
- && ApplyStatus.Value == false)
- {
- return "已报满";
- }
- else
- {
- return !(this.ApplyStatus ?? false) ? "立即报名" : "取消报名";
- }
- }
- }
- }
- }
- }
|