public override void update()
        {
            CswNbtMetaDataObjectClass MailReportOC = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass( CswEnumNbtObjectClass.MailReportClass );
            foreach( CswNbtMetaDataNodeType MailReportNT in MailReportOC.getNodeTypes())
            {
                CswNbtMetaDataNodeTypeProp NameNTP = MailReportNT.getNodeTypePropByObjectClassProp( CswNbtObjClassMailReport.PropertyName.Name );

                // Add 'Name' property to Add layout
                if( null == NameNTP.getAddLayout() )
                {
                    NameNTP.updateLayout( CswEnumNbtLayoutType.Add, false );
                }

            } // foreach( CswNbtMetaDataNodeType MailReportNT in _CswNbtSchemaModTrnsctn.MetaData.getNodeTypes( CswEnumNbtObjectClass.MailReportClass ) )
        } // update()
Beispiel #2
0
        }     //isPropWritable

        private bool _isPropWritableImpl(CswNbtMetaDataNodeTypeTab MetaDataTab, CswNbtMetaDataNodeTypeProp MetaDataProp, CswNbtNodePropWrapper NodePropWrapper)
        {
            bool ret = _CswNbtPermitInfo.IsUberUser;

            if ((false == ret) ||
                (MetaDataProp.ServerManaged) ||
                ((MetaDataProp.ReadOnly) || (null != NodePropWrapper && NodePropWrapper.ReadOnly)))        // case 29321
            {
                if (_CswNbtPermitInfo.shouldPermissionCheckProceed())
                {
                    ret = _CswNbtPermitInfo.NoExceptionCases;
                    if (ret)
                    {
                        if (null != MetaDataTab && false == canTab(_CswNbtPermitInfo.NodeTypePermission, _CswNbtPermitInfo.NodeType, MetaDataTab))
                        {
                            ret = false;
                            _CswNbtResources.CswLogger.reportAppState("The property " + MetaDataProp.PropName + " (" + MetaDataProp.PropId + ") has been displayed as non-editable because the viewer cannot see tab " + MetaDataTab.TabId + ".", "ReadOnlyConditions");
                        }
                        else if (_CswNbtPermitInfo.NodeTypePermission == CswEnumNbtNodeTypePermission.View)
                        {
                            ret = false;
                            _CswNbtResources.CswLogger.reportAppState("The property " + MetaDataProp.PropName + " (" + MetaDataProp.PropId + ") has been displayed as non-editable because the viewer does not have edit permissions on nodetype " + MetaDataProp.NodeTypeId + ".", "ReadOnlyConditions");
                        }
                        else if (MetaDataProp.ServerManaged)
                        {
                            ret = false;
                            _CswNbtResources.CswLogger.reportAppState("The property " + MetaDataProp.PropName + " (" + MetaDataProp.PropId + ") has been displayed as non-editable because this property is server managed.", "ReadOnlyConditions");
                        }
                        else if (MetaDataProp.getFieldType().FieldType != CswEnumNbtFieldType.Button)
                        {
                            if (false == (MetaDataProp.IsRequired && _CswNbtResources.EditMode == CswEnumNbtNodeEditMode.Add && null != MetaDataProp.getAddLayout()))
                            {
                                if (MetaDataProp.ReadOnly)
                                {
                                    ret = false;
                                    _CswNbtResources.CswLogger.reportAppState("The property " + MetaDataProp.PropName + " (" + MetaDataProp.PropId + ") has been displayed as non-editable because this property is read only.", "ReadOnlyConditions");
                                }
                                else if (null != NodePropWrapper)
                                {
                                    if (NodePropWrapper.ReadOnly)
                                    {
                                        ret = false;
                                        _CswNbtResources.CswLogger.reportAppState("The property " + MetaDataProp.PropName + " (" + MetaDataProp.PropId + ") has been displayed as non-editable because this property's nodepropwrapper is read only.", "ReadOnlyConditions");
                                    }
                                    else if (NodePropWrapper.Node.ReadOnly)
                                    {
                                        ret = false;
                                        _CswNbtResources.CswLogger.reportAppState("The property " + MetaDataProp.PropName + " (" + MetaDataProp.PropId + ") has been displayed as non-editable because this property's nodepropwrapper's node is read only.", "ReadOnlyConditions");
                                    }
                                } //else if( null != NodePropWrapper )
                            }     //if( false == ( MetaDataProp.IsRequired && _CswNbtResources.EditMode == CswEnumNbtNodeEditMode.Add && null != MetaDataProp.getAddLayout() )
                        }         //else if MetaDataProp.getFieldType().FieldType != CswEnumNbtFieldType.Button
                    }             // if( _CswNbtPermitInfo.shouldPermissionCheckProceed() )
                }
            }
            return(ret);
        }//_isPropWritableImpl()