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

            // show the framework that this is a child object
            obj.MarkAsChild();
            obj.Fetch(dr);
            obj.LoadProperty(A07Level1111ObjectsProperty, A07Level1111Coll.NewA07Level1111Coll());
            obj.MarkOld();
            return(obj);
        }
Beispiel #3
0
        /// <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);
        }