12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.ComponentModel.DataAnnotations;
- using System.ComponentModel;
- using EMIS.Entities;
- namespace EMIS.ViewModel.SystemView
- {
- public class RoleView
- {
- [Required]
- [DisplayName("序号")]
- [RegularExpression(@"^[1-9]\d*|0$", ErrorMessage = "请输入自然数!")]
- public Nullable<int> OrderNo { get; set; }
- public Guid RoleID { get; set; }
- [Required]
- [DisplayName("角色ID")]
- public Nullable<int> 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<int> SystemRoleType { get; set; }
- public string SystemRoleTypeDesc { get; set; }
- [Required]
- [DisplayName("数据范围")]
- public Nullable<int> DefaultDataRange { get; set; }
- public string DefaultDataRangeDesc { get; set; }
- [Required]
- [DisplayName("学生类别")]
- public Nullable<int> StudentType { get; set; }
- public string StudentTypeDesc { get; set; }
- public Nullable<int> RecordStatus { get; set; }
- public string RecordStatusDesc { get; set; }
- public Nullable<Guid> CreateUserID { get; set; }
- public string CreateUserName { get; set; }
- public Nullable<System.DateTime> CreateTime { get; set; }
- public Nullable<System.Guid> ModifyUserID { get; set; }
- public string ModifyUserName { get; set; }
- public Nullable<System.DateTime> 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,
- CF_StudentRole = new CF_StudentRole() {
- RoleID = this.RoleID,
- StudentType = this.StudentType,
- RecordStatus = this.RecordStatus,
- CreateUserID = this.CreateUserID,
- CreateTime = this.CreateTime,
- ModifyUserID = this.ModifyUserID,
- ModifyTime = this.ModifyTime
- }
- };
- return role;
- }
- }
- }
|