using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using EMIS.ViewModel.CacheManage;
namespace EMIS.ViewModel.EvaluationManage.EvaluationTable
{
public class EvaluationTargetView
{
///
/// 主键ID
///
[DisplayName("主键ID")]
public Guid EvaluationTargetID { get; set; }
///
/// 次序
///
[Required]
[DisplayName("次序")]
[RegularExpression(@"^[1-9]\d*|0$", ErrorMessage = "请输入自然数")]
public int? OrderNo { get; set; }
///
/// 指标编号
///
[Required]
[DisplayName("指标编号")]
[RegularExpression(@"^[0-9a-zA-Z\s?]+$", ErrorMessage = "请输入数字或英文字母")]
public string Code { get; set; }
///
/// 指标名称
///
[Required]
[DisplayName("指标名称")]
public string Name { get; set; }
///
/// 评价表ID
///
[Required]
[DisplayName("评价表ID")]
public Guid? EvaluationTableID { get; set; }
///
/// 评价表编号
///
[DisplayName("评价表编号")]
public string EvaluationTableCode { get; set; }
///
/// 评价表名
///
[DisplayName("评价表名")]
public string EvaluationTableName { get; set; }
///
/// 评价表权重
///
[DisplayName("评价表权重")]
public decimal? EvaluationTableWeight { get; set; }
///
/// 参评类型ID
///
[DisplayName("参评类型ID")]
public Guid? EvaluationParticipateTypeID { get; set; }
///
/// 参评类型
///
[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 ? "是" : "否"; }
}
///
/// 评价类型ID
///
[DisplayName("评价类型ID")]
public Guid? EvaluationTypeID { get; set; }
///
/// 评价类型编号
///
[DisplayName("评价类型编号")]
public string EvaluationTypeCode { get; set; }
///
/// 评价类型
///
[DisplayName("评价类型")]
public string EvaluationTypeName { get; set; }
///
/// 授课方式
///
[DisplayName("授课方式")]
public List TeachingModeIDList { get; set; }
///
/// 授课方式(可存在多个授课方式--用顿号隔开)
///
[DisplayName("授课方式")]
public string TeachingModeIDListName
{
get
{
if (TeachingModeIDList != null && TeachingModeIDList.Count() > 0)
{
return string.Join("、", TeachingModeIDList.Select(x => IdNameExt.GetDictionaryItem(DictionaryItem.CF_TeachingMode.ToString()).Where(w => w.Value == x).Select(w => w.Name).FirstOrDefault()));
}
else
{
return "";
}
}
}
///
/// 评分标准ID
///
[Required]
[DisplayName("评分标准ID")]
public Guid? EvaluationNormID { get; set; }
///
/// 评分标准
///
[DisplayName("评分标准")]
public string EvaluationNormName { get; set; }
///
/// 评分类型
///
[DisplayName("评分类型")]
public int? NormTypeID { get; set; }
///
/// 评分类型
///
[DisplayName("评分类型")]
public string NormTypeName
{
get
{
return IdNameExt.GetDictionaryItem(DictionaryItem.EM_EvaluationNormType.ToString()).Where(x => x.Value == NormTypeID).Select(x => x.Name).FirstOrDefault();
}
}
///
/// 权重
///
[Required]
[DisplayName("权重")]
[RegularExpression(@"^\d+(\.\d{1})?$", ErrorMessage = "请输入整数或保留1位小数")]
public decimal? Weight { get; set; }
///
/// 项目个数
///
[DisplayName("项目个数")]
public int? ProjectCount { 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; }
}
}