Print Speed-up

This commit is contained in:
Rich
2014-04-10 21:39:17 +00:00
parent 44bc2844eb
commit e8fbd9d30b
6 changed files with 38 additions and 12 deletions

View File

@@ -423,6 +423,7 @@ namespace VEPROMS.CSLA.Library
if (itemInfo == null) return;
itemInfo.LoadAllAtOnce = true;
itemInfo.ActiveParent = itemParent;
itemInfo.MyParent = itemParent as ItemInfo;
// itemInfo.ActiveSection = (itemInfo as SectionInfo) ?? sectionInfo; - possible fix for not accessing correct format
itemInfo.ActiveSection = sectionInfo;
itemInfo.MyProcedure = procInfo;
@@ -431,8 +432,16 @@ namespace VEPROMS.CSLA.Library
itemInfo.MyContent.LoadNonCachedGrid();
if (itemInfo.MyContent.ContentPartCount > 0)
foreach (PartInfo pi in itemInfo.MyContent.ContentParts)
{
ItemInfo il = null;
foreach (ItemInfo ii in pi.MyItems)
{
SetParentSectionAndDocVersion(ii, itemInfo, (itemInfo as SectionInfo) ?? sectionInfo, procInfo, docVersionInfo);
ii.MyPrevious = il;
//if (il != null) il.NextItem = ii;
il = ii;
}
}
}
/// <summary>
/// The following method is used only in print because the 'printed' data is loaded into
@@ -496,6 +505,7 @@ namespace VEPROMS.CSLA.Library
if (itemInfo == null) return;
itemInfo.LoadAllAtOnce = true;
itemInfo.ActiveParent = itemParent;
itemInfo.MyParent = itemParent as ItemInfo;
// itemInfo.ActiveSection = (itemInfo as SectionInfo) ?? sectionInfo;
itemInfo.ActiveSection = sectionInfo;
itemInfo.MyDocVersion = docVersionInfo;
@@ -525,9 +535,13 @@ namespace VEPROMS.CSLA.Library
{
foreach (PartInfo pi in itemInfo.MyContent.ContentParts)
{
ItemInfo il = null;
foreach (ItemInfo ii in pi.MyItems)
{
SetParentSectionAndDocVersion(ii, itemInfo, (itemInfo as SectionInfo) ?? sectionInfo, docVersionInfo, tranLookup);
ii.MyPrevious = il;
//if (il != null) il.NextItem = ii;
il = ii;
}
}
}
@@ -2011,6 +2025,10 @@ namespace VEPROMS.CSLA.Library
}
return _MyParent;
}
set
{
_MyParent = value;
}
}
#endregion
#region Lookups and More Related

View File

@@ -130,6 +130,10 @@ namespace VEPROMS.CSLA.Library
if (_MyPrevious == null && _PreviousID != null) _MyPrevious = ItemInfo.Get((int)_PreviousID);
return _MyPrevious;
}
set
{
_MyPrevious = value;
}
}
private int _ContentID;
public int ContentID