public override void update() { CswNbtMetaDataObjectClass ChemicalOC = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass(CswEnumNbtObjectClass.ChemicalClass); foreach (CswNbtMetaDataNodeType ChemicalNT in ChemicalOC.getNodeTypes()) { CswNbtMetaDataNodeTypeProp GHSNTP = ChemicalNT.getNodeTypePropByObjectClassProp(CswNbtObjClassChemical.PropertyName.Jurisdiction); if (null != GHSNTP) { GHSNTP.updateLayout(CswEnumNbtLayoutType.Preview, true); } } CswNbtMetaDataObjectClass GHSOC = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass(CswEnumNbtObjectClass.GHSClass); foreach (CswNbtMetaDataNodeType GHSNT in GHSOC.getNodeTypes()) { CswNbtMetaDataNodeTypeProp PictosNTP = GHSNT.getNodeTypePropByObjectClassProp(CswNbtObjClassGHS.PropertyName.Pictograms); foreach (CswNbtMetaDataNodeTypeProp GHSNTP in GHSNT.getNodeTypeProps()) { if (null != PictosNTP && GHSNTP.PropId == PictosNTP.PropId) { GHSNTP.updateLayout(CswEnumNbtLayoutType.Preview, true); } else { GHSNTP.removeFromLayout(CswEnumNbtLayoutType.Preview); } } } }
public override void update() { CswNbtMetaDataObjectClass PrintLabelOC = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass( CswEnumNbtObjectClass.PrintLabelClass ); foreach( CswNbtMetaDataNodeType PrintLabelNT in PrintLabelOC.getNodeTypes() ) { CswNbtMetaDataNodeTypeProp SqlScriptNTP = PrintLabelNT.getNodeTypePropByObjectClassProp( CswNbtObjClassPrintLabel.PropertyName.SqlScript ); CswNbtMetaDataNodeTypeProp NodeTypesNTP = PrintLabelNT.getNodeTypePropByObjectClassProp( CswNbtObjClassPrintLabel.PropertyName.NodeTypes ); SqlScriptNTP.updateLayout( CswEnumNbtLayoutType.Edit, NodeTypesNTP, true ); SqlScriptNTP.updateLayout( CswEnumNbtLayoutType.Add, NodeTypesNTP, true ); } } // update()
}//_addBalanceConfigurationNT() public void _updateUserLayout() { CswNbtMetaDataNodeType UserNT = _CswNbtSchemaModTrnsctn.MetaData.getNodeType( "User" ); CswNbtMetaDataNodeTypeProp DefaultBalanceNTP = UserNT.getNodeTypePropByObjectClassProp( CswNbtObjClassUser.PropertyName.DefaultBalance ); CswNbtMetaDataNodeTypeProp DefaultPrinterNTP = UserNT.getNodeTypePropByObjectClassProp( CswNbtObjClassUser.PropertyName.DefaultPrinter ); //insert the Balance prop to the layout after the Printer prop DefaultBalanceNTP.updateLayout( CswEnumNbtLayoutType.Add, DefaultPrinterNTP, true ); DefaultBalanceNTP.updateLayout( CswEnumNbtLayoutType.Edit, DefaultPrinterNTP, true ); }//_updateUserLayout()
//private CswNbtObjClassRole _AdminRole; //private CswNbtObjClassRole _ReadOnlyRole; //private CswNbtObjClassRole _NodeTypeEditRole; //private CswNbtObjClassRole _NodeTypeCreateRole; //private CswNbtObjClassRole _NodeTypeViewRole; //private CswNbtObjClassRole _NodeTypeDeleteRole; /// <summary> /// Create the NodeType, the Tabs and the Props /// </summary> private void _InitMetaData() { _GenericOc = _TestData.CswNbtResources.MetaData.getObjectClass(CswEnumNbtObjectClass.GenericClass); _SprocketNt = _TestData.CswNbtResources.MetaData.getNodeTypeFirstVersion("CswPermit Sprocket"); if (null == _SprocketNt) { _SprocketNt = _TestData.CswNbtResources.MetaData.makeNewNodeType(new CswNbtWcfMetaDataModel.NodeType(_GenericOc) { NodeTypeName = "CswPermit Sprocket", Category = "CswPermit" }); _FirstTab = _SprocketNt.getNodeTypeTab("CswPermit Sprocket"); _SecondTab = _SprocketNt.getNodeTypeTab("Identity"); _NoAttributeNtp = _TestData.CswNbtResources.MetaData.makeNewProp( new CswNbtWcfMetaDataModel.NodeTypeProp(_SprocketNt, _TestData.CswNbtResources.MetaData.getFieldType(CswEnumNbtFieldType.Text), "Name")); _NoAttributeNtp.updateLayout(CswEnumNbtLayoutType.Add, DoMove: false); _NoAttributeNtp.updateLayout(CswEnumNbtLayoutType.Edit, DoMove: false, TabId: _FirstTab.TabId); _NoAttributeNtp.updateLayout(CswEnumNbtLayoutType.Edit, DoMove: false, TabId: _SecondTab.TabId); _ServerManagedNtp = _TestData.CswNbtResources.MetaData.makeNewProp( new CswNbtWcfMetaDataModel.NodeTypeProp(_SprocketNt, _TestData.CswNbtResources.MetaData.getFieldType(CswEnumNbtFieldType.Text), "Description")); _ServerManagedNtp.DesignNode.ServerManaged.Checked = CswEnumTristate.True; _ServerManagedNtp.updateLayout(CswEnumNbtLayoutType.Add, DoMove: false); _ServerManagedNtp.updateLayout(CswEnumNbtLayoutType.Edit, DoMove: false, TabId: _FirstTab.TabId); _ServerManagedNtp.updateLayout(CswEnumNbtLayoutType.Edit, DoMove: false, TabId: _SecondTab.TabId); _ReadOnlyNtp = _TestData.CswNbtResources.MetaData.makeNewProp( new CswNbtWcfMetaDataModel.NodeTypeProp(_SprocketNt, _TestData.CswNbtResources.MetaData.getFieldType(CswEnumNbtFieldType.Text), "Status")); _ReadOnlyNtp.DesignNode.ReadOnly.Checked = CswEnumTristate.True; _ReadOnlyNtp.updateLayout(CswEnumNbtLayoutType.Add, DoMove: false); _ReadOnlyNtp.updateLayout(CswEnumNbtLayoutType.Edit, DoMove: false, TabId: _FirstTab.TabId); _ReadOnlyNtp.updateLayout(CswEnumNbtLayoutType.Edit, DoMove: false, TabId: _SecondTab.TabId); _RequiredReadOnlyNtp = _TestData.CswNbtResources.MetaData.makeNewProp( new CswNbtWcfMetaDataModel.NodeTypeProp(_SprocketNt, _TestData.CswNbtResources.MetaData.getFieldType(CswEnumNbtFieldType.Text), "Type")); _RequiredReadOnlyNtp.DesignNode.ReadOnly.Checked = CswEnumTristate.True; _RequiredReadOnlyNtp.DesignNode.Required.Checked = CswEnumTristate.True; _RequiredReadOnlyNtp.updateLayout(CswEnumNbtLayoutType.Add, DoMove: false); _RequiredReadOnlyNtp.updateLayout(CswEnumNbtLayoutType.Edit, DoMove: false, TabId: _FirstTab.TabId); _RequiredReadOnlyNtp.updateLayout(CswEnumNbtLayoutType.Edit, DoMove: false, TabId: _SecondTab.TabId); _ServerManagedNtp.DesignNode.postChanges(false); _ReadOnlyNtp.DesignNode.postChanges(false); _RequiredReadOnlyNtp.DesignNode.postChanges(false); } }
public override void update() { CswNbtMetaDataObjectClass GHSOC = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass(CswEnumNbtObjectClass.GHSClass); foreach (CswNbtMetaDataNodeType GHSNT in GHSOC.getNodeTypes()) { CswNbtMetaDataNodeTypeProp AddClassCodesNTP = GHSNT.getNodeTypePropByObjectClassProp(CswNbtObjClassGHS.PropertyName.AddClassCodes); AddClassCodesNTP.updateLayout(CswEnumNbtLayoutType.Add, true, TabGroup: "Classification"); AddClassCodesNTP.updateLayout(CswEnumNbtLayoutType.Edit, true, GHSNT.getFirstNodeTypeTab().TabId, TabGroup: "Classification"); CswNbtMetaDataNodeTypeProp AddLabelCodesNTP = GHSNT.getNodeTypePropByObjectClassProp(CswNbtObjClassGHS.PropertyName.AddLabelCodes); AddLabelCodesNTP.updateLayout(CswEnumNbtLayoutType.Add, true, TabGroup: "Labeling"); AddLabelCodesNTP.updateLayout(CswEnumNbtLayoutType.Edit, true, GHSNT.getFirstNodeTypeTab().TabId, TabGroup: "Labeling"); } }
public override void update() { CswNbtMetaDataObjectClass ContainerOc = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass( CswNbtMetaDataObjectClass.NbtObjectClass.ContainerClass ); _CswNbtSchemaModTrnsctn.createObjectClassProp( ContainerOc, new CswNbtWcfMetaDataModel.ObjectClassProp { FieldType = CswNbtMetaDataFieldType.NbtFieldType.Button, PropName = CswNbtObjClassContainer.RequestPropertyName, Extended = CswNbtNodePropButton.ButtonMode.menu, ListOptions = CswNbtObjClassContainer.RequestMenu.Options.ToString(), StaticText = CswNbtObjClassContainer.RequestMenu.Dispense } ); foreach( CswNbtMetaDataNodeType ContainerNt in ContainerOc.getNodeTypes() ) { CswNbtMetaDataNodeTypeTab RequestsTab = ContainerNt.getNodeTypeTab( "Requests" ); if( null == RequestsTab ) { RequestsTab = _CswNbtSchemaModTrnsctn.MetaData.makeNewTab( ContainerNt, "Requests", ContainerNt.getNodeTypeTabIds().Count ); } CswNbtMetaDataNodeTypeProp DispenseNtp = ContainerNt.getNodeTypePropByObjectClassProp( CswNbtObjClassContainer.RequestPropertyName ); DispenseNtp.updateLayout( CswNbtMetaDataNodeTypeLayoutMgr.LayoutType.Edit, true, RequestsTab.TabId, 1, 1 ); DispenseNtp.updateLayout( CswNbtMetaDataNodeTypeLayoutMgr.LayoutType.Table, true, RequestsTab.TabId, 1, 1 ); CswNbtMetaDataNodeTypeProp RequestsGridNtp = _CswNbtSchemaModTrnsctn.MetaData.makeNewProp( ContainerNt, CswNbtMetaDataFieldType.NbtFieldType.Grid, "Submitted Requests", RequestsTab.TabId ); CswNbtView GridView = _CswNbtSchemaModTrnsctn.ViewSelect.restoreView( RequestsGridNtp.ViewId ); makeRequestGridView( GridView, ContainerNt ); } CswNbtMetaDataObjectClass MaterialOc = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass( CswNbtMetaDataObjectClass.NbtObjectClass.MaterialClass ); CswNbtMetaDataObjectClassProp MaterialRequestOcp = _CswNbtSchemaModTrnsctn.createObjectClassProp( MaterialOc, new CswNbtWcfMetaDataModel.ObjectClassProp { FieldType = CswNbtMetaDataFieldType.NbtFieldType.Button, PropName = CswNbtObjClassMaterial.RequestPropertyName } ); foreach( CswNbtMetaDataNodeType MaterialNt in MaterialOc.getNodeTypes() ) { CswNbtMetaDataNodeTypeTab IdentityTab = MaterialNt.getNodeTypeTab( "Identity" ); if( null == IdentityTab ) { IdentityTab = _CswNbtSchemaModTrnsctn.MetaData.makeNewTab(MaterialNt, "Identity", MaterialNt.getNodeTypeTabIds().Count); } CswNbtMetaDataNodeTypeProp RequestBtnNtp = MaterialNt.getNodeTypePropByObjectClassProp( CswNbtObjClassMaterial.RequestPropertyName ); RequestBtnNtp.updateLayout( CswNbtMetaDataNodeTypeLayoutMgr.LayoutType.Edit, true, IdentityTab.TabId ); } }//Update()
public override void update() { /* Receive wizard property order: Owner, Location, Label Format, Expiration Date */ CswNbtMetaDataNodeType ContainerNT = _CswNbtSchemaModTrnsctn.MetaData.getNodeType( "Container" ); if( null != ContainerNT ) { CswNbtMetaDataNodeTypeProp LocationNTP = ContainerNT.getNodeTypePropByObjectClassProp( CswNbtObjClassContainer.PropertyName.Location ); CswNbtMetaDataNodeTypeProp OwnerNTP = ContainerNT.getNodeTypePropByObjectClassProp( CswNbtObjClassContainer.PropertyName.Owner ); CswNbtMetaDataNodeTypeProp ExpirationDateNTP = ContainerNT.getNodeTypePropByObjectClassProp( CswNbtObjClassContainer.PropertyName.ExpirationDate ); CswNbtMetaDataNodeTypeProp LabelFormat = ContainerNT.getNodeTypePropByObjectClassProp( CswNbtObjClassContainer.PropertyName.LabelFormat ); if( null != OwnerNTP ) { OwnerNTP.updateLayout( CswNbtMetaDataNodeTypeLayoutMgr.LayoutType.Add, true, Int32.MinValue, 7, 1 ); } if( null != LocationNTP ) { LocationNTP.updateLayout( CswNbtMetaDataNodeTypeLayoutMgr.LayoutType.Add, true, Int32.MinValue, 8, 1 ); } if( null != LabelFormat ) { LabelFormat.updateLayout( CswNbtMetaDataNodeTypeLayoutMgr.LayoutType.Add, true, Int32.MinValue, 9, 1 ); } if( null != ExpirationDateNTP ) { ExpirationDateNTP.updateLayout( CswNbtMetaDataNodeTypeLayoutMgr.LayoutType.Add, true, Int32.MinValue, 15, 1 ); } } } //Update()
public override void update() { CswNbtNode CisproRequestFulfillerRole = _CswNbtSchemaModTrnsctn.Nodes.makeRoleNodeFromRoleName( "CISPro_Request_Fulfiller" ); if( null != CisproRequestFulfillerRole ) { LandingPageData PageData = _CswNbtSchemaModTrnsctn.getLandingPageTable().getLandingPageItems( new LandingPageData.Request { RoleId = CisproRequestFulfillerRole.NodeId.ToString(), ActionId = null } ); Collection<Int32> DoomedIds = new Collection<int>(); foreach( LandingPageData.LandingPageItem PageItem in PageData.LandingPageItems ) { if( PageItem.Text == "Pending Requests" ) { _CswNbtSchemaModTrnsctn.getLandingPageTable().addLandingPageItem( new LandingPageData.Request { Type = CswEnumNbtLandingPageItemType.Link, RoleId = CisproRequestFulfillerRole.NodeId.ToString(), Text = "Submitted Requests", NodeViewId = PageItem.ViewId, PkValue = PageItem.ViewId, ButtonIcon = "cart.png", ViewType = CswEnumNbtViewType.View.ToString() } ); DoomedIds.Add( CswConvert.ToInt32( PageItem.LandingPageId ) ); } } foreach( int DoomedId in DoomedIds ) { _CswNbtSchemaModTrnsctn.getLandingPageTable().deleteLandingPageItem( new LandingPageData.Request { LandingPageId = DoomedId } ); } } foreach( CswEnumNbtObjectClass Member in CswNbtPropertySetRequestItem.Members() ) { CswNbtMetaDataObjectClass MemberOc = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass( Member ); foreach( CswNbtMetaDataNodeType NodeType in MemberOc.getLatestVersionNodeTypes() ) { CswNbtMetaDataNodeTypeProp CommentsNtp = NodeType.getNodeTypePropByObjectClassProp( CswNbtPropertySetRequestItem.PropertyName.Comments ); CommentsNtp.updateLayout( CswEnumNbtLayoutType.Add, false ); if( null != CisproRequestFulfillerRole ) { _CswNbtSchemaModTrnsctn.Permit.set( CswEnumNbtNodeTypePermission.Edit, NodeType, CisproRequestFulfillerRole, true ); } } } CswNbtMetaDataObjectClass RequestOc = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass( CswEnumNbtObjectClass.RequestClass ); foreach( CswNbtMetaDataNodeType RequestNt in RequestOc.getNodeTypes() ) { RequestNt.NameTemplateValue = ""; RequestNt.addNameTemplateText( CswNbtObjClassRequest.PropertyName.Name ); RequestNt.addNameTemplateText( CswNbtObjClassRequest.PropertyName.SubmittedDate ); } } // update()
public override void update() { /* updating the propery order on size */ CswNbtMetaDataNodeType sizeNT = _CswNbtSchemaModTrnsctn.MetaData.getNodeType( "Size" ); if( null != sizeNT ) { CswNbtMetaDataNodeTypeProp initQuantNTP = sizeNT.getNodeTypeProp( CswNbtObjClassSize.InitialQuantityPropertyName ); CswNbtMetaDataNodeTypeProp catalogNoNTP = sizeNT.getNodeTypeProp( CswNbtObjClassSize.CatalogNoPropertyName ); CswNbtMetaDataNodeTypeProp quanEditNTP = sizeNT.getNodeTypeProp( CswNbtObjClassSize.QuantityEditablePropertyName ); CswNbtMetaDataNodeTypeProp dispensableNTP = sizeNT.getNodeTypeProp( CswNbtObjClassSize.DispensablePropertyName ); if( null != initQuantNTP ) { initQuantNTP.updateLayout( CswNbtMetaDataNodeTypeLayoutMgr.LayoutType.Add, true, Int32.MinValue, 1, 1 ); } if( null != catalogNoNTP ) { catalogNoNTP.updateLayout( CswNbtMetaDataNodeTypeLayoutMgr.LayoutType.Add, true, Int32.MinValue, 2, 1 ); } if( null != quanEditNTP ) { quanEditNTP.updateLayout( CswNbtMetaDataNodeTypeLayoutMgr.LayoutType.Add, true, Int32.MinValue, 3, 1 ); } if( null != dispensableNTP ) { dispensableNTP.updateLayout( CswNbtMetaDataNodeTypeLayoutMgr.LayoutType.Add, true, Int32.MinValue, 4, 1 ); } } }//Update()
public override void update() { CswNbtMetaDataNodeType ContainerNT = _CswNbtSchemaModTrnsctn.MetaData.getNodeType( "Container" ); if( null != ContainerNT ) { CswNbtMetaDataNodeTypeTab FireCodeTab = _CswNbtSchemaModTrnsctn.MetaData.makeNewTab( ContainerNT, "Fire Code" ); CswNbtMetaDataNodeTypeProp StoragePressureNTP = ContainerNT.getNodeTypePropByObjectClassProp( CswNbtObjClassContainer.PropertyName.StoragePressure ); CswNbtMetaDataNodeTypeProp StorageTemperatureNTP = ContainerNT.getNodeTypePropByObjectClassProp( CswNbtObjClassContainer.PropertyName.StorageTemperature ); CswNbtMetaDataNodeTypeProp UseTypeNTP = ContainerNT.getNodeTypePropByObjectClassProp( CswNbtObjClassContainer.PropertyName.UseType ); StoragePressureNTP.removeFromAllLayouts(); StorageTemperatureNTP.removeFromAllLayouts(); UseTypeNTP.removeFromAllLayouts(); StoragePressureNTP.updateLayout( CswNbtMetaDataNodeTypeLayoutMgr.LayoutType.Edit, true, FireCodeTab.TabId, 1, 1 ); StorageTemperatureNTP.updateLayout( CswNbtMetaDataNodeTypeLayoutMgr.LayoutType.Edit, true, FireCodeTab.TabId, 2, 1 ); UseTypeNTP.updateLayout( CswNbtMetaDataNodeTypeLayoutMgr.LayoutType.Edit, true, FireCodeTab.TabId, 3, 1 ); foreach( CswNbtMetaDataNodeTypeTab Tab in ContainerNT.getNodeTypeTabs() ) { if( Tab.TabOrder >= 4 ) Tab.TabOrder += 1; } CswNbtMetaDataNodeTypeTab DispensesTab = ContainerNT.getNodeTypeTab( "Dispenses" ); if( null == DispensesTab ) { DispensesTab = _CswNbtSchemaModTrnsctn.MetaData.makeNewTab( ContainerNT, "Dispenses", 4 ); } CswNbtMetaDataNodeTypeProp DispenseNTP = ContainerNT.getNodeTypePropByObjectClassProp( CswNbtObjClassContainer.PropertyName.Dispense ); DispenseNTP.updateLayout( CswNbtMetaDataNodeTypeLayoutMgr.LayoutType.Edit, true, DispensesTab.TabId, 1, 1 ); } } //Update()
public override void update() { // For each Location Node type that isn't Site, the Full Path should be Path + > + Name // and for Sites, the Full Path should be Name. CswNbtMetaDataObjectClass LocationOC = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass(CswEnumNbtObjectClass.LocationClass); foreach (CswNbtMetaDataNodeType LocationNT in LocationOC.getNodeTypes()) { CswNbtMetaDataNodeTypeProp FullPathNTP = LocationNT.getNodeTypePropByObjectClassProp(CswNbtObjClassLocation.PropertyName.FullPath); CswNbtMetaDataNodeTypeProp LocationNTP = LocationNT.getNodeTypePropByObjectClassProp(CswNbtObjClassLocation.PropertyName.Location); CswNbtMetaDataNodeTypeProp NameNTP = LocationNT.getNodeTypePropByObjectClassProp(CswNbtObjClassLocation.PropertyName.Name); if (null != FullPathNTP) { // Set the value of the property if (LocationNT.NodeTypeName != "Site") { FullPathNTP.DesignNode.AttributeProperty[CswNbtFieldTypeRuleComposite.AttributeName.Template].AsText.Text = "{" + LocationNTP.PropId + "} > " + "{" + NameNTP.PropId + "}"; } else { FullPathNTP.DesignNode.AttributeProperty[CswNbtFieldTypeRuleComposite.AttributeName.Template].AsText.Text = "{" + NameNTP.PropId + "}"; } // Set the layout position and remove from the add layout FullPathNTP.removeFromLayout(CswEnumNbtLayoutType.Add); FullPathNTP.updateLayout(CswEnumNbtLayoutType.Edit, LocationNTP, true); } } _setLocationsPendingUpdate(); }
public override void update() { CswNbtMetaDataObjectClass MaterialOC = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass( NbtObjectClass.MaterialClass ); foreach( CswNbtMetaDataNodeType MaterialNT in MaterialOC.getNodeTypes() ) { if( MaterialNT.NodeTypeName == "Biological" ) { CswNbtMetaDataNodeTypeProp PictureNTP = _CswNbtSchemaModTrnsctn.MetaData.getNodeTypeProp( MaterialNT.NodeTypeId, "Picture" ); if( null != PictureNTP ) { PictureNTP.removeFromLayout( CswNbtMetaDataNodeTypeLayoutMgr.LayoutType.Add ); } CswNbtMetaDataNodeTypeProp RefNoNTP = _CswNbtSchemaModTrnsctn.MetaData.getNodeTypeProp( MaterialNT.NodeTypeId, "Reference Number" ); if( null != RefNoNTP ) { RefNoNTP.updateLayout( CswNbtMetaDataNodeTypeLayoutMgr.LayoutType.Add, true ); } CswNbtMetaDataNodeTypeProp TypeNTP = _CswNbtSchemaModTrnsctn.MetaData.getNodeTypeProp( MaterialNT.NodeTypeId, "Type" ); if( null != TypeNTP ) { TypeNTP.updateLayout( CswNbtMetaDataNodeTypeLayoutMgr.LayoutType.Add, true ); } } else if( MaterialNT.NodeTypeName == "Chemical" ) { CswNbtMetaDataNodeTypeProp CasNoNTP = _CswNbtSchemaModTrnsctn.MetaData.getNodeTypePropByObjectClassProp( MaterialNT.NodeTypeId, CswNbtObjClassMaterial.PropertyName.CasNo ); CasNoNTP.updateLayout( CswNbtMetaDataNodeTypeLayoutMgr.LayoutType.Add, true ); } } }//Update()
private void _setEditLayout( string PropName, int ColNum, int RowNum, string TabGroup = "", bool RemoveFromAdd = true ) { CswNbtMetaDataNodeTypeProp FireClassExemptAmountNTP = _CswNbtSchemaModTrnsctn.MetaData.getNodeTypePropByObjectClassProp( FireClassExemptAmountNT.NodeTypeId, PropName ); if( RemoveFromAdd ) FireClassExemptAmountNTP.removeFromLayout( CswNbtMetaDataNodeTypeLayoutMgr.LayoutType.Add ); FireClassExemptAmountNTP.updateLayout( CswNbtMetaDataNodeTypeLayoutMgr.LayoutType.Edit, true, FireClassExemptAmountNT.getFirstNodeTypeTab().TabId, RowNum, ColNum, TabGroup ); }
public override void update() { CswNbtMetaDataObjectClass InspectionDesignOc = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass( CswNbtMetaDataObjectClass.NbtObjectClass.InspectionDesignClass ); _CswNbtSchemaModTrnsctn.createObjectClassProp( InspectionDesignOc, new CswNbtWcfMetaDataModel.ObjectClassProp { FieldType = CswNbtMetaDataFieldType.NbtFieldType.Button, PropName = CswNbtObjClassInspectionDesign.SetPreferredPropertyName } ); foreach( CswNbtMetaDataNodeType InspectionNt in InspectionDesignOc.getLatestVersionNodeTypes() ) { CswNbtMetaDataNodeTypeProp Finished = InspectionNt.getNodeTypePropByObjectClassProp( CswNbtObjClassInspectionDesign.FinishPropertyName ); if( null != Finished.FirstEditLayout ) { CswNbtMetaDataNodeTypeProp SetPreferred = InspectionNt.getNodeTypePropByObjectClassProp( CswNbtObjClassInspectionDesign.SetPreferredPropertyName ); SetPreferred.updateLayout( CswNbtMetaDataNodeTypeLayoutMgr.LayoutType.Edit, true, Finished.FirstEditLayout.TabId, 1, 1 ); Finished.updateLayout( CswNbtMetaDataNodeTypeLayoutMgr.LayoutType.Edit, SetPreferred, true ); CswNbtMetaDataNodeTypeProp Cancel = InspectionNt.getNodeTypePropByObjectClassProp( CswNbtObjClassInspectionDesign.CancelPropertyName ); if( null != Cancel.FirstEditLayout && Finished.FirstEditLayout.TabId == Cancel.FirstEditLayout.TabId ) { Cancel.updateLayout( CswNbtMetaDataNodeTypeLayoutMgr.LayoutType.Edit, Finished, true ); } CswNbtMetaDataNodeTypeProp CancelReason = InspectionNt.getNodeTypePropByObjectClassProp( CswNbtObjClassInspectionDesign.CancelReasonPropertyName ); if( null != CancelReason.FirstEditLayout && Finished.FirstEditLayout.TabId == CancelReason.FirstEditLayout.TabId ) { CancelReason.updateLayout( CswNbtMetaDataNodeTypeLayoutMgr.LayoutType.Edit, Cancel, true ); } } } }//Update()
public override void update() { CswNbtMetaDataObjectClass CertDefSpecOC = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass(CswEnumNbtObjectClass.CertDefSpecClass); CswNbtMetaDataNodeType CertDefSpecDefaultNT = _CswNbtSchemaModTrnsctn.MetaData.makeNewNodeType(new CswNbtWcfMetaDataModel.NodeType(CertDefSpecOC) { Category = "MLM", ObjectClass = CertDefSpecOC, ObjectClassId = CertDefSpecOC.ObjectClassId, NodeTypeName = "CertDef Spec", Searchable = true, NameTemplate = CswNbtMetaData.MakeTemplateEntry(CswNbtObjClassCertDefSpec.PropertyName.NameForTestingConditions) }); CswNbtMetaDataNodeTypeTab ConditionsTab = _CswNbtSchemaModTrnsctn.MetaData.makeNewTab(CertDefSpecDefaultNT, "Conditions", 2); CswNbtMetaDataNodeTypeTab CharacteristicsTab = _CswNbtSchemaModTrnsctn.MetaData.makeNewTab(CertDefSpecDefaultNT, "Characteristics", 3); CswNbtMetaDataNodeTypeProp ConditionsNTP = CertDefSpecDefaultNT.getNodeTypePropByObjectClassProp(CswNbtObjClassCertDefSpec.PropertyName.Conditions); ConditionsNTP.updateLayout(CswEnumNbtLayoutType.Edit, true, ConditionsTab.TabId, 1, 1); CswNbtMetaDataNodeTypeProp CharacteristicsNTP = CertDefSpecDefaultNT.getNodeTypePropByObjectClassProp(CswNbtObjClassCertDefSpec.PropertyName.Characteristics); CharacteristicsNTP.updateLayout(CswEnumNbtLayoutType.Edit, true, CharacteristicsTab.TabId, 1, 1); }
public override void update() { CswNbtMetaDataObjectClass DocumentOC = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass( NbtObjectClass.DocumentClass ); CswNbtMetaDataNodeType SDSNT = _CswNbtSchemaModTrnsctn.MetaData.makeNewNodeType( new CswNbtWcfMetaDataModel.NodeType( DocumentOC ) { NodeTypeName = "SDS Document", Category = "Materials" } ); CswNbtMetaDataNodeTypeProp TradeNameNTP = SDSNT.getNodeTypePropByObjectClassProp( CswNbtObjClassDocument.PropertyName.Owner ); CswNbtMetaDataNodeType ChemicalNT = _CswNbtSchemaModTrnsctn.MetaData.getNodeType( "Chemical" ); if( null != ChemicalNT ) { TradeNameNTP.SetFK( NbtViewRelatedIdType.NodeTypeId.ToString(), ChemicalNT.NodeTypeId ); } TradeNameNTP.PropName = "Tradename"; CswNbtMetaDataNodeTypeProp RevisionDateNTP = _CswNbtSchemaModTrnsctn.MetaData.makeNewProp( new CswNbtWcfMetaDataModel.NodeTypeProp( SDSNT, _CswNbtSchemaModTrnsctn.MetaData.getFieldType( CswNbtMetaDataFieldType.NbtFieldType.DateTime ), "Revision Date" ) ); CswNbtMetaDataNodeTypeProp LanguageNTP = SDSNT.getNodeTypePropByObjectClassProp( CswNbtObjClassDocument.PropertyName.Language ); LanguageNTP.updateLayout( CswNbtMetaDataNodeTypeLayoutMgr.LayoutType.Add, true, SDSNT.getFirstNodeTypeTab().TabId ); CswNbtMetaDataNodeTypeProp FormatNTP = SDSNT.getNodeTypePropByObjectClassProp( CswNbtObjClassDocument.PropertyName.Format ); FormatNTP.updateLayout( CswNbtMetaDataNodeTypeLayoutMgr.LayoutType.Add, true, SDSNT.getFirstNodeTypeTab().TabId ); SDSNT.setNameTemplateText( CswNbtMetaData.MakeTemplateEntry( CswNbtObjClassDocument.PropertyName.Title ) ); foreach( CswNbtMetaDataNodeType DocNT in DocumentOC.getNodeTypes() ) { CswNbtMetaDataNodeTypeProp DocClassNTP = DocNT.getNodeTypePropByObjectClassProp( CswNbtObjClassDocument.PropertyName.DocumentClass ); DocClassNTP.removeFromAllLayouts(); } } //Update()
protected override void afterPromoteNodeLogic() { // ------------------------------------------------------------ // This logic from makeNewTab in CswNbtMetaData.cs // ------------------------------------------------------------ if (CswTools.IsPrimaryKey(RelationalId)) { Int32 TabId = RelationalId.PrimaryKey; //CswTableUpdate TabsUpdate = _CswNbtResources.makeCswTableUpdate( "DesignNodeTypeTab_afterCreateNode_TabsUpdate", "nodetype_tabset" ); //DataTable TabsTable = TabsUpdate.getTable( "nodetypetabsetid", TabId ); //if( TabsTable.Rows.Count > 0 ) //{ // Version, if necessary //NodeType = CheckVersioning( NodeType ); //DataRow Row = TabsTable.Rows[0]; DataRow Row = RelationalNodeTypeTab._DataRow; if (null != Row) { Row["firsttabversionid"] = CswConvert.ToDbVal(TabId); //TabsUpdate.update( TabsTable ); } CswNbtMetaDataNodeTypeProp SaveNtp = NodeType.getNodeTypeProp(CswNbtObjClass.PropertyName.Save); if (null != SaveNtp) //Case 29181 - Save prop on new tabs { //Note - when first creating a new NodeType and creating its first tab this will be null, which is expected SaveNtp.updateLayout(CswEnumNbtLayoutType.Edit, false, TabId: TabId, DisplayColumn: 1, DisplayRow: Int32.MaxValue); } //} // if( TabsTable.Rows.Count > 0 ) } // if( CswTools.IsPrimaryKey( RelationalId ) ) } // afterPromoteNode()
public void AddPropToTab(int NodeTypeId, string PropName, CswNbtMetaDataNodeTypeTab Tab, int Row = Int32.MinValue, int Col = Int32.MinValue, string TabGroup = "") { CswNbtMetaDataNodeTypeProp NodeTypeProp = _CswNbtResources.MetaData.getNodeTypeProp(NodeTypeId, PropName); if (null != NodeTypeProp) { CswNbtMetaDataNodeType locationNT = _CswNbtResources.MetaData.getNodeType(NodeTypeId); if (Int32.MinValue != Row && Int32.MinValue != Col) { NodeTypeProp.updateLayout(CswEnumNbtLayoutType.Edit, true, Tab.TabId, DisplayRow: Row, DisplayColumn: Col, TabGroup: TabGroup); } else { NodeTypeProp.updateLayout(CswEnumNbtLayoutType.Edit, true, Tab.TabId); } } }
}//Update() private void _addToPreview( String NodeTypePropName ) { CswNbtMetaDataNodeTypeProp ChemicalNTP = ChemicalNT.getNodeTypeProp( NodeTypePropName ); if( null != ChemicalNTP ) { ChemicalNTP.updateLayout( CswNbtMetaDataNodeTypeLayoutMgr.LayoutType.Preview, true ); } }
private void _filterToSDS( CswNbtMetaDataNodeType DocumentNT, String NodeTypePropName ) { CswNbtMetaDataNodeTypeProp DocumentNTP = DocumentNT.getNodeTypeProp( NodeTypePropName ); if( null != DocumentNTP ) { DocumentNTP.setFilter( DocumentClassNTP, DocumentClassNTP.getFieldTypeRule().SubFields.Default, CswNbtPropFilterSql.PropertyFilterMode.Equals, CswNbtObjClassDocument.DocumentClasses.SDS ); DocumentNTP.updateLayout( CswNbtMetaDataNodeTypeLayoutMgr.LayoutType.Add, true, DocumentNT.getFirstNodeTypeTab().TabId ); } }
} // update() //From MLM module private void _toggleMaterialRequestApprovalLevel( CswEnumNbtObjectClass ObjClass, bool MLMDisabled ) { CswNbtMetaDataObjectClass createMaterialRequestOC = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass( ObjClass ); foreach( CswNbtMetaDataNodeType createMaterialRequestNT in createMaterialRequestOC.getNodeTypes() ) { CswNbtMetaDataNodeTypeProp approvalLevelNT = createMaterialRequestNT.getNodeTypePropByObjectClassProp( CswNbtObjClassRequestMaterialCreate.PropertyName.ApprovalLevel ); if( MLMDisabled ) { approvalLevelNT.removeFromAllLayouts(); } else { CswNbtMetaDataNodeTypeTab firstTab = createMaterialRequestNT.getFirstNodeTypeTab(); approvalLevelNT.updateLayout( CswEnumNbtLayoutType.Edit, true, TabId: firstTab.TabId ); approvalLevelNT.updateLayout( CswEnumNbtLayoutType.Add, true ); } } }
public override void update() { CswNbtMetaDataObjectClass FireClassSetOC = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass( CswEnumNbtObjectClass.FireClassExemptAmountSetClass ); foreach( CswNbtMetaDataNodeType FireClassSetNT in FireClassSetOC.getNodeTypes() ) { CswNbtMetaDataNodeTypeProp SetNameNTP = FireClassSetNT.getNodeTypePropByObjectClassProp( CswNbtObjClassFireClassExemptAmountSet.PropertyName.SetName ); SetNameNTP.updateLayout( CswEnumNbtLayoutType.Add, true, DisplayRow: 1, DisplayColumn: 1 ); } } // update()
public override void update() { CswNbtMetaDataObjectClass UnitOfMeasureOC = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass( NbtObjectClass.UnitOfMeasureClass ); foreach( CswNbtMetaDataNodeType UnitOfMeasureNT in UnitOfMeasureOC.getNodeTypes() ) { CswNbtMetaDataNodeTypeProp ConversionFactorNTP = UnitOfMeasureNT.getNodeTypePropByObjectClassProp( CswNbtObjClassUnitOfMeasure.PropertyName.ConversionFactor ); ConversionFactorNTP.updateLayout( CswNbtMetaDataNodeTypeLayoutMgr.LayoutType.Add, null, false ); } }
public override void update() { CswNbtMetaDataObjectClass UserOC = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass( CswEnumNbtObjectClass.UserClass ); foreach( CswNbtMetaDataNodeType UserNT in UserOC.getNodeTypes() ) { CswNbtMetaDataNodeTypeProp WorkUnitNTP = UserNT.getNodeTypePropByObjectClassProp( CswNbtObjClassUser.PropertyName.WorkUnit ); CswNbtMetaDataNodeTypeTab UserTab = UserNT.getFirstNodeTypeTab(); WorkUnitNTP.updateLayout( CswEnumNbtLayoutType.Edit, true, UserTab.TabId ); } } // update()
public override void update() { CswNbtMetaDataObjectClass UnitOfMeasureOC = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass( NbtObjectClass.UnitOfMeasureClass ); foreach(CswNbtMetaDataNodeType UoMNT in UnitOfMeasureOC.getNodeTypes()) { CswNbtMetaDataNodeTypeProp BaseUnitNTP = _CswNbtSchemaModTrnsctn.MetaData.getNodeTypePropByObjectClassProp( UoMNT.NodeTypeId, CswNbtObjClassUnitOfMeasure.PropertyName.BaseUnit ); BaseUnitNTP.StaticText = BaseUnitNTP.DefaultValue.AsText.Text; BaseUnitNTP.updateLayout( CswNbtMetaDataNodeTypeLayoutMgr.LayoutType.Add, true ); BaseUnitNTP.ServerManaged = false; } } //Update()
public override void update() { CswNbtMetaDataObjectClass ManufacturerOC = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass( CswEnumNbtObjectClass.ManufacturerClass ); foreach( CswNbtMetaDataNodeType ManufacturerNT in ManufacturerOC.getNodeTypes() ) { CswNbtMetaDataNodeTypeTab QualifiedNTT = _CswNbtSchemaModTrnsctn.MetaData.makeNewTab( ManufacturerNT, "Qualified" ); CswNbtMetaDataNodeTypeProp QualifiedNTP = ManufacturerNT.getNodeTypePropByObjectClassProp( CswNbtObjClassManufacturer.PropertyName.Qualified ); QualifiedNTP.updateLayout( CswEnumNbtLayoutType.Edit, true, QualifiedNTT.TabId ); } } // update()
public override void update() { //add Inspection Design Status prop to the table layout CswNbtMetaDataObjectClass inspectionDesignOC = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass( NbtObjectClass.InspectionDesignClass ); foreach( CswNbtMetaDataNodeType inspectionNT in inspectionDesignOC.getNodeTypes() ) { CswNbtMetaDataNodeTypeProp statusNTP = inspectionNT.getNodeTypePropByObjectClassProp( CswNbtObjClassInspectionDesign.PropertyName.Status ); statusNTP.updateLayout( CswNbtMetaDataNodeTypeLayoutMgr.LayoutType.Table, null, false ); } }
private void _doLayoutUpdate(string PropName, Int32 Row, Int32 Column, bool DoMove, bool DoNotTrack, CswEnumNbtLayoutType LayoutType = null) { CswNbtSchemaUpdateLayoutMgr.LayoutProp Prop = _vetLayoutOp(PropName, DoNotTrack, LayoutType); foreach (CswNbtMetaDataNodeType NodeType in _LayoutMgr.LatestVersionNodeTypes) { CswNbtMetaDataNodeTypeTab Tab = _getTab(_LayoutMgr.SchemaModTrnsctn, NodeType); CswNbtMetaDataNodeTypeProp Ntp = NodeType.getNodeTypePropByObjectClassProp(Prop.Prop); Ntp.updateLayout(Prop.Layout, TabId: Tab.TabId, DoMove: DoMove, DisplayRow: Row, DisplayColumn: Column); } }
public override void update() { CswNbtMetaDataObjectClass RequestMaterialCreateOC = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass( CswEnumNbtObjectClass.RequestMaterialCreateClass ); foreach( CswNbtMetaDataNodeType RequestMaterialCreateNT in RequestMaterialCreateOC.getNodeTypes() ) { CswNbtMetaDataNodeTypeProp LocationNTP = RequestMaterialCreateNT.getNodeTypePropByObjectClassProp( CswNbtObjClassRequestMaterialCreate.PropertyName.Location ); LocationNTP.updateLayout( CswEnumNbtLayoutType.Add, true ); CswNbtMetaDataNodeTypeProp QuantityNTP = RequestMaterialCreateNT.getNodeTypePropByObjectClassProp( CswNbtObjClassRequestMaterialCreate.PropertyName.Quantity ); QuantityNTP.updateLayout( CswEnumNbtLayoutType.Add, true ); } } // update()
public override void update() { // Add storage compatibility to location preview CswNbtMetaDataObjectClass LocationOC = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass( NbtObjectClass.LocationClass ); foreach( CswNbtMetaDataNodeType LocationNT in LocationOC.getNodeTypes() ) { CswNbtMetaDataNodeTypeProp StorageCompatOCP = LocationNT.getNodeTypePropByObjectClassProp( CswNbtObjClassLocation.PropertyName.StorageCompatibility ); StorageCompatOCP.updateLayout( CswNbtMetaDataNodeTypeLayoutMgr.LayoutType.Preview, false ); } } //Update()