Esempio n. 1
0
 private void _init(CswNbtMetaDataNodeType NbtNodeType, CswNbtMetaDataFieldType NbtFieldType, string NbtPropName)
 {
     if (null == NbtNodeType)
     {
         throw new CswDniException(CswEnumErrorType.Error, "Cannot create a NodeTypeProp DataContract without a valid Node Type", "Attempted to instance CswNbtWcfMetaDataModel.NodeTypeProp with a null NodeType.");
     }
     if (null == NbtFieldType)
     {
         throw new CswDniException(CswEnumErrorType.Error, "Cannot create a NodeTypeProp DataContract without a valid Field Type", "Attempted to instance CswNbtWcfMetaDataModel.NodeTypeProp with a null FieldType.");
     }
     if (string.IsNullOrEmpty(NbtPropName))
     {
         throw new CswDniException(CswEnumErrorType.Warning, "Property Name is required", "Attempted to create a new nodetype prop with a null propname");
     }
     NodeType     = NbtNodeType;
     NodeTypeId   = NodeType.NodeTypeId;
     FieldType    = NbtFieldType;
     PropName     = NbtPropName;
     UseNumbering = (NodeType.getObjectClass().ObjectClass == CswEnumNbtObjectClass.InspectionDesignClass &&
                     FieldType.FieldType == CswEnumNbtFieldType.Question);
     if (FieldType.FieldType == CswEnumNbtFieldType.NodeTypeSelect)
     {
         Multi = CswEnumTristate.False;
     }
     else
     {
         Multi = CswEnumTristate.Null;
     }
     ReadOnly = (FieldType.FieldType == CswEnumNbtFieldType.Barcode ||
                 FieldType.FieldType == CswEnumNbtFieldType.Sequence);
     IsUnique = (FieldType.FieldType == CswEnumNbtFieldType.Barcode ||
                 FieldType.FieldType == CswEnumNbtFieldType.Sequence);
 }
Esempio n. 2
0
 public NodeTypeProp(CswNbtMetaDataNodeType NbtNodeType, CswNbtMetaDataFieldType NbtFieldType, string NbtPropName)
 {
     _init(NbtNodeType, NbtFieldType, NbtPropName);
 }
Esempio n. 3
0
 public void AddToCache( CswNbtMetaDataFieldType NewObj )
 {
     _CollImpl.AddToCache( NewObj );
 }