/// <summary> /// Factory method. Loads a <see cref="F08Level1111"/> object from the given SafeDataReader. /// </summary> /// <param name="dr">The SafeDataReader to use.</param> /// <returns>A reference to the fetched <see cref="F08Level1111"/> object.</returns> internal static F08Level1111 GetF08Level1111(SafeDataReader dr) { F08Level1111 obj = new F08Level1111(); // show the framework that this is a child object obj.MarkAsChild(); obj.Fetch(dr); obj.LoadProperty(F09Level11111ObjectsProperty, F09Level11111Coll.NewF09Level11111Coll()); obj.MarkOld(); return obj; }
/// <summary> /// Loads <see cref="F12Level111111"/> items on the F11Level111111Objects collection. /// </summary> /// <param name="collection">The grand parent <see cref="F09Level11111Coll"/> collection.</param> internal void LoadItems(F09Level11111Coll collection) { foreach (var item in this) { var obj = collection.FindF10Level11111ByParentProperties(item.qarentID1); var rlce = obj.F11Level111111Objects.RaiseListChangedEvents; obj.F11Level111111Objects.RaiseListChangedEvents = false; obj.F11Level111111Objects.Add(item); obj.F11Level111111Objects.RaiseListChangedEvents = rlce; } }
/// <summary> /// Loads child objects from the given SafeDataReader. /// </summary> /// <param name="dr">The SafeDataReader to use.</param> internal void FetchChildren(SafeDataReader dr) { dr.NextResult(); while (dr.Read()) { var child = F03Level11Child.GetF03Level11Child(dr); var obj = ((F01Level1Coll)Parent).FindF02Level1ByParentProperties(child.cParentID1); obj.LoadProperty(F03Level11SingleObjectProperty, child); } dr.NextResult(); while (dr.Read()) { var child = F03Level11ReChild.GetF03Level11ReChild(dr); var obj = ((F01Level1Coll)Parent).FindF02Level1ByParentProperties(child.cParentID2); obj.LoadProperty(F03Level11ASingleObjectProperty, child); } dr.NextResult(); var f03Level11Coll = F03Level11Coll.GetF03Level11Coll(dr); f03Level11Coll.LoadItems((F01Level1Coll)Parent); dr.NextResult(); while (dr.Read()) { var child = F05Level111ReChild.GetF05Level111ReChild(dr); var obj = f03Level11Coll.FindF04Level11ByParentProperties(child.cMarentID2); obj.LoadChild(child); } dr.NextResult(); while (dr.Read()) { var child = F05Level111Child.GetF05Level111Child(dr); var obj = f03Level11Coll.FindF04Level11ByParentProperties(child.cMarentID1); obj.LoadChild(child); } dr.NextResult(); var f05Level111Coll = F05Level111Coll.GetF05Level111Coll(dr); f05Level111Coll.LoadItems(f03Level11Coll); dr.NextResult(); while (dr.Read()) { var child = F07Level1111Child.GetF07Level1111Child(dr); var obj = f05Level111Coll.FindF06Level111ByParentProperties(child.cLarentID1); obj.LoadChild(child); } dr.NextResult(); while (dr.Read()) { var child = F07Level1111ReChild.GetF07Level1111ReChild(dr); var obj = f05Level111Coll.FindF06Level111ByParentProperties(child.cLarentID2); obj.LoadChild(child); } dr.NextResult(); var f07Level1111Coll = F07Level1111Coll.GetF07Level1111Coll(dr); f07Level1111Coll.LoadItems(f05Level111Coll); dr.NextResult(); while (dr.Read()) { var child = F09Level11111Child.GetF09Level11111Child(dr); var obj = f07Level1111Coll.FindF08Level1111ByParentProperties(child.cNarentID1); obj.LoadChild(child); } dr.NextResult(); while (dr.Read()) { var child = F09Level11111ReChild.GetF09Level11111ReChild(dr); var obj = f07Level1111Coll.FindF08Level1111ByParentProperties(child.cNarentID2); obj.LoadChild(child); } dr.NextResult(); var f09Level11111Coll = F09Level11111Coll.GetF09Level11111Coll(dr); f09Level11111Coll.LoadItems(f07Level1111Coll); dr.NextResult(); while (dr.Read()) { var child = F11Level111111Child.GetF11Level111111Child(dr); var obj = f09Level11111Coll.FindF10Level11111ByParentProperties(child.cQarentID1); obj.LoadChild(child); } dr.NextResult(); while (dr.Read()) { var child = F11Level111111ReChild.GetF11Level111111ReChild(dr); var obj = f09Level11111Coll.FindF10Level11111ByParentProperties(child.cQarentID2); obj.LoadChild(child); } dr.NextResult(); var f11Level111111Coll = F11Level111111Coll.GetF11Level111111Coll(dr); f11Level111111Coll.LoadItems(f09Level11111Coll); }