Changed SubSection.Edit Section Config property to correctly be defaulted to "No"

Base MyConfig on the type of item (Procedure, Section or Step)
Keep the code from crashing iff the user selects a result in the search window that points to non-editable text
This commit is contained in:
Rich
2015-02-16 20:22:57 +00:00
parent 469a8da0ba
commit 3e413b0f17
3 changed files with 43 additions and 11 deletions

View File

@@ -3017,13 +3017,16 @@ namespace VEPROMS.CSLA.Library
switch (MyContent.Type / 10000)
{
case 0:
_MyConfig = new ProcedureConfig(MyContent.Config);
//_MyConfig = new ProcedureConfig(MyContent.Config);
_MyConfig = new ProcedureConfig(this as ProcedureInfo ?? ProcedureInfo.Get(ItemID));
break;
case 1:
_MyConfig = new SectionConfig(MyContent.Config);
//_MyConfig = new SectionConfig(MyContent.Config);
_MyConfig = new SectionConfig(this as SectionInfo ?? SectionInfo.Get(ItemID));
break;
case 2:
_MyConfig = new StepConfig(MyContent.Config);
//_MyConfig = new StepConfig(MyContent.Config);
_MyConfig = new StepConfig(this as StepInfo ?? StepInfo.Get(ItemID));
break;
}
}