/// <summary>
 /// Loads <see cref="E08Level1111"/> items on the E07Level1111Objects collection.
 /// </summary>
 /// <param name="collection">The grand parent <see cref="E05Level111Coll"/> collection.</param>
 internal void LoadItems(E05Level111Coll collection)
 {
     foreach (var item in this)
     {
         var obj  = collection.FindE06Level111ByParentProperties(item.larentID1);
         var rlce = obj.E07Level1111Objects.RaiseListChangedEvents;
         obj.E07Level1111Objects.RaiseListChangedEvents = false;
         obj.E07Level1111Objects.Add(item);
         obj.E07Level1111Objects.RaiseListChangedEvents = rlce;
     }
 }
示例#2
0
        /// <summary>
        /// Factory method. Loads a <see cref="E04Level11"/> object from the given SafeDataReader.
        /// </summary>
        /// <param name="dr">The SafeDataReader to use.</param>
        /// <returns>A reference to the fetched <see cref="E04Level11"/> object.</returns>
        internal static E04Level11 GetE04Level11(SafeDataReader dr)
        {
            E04Level11 obj = new E04Level11();

            // show the framework that this is a child object
            obj.MarkAsChild();
            obj.Fetch(dr);
            obj.LoadProperty(E05Level111ObjectsProperty, E05Level111Coll.NewE05Level111Coll());
            obj.MarkOld();
            return(obj);
        }
示例#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(E03Level11SingleObjectProperty, E03Level11Child.GetE03Level11Child(dr));
            }
            dr.NextResult();
            if (dr.Read())
            {
                LoadProperty(E03Level11ASingleObjectProperty, E03Level11ReChild.GetE03Level11ReChild(dr));
            }
            dr.NextResult();
            LoadProperty(E03Level11ObjectsProperty, E03Level11Coll.GetE03Level11Coll(dr));
            dr.NextResult();
            while (dr.Read())
            {
                var child = E05Level111Child.GetE05Level111Child(dr);
                var obj   = E03Level11Objects.FindE04Level11ByParentProperties(child.cMarentID1);
                obj.LoadChild(child);
            }
            dr.NextResult();
            while (dr.Read())
            {
                var child = E05Level111ReChild.GetE05Level111ReChild(dr);
                var obj   = E03Level11Objects.FindE04Level11ByParentProperties(child.cMarentID2);
                obj.LoadChild(child);
            }
            dr.NextResult();
            var e05Level111Coll = E05Level111Coll.GetE05Level111Coll(dr);

            e05Level111Coll.LoadItems(E03Level11Objects);
            dr.NextResult();
            while (dr.Read())
            {
                var child = E07Level1111Child.GetE07Level1111Child(dr);
                var obj   = e05Level111Coll.FindE06Level111ByParentProperties(child.cLarentID1);
                obj.LoadChild(child);
            }
            dr.NextResult();
            while (dr.Read())
            {
                var child = E07Level1111ReChild.GetE07Level1111ReChild(dr);
                var obj   = e05Level111Coll.FindE06Level111ByParentProperties(child.cLarentID2);
                obj.LoadChild(child);
            }
            dr.NextResult();
            var e07Level1111Coll = E07Level1111Coll.GetE07Level1111Coll(dr);

            e07Level1111Coll.LoadItems(e05Level111Coll);
            dr.NextResult();
            while (dr.Read())
            {
                var child = E09Level11111Child.GetE09Level11111Child(dr);
                var obj   = e07Level1111Coll.FindE08Level1111ByParentProperties(child.cNarentID1);
                obj.LoadChild(child);
            }
            dr.NextResult();
            while (dr.Read())
            {
                var child = E09Level11111ReChild.GetE09Level11111ReChild(dr);
                var obj   = e07Level1111Coll.FindE08Level1111ByParentProperties(child.cNarentID2);
                obj.LoadChild(child);
            }
            dr.NextResult();
            var e09Level11111Coll = E09Level11111Coll.GetE09Level11111Coll(dr);

            e09Level11111Coll.LoadItems(e07Level1111Coll);
            dr.NextResult();
            while (dr.Read())
            {
                var child = E11Level111111Child.GetE11Level111111Child(dr);
                var obj   = e09Level11111Coll.FindE10Level11111ByParentProperties(child.cQarentID1);
                obj.LoadChild(child);
            }
            dr.NextResult();
            while (dr.Read())
            {
                var child = E11Level111111ReChild.GetE11Level111111ReChild(dr);
                var obj   = e09Level11111Coll.FindE10Level11111ByParentProperties(child.cQarentID2);
                obj.LoadChild(child);
            }
            dr.NextResult();
            var e11Level111111Coll = E11Level111111Coll.GetE11Level111111Coll(dr);

            e11Level111111Coll.LoadItems(e09Level11111Coll);
        }