public override void update() { CswNbtMetaDataObjectClass ContainerOC = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass( CswEnumNbtObjectClass.ContainerClass ); foreach( CswNbtMetaDataNodeType ContainerNT in ContainerOC.getNodeTypes() ) { CswNbtMetaDataNodeTypeProp ViewSDS_NTP = ContainerNT.getNodeTypePropByObjectClassProp( CswNbtObjClassContainer.PropertyName.ViewSDS ); CswNbtMetaDataNodeTypeTab ContainerIdentityTab = ContainerNT.getIdentityTab(); ViewSDS_NTP.updateLayout( CswEnumNbtLayoutType.Edit, true, ContainerIdentityTab.TabId, 1, 2 ); } } // update()
public override void update() { // Set container name template to include Disposed CswNbtMetaDataObjectClass ContainerOC = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass( NbtObjectClass.ContainerClass ); foreach( CswNbtMetaDataNodeType ContainerNT in ContainerOC.getNodeTypes() ) { CswNbtMetaDataNodeTypeProp BarcodeNTP = ContainerNT.getNodeTypePropByObjectClassProp( CswNbtObjClassContainer.PropertyName.Barcode ); CswNbtMetaDataNodeTypeProp DisposedNTP = ContainerNT.getNodeTypePropByObjectClassProp( CswNbtObjClassContainer.PropertyName.Disposed ); ContainerNT.setNameTemplateText( CswNbtMetaData.MakeTemplateEntry( BarcodeNTP.PropName ) + " " + CswNbtMetaData.MakeTemplateEntry( DisposedNTP.PropName ) ); } } //update()
public override void update() { CswNbtMetaDataObjectClass ContainerOC = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass( CswEnumNbtObjectClass.ContainerClass ); foreach( CswNbtMetaDataNodeType ContainerNT in ContainerOC.getNodeTypes() ) { _CswNbtSchemaModTrnsctn.MetaData.NodeTypeLayout.clearLayout( CswEnumNbtLayoutType.Add, ContainerNT.NodeTypeId ); CswNbtMetaDataNodeTypeProp OwnerNTP = ContainerNT.getNodeTypePropByObjectClassProp( CswNbtObjClassContainer.PropertyName.Owner ); CswNbtMetaDataNodeTypeProp LocationNTP = ContainerNT.getNodeTypePropByObjectClassProp( CswNbtObjClassContainer.PropertyName.Location ); CswNbtMetaDataNodeTypeProp LabelFormatNTP = ContainerNT.getNodeTypePropByObjectClassProp( CswNbtObjClassContainer.PropertyName.LabelFormat ); CswNbtMetaDataNodeTypeProp ExpirationDateNTP = ContainerNT.getNodeTypePropByObjectClassProp( CswNbtObjClassContainer.PropertyName.ExpirationDate ); OwnerNTP.updateLayout( CswEnumNbtLayoutType.Add, false, DisplayRow: 1, DisplayColumn: 1 ); LocationNTP.updateLayout( CswEnumNbtLayoutType.Add, false, DisplayRow: 2, DisplayColumn: 1 ); LabelFormatNTP.updateLayout( CswEnumNbtLayoutType.Add, false, DisplayRow: 3, DisplayColumn: 1 ); ExpirationDateNTP.updateLayout( CswEnumNbtLayoutType.Add, false, DisplayRow: 4, DisplayColumn: 1 ); } } // update()
public override void update() { CswNbtMetaDataObjectClass ContainerOC = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass( CswEnumNbtObjectClass.ContainerClass ); foreach( CswNbtMetaDataNodeType ContainerNT in ContainerOC.getNodeTypes() ) { CswNbtMetaDataNodeTypeProp ReceiptLotNTP = ContainerNT.getNodeTypePropByObjectClassProp( CswNbtObjClassContainer.PropertyName.ReceiptLot ); if( null != ReceiptLotNTP ) { ReceiptLotNTP.Hidden = false; if( _CswNbtSchemaModTrnsctn.Modules.IsModuleEnabled( CswEnumNbtModuleName.MLM ) ) { CswNbtMetaDataNodeTypeProp DateCreatedNTP = ContainerNT.getNodeTypePropByObjectClassProp( CswNbtObjClassContainer.PropertyName.DateCreated ); ReceiptLotNTP.updateLayout( CswEnumNbtLayoutType.Edit, DateCreatedNTP, true ); } else { ReceiptLotNTP.removeFromAllLayouts(); } } } }
public override void update() { if (_CswNbtSchemaModTrnsctn.isMaster()) { CswNbtMetaDataObjectClass ContainerOC = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass(CswEnumNbtObjectClass.ContainerClass); foreach (CswNbtMetaDataNodeType ContainerNT in ContainerOC.getNodeTypes()) { CswNbtMetaDataNodeTypeTab firstTab = ContainerNT.getFirstNodeTypeTab(); CswNbtMetaDataNodeTypeTab identityTab = ContainerNT.getIdentityTab(); //update the edit layout CswNbtMetaDataNodeTypeProp BarcodeNTP = ContainerNT.getNodeTypePropByObjectClassProp(CswNbtObjClassContainer.PropertyName.Barcode); BarcodeNTP.updateLayout(CswEnumNbtLayoutType.Edit, true, identityTab.TabId, 1, 1); CswNbtMetaDataNodeTypeProp MaterialNTP = ContainerNT.getNodeTypePropByObjectClassProp(CswNbtObjClassContainer.PropertyName.Material); MaterialNTP.updateLayout(CswEnumNbtLayoutType.Edit, true, identityTab.TabId, 2, 1); CswNbtMetaDataNodeTypeProp QuantityNTP = ContainerNT.getNodeTypePropByObjectClassProp(CswNbtObjClassContainer.PropertyName.Quantity); QuantityNTP.updateLayout(CswEnumNbtLayoutType.Edit, true, identityTab.TabId, 3, 1); CswNbtMetaDataNodeTypeProp OwnerNTP = ContainerNT.getNodeTypePropByObjectClassProp(CswNbtObjClassContainer.PropertyName.Owner); OwnerNTP.updateLayout(CswEnumNbtLayoutType.Edit, true, firstTab.TabId, 1, 1); OwnerNTP.updateLayout(CswEnumNbtLayoutType.Add, true, firstTab.TabId, 1, 1); CswNbtMetaDataNodeTypeProp LocationNTP = ContainerNT.getNodeTypePropByObjectClassProp(CswNbtObjClassContainer.PropertyName.Location); LocationNTP.updateLayout(CswEnumNbtLayoutType.Edit, true, firstTab.TabId, 2, 1); LocationNTP.updateLayout(CswEnumNbtLayoutType.Add, true, firstTab.TabId, 2, 1); CswNbtMetaDataNodeTypeProp OpenButtonNTP = ContainerNT.getNodeTypePropByObjectClassProp(CswNbtObjClassContainer.PropertyName.Open); OpenButtonNTP.updateLayout(CswEnumNbtLayoutType.Edit, true, firstTab.TabId, 4, 1); CswNbtMetaDataNodeTypeProp OpenedDateNTP = ContainerNT.getNodeTypePropByObjectClassProp(CswNbtObjClassContainer.PropertyName.OpenedDate); OpenedDateNTP.updateLayout(CswEnumNbtLayoutType.Edit, true, firstTab.TabId, 5, 1); CswNbtMetaDataNodeTypeProp DateCreatedNTP = ContainerNT.getNodeTypePropByObjectClassProp(CswNbtObjClassContainer.PropertyName.DateCreated); DateCreatedNTP.updateLayout(CswEnumNbtLayoutType.Edit, true, firstTab.TabId, 6, 1); CswNbtMetaDataNodeTypeProp LabelFormatNTP = ContainerNT.getNodeTypePropByObjectClassProp(CswNbtObjClassContainer.PropertyName.LabelFormat); LabelFormatNTP.updateLayout(CswEnumNbtLayoutType.Edit, true, firstTab.TabId, 7, 1); LabelFormatNTP.updateLayout(CswEnumNbtLayoutType.Add, true, firstTab.TabId, 5, 1); CswNbtMetaDataNodeTypeProp ExpDateNTP = ContainerNT.getNodeTypePropByObjectClassProp(CswNbtObjClassContainer.PropertyName.ExpirationDate); ExpDateNTP.updateLayout(CswEnumNbtLayoutType.Edit, true, firstTab.TabId, 3, 1); ExpDateNTP.updateLayout(CswEnumNbtLayoutType.Add, true, firstTab.TabId, 3, 1); CswNbtMetaDataNodeTypeProp MissingNTP = ContainerNT.getNodeTypePropByObjectClassProp(CswNbtObjClassContainer.PropertyName.Missing); MissingNTP.updateLayout(CswEnumNbtLayoutType.Edit, true, firstTab.TabId, 2, 2); CswNbtMetaDataNodeTypeProp StatusNTP = ContainerNT.getNodeTypePropByObjectClassProp(CswNbtObjClassContainer.PropertyName.Status); StatusNTP.updateLayout(CswEnumNbtLayoutType.Edit, true, firstTab.TabId, 3, 2); CswNbtMetaDataNodeTypeProp RecieptLotNTP = ContainerNT.getNodeTypePropByObjectClassProp(CswNbtObjClassContainer.PropertyName.ReceiptLot); RecieptLotNTP.updateLayout(CswEnumNbtLayoutType.Edit, true, firstTab.TabId, 4, 2); CswNbtMetaDataNodeTypeProp ContainerGroupNTP = ContainerNT.getNodeTypePropByObjectClassProp(CswNbtObjClassContainer.PropertyName.ContainerGroup); ContainerGroupNTP.updateLayout(CswEnumNbtLayoutType.Edit, true, firstTab.TabId, 5, 2); CswNbtMetaDataNodeTypeProp ContainerFamilyNTP = ContainerNT.getNodeTypePropByObjectClassProp(CswNbtObjClassContainer.PropertyName.ContainerFamily); ContainerFamilyNTP.updateLayout(CswEnumNbtLayoutType.Edit, true, firstTab.TabId, 6, 2); CswNbtMetaDataNodeTypeProp UndisposeContainerNTP = ContainerNT.getNodeTypePropByObjectClassProp (CswNbtObjClassContainer.PropertyName.Undispose); UndisposeContainerNTP.updateLayout(CswEnumNbtLayoutType.Edit, true, firstTab.TabId, 7, 2); CswNbtMetaDataNodeTypeProp DisposeContainerNTP = ContainerNT.getNodeTypePropByObjectClassProp (CswNbtObjClassContainer.PropertyName.Dispose); DisposeContainerNTP.updateLayout(CswEnumNbtLayoutType.Edit, true, firstTab.TabId, 8, 2); //update the preview layout BarcodeNTP.updateLayout(CswEnumNbtLayoutType.Preview, true, identityTab.TabId, 1, 1); MaterialNTP.updateLayout(CswEnumNbtLayoutType.Preview, true, identityTab.TabId, 2, 1); QuantityNTP.updateLayout(CswEnumNbtLayoutType.Preview, true, identityTab.TabId, 3, 1); } } }
public override void update() { CswNbtMetaDataObjectClass ContainerOC = _CswNbtSchemaModTrnsctn.MetaData.getObjectClass( CswEnumNbtObjectClass.ContainerClass ); if( null != ContainerOC ) { CswNbtMetaDataObjectClassProp HomeLocationOCP = _CswNbtSchemaModTrnsctn.createObjectClassProp( ContainerOC, new CswNbtWcfMetaDataModel.ObjectClassProp { FieldType = CswEnumNbtFieldType.Relationship, PropName = CswNbtObjClassContainer.PropertyName.HomeLocation, ReadOnly = true, IsFk = true, FkType = CswEnumNbtViewRelatedIdType.ObjectClassId.ToString(), FkValue = _CswNbtSchemaModTrnsctn.MetaData.getObjectClassId( CswEnumNbtObjectClass.LocationClass ) } ); CswNbtMetaDataObjectClassProp ProjectOCP = _CswNbtSchemaModTrnsctn.createObjectClassProp( ContainerOC, new CswNbtWcfMetaDataModel.ObjectClassProp { FieldType = CswEnumNbtFieldType.Text, PropName = CswNbtObjClassContainer.PropertyName.Project, ReadOnly = true, } ); CswNbtMetaDataObjectClassProp TareQuantityOCP = _CswNbtSchemaModTrnsctn.createObjectClassProp( ContainerOC, new CswNbtWcfMetaDataModel.ObjectClassProp { FieldType = CswEnumNbtFieldType.Quantity, PropName = CswNbtObjClassContainer.PropertyName.TareQuantity, ReadOnly = true, IsFk = true, FkType = CswEnumNbtViewRelatedIdType.ObjectClassId.ToString(), FkValue = _CswNbtSchemaModTrnsctn.MetaData.getObjectClassId( CswEnumNbtObjectClass.UnitOfMeasureClass ) } ); CswNbtMetaDataObjectClassProp SpecificActivityOCP = _CswNbtSchemaModTrnsctn.createObjectClassProp( ContainerOC, new CswNbtWcfMetaDataModel.ObjectClassProp { FieldType = CswEnumNbtFieldType.Text, PropName = CswNbtObjClassContainer.PropertyName.SpecificActivity, ReadOnly = true, } ); CswNbtMetaDataObjectClassProp ConcentrationOCP = _CswNbtSchemaModTrnsctn.createObjectClassProp( ContainerOC, new CswNbtWcfMetaDataModel.ObjectClassProp { FieldType = CswEnumNbtFieldType.Text, PropName = CswNbtObjClassContainer.PropertyName.Concentration, ReadOnly = true, } ); CswNbtMetaDataObjectClassProp NotesOCP = _CswNbtSchemaModTrnsctn.createObjectClassProp( ContainerOC, new CswNbtWcfMetaDataModel.ObjectClassProp { FieldType = CswEnumNbtFieldType.Comments, PropName = CswNbtObjClassContainer.PropertyName.Notes, ReadOnly = true, } ); CswNbtMetaDataObjectClassProp OpenedDateOCP = _CswNbtSchemaModTrnsctn.createObjectClassProp( ContainerOC, new CswNbtWcfMetaDataModel.ObjectClassProp { FieldType = CswEnumNbtFieldType.DateTime, PropName = CswNbtObjClassContainer.PropertyName.OpenedDate, ReadOnly = true, } ); _CswNbtSchemaModTrnsctn.MetaData.makeMissingNodeTypeProps(); //in order to cascade hidden status to the nodetype props Collection<CswNbtMetaDataObjectClassProp> ObjectClassProps = new Collection<CswNbtMetaDataObjectClassProp> { HomeLocationOCP, ProjectOCP, TareQuantityOCP, SpecificActivityOCP, ConcentrationOCP, NotesOCP, OpenedDateOCP }; foreach( CswNbtMetaDataNodeType ContainerNT in ContainerOC.getNodeTypes() ) { foreach( CswNbtMetaDataObjectClassProp ObjectClassProp in ObjectClassProps ) { if( null != ObjectClassProp ) { CswNbtMetaDataNodeTypeProp NodetypeProp = ContainerNT.getNodeTypePropByObjectClassProp( ObjectClassProp ); if( null != NodetypeProp ) { NodetypeProp.removeFromAllLayouts(); } } } } }//if null != ContainerOC } // update()