This commit is contained in:
Kathy Ruffing 2010-10-19 16:43:31 +00:00
parent 8f110a10e3
commit 08d4b3c923
2 changed files with 10 additions and 12 deletions

View File

@ -1134,6 +1134,7 @@ namespace VEPROMS.CSLA.Library
public string SearchAnnotationText public string SearchAnnotationText
{ {
get { return _SearchAnnotationText; } get { return _SearchAnnotationText; }
set { _SearchAnnotationText = value; }
} }
internal string _SearchAnnotationType; internal string _SearchAnnotationType;
public string SearchAnnotationType public string SearchAnnotationType

View File

@ -624,23 +624,20 @@ namespace VEPROMS.CSLA.Library
} }
private static bool AddOptionalTranGetSectionHdr(bool textAdded, TransitionBuilder tb, string token, string nonToken) private static bool AddOptionalTranGetSectionHdr(bool textAdded, TransitionBuilder tb, string token, string nonToken)
{ {
// If section is not a procedure step section, add it.
// If Procedure going to has only 1 step section, do not add it.
// If procedure going to has more than 1 step section and is NOT same procedure
// and going to default section, do not add it.
// If procedure going to has more than 1 step section and going to non-default section, add it.
// first handle 'to' non-step section. Always add it. // first handle 'to' non-step section. Always add it.
if (tb._ToItem.IsSection && !tb._ToItem.IsStepSection)return AddTranGetSectionHdr(textAdded, tb, token, nonToken); if (tb._ToItem.IsSection && !tb._ToItem.IsStepSection)return AddTranGetSectionHdr(textAdded, tb, token, nonToken);
// Now, handle case where 'to' procedure only has one step section OR going 'to' the default section of a
// different procedure. It is NOT added.
int cntsect = 0; int cntsect = 0;
ItemInfo sect = TranGetSectionItem(tb._ToItem); ItemInfo sect = TranGetSectionItem(tb._ToItem);
foreach (ItemInfo ii in tb._ToItem.MyProcedure.Sections) if (ii.IsStepSection) cntsect++; foreach (ItemInfo ii in tb._ToItem.MyProcedure.Sections) if (ii.IsStepSection) cntsect++;
if (cntsect == 1 || (sect != null && sect.IsDefaultSection && tb._ToItem.IsStep) // If Procedure going to has only 1 step section, do not add it.
|| (tb._ToItem.MyProcedure != tb._FromItem.MyProcedure && sect != null && sect.IsDefaultSection && tb._ToItem.IsSection) if (cntsect == 1) return textAdded ? true : false;
|| tb._ToItem.IsProcedure) return textAdded ? true : false;
// If procedure going to has more than 1 step section and is NOT same procedure
// and going to default section, do not add it.
if (tb._ToItem.MyProcedure.ItemID != tb._FromItem.MyProcedure.ItemID && sect != null &&
sect.IsDefaultSection) return textAdded ? true : false;
return AddTranGetSectionHdr(textAdded, tb, token, nonToken); return AddTranGetSectionHdr(textAdded, tb, token, nonToken);
} }
private static bool AddTranGetSectionHdr(bool textAdded, TransitionBuilder tb, string token, string nonToken) private static bool AddTranGetSectionHdr(bool textAdded, TransitionBuilder tb, string token, string nonToken)