Beispiel #1
0
        public List<SystemRoleEntity> GetAssignedRoleByUserGroup(SystemUserGroupEntity entity)
        {
            NHibernateDynamicQueryGenerator<SystemUserGroupRoleRelationEntity> queryGenerator = this.GetNewQueryBuilder();
            queryGenerator.AddWhereClause(PROPERTY_USERGROUPID.Eq(entity));

            return this.FindListByProjection<SystemRoleEntity>(queryGenerator,  PROPERTY_ROLEID);
        }
Beispiel #2
0
        /// <summary>
        /// ��ȡ�û����ɫ��ϵ�Ƿ����
        /// </summary>
        /// <param name="userGroup">�û���</param>
        /// <param name="role">��ɫ</param>
        /// <returns></returns>
        public SystemUserGroupRoleRelationEntity GetUserGroupRoleRelation(SystemUserGroupEntity userGroupEntity, SystemRoleEntity roleEntity)
        {
            NHibernateDynamicQueryGenerator<SystemUserGroupRoleRelationEntity> queryGenerator = this.GetNewQueryBuilder();

            queryGenerator.AddWhereClause(PROPERTY_USERGROUPID.Eq(userGroupEntity));

            queryGenerator.AddWhereClause(PROPERTY_ROLEID.Eq(roleEntity));

            return this.FindSingleEntityByQueryBuilder(queryGenerator);
        }
        /// <summary>
        /// local implementation of Equals based on unique value members
        /// </summary>
        public override bool Equals(object obj)
        {
            if (this == obj)
            {
                return(true);
            }

            if ((obj == null) || (obj.GetType() != this.GetType()))
            {
                return(false);
            }

            SystemUserGroupEntity castObj = (SystemUserGroupEntity)obj;

            return((castObj != null) && (this._groupID == castObj.GroupID));
        }
Beispiel #4
0
 /// <summary>
 /// 全构造函数
 /// </summary>
 public SystemUserGroupUserRelationEntity(int userGroupUserID, SystemUserEntity userID, SystemUserGroupEntity userGroupID)
 {
     _userGroupUserID = userGroupUserID;
     _userID          = userID;
     _userGroupID     = userGroupID;
 }
Beispiel #5
0
 /// <summary>
 /// 默认构造函数
 /// </summary>
 public SystemUserGroupUserRelationEntity()
 {
     _userGroupUserID = 0;
     _userID          = null;
     _userGroupID     = null;
 }
Beispiel #6
0
 /// <summary>
 /// 全构造函数
 /// </summary>
 public SystemUserGroupRoleRelationEntity(int userGroupRoleID, SystemRoleEntity roleID, SystemUserGroupEntity userGroupID)
 {
     _userGroupRoleID = userGroupRoleID;
     _roleID          = roleID;
     _userGroupID     = userGroupID;
 }
Beispiel #7
0
 /// <summary>
 /// 默认构造函数
 /// </summary>
 public SystemUserGroupRoleRelationEntity()
 {
     _userGroupRoleID = 0;
     _roleID          = null;
     _userGroupID     = null;
 }
Beispiel #8
0
		/// <summary>
		/// 全构造函数
		/// </summary>
		public SystemUserGroupRoleRelationEntity( int userGroupRoleID, SystemRoleEntity roleID, SystemUserGroupEntity userGroupID)
		{
			_userGroupRoleID = userGroupRoleID;
			_roleID = roleID;
			_userGroupID = userGroupID;
		}
Beispiel #9
0
		/// <summary>
		/// 默认构造函数
		/// </summary>
		public SystemUserGroupRoleRelationEntity()
		{
			_userGroupRoleID = 0;
			_roleID = null;
			_userGroupID = null;
		}
Beispiel #10
0
 internal SystemUserGroupWrapper(SystemUserGroupEntity entityObj)
 {
     entity = entityObj;
 }
Beispiel #11
0
        internal static SystemUserGroupWrapper ConvertEntityToWrapper(SystemUserGroupEntity entity)
        {
            if (entity == null)
                return null;
				
            if (entity.GroupID == 0)
                return null;

            return new SystemUserGroupWrapper(entity);
        }