Beispiel #1
0
        protected override void OnSaving()
        {
            RoleGrade found = GetRoleGrade(this.角色, this.薪等标识);

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

            return(obj);
        }