コード例 #1
0
 /// <summary>
 /// Loads child <see cref="E11_City_ReChild"/> object.
 /// </summary>
 /// <param name="child">The child object to load.</param>
 internal void LoadChild(E11_City_ReChild child)
 {
     LoadProperty(E11_City_ASingleObjectProperty, child);
 }
コード例 #2
0
        /// <summary>
        /// Loads child objects from the given DAL provider.
        /// </summary>
        /// <param name="dal">The DAL provider to use.</param>
        private void FetchChildren(IE02_ContinentDal dal)
        {
            LoadProperty(E03_Continent_SingleObjectProperty, E03_Continent_Child.GetE03_Continent_Child(dal.E03_Continent_Child));
            LoadProperty(E03_Continent_ASingleObjectProperty, E03_Continent_ReChild.GetE03_Continent_ReChild(dal.E03_Continent_ReChild));
            LoadProperty(E03_SubContinentObjectsProperty, E03_SubContinentColl.GetE03_SubContinentColl(dal.E03_SubContinentColl));
            foreach (var item in dal.E05_SubContinent_Child)
            {
                var child = E05_SubContinent_Child.GetE05_SubContinent_Child(item);
                var obj   = E03_SubContinentObjects.FindE04_SubContinentByParentProperties(child.subContinent_ID1);
                obj.LoadChild(child);
            }
            foreach (var item in dal.E05_SubContinent_ReChild)
            {
                var child = E05_SubContinent_ReChild.GetE05_SubContinent_ReChild(item);
                var obj   = E03_SubContinentObjects.FindE04_SubContinentByParentProperties(child.subContinent_ID2);
                obj.LoadChild(child);
            }
            var e05_CountryColl = E05_CountryColl.GetE05_CountryColl(dal.E05_CountryColl);

            e05_CountryColl.LoadItems(E03_SubContinentObjects);
            foreach (var item in dal.E07_Country_Child)
            {
                var child = E07_Country_Child.GetE07_Country_Child(item);
                var obj   = e05_CountryColl.FindE06_CountryByParentProperties(child.country_ID1);
                obj.LoadChild(child);
            }
            foreach (var item in dal.E07_Country_ReChild)
            {
                var child = E07_Country_ReChild.GetE07_Country_ReChild(item);
                var obj   = e05_CountryColl.FindE06_CountryByParentProperties(child.country_ID2);
                obj.LoadChild(child);
            }
            var e07_RegionColl = E07_RegionColl.GetE07_RegionColl(dal.E07_RegionColl);

            e07_RegionColl.LoadItems(e05_CountryColl);
            foreach (var item in dal.E09_Region_Child)
            {
                var child = E09_Region_Child.GetE09_Region_Child(item);
                var obj   = e07_RegionColl.FindE08_RegionByParentProperties(child.region_ID1);
                obj.LoadChild(child);
            }
            foreach (var item in dal.E09_Region_ReChild)
            {
                var child = E09_Region_ReChild.GetE09_Region_ReChild(item);
                var obj   = e07_RegionColl.FindE08_RegionByParentProperties(child.region_ID2);
                obj.LoadChild(child);
            }
            var e09_CityColl = E09_CityColl.GetE09_CityColl(dal.E09_CityColl);

            e09_CityColl.LoadItems(e07_RegionColl);
            foreach (var item in dal.E11_City_Child)
            {
                var child = E11_City_Child.GetE11_City_Child(item);
                var obj   = e09_CityColl.FindE10_CityByParentProperties(child.city_ID1);
                obj.LoadChild(child);
            }
            foreach (var item in dal.E11_City_ReChild)
            {
                var child = E11_City_ReChild.GetE11_City_ReChild(item);
                var obj   = e09_CityColl.FindE10_CityByParentProperties(child.city_ID2);
                obj.LoadChild(child);
            }
            var e11_CityRoadColl = E11_CityRoadColl.GetE11_CityRoadColl(dal.E11_CityRoadColl);

            e11_CityRoadColl.LoadItems(e09_CityColl);
        }