From 26f8e03a8cb478e0226dc829859cdc7a22e032a9 Mon Sep 17 00:00:00 2001 From: Rich Date: Fri, 6 Feb 2009 15:55:52 +0000 Subject: [PATCH] Reset related lists --- .../Generated/AnnotationInfoList.cs | 9 ++- .../Generated/AnnotationType.cs | 10 +++- .../Generated/AnnotationTypeInfoList.cs | 9 ++- .../Generated/AssignmentInfoList.cs | 9 ++- .../Generated/Connection.cs | 10 +++- .../Generated/ConnectionInfoList.cs | 9 ++- .../VEPROMS.CSLA.Library/Generated/Content.cs | 50 ++++++++++++---- .../Generated/ContentInfoList.cs | 9 ++- .../Generated/DetailInfoList.cs | 9 ++- .../Generated/DocVersionInfoList.cs | 9 ++- .../Generated/Document.cs | 10 +++- .../Generated/DocumentInfoList.cs | 9 ++- .../Generated/EntryInfoList.cs | 9 ++- .../VEPROMS.CSLA.Library/Generated/Folder.cs | 30 ++++++++-- .../Generated/FolderInfoList.cs | 9 ++- .../VEPROMS.CSLA.Library/Generated/Format.cs | 40 ++++++++++--- .../Generated/FormatInfoList.cs | 9 ++- PROMS/VEPROMS.CSLA.Library/Generated/Group.cs | 20 +++++-- .../Generated/GroupInfoList.cs | 9 ++- PROMS/VEPROMS.CSLA.Library/Generated/Item.cs | 60 +++++++++++++++---- .../Generated/ItemInfoList.cs | 9 ++- .../Generated/MembershipInfoList.cs | 9 ++- .../Generated/PartInfoList.cs | 9 ++- .../Generated/PermissionInfoList.cs | 9 ++- PROMS/VEPROMS.CSLA.Library/Generated/Role.cs | 20 +++++-- .../Generated/RoleInfoList.cs | 9 ++- .../Generated/TransitionInfoList.cs | 9 ++- PROMS/VEPROMS.CSLA.Library/Generated/User.cs | 10 +++- .../Generated/UserInfoList.cs | 9 ++- 29 files changed, 360 insertions(+), 71 deletions(-) diff --git a/PROMS/VEPROMS.CSLA.Library/Generated/AnnotationInfoList.cs b/PROMS/VEPROMS.CSLA.Library/Generated/AnnotationInfoList.cs index 07442abd..9dbf3bae 100644 --- a/PROMS/VEPROMS.CSLA.Library/Generated/AnnotationInfoList.cs +++ b/PROMS/VEPROMS.CSLA.Library/Generated/AnnotationInfoList.cs @@ -58,7 +58,7 @@ namespace VEPROMS.CSLA.Library #region Factory Methods public static AnnotationInfoList _AnnotationInfoList = null; /// - /// Return a list of all projects. + /// Return a list of all AnnotationInfo. /// public static AnnotationInfoList Get() { @@ -77,6 +77,13 @@ namespace VEPROMS.CSLA.Library throw new DbCslaException("Error on AnnotationInfoList.Get", ex); } } + /// + /// Reset the list of all AnnotationInfo. + /// + public static void Reset() + { + _AnnotationInfoList = null; + } // TODO: Add alternative gets - //public static AnnotationInfoList Get() //{ diff --git a/PROMS/VEPROMS.CSLA.Library/Generated/AnnotationType.cs b/PROMS/VEPROMS.CSLA.Library/Generated/AnnotationType.cs index ece9a2e5..07f0e3c2 100644 --- a/PROMS/VEPROMS.CSLA.Library/Generated/AnnotationType.cs +++ b/PROMS/VEPROMS.CSLA.Library/Generated/AnnotationType.cs @@ -237,13 +237,19 @@ namespace VEPROMS.CSLA.Library get { CanReadProperty("AnnotationTypeAnnotations", true); - if (_AnnotationTypeAnnotationCount > 0 && _AnnotationTypeAnnotations == null) + if (_AnnotationTypeAnnotationCount < 0 || (_AnnotationTypeAnnotationCount > 0 && _AnnotationTypeAnnotations == null)) _AnnotationTypeAnnotations = AnnotationTypeAnnotations.GetByTypeID(TypeID); - else if (_AnnotationTypeAnnotations == null) + if (_AnnotationTypeAnnotationCount < 0 ) + _AnnotationTypeAnnotationCount = _AnnotationTypeAnnotations == null ? 0 : _AnnotationTypeAnnotations.Count; + if (_AnnotationTypeAnnotations == null) _AnnotationTypeAnnotations = AnnotationTypeAnnotations.New(); return _AnnotationTypeAnnotations; } } + public void Reset_AnnotationTypeAnnotations() + { + _AnnotationTypeAnnotationCount = -1; + } public override bool IsDirty { get { return base.IsDirty || (_AnnotationTypeAnnotations == null ? false : _AnnotationTypeAnnotations.IsDirty); } diff --git a/PROMS/VEPROMS.CSLA.Library/Generated/AnnotationTypeInfoList.cs b/PROMS/VEPROMS.CSLA.Library/Generated/AnnotationTypeInfoList.cs index 7f04a375..91e1b384 100644 --- a/PROMS/VEPROMS.CSLA.Library/Generated/AnnotationTypeInfoList.cs +++ b/PROMS/VEPROMS.CSLA.Library/Generated/AnnotationTypeInfoList.cs @@ -58,7 +58,7 @@ namespace VEPROMS.CSLA.Library #region Factory Methods public static AnnotationTypeInfoList _AnnotationTypeInfoList = null; /// - /// Return a list of all projects. + /// Return a list of all AnnotationTypeInfo. /// public static AnnotationTypeInfoList Get() { @@ -77,6 +77,13 @@ namespace VEPROMS.CSLA.Library throw new DbCslaException("Error on AnnotationTypeInfoList.Get", ex); } } + /// + /// Reset the list of all AnnotationTypeInfo. + /// + public static void Reset() + { + _AnnotationTypeInfoList = null; + } // TODO: Add alternative gets - //public static AnnotationTypeInfoList Get() //{ diff --git a/PROMS/VEPROMS.CSLA.Library/Generated/AssignmentInfoList.cs b/PROMS/VEPROMS.CSLA.Library/Generated/AssignmentInfoList.cs index ff4a630a..39f96983 100644 --- a/PROMS/VEPROMS.CSLA.Library/Generated/AssignmentInfoList.cs +++ b/PROMS/VEPROMS.CSLA.Library/Generated/AssignmentInfoList.cs @@ -58,7 +58,7 @@ namespace VEPROMS.CSLA.Library #region Factory Methods public static AssignmentInfoList _AssignmentInfoList = null; /// - /// Return a list of all projects. + /// Return a list of all AssignmentInfo. /// public static AssignmentInfoList Get() { @@ -77,6 +77,13 @@ namespace VEPROMS.CSLA.Library throw new DbCslaException("Error on AssignmentInfoList.Get", ex); } } + /// + /// Reset the list of all AssignmentInfo. + /// + public static void Reset() + { + _AssignmentInfoList = null; + } // TODO: Add alternative gets - //public static AssignmentInfoList Get() //{ diff --git a/PROMS/VEPROMS.CSLA.Library/Generated/Connection.cs b/PROMS/VEPROMS.CSLA.Library/Generated/Connection.cs index b573ada2..fd52ab44 100644 --- a/PROMS/VEPROMS.CSLA.Library/Generated/Connection.cs +++ b/PROMS/VEPROMS.CSLA.Library/Generated/Connection.cs @@ -302,13 +302,19 @@ namespace VEPROMS.CSLA.Library get { CanReadProperty("ConnectionFolders", true); - if (_ConnectionFolderCount > 0 && _ConnectionFolders == null) + if (_ConnectionFolderCount < 0 || (_ConnectionFolderCount > 0 && _ConnectionFolders == null)) _ConnectionFolders = ConnectionFolders.GetByDBID(DBID); - else if (_ConnectionFolders == null) + if (_ConnectionFolderCount < 0 ) + _ConnectionFolderCount = _ConnectionFolders == null ? 0 : _ConnectionFolders.Count; + if (_ConnectionFolders == null) _ConnectionFolders = ConnectionFolders.New(); return _ConnectionFolders; } } + public void Reset_ConnectionFolders() + { + _ConnectionFolderCount = -1; + } public override bool IsDirty { get { return base.IsDirty || (_ConnectionFolders == null ? false : _ConnectionFolders.IsDirty); } diff --git a/PROMS/VEPROMS.CSLA.Library/Generated/ConnectionInfoList.cs b/PROMS/VEPROMS.CSLA.Library/Generated/ConnectionInfoList.cs index 31d27679..9861a40e 100644 --- a/PROMS/VEPROMS.CSLA.Library/Generated/ConnectionInfoList.cs +++ b/PROMS/VEPROMS.CSLA.Library/Generated/ConnectionInfoList.cs @@ -58,7 +58,7 @@ namespace VEPROMS.CSLA.Library #region Factory Methods public static ConnectionInfoList _ConnectionInfoList = null; /// - /// Return a list of all projects. + /// Return a list of all ConnectionInfo. /// public static ConnectionInfoList Get() { @@ -77,6 +77,13 @@ namespace VEPROMS.CSLA.Library throw new DbCslaException("Error on ConnectionInfoList.Get", ex); } } + /// + /// Reset the list of all ConnectionInfo. + /// + public static void Reset() + { + _ConnectionInfoList = null; + } // TODO: Add alternative gets - //public static ConnectionInfoList Get() //{ diff --git a/PROMS/VEPROMS.CSLA.Library/Generated/Content.cs b/PROMS/VEPROMS.CSLA.Library/Generated/Content.cs index 1e2b701e..edcedf9e 100644 --- a/PROMS/VEPROMS.CSLA.Library/Generated/Content.cs +++ b/PROMS/VEPROMS.CSLA.Library/Generated/Content.cs @@ -357,13 +357,19 @@ namespace VEPROMS.CSLA.Library get { CanReadProperty("ContentDetails", true); - if (_ContentDetailCount > 0 && _ContentDetails == null) + if (_ContentDetailCount < 0 || (_ContentDetailCount > 0 && _ContentDetails == null)) _ContentDetails = ContentDetails.GetByContentID(ContentID); - else if (_ContentDetails == null) + if (_ContentDetailCount < 0 ) + _ContentDetailCount = _ContentDetails == null ? 0 : _ContentDetails.Count; + if (_ContentDetails == null) _ContentDetails = ContentDetails.New(); return _ContentDetails; } } + public void Reset_ContentDetails() + { + _ContentDetailCount = -1; + } private int _ContentEntryCount = 0; /// /// Count of ContentEntries for this Content @@ -416,13 +422,19 @@ namespace VEPROMS.CSLA.Library get { CanReadProperty("ContentItems", true); - if (_ContentItemCount > 0 && _ContentItems == null) + if (_ContentItemCount < 0 || (_ContentItemCount > 0 && _ContentItems == null)) _ContentItems = ContentItems.GetByContentID(ContentID); - else if (_ContentItems == null) + if (_ContentItemCount < 0 ) + _ContentItemCount = _ContentItems == null ? 0 : _ContentItems.Count; + if (_ContentItems == null) _ContentItems = ContentItems.New(); return _ContentItems; } } + public void Reset_ContentItems() + { + _ContentItemCount = -1; + } private int _ContentPartCount = 0; /// /// Count of ContentParts for this Content @@ -447,13 +459,19 @@ namespace VEPROMS.CSLA.Library get { CanReadProperty("ContentParts", true); - if (_ContentPartCount > 0 && _ContentParts == null) + if (_ContentPartCount < 0 || (_ContentPartCount > 0 && _ContentParts == null)) _ContentParts = ContentParts.GetByContentID(ContentID); - else if (_ContentParts == null) + if (_ContentPartCount < 0 ) + _ContentPartCount = _ContentParts == null ? 0 : _ContentParts.Count; + if (_ContentParts == null) _ContentParts = ContentParts.New(); return _ContentParts; } } + public void Reset_ContentParts() + { + _ContentPartCount = -1; + } private int _ContentRoUsageCount = 0; /// /// Count of ContentRoUsages for this Content @@ -478,13 +496,19 @@ namespace VEPROMS.CSLA.Library get { CanReadProperty("ContentRoUsages", true); - if (_ContentRoUsageCount > 0 && _ContentRoUsages == null) + if (_ContentRoUsageCount < 0 || (_ContentRoUsageCount > 0 && _ContentRoUsages == null)) _ContentRoUsages = ContentRoUsages.GetByContentID(ContentID); - else if (_ContentRoUsages == null) + if (_ContentRoUsageCount < 0 ) + _ContentRoUsageCount = _ContentRoUsages == null ? 0 : _ContentRoUsages.Count; + if (_ContentRoUsages == null) _ContentRoUsages = ContentRoUsages.New(); return _ContentRoUsages; } } + public void Reset_ContentRoUsages() + { + _ContentRoUsageCount = -1; + } private int _ContentTransitionCount = 0; /// /// Count of ContentTransitions for this Content @@ -509,13 +533,19 @@ namespace VEPROMS.CSLA.Library get { CanReadProperty("ContentTransitions", true); - if (_ContentTransitionCount > 0 && _ContentTransitions == null) + if (_ContentTransitionCount < 0 || (_ContentTransitionCount > 0 && _ContentTransitions == null)) _ContentTransitions = ContentTransitions.GetByFromID(ContentID); - else if (_ContentTransitions == null) + if (_ContentTransitionCount < 0 ) + _ContentTransitionCount = _ContentTransitions == null ? 0 : _ContentTransitions.Count; + if (_ContentTransitions == null) _ContentTransitions = ContentTransitions.New(); return _ContentTransitions; } } + public void Reset_ContentTransitions() + { + _ContentTransitionCount = -1; + } private int _ContentZContentCount = 0; /// /// Count of ContentZContents for this Content diff --git a/PROMS/VEPROMS.CSLA.Library/Generated/ContentInfoList.cs b/PROMS/VEPROMS.CSLA.Library/Generated/ContentInfoList.cs index d4dc4da8..66601040 100644 --- a/PROMS/VEPROMS.CSLA.Library/Generated/ContentInfoList.cs +++ b/PROMS/VEPROMS.CSLA.Library/Generated/ContentInfoList.cs @@ -58,7 +58,7 @@ namespace VEPROMS.CSLA.Library #region Factory Methods public static ContentInfoList _ContentInfoList = null; /// - /// Return a list of all projects. + /// Return a list of all ContentInfo. /// public static ContentInfoList Get() { @@ -77,6 +77,13 @@ namespace VEPROMS.CSLA.Library throw new DbCslaException("Error on ContentInfoList.Get", ex); } } + /// + /// Reset the list of all ContentInfo. + /// + public static void Reset() + { + _ContentInfoList = null; + } // TODO: Add alternative gets - //public static ContentInfoList Get() //{ diff --git a/PROMS/VEPROMS.CSLA.Library/Generated/DetailInfoList.cs b/PROMS/VEPROMS.CSLA.Library/Generated/DetailInfoList.cs index 229d6851..9cbc9232 100644 --- a/PROMS/VEPROMS.CSLA.Library/Generated/DetailInfoList.cs +++ b/PROMS/VEPROMS.CSLA.Library/Generated/DetailInfoList.cs @@ -58,7 +58,7 @@ namespace VEPROMS.CSLA.Library #region Factory Methods public static DetailInfoList _DetailInfoList = null; /// - /// Return a list of all projects. + /// Return a list of all DetailInfo. /// public static DetailInfoList Get() { @@ -77,6 +77,13 @@ namespace VEPROMS.CSLA.Library throw new DbCslaException("Error on DetailInfoList.Get", ex); } } + /// + /// Reset the list of all DetailInfo. + /// + public static void Reset() + { + _DetailInfoList = null; + } // TODO: Add alternative gets - //public static DetailInfoList Get() //{ diff --git a/PROMS/VEPROMS.CSLA.Library/Generated/DocVersionInfoList.cs b/PROMS/VEPROMS.CSLA.Library/Generated/DocVersionInfoList.cs index 2ee6798b..b41b2655 100644 --- a/PROMS/VEPROMS.CSLA.Library/Generated/DocVersionInfoList.cs +++ b/PROMS/VEPROMS.CSLA.Library/Generated/DocVersionInfoList.cs @@ -58,7 +58,7 @@ namespace VEPROMS.CSLA.Library #region Factory Methods public static DocVersionInfoList _DocVersionInfoList = null; /// - /// Return a list of all projects. + /// Return a list of all DocVersionInfo. /// public static DocVersionInfoList Get() { @@ -77,6 +77,13 @@ namespace VEPROMS.CSLA.Library throw new DbCslaException("Error on DocVersionInfoList.Get", ex); } } + /// + /// Reset the list of all DocVersionInfo. + /// + public static void Reset() + { + _DocVersionInfoList = null; + } // TODO: Add alternative gets - //public static DocVersionInfoList Get() //{ diff --git a/PROMS/VEPROMS.CSLA.Library/Generated/Document.cs b/PROMS/VEPROMS.CSLA.Library/Generated/Document.cs index c5654037..bb9c03b8 100644 --- a/PROMS/VEPROMS.CSLA.Library/Generated/Document.cs +++ b/PROMS/VEPROMS.CSLA.Library/Generated/Document.cs @@ -274,13 +274,19 @@ namespace VEPROMS.CSLA.Library get { CanReadProperty("DocumentEntries", true); - if (_DocumentEntryCount > 0 && _DocumentEntries == null) + if (_DocumentEntryCount < 0 || (_DocumentEntryCount > 0 && _DocumentEntries == null)) _DocumentEntries = DocumentEntries.GetByDocID(DocID); - else if (_DocumentEntries == null) + if (_DocumentEntryCount < 0 ) + _DocumentEntryCount = _DocumentEntries == null ? 0 : _DocumentEntries.Count; + if (_DocumentEntries == null) _DocumentEntries = DocumentEntries.New(); return _DocumentEntries; } } + public void Reset_DocumentEntries() + { + _DocumentEntryCount = -1; + } public override bool IsDirty { get { return base.IsDirty || (_DocumentEntries == null ? false : _DocumentEntries.IsDirty); } diff --git a/PROMS/VEPROMS.CSLA.Library/Generated/DocumentInfoList.cs b/PROMS/VEPROMS.CSLA.Library/Generated/DocumentInfoList.cs index ff96c69d..59cb0e7c 100644 --- a/PROMS/VEPROMS.CSLA.Library/Generated/DocumentInfoList.cs +++ b/PROMS/VEPROMS.CSLA.Library/Generated/DocumentInfoList.cs @@ -58,7 +58,7 @@ namespace VEPROMS.CSLA.Library #region Factory Methods public static DocumentInfoList _DocumentInfoList = null; /// - /// Return a list of all projects. + /// Return a list of all DocumentInfo. /// public static DocumentInfoList Get() { @@ -77,6 +77,13 @@ namespace VEPROMS.CSLA.Library throw new DbCslaException("Error on DocumentInfoList.Get", ex); } } + /// + /// Reset the list of all DocumentInfo. + /// + public static void Reset() + { + _DocumentInfoList = null; + } // TODO: Add alternative gets - //public static DocumentInfoList Get() //{ diff --git a/PROMS/VEPROMS.CSLA.Library/Generated/EntryInfoList.cs b/PROMS/VEPROMS.CSLA.Library/Generated/EntryInfoList.cs index 4825d65b..32d9301b 100644 --- a/PROMS/VEPROMS.CSLA.Library/Generated/EntryInfoList.cs +++ b/PROMS/VEPROMS.CSLA.Library/Generated/EntryInfoList.cs @@ -58,7 +58,7 @@ namespace VEPROMS.CSLA.Library #region Factory Methods public static EntryInfoList _EntryInfoList = null; /// - /// Return a list of all projects. + /// Return a list of all EntryInfo. /// public static EntryInfoList Get() { @@ -77,6 +77,13 @@ namespace VEPROMS.CSLA.Library throw new DbCslaException("Error on EntryInfoList.Get", ex); } } + /// + /// Reset the list of all EntryInfo. + /// + public static void Reset() + { + _EntryInfoList = null; + } // TODO: Add alternative gets - //public static EntryInfoList Get() //{ diff --git a/PROMS/VEPROMS.CSLA.Library/Generated/Folder.cs b/PROMS/VEPROMS.CSLA.Library/Generated/Folder.cs index db5a4c6e..ee664a48 100644 --- a/PROMS/VEPROMS.CSLA.Library/Generated/Folder.cs +++ b/PROMS/VEPROMS.CSLA.Library/Generated/Folder.cs @@ -418,13 +418,19 @@ namespace VEPROMS.CSLA.Library get { CanReadProperty("FolderAssignments", true); - if (_FolderAssignmentCount > 0 && _FolderAssignments == null) + if (_FolderAssignmentCount < 0 || (_FolderAssignmentCount > 0 && _FolderAssignments == null)) _FolderAssignments = FolderAssignments.GetByFolderID(FolderID); - else if (_FolderAssignments == null) + if (_FolderAssignmentCount < 0 ) + _FolderAssignmentCount = _FolderAssignments == null ? 0 : _FolderAssignments.Count; + if (_FolderAssignments == null) _FolderAssignments = FolderAssignments.New(); return _FolderAssignments; } } + public void Reset_FolderAssignments() + { + _FolderAssignmentCount = -1; + } private int _FolderDocVersionCount = 0; /// /// Count of FolderDocVersions for this Folder @@ -449,13 +455,19 @@ namespace VEPROMS.CSLA.Library get { CanReadProperty("FolderDocVersions", true); - if (_FolderDocVersionCount > 0 && _FolderDocVersions == null) + if (_FolderDocVersionCount < 0 || (_FolderDocVersionCount > 0 && _FolderDocVersions == null)) _FolderDocVersions = FolderDocVersions.GetByFolderID(FolderID); - else if (_FolderDocVersions == null) + if (_FolderDocVersionCount < 0 ) + _FolderDocVersionCount = _FolderDocVersions == null ? 0 : _FolderDocVersions.Count; + if (_FolderDocVersions == null) _FolderDocVersions = FolderDocVersions.New(); return _FolderDocVersions; } } + public void Reset_FolderDocVersions() + { + _FolderDocVersionCount = -1; + } private int _ChildFolderCount = 0; /// /// Count of ChildFolders for this Folder @@ -480,13 +492,19 @@ namespace VEPROMS.CSLA.Library get { CanReadProperty("ChildFolders", true); - if (_ChildFolderCount > 0 && _ChildFolders == null) + if (_ChildFolderCount < 0 || (_ChildFolderCount > 0 && _ChildFolders == null)) _ChildFolders = ChildFolders.GetByParentID(FolderID); - else if (_ChildFolders == null) + if (_ChildFolderCount < 0 ) + _ChildFolderCount = _ChildFolders == null ? 0 : _ChildFolders.Count; + if (_ChildFolders == null) _ChildFolders = ChildFolders.New(); return _ChildFolders; } } + public void Reset_ChildFolders() + { + _ChildFolderCount = -1; + } public override bool IsDirty { get { return base.IsDirty || (_FolderAssignments == null ? false : _FolderAssignments.IsDirty) || (_FolderDocVersions == null ? false : _FolderDocVersions.IsDirty) || (_ChildFolders == null ? false : _ChildFolders.IsDirty) || (_MyConnection == null ? false : _MyConnection.IsDirty) || (_MyFormat == null ? false : _MyFormat.IsDirty); } diff --git a/PROMS/VEPROMS.CSLA.Library/Generated/FolderInfoList.cs b/PROMS/VEPROMS.CSLA.Library/Generated/FolderInfoList.cs index 3239b29d..558a5c42 100644 --- a/PROMS/VEPROMS.CSLA.Library/Generated/FolderInfoList.cs +++ b/PROMS/VEPROMS.CSLA.Library/Generated/FolderInfoList.cs @@ -58,7 +58,7 @@ namespace VEPROMS.CSLA.Library #region Factory Methods public static FolderInfoList _FolderInfoList = null; /// - /// Return a list of all projects. + /// Return a list of all FolderInfo. /// public static FolderInfoList Get() { @@ -77,6 +77,13 @@ namespace VEPROMS.CSLA.Library throw new DbCslaException("Error on FolderInfoList.Get", ex); } } + /// + /// Reset the list of all FolderInfo. + /// + public static void Reset() + { + _FolderInfoList = null; + } // TODO: Add alternative gets - //public static FolderInfoList Get() //{ diff --git a/PROMS/VEPROMS.CSLA.Library/Generated/Format.cs b/PROMS/VEPROMS.CSLA.Library/Generated/Format.cs index c57d1137..4febed74 100644 --- a/PROMS/VEPROMS.CSLA.Library/Generated/Format.cs +++ b/PROMS/VEPROMS.CSLA.Library/Generated/Format.cs @@ -344,13 +344,19 @@ namespace VEPROMS.CSLA.Library get { CanReadProperty("FormatContents", true); - if (_FormatContentCount > 0 && _FormatContents == null) + if (_FormatContentCount < 0 || (_FormatContentCount > 0 && _FormatContents == null)) _FormatContents = FormatContents.GetByFormatID(FormatID); - else if (_FormatContents == null) + if (_FormatContentCount < 0 ) + _FormatContentCount = _FormatContents == null ? 0 : _FormatContents.Count; + if (_FormatContents == null) _FormatContents = FormatContents.New(); return _FormatContents; } } + public void Reset_FormatContents() + { + _FormatContentCount = -1; + } private int _FormatDocVersionCount = 0; /// /// Count of FormatDocVersions for this Format @@ -375,13 +381,19 @@ namespace VEPROMS.CSLA.Library get { CanReadProperty("FormatDocVersions", true); - if (_FormatDocVersionCount > 0 && _FormatDocVersions == null) + if (_FormatDocVersionCount < 0 || (_FormatDocVersionCount > 0 && _FormatDocVersions == null)) _FormatDocVersions = FormatDocVersions.GetByFormatID(FormatID); - else if (_FormatDocVersions == null) + if (_FormatDocVersionCount < 0 ) + _FormatDocVersionCount = _FormatDocVersions == null ? 0 : _FormatDocVersions.Count; + if (_FormatDocVersions == null) _FormatDocVersions = FormatDocVersions.New(); return _FormatDocVersions; } } + public void Reset_FormatDocVersions() + { + _FormatDocVersionCount = -1; + } private int _FormatFolderCount = 0; /// /// Count of FormatFolders for this Format @@ -406,13 +418,19 @@ namespace VEPROMS.CSLA.Library get { CanReadProperty("FormatFolders", true); - if (_FormatFolderCount > 0 && _FormatFolders == null) + if (_FormatFolderCount < 0 || (_FormatFolderCount > 0 && _FormatFolders == null)) _FormatFolders = FormatFolders.GetByFormatID(FormatID); - else if (_FormatFolders == null) + if (_FormatFolderCount < 0 ) + _FormatFolderCount = _FormatFolders == null ? 0 : _FormatFolders.Count; + if (_FormatFolders == null) _FormatFolders = FormatFolders.New(); return _FormatFolders; } } + public void Reset_FormatFolders() + { + _FormatFolderCount = -1; + } private int _ChildFormatCount = 0; /// /// Count of ChildFormats for this Format @@ -437,13 +455,19 @@ namespace VEPROMS.CSLA.Library get { CanReadProperty("ChildFormats", true); - if (_ChildFormatCount > 0 && _ChildFormats == null) + if (_ChildFormatCount < 0 || (_ChildFormatCount > 0 && _ChildFormats == null)) _ChildFormats = ChildFormats.GetByParentID(FormatID); - else if (_ChildFormats == null) + if (_ChildFormatCount < 0 ) + _ChildFormatCount = _ChildFormats == null ? 0 : _ChildFormats.Count; + if (_ChildFormats == null) _ChildFormats = ChildFormats.New(); return _ChildFormats; } } + public void Reset_ChildFormats() + { + _ChildFormatCount = -1; + } public override bool IsDirty { get { return base.IsDirty || (_FormatContents == null ? false : _FormatContents.IsDirty) || (_FormatDocVersions == null ? false : _FormatDocVersions.IsDirty) || (_FormatFolders == null ? false : _FormatFolders.IsDirty) || (_ChildFormats == null ? false : _ChildFormats.IsDirty); } diff --git a/PROMS/VEPROMS.CSLA.Library/Generated/FormatInfoList.cs b/PROMS/VEPROMS.CSLA.Library/Generated/FormatInfoList.cs index e7ec741b..c73f1f16 100644 --- a/PROMS/VEPROMS.CSLA.Library/Generated/FormatInfoList.cs +++ b/PROMS/VEPROMS.CSLA.Library/Generated/FormatInfoList.cs @@ -58,7 +58,7 @@ namespace VEPROMS.CSLA.Library #region Factory Methods public static FormatInfoList _FormatInfoList = null; /// - /// Return a list of all projects. + /// Return a list of all FormatInfo. /// public static FormatInfoList Get() { @@ -77,6 +77,13 @@ namespace VEPROMS.CSLA.Library throw new DbCslaException("Error on FormatInfoList.Get", ex); } } + /// + /// Reset the list of all FormatInfo. + /// + public static void Reset() + { + _FormatInfoList = null; + } // TODO: Add alternative gets - //public static FormatInfoList Get() //{ diff --git a/PROMS/VEPROMS.CSLA.Library/Generated/Group.cs b/PROMS/VEPROMS.CSLA.Library/Generated/Group.cs index e17a73fb..d6750aa7 100644 --- a/PROMS/VEPROMS.CSLA.Library/Generated/Group.cs +++ b/PROMS/VEPROMS.CSLA.Library/Generated/Group.cs @@ -270,13 +270,19 @@ namespace VEPROMS.CSLA.Library get { CanReadProperty("GroupAssignments", true); - if (_GroupAssignmentCount > 0 && _GroupAssignments == null) + if (_GroupAssignmentCount < 0 || (_GroupAssignmentCount > 0 && _GroupAssignments == null)) _GroupAssignments = GroupAssignments.GetByGID(GID); - else if (_GroupAssignments == null) + if (_GroupAssignmentCount < 0 ) + _GroupAssignmentCount = _GroupAssignments == null ? 0 : _GroupAssignments.Count; + if (_GroupAssignments == null) _GroupAssignments = GroupAssignments.New(); return _GroupAssignments; } } + public void Reset_GroupAssignments() + { + _GroupAssignmentCount = -1; + } private int _GroupMembershipCount = 0; /// /// Count of GroupMemberships for this Group @@ -301,13 +307,19 @@ namespace VEPROMS.CSLA.Library get { CanReadProperty("GroupMemberships", true); - if (_GroupMembershipCount > 0 && _GroupMemberships == null) + if (_GroupMembershipCount < 0 || (_GroupMembershipCount > 0 && _GroupMemberships == null)) _GroupMemberships = GroupMemberships.GetByGID(GID); - else if (_GroupMemberships == null) + if (_GroupMembershipCount < 0 ) + _GroupMembershipCount = _GroupMemberships == null ? 0 : _GroupMemberships.Count; + if (_GroupMemberships == null) _GroupMemberships = GroupMemberships.New(); return _GroupMemberships; } } + public void Reset_GroupMemberships() + { + _GroupMembershipCount = -1; + } public override bool IsDirty { get { return base.IsDirty || (_GroupAssignments == null ? false : _GroupAssignments.IsDirty) || (_GroupMemberships == null ? false : _GroupMemberships.IsDirty); } diff --git a/PROMS/VEPROMS.CSLA.Library/Generated/GroupInfoList.cs b/PROMS/VEPROMS.CSLA.Library/Generated/GroupInfoList.cs index c90417fb..82e77183 100644 --- a/PROMS/VEPROMS.CSLA.Library/Generated/GroupInfoList.cs +++ b/PROMS/VEPROMS.CSLA.Library/Generated/GroupInfoList.cs @@ -58,7 +58,7 @@ namespace VEPROMS.CSLA.Library #region Factory Methods public static GroupInfoList _GroupInfoList = null; /// - /// Return a list of all projects. + /// Return a list of all GroupInfo. /// public static GroupInfoList Get() { @@ -77,6 +77,13 @@ namespace VEPROMS.CSLA.Library throw new DbCslaException("Error on GroupInfoList.Get", ex); } } + /// + /// Reset the list of all GroupInfo. + /// + public static void Reset() + { + _GroupInfoList = null; + } // TODO: Add alternative gets - //public static GroupInfoList Get() //{ diff --git a/PROMS/VEPROMS.CSLA.Library/Generated/Item.cs b/PROMS/VEPROMS.CSLA.Library/Generated/Item.cs index 743c337d..ab3b3979 100644 --- a/PROMS/VEPROMS.CSLA.Library/Generated/Item.cs +++ b/PROMS/VEPROMS.CSLA.Library/Generated/Item.cs @@ -310,13 +310,19 @@ namespace VEPROMS.CSLA.Library get { CanReadProperty("ItemAnnotations", true); - if (_ItemAnnotationCount > 0 && _ItemAnnotations == null) + if (_ItemAnnotationCount < 0 || (_ItemAnnotationCount > 0 && _ItemAnnotations == null)) _ItemAnnotations = ItemAnnotations.GetByItemID(ItemID); - else if (_ItemAnnotations == null) + if (_ItemAnnotationCount < 0 ) + _ItemAnnotationCount = _ItemAnnotations == null ? 0 : _ItemAnnotations.Count; + if (_ItemAnnotations == null) _ItemAnnotations = ItemAnnotations.New(); return _ItemAnnotations; } } + public void Reset_ItemAnnotations() + { + _ItemAnnotationCount = -1; + } private int _ItemDocVersionCount = 0; /// /// Count of ItemDocVersions for this Item @@ -341,13 +347,19 @@ namespace VEPROMS.CSLA.Library get { CanReadProperty("ItemDocVersions", true); - if (_ItemDocVersionCount > 0 && _ItemDocVersions == null) + if (_ItemDocVersionCount < 0 || (_ItemDocVersionCount > 0 && _ItemDocVersions == null)) _ItemDocVersions = ItemDocVersions.GetByItemID(ItemID); - else if (_ItemDocVersions == null) + if (_ItemDocVersionCount < 0 ) + _ItemDocVersionCount = _ItemDocVersions == null ? 0 : _ItemDocVersions.Count; + if (_ItemDocVersions == null) _ItemDocVersions = ItemDocVersions.New(); return _ItemDocVersions; } } + public void Reset_ItemDocVersions() + { + _ItemDocVersionCount = -1; + } private int _NextItemCount = 0; /// /// Count of NextItems for this Item @@ -372,13 +384,19 @@ namespace VEPROMS.CSLA.Library get { CanReadProperty("NextItems", true); - if (_NextItemCount > 0 && _NextItems == null) + if (_NextItemCount < 0 || (_NextItemCount > 0 && _NextItems == null)) _NextItems = NextItems.GetByPreviousID(ItemID); - else if (_NextItems == null) + if (_NextItemCount < 0 ) + _NextItemCount = _NextItems == null ? 0 : _NextItems.Count; + if (_NextItems == null) _NextItems = NextItems.New(); return _NextItems; } } + public void Reset_NextItems() + { + _NextItemCount = -1; + } private int _ItemPartCount = 0; /// /// Count of ItemParts for this Item @@ -403,13 +421,19 @@ namespace VEPROMS.CSLA.Library get { CanReadProperty("ItemParts", true); - if (_ItemPartCount > 0 && _ItemParts == null) + if (_ItemPartCount < 0 || (_ItemPartCount > 0 && _ItemParts == null)) _ItemParts = ItemParts.GetByItemID(ItemID); - else if (_ItemParts == null) + if (_ItemPartCount < 0 ) + _ItemPartCount = _ItemParts == null ? 0 : _ItemParts.Count; + if (_ItemParts == null) _ItemParts = ItemParts.New(); return _ItemParts; } } + public void Reset_ItemParts() + { + _ItemPartCount = -1; + } private int _ItemTransition_RangeIDCount = 0; /// /// Count of ItemTransitions for this Item @@ -434,13 +458,19 @@ namespace VEPROMS.CSLA.Library get { CanReadProperty("ItemTransitions_RangeID", true); - if (_ItemTransition_RangeIDCount > 0 && _ItemTransitions_RangeID == null) + if (_ItemTransition_RangeIDCount < 0 || (_ItemTransition_RangeIDCount > 0 && _ItemTransitions_RangeID == null)) _ItemTransitions_RangeID = ItemTransitions_RangeID.GetByRangeID(ItemID); - else if (_ItemTransitions_RangeID == null) + if (_ItemTransition_RangeIDCount < 0 ) + _ItemTransition_RangeIDCount = _ItemTransitions_RangeID == null ? 0 : _ItemTransitions_RangeID.Count; + if (_ItemTransitions_RangeID == null) _ItemTransitions_RangeID = ItemTransitions_RangeID.New(); return _ItemTransitions_RangeID; } } + public void Reset_ItemTransitions_RangeID() + { + _ItemTransition_RangeIDCount = -1; + } private int _ItemTransition_ToIDCount = 0; /// /// Count of ItemTransitions for this Item @@ -465,13 +495,19 @@ namespace VEPROMS.CSLA.Library get { CanReadProperty("ItemTransitions_ToID", true); - if (_ItemTransition_ToIDCount > 0 && _ItemTransitions_ToID == null) + if (_ItemTransition_ToIDCount < 0 || (_ItemTransition_ToIDCount > 0 && _ItemTransitions_ToID == null)) _ItemTransitions_ToID = ItemTransitions_ToID.GetByToID(ItemID); - else if (_ItemTransitions_ToID == null) + if (_ItemTransition_ToIDCount < 0 ) + _ItemTransition_ToIDCount = _ItemTransitions_ToID == null ? 0 : _ItemTransitions_ToID.Count; + if (_ItemTransitions_ToID == null) _ItemTransitions_ToID = ItemTransitions_ToID.New(); return _ItemTransitions_ToID; } } + public void Reset_ItemTransitions_ToID() + { + _ItemTransition_ToIDCount = -1; + } public override bool IsDirty { get { return base.IsDirty || (_ItemAnnotations == null ? false : _ItemAnnotations.IsDirty) || (_ItemDocVersions == null ? false : _ItemDocVersions.IsDirty) || (_NextItems == null ? false : _NextItems.IsDirty) || (_ItemParts == null ? false : _ItemParts.IsDirty) || (_ItemTransitions_RangeID == null ? false : _ItemTransitions_RangeID.IsDirty) || (_ItemTransitions_ToID == null ? false : _ItemTransitions_ToID.IsDirty) || (_MyContent == null ? false : _MyContent.IsDirty); } diff --git a/PROMS/VEPROMS.CSLA.Library/Generated/ItemInfoList.cs b/PROMS/VEPROMS.CSLA.Library/Generated/ItemInfoList.cs index 9797584e..a3a9e563 100644 --- a/PROMS/VEPROMS.CSLA.Library/Generated/ItemInfoList.cs +++ b/PROMS/VEPROMS.CSLA.Library/Generated/ItemInfoList.cs @@ -58,7 +58,7 @@ namespace VEPROMS.CSLA.Library #region Factory Methods public static ItemInfoList _ItemInfoList = null; /// - /// Return a list of all projects. + /// Return a list of all ItemInfo. /// public static ItemInfoList Get() { @@ -77,6 +77,13 @@ namespace VEPROMS.CSLA.Library throw new DbCslaException("Error on ItemInfoList.Get", ex); } } + /// + /// Reset the list of all ItemInfo. + /// + public static void Reset() + { + _ItemInfoList = null; + } // TODO: Add alternative gets - //public static ItemInfoList Get() //{ diff --git a/PROMS/VEPROMS.CSLA.Library/Generated/MembershipInfoList.cs b/PROMS/VEPROMS.CSLA.Library/Generated/MembershipInfoList.cs index 3672a6ed..b264e687 100644 --- a/PROMS/VEPROMS.CSLA.Library/Generated/MembershipInfoList.cs +++ b/PROMS/VEPROMS.CSLA.Library/Generated/MembershipInfoList.cs @@ -58,7 +58,7 @@ namespace VEPROMS.CSLA.Library #region Factory Methods public static MembershipInfoList _MembershipInfoList = null; /// - /// Return a list of all projects. + /// Return a list of all MembershipInfo. /// public static MembershipInfoList Get() { @@ -77,6 +77,13 @@ namespace VEPROMS.CSLA.Library throw new DbCslaException("Error on MembershipInfoList.Get", ex); } } + /// + /// Reset the list of all MembershipInfo. + /// + public static void Reset() + { + _MembershipInfoList = null; + } // TODO: Add alternative gets - //public static MembershipInfoList Get() //{ diff --git a/PROMS/VEPROMS.CSLA.Library/Generated/PartInfoList.cs b/PROMS/VEPROMS.CSLA.Library/Generated/PartInfoList.cs index 1b78f5a0..5b34a1da 100644 --- a/PROMS/VEPROMS.CSLA.Library/Generated/PartInfoList.cs +++ b/PROMS/VEPROMS.CSLA.Library/Generated/PartInfoList.cs @@ -58,7 +58,7 @@ namespace VEPROMS.CSLA.Library #region Factory Methods public static PartInfoList _PartInfoList = null; /// - /// Return a list of all projects. + /// Return a list of all PartInfo. /// public static PartInfoList Get() { @@ -77,6 +77,13 @@ namespace VEPROMS.CSLA.Library throw new DbCslaException("Error on PartInfoList.Get", ex); } } + /// + /// Reset the list of all PartInfo. + /// + public static void Reset() + { + _PartInfoList = null; + } // TODO: Add alternative gets - //public static PartInfoList Get() //{ diff --git a/PROMS/VEPROMS.CSLA.Library/Generated/PermissionInfoList.cs b/PROMS/VEPROMS.CSLA.Library/Generated/PermissionInfoList.cs index 6b4500fd..8d959159 100644 --- a/PROMS/VEPROMS.CSLA.Library/Generated/PermissionInfoList.cs +++ b/PROMS/VEPROMS.CSLA.Library/Generated/PermissionInfoList.cs @@ -58,7 +58,7 @@ namespace VEPROMS.CSLA.Library #region Factory Methods public static PermissionInfoList _PermissionInfoList = null; /// - /// Return a list of all projects. + /// Return a list of all PermissionInfo. /// public static PermissionInfoList Get() { @@ -77,6 +77,13 @@ namespace VEPROMS.CSLA.Library throw new DbCslaException("Error on PermissionInfoList.Get", ex); } } + /// + /// Reset the list of all PermissionInfo. + /// + public static void Reset() + { + _PermissionInfoList = null; + } // TODO: Add alternative gets - //public static PermissionInfoList Get() //{ diff --git a/PROMS/VEPROMS.CSLA.Library/Generated/Role.cs b/PROMS/VEPROMS.CSLA.Library/Generated/Role.cs index 8a039745..a2bea19f 100644 --- a/PROMS/VEPROMS.CSLA.Library/Generated/Role.cs +++ b/PROMS/VEPROMS.CSLA.Library/Generated/Role.cs @@ -250,13 +250,19 @@ namespace VEPROMS.CSLA.Library get { CanReadProperty("RoleAssignments", true); - if (_RoleAssignmentCount > 0 && _RoleAssignments == null) + if (_RoleAssignmentCount < 0 || (_RoleAssignmentCount > 0 && _RoleAssignments == null)) _RoleAssignments = RoleAssignments.GetByRID(RID); - else if (_RoleAssignments == null) + if (_RoleAssignmentCount < 0 ) + _RoleAssignmentCount = _RoleAssignments == null ? 0 : _RoleAssignments.Count; + if (_RoleAssignments == null) _RoleAssignments = RoleAssignments.New(); return _RoleAssignments; } } + public void Reset_RoleAssignments() + { + _RoleAssignmentCount = -1; + } private int _RolePermissionCount = 0; /// /// Count of RolePermissions for this Role @@ -281,13 +287,19 @@ namespace VEPROMS.CSLA.Library get { CanReadProperty("RolePermissions", true); - if (_RolePermissionCount > 0 && _RolePermissions == null) + if (_RolePermissionCount < 0 || (_RolePermissionCount > 0 && _RolePermissions == null)) _RolePermissions = RolePermissions.GetByRID(RID); - else if (_RolePermissions == null) + if (_RolePermissionCount < 0 ) + _RolePermissionCount = _RolePermissions == null ? 0 : _RolePermissions.Count; + if (_RolePermissions == null) _RolePermissions = RolePermissions.New(); return _RolePermissions; } } + public void Reset_RolePermissions() + { + _RolePermissionCount = -1; + } public override bool IsDirty { get { return base.IsDirty || (_RoleAssignments == null ? false : _RoleAssignments.IsDirty) || (_RolePermissions == null ? false : _RolePermissions.IsDirty); } diff --git a/PROMS/VEPROMS.CSLA.Library/Generated/RoleInfoList.cs b/PROMS/VEPROMS.CSLA.Library/Generated/RoleInfoList.cs index 5101de2c..0585959f 100644 --- a/PROMS/VEPROMS.CSLA.Library/Generated/RoleInfoList.cs +++ b/PROMS/VEPROMS.CSLA.Library/Generated/RoleInfoList.cs @@ -58,7 +58,7 @@ namespace VEPROMS.CSLA.Library #region Factory Methods public static RoleInfoList _RoleInfoList = null; /// - /// Return a list of all projects. + /// Return a list of all RoleInfo. /// public static RoleInfoList Get() { @@ -77,6 +77,13 @@ namespace VEPROMS.CSLA.Library throw new DbCslaException("Error on RoleInfoList.Get", ex); } } + /// + /// Reset the list of all RoleInfo. + /// + public static void Reset() + { + _RoleInfoList = null; + } // TODO: Add alternative gets - //public static RoleInfoList Get() //{ diff --git a/PROMS/VEPROMS.CSLA.Library/Generated/TransitionInfoList.cs b/PROMS/VEPROMS.CSLA.Library/Generated/TransitionInfoList.cs index 0ee8f648..565e5033 100644 --- a/PROMS/VEPROMS.CSLA.Library/Generated/TransitionInfoList.cs +++ b/PROMS/VEPROMS.CSLA.Library/Generated/TransitionInfoList.cs @@ -58,7 +58,7 @@ namespace VEPROMS.CSLA.Library #region Factory Methods public static TransitionInfoList _TransitionInfoList = null; /// - /// Return a list of all projects. + /// Return a list of all TransitionInfo. /// public static TransitionInfoList Get() { @@ -77,6 +77,13 @@ namespace VEPROMS.CSLA.Library throw new DbCslaException("Error on TransitionInfoList.Get", ex); } } + /// + /// Reset the list of all TransitionInfo. + /// + public static void Reset() + { + _TransitionInfoList = null; + } // TODO: Add alternative gets - //public static TransitionInfoList Get() //{ diff --git a/PROMS/VEPROMS.CSLA.Library/Generated/User.cs b/PROMS/VEPROMS.CSLA.Library/Generated/User.cs index aa48f537..944cce72 100644 --- a/PROMS/VEPROMS.CSLA.Library/Generated/User.cs +++ b/PROMS/VEPROMS.CSLA.Library/Generated/User.cs @@ -416,13 +416,19 @@ namespace VEPROMS.CSLA.Library get { CanReadProperty("UserMemberships", true); - if (_UserMembershipCount > 0 && _UserMemberships == null) + if (_UserMembershipCount < 0 || (_UserMembershipCount > 0 && _UserMemberships == null)) _UserMemberships = UserMemberships.GetByUID(UID); - else if (_UserMemberships == null) + if (_UserMembershipCount < 0 ) + _UserMembershipCount = _UserMemberships == null ? 0 : _UserMemberships.Count; + if (_UserMemberships == null) _UserMemberships = UserMemberships.New(); return _UserMemberships; } } + public void Reset_UserMemberships() + { + _UserMembershipCount = -1; + } public override bool IsDirty { get { return base.IsDirty || (_UserMemberships == null ? false : _UserMemberships.IsDirty); } diff --git a/PROMS/VEPROMS.CSLA.Library/Generated/UserInfoList.cs b/PROMS/VEPROMS.CSLA.Library/Generated/UserInfoList.cs index fb63966c..48f0f731 100644 --- a/PROMS/VEPROMS.CSLA.Library/Generated/UserInfoList.cs +++ b/PROMS/VEPROMS.CSLA.Library/Generated/UserInfoList.cs @@ -58,7 +58,7 @@ namespace VEPROMS.CSLA.Library #region Factory Methods public static UserInfoList _UserInfoList = null; /// - /// Return a list of all projects. + /// Return a list of all UserInfo. /// public static UserInfoList Get() { @@ -77,6 +77,13 @@ namespace VEPROMS.CSLA.Library throw new DbCslaException("Error on UserInfoList.Get", ex); } } + /// + /// Reset the list of all UserInfo. + /// + public static void Reset() + { + _UserInfoList = null; + } // TODO: Add alternative gets - //public static UserInfoList Get() //{