From 5a81462bf7744a833ebc635bd526e7e7a3f22caa Mon Sep 17 00:00:00 2001 From: Kathy Date: Tue, 27 Aug 2013 15:54:10 +0000 Subject: [PATCH] B2013-153 fixed: fix getting Count of associated objects. Cleanup for getting Counts of associated objects. --- PROMS/VEPROMS.CSLA.Library/Generated/ContentInfo.cs | 5 +++++ PROMS/VEPROMS.CSLA.Library/Generated/Document.cs | 2 ++ 2 files changed, 7 insertions(+) diff --git a/PROMS/VEPROMS.CSLA.Library/Generated/ContentInfo.cs b/PROMS/VEPROMS.CSLA.Library/Generated/ContentInfo.cs index 6ae275ba..5eb859df 100644 --- a/PROMS/VEPROMS.CSLA.Library/Generated/ContentInfo.cs +++ b/PROMS/VEPROMS.CSLA.Library/Generated/ContentInfo.cs @@ -254,6 +254,11 @@ namespace VEPROMS.CSLA.Library get { CanReadProperty("ContentEntryCount", true); + if (_ContentEntryCount < 0) + { + _MyEntry = EntryInfo.Get(_ContentID); + _ContentEntryCount = MyEntry == null ? 0 : 1; + } return _ContentEntryCount; } } diff --git a/PROMS/VEPROMS.CSLA.Library/Generated/Document.cs b/PROMS/VEPROMS.CSLA.Library/Generated/Document.cs index 30dc1c7b..b5c680ee 100644 --- a/PROMS/VEPROMS.CSLA.Library/Generated/Document.cs +++ b/PROMS/VEPROMS.CSLA.Library/Generated/Document.cs @@ -348,6 +348,8 @@ namespace VEPROMS.CSLA.Library get { CanReadProperty("DocumentEntryCount", true); + if (_DocumentEntryCount < 0) + _DocumentEntryCount = DocumentEntries.Count; return _DocumentEntryCount; } }