RoleView.cs 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.ComponentModel.DataAnnotations;
  6. using System.ComponentModel;
  7. using EMISOnline.Entities;
  8. namespace EMISOnline.ViewModel.SystemView
  9. {
  10. public class RoleView
  11. {
  12. public Guid RoleID { get; set; }
  13. [Required]
  14. [DisplayName("类型")]
  15. public Nullable<int> TypeID { get; set; }
  16. public string TypeDesc { get; set; }
  17. [Required]
  18. [DisplayName("类型名称")]
  19. [StringLength(100)]
  20. public string RoleName { get; set; }
  21. [DisplayName("备注")]
  22. [StringLength(500)]
  23. public string Description { get; set; }
  24. public bool IsSystemRole { get; set; }
  25. public Nullable<int> SystemRoleType { get; set; }
  26. public string SystemRoleTypeDesc { get; set; }
  27. [Required]
  28. [DisplayName("默认数据范围")]
  29. public Nullable<int> DefaultDataRange { get; set; }
  30. public string DefaultDataRangeDesc { get; set; }
  31. [Required]
  32. [DisplayName("学生类别")]
  33. public Nullable<int> StudentType { get; set; }
  34. public string StudentTypeDesc { get; set; }
  35. public Nullable<int> RecordStatus { get; set; }
  36. public string RecordStatusDesc { get; set; }
  37. public Nullable<Guid> CreateUserID { get; set; }
  38. public string CreateUserName { get; set; }
  39. public Nullable<System.DateTime> CreateTime { get; set; }
  40. public Nullable<System.Guid> ModifyUserID { get; set; }
  41. public string ModifyUserName { get; set; }
  42. public Nullable<System.DateTime> ModifyTime { get; set; }
  43. public Sys_Role ParseToEntity()
  44. {
  45. Sys_Role role = new Sys_Role()
  46. {
  47. RoleID = this.RoleID,
  48. TypeID = this.TypeID,
  49. RoleName = this.RoleName,
  50. Description = this.Description,
  51. IsSystemRole = this.IsSystemRole,
  52. SystemRoleType = this.SystemRoleType,
  53. DefaultDataRange = this.DefaultDataRange,
  54. RecordStatus = this.RecordStatus,
  55. CreateUserID = this.CreateUserID,
  56. CreateTime = this.CreateTime,
  57. ModifyUserID = this.ModifyUserID,
  58. ModifyTime = this.ModifyTime
  59. };
  60. return role;
  61. }
  62. }
  63. }