diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/DocumentExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/DocumentExt.cs index 6ad33e4f..0f56c814 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/DocumentExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/DocumentExt.cs @@ -321,7 +321,7 @@ namespace VEPROMS.CSLA.Library fs.Close(); pdfFile.Delete(); Pdf.DeleteAll(doc.DocID); // clear the PDF table for DocID first - DocStyle myDocStyle = myItemInfo.MyActiveSection.MyDocStyle; + DocStyle myDocStyle = myItemInfo.ActiveSection.MyDocStyle; using (Pdf myPdf = Pdf.MakePdf(doc, MSWordToPDF.DebugStatus, (int) myDocStyle.Layout.TopRow, (int) myDocStyle.Layout.PageLength, (int) myDocStyle.Layout.LeftMargin, (int) myDocStyle.Layout.PageWidth, (double)myItemInfo.MSWordPageCount, buf)) { ;} doc.UpdateDRoUsages(roids); @@ -431,7 +431,7 @@ namespace VEPROMS.CSLA.Library pdfFile.Delete(); using (Document doc = docInfo.Get()) { - DocStyle myDocStyle = sect.MyActiveSection.MyDocStyle; + DocStyle myDocStyle = sect.ActiveSection.MyDocStyle; using (Pdf myPdf = Pdf.MakePdf(doc, MSWordToPDF.DebugStatus, (int)myDocStyle.Layout.TopRow, (int)myDocStyle.Layout.PageLength, (int)myDocStyle.Layout.LeftMargin, (int)myDocStyle.Layout.PageWidth, (double)sect.MSWordPageCount, buf)) { ;} doc.UpdateDRoUsages(roids); diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs index 1c5482b9..92490ed6 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs @@ -1752,7 +1752,10 @@ namespace VEPROMS.CSLA.Library } } private ItemInfo _ActiveSection = null; - public ItemInfo MyActiveSection { get { return ActiveSection; } } + /// + /// MyActiveSection is used to determine if _ActiveSection is null or not. + /// + public ItemInfo MyActiveSection { get { return _ActiveSection; } } public ItemInfo ActiveSection { get @@ -1993,7 +1996,7 @@ namespace VEPROMS.CSLA.Library if (IsCaution || IsNote) tbformat = CheckNoteCautionTab(tbformat); int ordinal = Ordinal; - if (!IsSection && !IsProcedure) tbformat = tbformat.Replace("{Section Prefix}", this.MyActiveSection.MyTab.CleanText); + if (!IsSection && !IsProcedure) tbformat = tbformat.Replace("{Section Prefix}", this.ActiveSection.MyTab.CleanText); string alpha = AlphabeticalNumbering(ordinal); tbformat = tbformat.Replace("{alpha}", alpha.ToLower()); tbformat = tbformat.Replace("{alphaWpar}", alpha.ToLower());