Пример #1
0
        public int ClearRole(string userId)
        {
            var returnValue = 0;

            returnValue += this.SetProperty(PiUserTable.FieldId, userId, PiUserTable.FieldRoleId, null);


            var userRoleManager = new PiUserRoleManager(this.DBProvider, this.UserInfo, PiUserRoleTable.TableName);

            returnValue += userRoleManager.Delete(PiUserRoleTable.FieldUserId, userId);
            return(returnValue);
        }
Пример #2
0
        //
        //  从角色中删除员工
        //

        #region public int RemoveFormRole(string userId, string roleId) 撤销角色权限
        /// <summary>
        /// 从角色中删除员工
        /// </summary>
        /// <param name="userId">员工主键</param>
        /// <param name="roleId">角色主键</param>
        /// <returns>影响行数</returns>
        public int RemoveFormRole(string userId, string roleId)
        {
            var userRoleManager = new PiUserRoleManager(this.DBProvider, this.UserInfo, PiUserRoleTable.TableName);

            return(userRoleManager.Delete(PiUserRoleTable.FieldUserId, userId, PiUserRoleTable.FieldRoleId, roleId));
        }