using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using Bowin.Common.Mvc;
using EMIS.ViewModel.CacheManage;
namespace EMIS.ViewModel.EvaluationManage.EvaluationSetting
{
public class EvaluationParticipateTypeView
{
///
/// 主键ID
///
[DisplayName("主键ID")]
public Guid EvaluationParticipateTypeID { get; set; }
///
/// 参评类型
///
[Required]
[DisplayName("参评类型")]
public int? ParticipateTypeID { get; set; }
///
/// 参评代码
///
[DisplayName("参评代码")]
public string ParticipateTypeCode
{
get
{
return IdNameExt.GetDictionaryItem(DictionaryItem.EM_ParticipateType.ToString()).Where(x => x.Value == ParticipateTypeID).Select(x => x.Code).FirstOrDefault();
}
}
///
/// 参评类型
///
[DisplayName("参评类型")]
public string ParticipateTypeName
{
get
{
return IdNameExt.GetDictionaryItem(DictionaryItem.EM_ParticipateType.ToString()).Where(x => x.Value == ParticipateTypeID).Select(x => x.Name).FirstOrDefault();
}
}
///
/// 学生用
///
[DisplayName("学生用")]
public bool IsStudent { get; set; }
///
/// 学生用
///
[DisplayName("学生用")]
public string IsStudentName
{
get { return this.IsStudent == true ? "是" : "否"; }
}
///
/// 可评次数
///
[Required]
[DisplayName("可评次数")]
[RegularExpression(@"^\d+$", ErrorMessage = "请输入非负整数")]
public int? Number { get; set; }
///
/// 开始时间
///
[Required]
[DisplayName("开始时间")]
[DataType(DataType.DateTime)]
public DateTime? StartTime { get; set; }
///
/// 结束时间
///
[Required]
[DisplayName("结束时间")]
[DataType(DataType.DateTime)]
[DateTimeNotLessThan("StartTime", "开始时间")]
public DateTime? EndTime { get; set; }
///
/// 备注
///
[DisplayName("备注")]
public string Remark { get; set; }
///
/// 状态
///
[DisplayName("状态")]
public int? RecordStatus { get; set; }
///
/// 创建人
///
[DisplayName("创建人")]
public Guid? CreateUserID { get; set; }
///
/// 创建人
///
[DisplayName("创建人")]
public string CreateUserName { get; set; }
///
/// 创建时间
///
[DisplayName("创建时间")]
public DateTime? CreateTime { get; set; }
///
/// 修改人
///
[DisplayName("修改人")]
public Guid? ModifyUserID { get; set; }
///
/// 修改人
///
[DisplayName("修改人")]
public string ModifyUserName { get; set; }
///
/// 修改时间
///
[DisplayName("修改时间")]
public DateTime? ModifyTime { get; set; }
}
}