Continuous Action Summary logic

Added a LazyLoad that passes in the default value
This commit is contained in:
2015-10-23 18:13:53 +00:00
parent 17d4c2b26b
commit 8708d0bbfc
4 changed files with 114 additions and 12 deletions

View File

@@ -1511,6 +1511,43 @@ namespace VEPROMS.CSLA.Library
StepData sd = sdlist[stepType];
return (sd.Type == type);
}
// determine if the the current step should automatically be placed on the Continuous Action Summary
// Note, this logic only checks the format setting of the step. We will check the value of the Tag's Check Box later on.
public bool IncludeOnContActSum
{
get
{
bool includeOnCAS = false;
if ((int)MyContent.Type < 20000) return includeOnCAS;
int stepType = ((int)MyContent.Type) % 10000;
StepDataList sdlist = ActiveFormat.PlantFormat.FormatData.StepDataList;
if (stepType > sdlist.MaxIndex)
{
//Console.WriteLine("IncludeOnContActSum - Error getting type - contentid = {0}", MyContent.ContentID);
_MyLog.InfoFormat(string.Format("IncludeOnContActSum - Error getting type - contentid = {0}", MyContent.ContentID));
return false;
}
// By default the PROMS step types that are initally identified as a Continuous Action type will return True,
// unless the format flag "ExcludeFromContActSum" is set on that step type
StepData sd = sdlist[stepType];
switch (stepType)
{
case 9: // Continuous Action High Level Step
case 44: // Continuous Action Sequential sub-step
case 45: // Continuous Action AND sub-step
case 46: // Continuous Action OR sub-step
case 47: //Continuous Actoin Paragraph sub-step
includeOnCAS = !sd.ExcludeFromContActSum; // if flag is not set then Automatically include this step/sub-step on the Continuous Action Summary
break;
default:
includeOnCAS = !sd.ExcludeFromContActSum; //false; // don't automatically include this step/sub-step on the Continuous Action Summary
break;
}
return includeOnCAS;
}
}
public bool IsCautionOrNotePart
{
get