Fixed initialization of the Print Section Number and Title

Fixed the logic that determines the column mode of a section
Logic to support the {HLSTEXT} token
This commit is contained in:
2013-06-10 19:53:02 +00:00
parent df121e54a9
commit f963dfc03c
4 changed files with 35 additions and 21 deletions

View File

@@ -475,6 +475,28 @@ namespace VEPROMS.CSLA.Library
// If there is no parent value, then use the volian default
if (s == string.Empty)
{
SectionInfo si = _SectionInfo != null ? _SectionInfo : SectionInfo.Get(_Section.ItemID);
if (si != null)
{
E_PurchaseOptions po = (E_PurchaseOptions)(MyFormat ?? MyDefaultFormat).PlantFormat.FormatData.PurchaseOptions;
bool enhDev = (po & E_PurchaseOptions.EnhancedDeviations) == E_PurchaseOptions.EnhancedDeviations;
bool enhBack = (po & E_PurchaseOptions.EnhancedBackgrounds) == E_PurchaseOptions.EnhancedBackgrounds;
if (!enhDev && !enhBack)
{
switch (si.MyProcedure.ProcedureConfig.Format_Columns)
{
case FormatColumns.OneColumn:
return SectionColumnMode.One;
break;
case FormatColumns.TwoColumn:
return SectionColumnMode.Two;
break;
//default:
// return SectionColumnMode.One;
// break;
}
}
}
int rval = 0;
if (MyFormat != null)
{
@@ -492,24 +514,7 @@ namespace VEPROMS.CSLA.Library
// it's format column.
if (rval == 0)
{
SectionInfo si = _SectionInfo != null? _SectionInfo: SectionInfo.Get(_Section.ItemID);
if (si != null)
{
switch (si.MyProcedure.ProcedureConfig.Format_Columns)
{
case FormatColumns.OneColumn:
return SectionColumnMode.One;
break;
case FormatColumns.TwoColumn:
return SectionColumnMode.Two;
break;
default:
return SectionColumnMode.One;
break;
}
}
else
return SectionColumnMode.One; // 16bit's default if nothing defined
return SectionColumnMode.One; // 16bit's default if nothing defined
}
return (SectionColumnMode)rval;
}