/// <summary>
 /// Loads <see cref="B10Level11111"/> items on the B09Level11111Objects collection.
 /// </summary>
 /// <param name="collection">The grand parent <see cref="B07Level1111Coll"/> collection.</param>
 internal void LoadItems(B07Level1111Coll collection)
 {
     foreach (var item in this)
     {
         var obj  = collection.FindB08Level1111ByParentProperties(item.narentID1);
         var rlce = obj.B09Level11111Objects.RaiseListChangedEvents;
         obj.B09Level11111Objects.RaiseListChangedEvents = false;
         obj.B09Level11111Objects.Add(item);
         obj.B09Level11111Objects.RaiseListChangedEvents = rlce;
     }
 }
Beispiel #2
0
        /// <summary>
        /// Factory method. Loads a <see cref="B06Level111"/> object from the given SafeDataReader.
        /// </summary>
        /// <param name="dr">The SafeDataReader to use.</param>
        /// <returns>A reference to the fetched <see cref="B06Level111"/> object.</returns>
        internal static B06Level111 GetB06Level111(SafeDataReader dr)
        {
            B06Level111 obj = new B06Level111();

            // show the framework that this is a child object
            obj.MarkAsChild();
            obj.Fetch(dr);
            obj.LoadProperty(B07Level1111ObjectsProperty, B07Level1111Coll.NewB07Level1111Coll());
            obj.MarkOld();
            return(obj);
        }
        /// <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 = B03Level11Child.GetB03Level11Child(dr);
                var obj   = ((B01Level1Coll)Parent).FindB02Level1ByParentProperties(child.cParentID1);
                obj.LoadProperty(B03Level11SingleObjectProperty, child);
            }
            dr.NextResult();
            while (dr.Read())
            {
                var child = B03Level11ReChild.GetB03Level11ReChild(dr);
                var obj   = ((B01Level1Coll)Parent).FindB02Level1ByParentProperties(child.cParentID2);
                obj.LoadProperty(B03Level11ASingleObjectProperty, child);
            }
            dr.NextResult();
            var b03Level11Coll = B03Level11Coll.GetB03Level11Coll(dr);

            b03Level11Coll.LoadItems((B01Level1Coll)Parent);
            dr.NextResult();
            while (dr.Read())
            {
                var child = B05Level111ReChild.GetB05Level111ReChild(dr);
                var obj   = b03Level11Coll.FindB04Level11ByParentProperties(child.cMarentID2);
                obj.LoadChild(child);
            }
            dr.NextResult();
            while (dr.Read())
            {
                var child = B05Level111Child.GetB05Level111Child(dr);
                var obj   = b03Level11Coll.FindB04Level11ByParentProperties(child.cMarentID1);
                obj.LoadChild(child);
            }
            dr.NextResult();
            var b05Level111Coll = B05Level111Coll.GetB05Level111Coll(dr);

            b05Level111Coll.LoadItems(b03Level11Coll);
            dr.NextResult();
            while (dr.Read())
            {
                var child = B07Level1111Child.GetB07Level1111Child(dr);
                var obj   = b05Level111Coll.FindB06Level111ByParentProperties(child.cLarentID1);
                obj.LoadChild(child);
            }
            dr.NextResult();
            while (dr.Read())
            {
                var child = B07Level1111ReChild.GetB07Level1111ReChild(dr);
                var obj   = b05Level111Coll.FindB06Level111ByParentProperties(child.cLarentID2);
                obj.LoadChild(child);
            }
            dr.NextResult();
            var b07Level1111Coll = B07Level1111Coll.GetB07Level1111Coll(dr);

            b07Level1111Coll.LoadItems(b05Level111Coll);
            dr.NextResult();
            while (dr.Read())
            {
                var child = B09Level11111Child.GetB09Level11111Child(dr);
                var obj   = b07Level1111Coll.FindB08Level1111ByParentProperties(child.cNarentID1);
                obj.LoadChild(child);
            }
            dr.NextResult();
            while (dr.Read())
            {
                var child = B09Level11111ReChild.GetB09Level11111ReChild(dr);
                var obj   = b07Level1111Coll.FindB08Level1111ByParentProperties(child.cNarentID2);
                obj.LoadChild(child);
            }
            dr.NextResult();
            var b09Level11111Coll = B09Level11111Coll.GetB09Level11111Coll(dr);

            b09Level11111Coll.LoadItems(b07Level1111Coll);
            dr.NextResult();
            while (dr.Read())
            {
                var child = B11Level111111Child.GetB11Level111111Child(dr);
                var obj   = b09Level11111Coll.FindB10Level11111ByParentProperties(child.cQarentID1);
                obj.LoadChild(child);
            }
            dr.NextResult();
            while (dr.Read())
            {
                var child = B11Level111111ReChild.GetB11Level111111ReChild(dr);
                var obj   = b09Level11111Coll.FindB10Level11111ByParentProperties(child.cQarentID2);
                obj.LoadChild(child);
            }
            dr.NextResult();
            var b11Level111111Coll = B11Level111111Coll.GetB11Level111111Coll(dr);

            b11Level111111Coll.LoadItems(b09Level11111Coll);
        }