/// <summary> /// Loads <see cref="A12Level111111"/> items on the A11Level111111Objects collection. /// </summary> /// <param name="collection">The grand parent <see cref="A09Level11111Coll"/> collection.</param> internal void LoadItems(A09Level11111Coll collection) { foreach (var item in this) { var obj = collection.FindA10Level11111ByParentProperties(item.qarentID1); var rlce = obj.A11Level111111Objects.RaiseListChangedEvents; obj.A11Level111111Objects.RaiseListChangedEvents = false; obj.A11Level111111Objects.Add(item); obj.A11Level111111Objects.RaiseListChangedEvents = rlce; } }
/// <summary> /// Factory method. Loads a <see cref="A08Level1111"/> object from the given SafeDataReader. /// </summary> /// <param name="dr">The SafeDataReader to use.</param> /// <returns>A reference to the fetched <see cref="A08Level1111"/> object.</returns> internal static A08Level1111 GetA08Level1111(SafeDataReader dr) { A08Level1111 obj = new A08Level1111(); // show the framework that this is a child object obj.MarkAsChild(); obj.Fetch(dr); obj.LoadProperty(A09Level11111ObjectsProperty, A09Level11111Coll.NewA09Level11111Coll()); obj.MarkOld(); return(obj); }
/// <summary> /// Loads child objects from the given SafeDataReader. /// </summary> /// <param name="dr">The SafeDataReader to use.</param> private void FetchChildren(SafeDataReader dr) { dr.NextResult(); if (dr.Read()) { LoadProperty(A03Level11SingleObjectProperty, A03Level11Child.GetA03Level11Child(dr)); } dr.NextResult(); if (dr.Read()) { LoadProperty(A03Level11ASingleObjectProperty, A03Level11ReChild.GetA03Level11ReChild(dr)); } dr.NextResult(); LoadProperty(A03Level11ObjectsProperty, A03Level11Coll.GetA03Level11Coll(dr)); dr.NextResult(); while (dr.Read()) { var child = A05Level111Child.GetA05Level111Child(dr); var obj = A03Level11Objects.FindA04Level11ByParentProperties(child.cMarentID1); obj.LoadChild(child); } dr.NextResult(); while (dr.Read()) { var child = A05Level111ReChild.GetA05Level111ReChild(dr); var obj = A03Level11Objects.FindA04Level11ByParentProperties(child.cMarentID2); obj.LoadChild(child); } dr.NextResult(); var a05Level111Coll = A05Level111Coll.GetA05Level111Coll(dr); a05Level111Coll.LoadItems(A03Level11Objects); dr.NextResult(); while (dr.Read()) { var child = A07Level1111Child.GetA07Level1111Child(dr); var obj = a05Level111Coll.FindA06Level111ByParentProperties(child.cLarentID1); obj.LoadChild(child); } dr.NextResult(); while (dr.Read()) { var child = A07Level1111ReChild.GetA07Level1111ReChild(dr); var obj = a05Level111Coll.FindA06Level111ByParentProperties(child.cLarentID2); obj.LoadChild(child); } dr.NextResult(); var a07Level1111Coll = A07Level1111Coll.GetA07Level1111Coll(dr); a07Level1111Coll.LoadItems(a05Level111Coll); dr.NextResult(); while (dr.Read()) { var child = A09Level11111Child.GetA09Level11111Child(dr); var obj = a07Level1111Coll.FindA08Level1111ByParentProperties(child.cNarentID1); obj.LoadChild(child); } dr.NextResult(); while (dr.Read()) { var child = A09Level11111ReChild.GetA09Level11111ReChild(dr); var obj = a07Level1111Coll.FindA08Level1111ByParentProperties(child.cNarentID2); obj.LoadChild(child); } dr.NextResult(); var a09Level11111Coll = A09Level11111Coll.GetA09Level11111Coll(dr); a09Level11111Coll.LoadItems(a07Level1111Coll); dr.NextResult(); while (dr.Read()) { var child = A11Level111111Child.GetA11Level111111Child(dr); var obj = a09Level11111Coll.FindA10Level11111ByParentProperties(child.cQarentID1); obj.LoadChild(child); } dr.NextResult(); while (dr.Read()) { var child = A11Level111111ReChild.GetA11Level111111ReChild(dr); var obj = a09Level11111Coll.FindA10Level11111ByParentProperties(child.cQarentID2); obj.LoadChild(child); } dr.NextResult(); var a11Level111111Coll = A11Level111111Coll.GetA11Level111111Coll(dr); a11Level111111Coll.LoadItems(a09Level11111Coll); }