using System; using System.Collections.Generic; using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Text; namespace EMIS.ViewModel.SystemView { public class DictionaryItemView { /// /// 字典元素主键ID /// [DisplayName("字典元素主键ID")] public Guid DictionaryItemID { get; set; } /// /// 类型代码 /// [Required] [DisplayName("类型代码")] public string DictionaryCode { get; set; } /// /// 类型名称 /// [DisplayName("类型名称")] public string DictionaryName { get; set; } /// /// 序号 /// [Required] [DisplayName("序号")] [RegularExpression(@"^[0-9]*[1-9][0-9]*$", ErrorMessage = "请输入正整数")] public int? OrderNo { get; set; } /// /// 元素代码 /// [Required] [DisplayName("元素代码")] [RegularExpression(@"^\w+$", ErrorMessage = "请输入数字或字符")] public string Code { get; set; } /// /// 元素名称 /// [Required] [DisplayName("元素名称")] public string Name { get; set; } /// /// 元素值 /// [Required] [DisplayName("元素值")] [RegularExpression(@"^[0-9]*[1-9][0-9]*$", ErrorMessage = "请输入正整数")] public int? Value { get; set; } /// /// 可否编辑 /// [DisplayName("可否编辑")] public bool IsEditable { get; set; } /// /// 可否编辑 /// [DisplayName("可否编辑")] public string IsEditableName { get { return IsEditable == true ? "是" : "否"; } } /// /// 可否显示 /// [DisplayName("可否显示")] public bool IsVisible { get; set; } /// /// 可否显示 /// [DisplayName("可否显示")] public string IsVisibleName { get { return IsVisible == true ? "是" : "否"; } } /// /// 状态 /// [DisplayName("状态")] public int? RecordStatus { get; set; } } }