1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using EMIS.Entities;
- namespace EMIS.ViewModel.SystemView
- {
- public class RoleDataRangeView
- {
- /// <summary>
- /// MenuNo
- /// </summary>
- public string MenuNo { get; set; }
- /// <summary>
- /// MenuName
- /// </summary>
- public string MenuName { get; set; }
- /// <summary>
- /// ParentMenuNo
- /// </summary>
- public string ParentMenuNo { get; set; }
- /// <summary>
- /// OrderNo
- /// </summary>
- public short OrderNo { get; set; }
- /// <summary>
- /// RoleDataRangeID
- /// </summary>
- public System.Guid? RoleDataRangeID { get; set; }
- /// <summary>
- /// RoleID
- /// </summary>
- public System.Guid? RoleID { get; set; }
- /// <summary>
- /// DataRangeID
- /// </summary>
- public int? DataRangeID { get; set; }
- public bool IsLeaf { get; set; }
- public Sys_RoleDataRange ParseToEntity()
- {
- Sys_RoleDataRange roleDataRange = new Sys_RoleDataRange();
- roleDataRange.RoleDataRangeID = this.RoleDataRangeID ?? Guid.NewGuid();
- if (this.MenuNo == null) throw new Exception("MenuNo为必填项。");
- roleDataRange.MenuNo = this.MenuNo;
- if (!this.RoleID.HasValue) throw new Exception("RoleID为必填项。");
- roleDataRange.RoleID = this.RoleID.Value;
- if (!this.DataRangeID.HasValue) throw new Exception("DataRangeID为必填项。");
- roleDataRange.DataRangeID = this.DataRangeID.Value;
- return roleDataRange;
- }
- }
- }
|