public static void clearBlob(ICswResources CswResources, BlobDataReturn Return, BlobDataParams Request)
        {
            CswNbtResources NbtResources = (CswNbtResources)CswResources;
            CswPropIdAttr   PropId       = new CswPropIdAttr(Request.propid);
            CswNbtNode      Node         = NbtResources.Nodes[PropId.NodeId];

            if (null != Node)
            {
                CswNbtMetaDataNodeTypeProp MetaDataProp = NbtResources.MetaData.getNodeTypeProp(PropId.NodeTypePropId);
                if (null != MetaDataProp)
                {
                    CswNbtNodePropWrapper FileProp = Node.Properties[MetaDataProp];
                    if (NbtResources.Permit.canNodeType(CswEnumNbtNodeTypePermission.Edit, MetaDataProp.getNodeType(), NbtResources.CurrentNbtUser) &&
                        NbtResources.Permit.isPropWritable(CswEnumNbtNodeTypePermission.Edit, MetaDataProp, null, FileProp))
                    {
                        CswNbtSdTabsAndProps tabsandprops = new CswNbtSdTabsAndProps(NbtResources);
                        tabsandprops.ClearPropValue(Request.propid, true);

                        Request.Blob    = new CswNbtSdBlobData.CswNbtBlob();
                        Request.success = true;

                        Return.Data = Request;
                    }
                    else
                    {
                        throw new CswDniException(CswEnumErrorType.Warning, "You do not have sufficient priveledges to clear this File property", "User " + NbtResources.CurrentNbtUser.UserId + " attempted to call clearBlob without sufficient priviledges.");
                    }
                }
            }
        }
Exemplo n.º 2
0
        } // addPropertyToLayout()

        public bool ClearPropValue(string PropIdAttr, bool IncludeBlob)
        {
            return(_TabsPropsSd.ClearPropValue(PropIdAttr, IncludeBlob));
        } // ClearPropValue()