using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.ComponentModel.DataAnnotations; using System.ComponentModel; using EMISOnline.Entities; namespace EMISOnline.ViewModel.SystemView { public class RoleView { public Guid RoleID { get; set; } [Required] [DisplayName("类型")] public Nullable TypeID { get; set; } public string TypeDesc { get; set; } [Required] [DisplayName("类型名称")] [StringLength(100)] public string RoleName { get; set; } [DisplayName("备注")] [StringLength(500)] public string Description { get; set; } public bool IsSystemRole { get; set; } public Nullable SystemRoleType { get; set; } public string SystemRoleTypeDesc { get; set; } [Required] [DisplayName("默认数据范围")] public Nullable DefaultDataRange { get; set; } public string DefaultDataRangeDesc { get; set; } [Required] [DisplayName("学生类别")] public Nullable StudentType { get; set; } public string StudentTypeDesc { get; set; } public Nullable RecordStatus { get; set; } public string RecordStatusDesc { get; set; } public Nullable CreateUserID { get; set; } public string CreateUserName { get; set; } public Nullable CreateTime { get; set; } public Nullable ModifyUserID { get; set; } public string ModifyUserName { get; set; } public Nullable ModifyTime { get; set; } public Sys_Role ParseToEntity() { Sys_Role role = new Sys_Role() { RoleID = this.RoleID, TypeID = this.TypeID, RoleName = this.RoleName, Description = this.Description, IsSystemRole = this.IsSystemRole, SystemRoleType = this.SystemRoleType, DefaultDataRange = this.DefaultDataRange, RecordStatus = this.RecordStatus, CreateUserID = this.CreateUserID, CreateTime = this.CreateTime, ModifyUserID = this.ModifyUserID, ModifyTime = this.ModifyTime }; return role; } } }