protected override void OnSaving()
        {
            RoleLevel found = GetRoleLevel(this.角色, this.公司编码, this.职务等级);

            if (found != null && found.标识 != this.标识)
            {
                throw new Exception("角色已具备这个职等的权限,不能重复设置.");
            }
            else
            {
                base.OnSaving();
            }
        }
        /// <summary>
        /// 通过 Id 获取线路
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public static RoleLevel GetRoleLevel(Guid id)
        {
            RoleLevel obj = (RoleLevel)Session.DefaultSession.GetObjectByKey(typeof(RoleLevel), id);

            return(obj);
        }