diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/DisplayText.cs b/PROMS/VEPROMS.CSLA.Library/Extension/DisplayText.cs index e577b32f..23d2429b 100644 Binary files a/PROMS/VEPROMS.CSLA.Library/Extension/DisplayText.cs and b/PROMS/VEPROMS.CSLA.Library/Extension/DisplayText.cs differ diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/DocVersionExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/DocVersionExt.cs index bfb42c75..cd7870d1 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/DocVersionExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/DocVersionExt.cs @@ -114,7 +114,7 @@ namespace VEPROMS.CSLA.Library { get { return MyFormat; } } - public DynamicTypeDescriptor MyConfig + public ConfigDynamicTypeDescriptor MyConfig { get { return DocVersionConfig; } } @@ -359,7 +359,7 @@ namespace VEPROMS.CSLA.Library { get { return MyFormat; } } - public DynamicTypeDescriptor MyConfig + public ConfigDynamicTypeDescriptor MyConfig { get { return Get().DocVersionConfig; } } diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/FolderExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/FolderExt.cs index 96bfcca0..7752c61e 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/FolderExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/FolderExt.cs @@ -88,7 +88,7 @@ namespace VEPROMS.CSLA.Library { get { return MyFormat; } } - public DynamicTypeDescriptor MyConfig + public ConfigDynamicTypeDescriptor MyConfig { get { return FolderConfig; } } @@ -221,7 +221,7 @@ namespace VEPROMS.CSLA.Library { get { return MyFormat; } } - public DynamicTypeDescriptor MyConfig + public ConfigDynamicTypeDescriptor MyConfig { get { return Get().FolderConfig; } } diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs index 8c757c72..c54831e0 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs @@ -91,7 +91,7 @@ namespace VEPROMS.CSLA.Library { get { return MyContent.MyFormat; } } - public DynamicTypeDescriptor MyConfig + public ConfigDynamicTypeDescriptor MyConfig { get { return null; } } @@ -593,7 +593,7 @@ namespace VEPROMS.CSLA.Library { get { - if (((MyContent.Type / 10000) == 2) && ((((int)MyContent.Type) % 10000) == 0)) return true; + if (((MyContent.Type / 10000) == 2) && ((((int)MyContent.Type) % 10000) == 1)) return true; return false; } } @@ -615,6 +615,19 @@ namespace VEPROMS.CSLA.Library return parent.IsInRNO; } } + /// + /// FormatStepType - Maps to step type in format file. All types map directly from step type in content + /// to step type in format except rno. The '39' is the RNO index in the format file. Note that we + /// could loop through the format's stepdata to find rnotype if we want this to be more flexible? + /// + public int FormatStepType + { + get + { + if (IsRNO) return 40; + else return (((int)MyContent.Type) % 10000); + } + } public ItemInfo FirstSibling { get @@ -1078,8 +1091,8 @@ namespace VEPROMS.CSLA.Library { get { return MyContent.MyFormat; } } - private DynamicTypeDescriptor _MyConfig=null; - public DynamicTypeDescriptor MyConfig + private ConfigDynamicTypeDescriptor _MyConfig=null; + public ConfigDynamicTypeDescriptor MyConfig { get { @@ -1093,10 +1106,18 @@ namespace VEPROMS.CSLA.Library case 1: _MyConfig = new SectionConfig(MyContent.Config); break; + case 2: + _MyConfig = new StepConfig(MyContent.Config); + break; } } return _MyConfig; } + set + { + if (_MyConfig == null) return; + // MyContent.Config = value; + } } //public bool HasStandardSteps() //{ return MyContent.ContentItemCount > 1; } @@ -1285,7 +1306,7 @@ namespace VEPROMS.CSLA.Library public ProcedureConfig ProcedureConfig { get { return (_ProcedureConfig != null ? _ProcedureConfig : _ProcedureConfig = new ProcedureConfig(this)); } } #endregion - public new DynamicTypeDescriptor MyConfig + public new ConfigDynamicTypeDescriptor MyConfig { get { return ProcedureConfig ; } } @@ -1402,7 +1423,7 @@ namespace VEPROMS.CSLA.Library public SectionConfig SectionConfig { get { return (_SectionConfig != null ? _SectionConfig : _SectionConfig = new SectionConfig(this)); } } #endregion - public new DynamicTypeDescriptor MyConfig + public new ConfigDynamicTypeDescriptor MyConfig { get { return SectionConfig; } } diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/PartExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/PartExt.cs index 077beab4..63fe2b1b 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/PartExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/PartExt.cs @@ -120,7 +120,7 @@ namespace VEPROMS.CSLA.Library { get { return null; } } - public DynamicTypeDescriptor MyConfig + public ConfigDynamicTypeDescriptor MyConfig { get { return null; } }