Added Format Flag to account for Sub-sections levels in the Sequential Numbering

B2015-162 Bug was able to be fixed with data.  Attachment 7 and 8 in Shared AOP 79 were incorrectly set to print Number and Title.
This commit is contained in:
Rich
2015-10-13 13:56:32 +00:00
parent fc05c5feec
commit 406ec0f036
4 changed files with 32 additions and 1 deletions

View File

@@ -3336,6 +3336,9 @@ namespace VEPROMS.CSLA.Library
localPrintLevel = PrintLevel + ((ActiveFormat.PlantFormat.FormatData.Express && IsSequential) ? 0 : CurrentSectionLevel());
if (!ActiveFormat.PlantFormat.FormatData.Express) doMeta = true;
}
if(sd.StepSectionLayoutData.TieTabToLevel && ActiveFormat.PlantFormat.FormatData.SectData.CountSubSectionsForLevel)
if (SectionLevel() > 1)
localPrintLevel += 1;
SeqTabFmtList seqtabs = ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.SeqTabFmtList;
// Start with basic cases of alpha/numeric/seq:
// If we have metasections AND...
@@ -3626,6 +3629,17 @@ namespace VEPROMS.CSLA.Library
_MyTab.Text = tbformat;
_MyTab.CleanText = cltext != null ? cltext : tbformat;
}
private int SectionLevel()
{
int level = 0;
ItemInfo ii = this;
while (!ii.IsProcedure)
{
if (ii.IsSection) level++;
ii = ii.ActiveParent as ItemInfo;
}
return level;
}
private bool InCaution()
{
// walk up until procedure level and if finding a caution type, return true, otherwise false.
@@ -6353,6 +6367,11 @@ namespace VEPROMS.CSLA.Library
[Serializable()]
public partial class StepInfo : ItemInfo
{
#region StepConfig
private StepConfig _StepConfig;
public StepConfig StepConfig
{ get { return (_StepConfig != null ? _StepConfig : _StepConfig = new StepConfig(this)); } }
#endregion
#region Tab
public override void SetupTags()
{

View File

@@ -1893,6 +1893,14 @@ namespace VEPROMS.CSLA.Library
return LazyLoad(ref _UseMetaSections, "@UseMetaSections");
}
}
private LazyLoad<bool> _CountSubSectionsForLevel;
public bool CountSubSectionsForLevel
{
get
{
return LazyLoad(ref _CountSubSectionsForLevel, "@CountSubSectionsForLevel");
}
}
private LazyLoad<bool> _PrintPhoneList;
public bool PrintPhoneList
{