Esempio n. 1
0
        /// <summary>
        /// Loads a <see cref="H07_Country_Child"/> object from the database, based on given criteria.
        /// </summary>
        /// <param name="country_ID1">The Country ID1.</param>
        protected void Child_Fetch(int country_ID1)
        {
            var args = new DataPortalHookArgs(country_ID1);

            OnFetchPre(args);
            using (var dalManager = DalFactorySelfLoadSoftDelete.GetManager())
            {
                var dal  = dalManager.GetProvider <IH07_Country_ChildDal>();
                var data = dal.Fetch(country_ID1);
                Fetch(data);
            }
            OnFetchPost(args);
        }
        /// <summary>
        /// Loads a <see cref="H11_CityRoadColl"/> collection from the database, based on given criteria.
        /// </summary>
        /// <param name="parent_City_ID">The Parent City ID.</param>
        protected void Child_Fetch(int parent_City_ID)
        {
            var args = new DataPortalHookArgs(parent_City_ID);

            OnFetchPre(args);
            using (var dalManager = DalFactorySelfLoadSoftDelete.GetManager())
            {
                var dal  = dalManager.GetProvider <IH11_CityRoadCollDal>();
                var data = dal.Fetch(parent_City_ID);
                LoadCollection(data);
            }
            OnFetchPost(args);
        }
Esempio n. 3
0
 private void Child_DeleteSelf()
 {
     using (var dalManager = DalFactorySelfLoadSoftDelete.GetManager())
     {
         var args = new DataPortalHookArgs();
         OnDeletePre(args);
         var dal = dalManager.GetProvider <IG12_CityRoadDal>();
         using (BypassPropertyChecks)
         {
             dal.Delete(ReadProperty(CityRoad_IDProperty));
         }
         OnDeletePost(args);
     }
 }
 private void Child_DeleteSelf(H04_SubContinent parent)
 {
     using (var dalManager = DalFactorySelfLoadSoftDelete.GetManager())
     {
         var args = new DataPortalHookArgs();
         OnDeletePre(args);
         var dal = dalManager.GetProvider <IH05_SubContinent_ReChildDal>();
         using (BypassPropertyChecks)
         {
             dal.Delete(parent.SubContinent_ID);
         }
         OnDeletePost(args);
     }
 }
Esempio n. 5
0
 private void Child_DeleteSelf(G06_Country parent)
 {
     using (var dalManager = DalFactorySelfLoadSoftDelete.GetManager())
     {
         var args = new DataPortalHookArgs();
         OnDeletePre(args);
         var dal = dalManager.GetProvider <IG07_Country_ChildDal>();
         using (BypassPropertyChecks)
         {
             dal.Delete(parent.Country_ID);
         }
         OnDeletePost(args);
     }
 }
Esempio n. 6
0
        /// <summary>
        /// Loads a <see cref="G03_Continent_ReChild"/> object from the database, based on given criteria.
        /// </summary>
        /// <param name="continent_ID2">The Continent ID2.</param>
        protected void Child_Fetch(int continent_ID2)
        {
            var args = new DataPortalHookArgs(continent_ID2);

            OnFetchPre(args);
            using (var dalManager = DalFactorySelfLoadSoftDelete.GetManager())
            {
                var dal  = dalManager.GetProvider <IG03_Continent_ReChildDal>();
                var data = dal.Fetch(continent_ID2);
                Fetch(data);
            }
            OnFetchPost(args);
            // check all object rules and property rules
            BusinessRules.CheckRules();
        }
 private void Child_DeleteSelf()
 {
     using (var dalManager = DalFactorySelfLoadSoftDelete.GetManager())
     {
         var args = new DataPortalHookArgs();
         // flushes all pending data operations
         FieldManager.UpdateChildren(this);
         OnDeletePre(args);
         var dal = dalManager.GetProvider <IG08_RegionDal>();
         using (BypassPropertyChecks)
         {
             dal.Delete(ReadProperty(Region_IDProperty));
         }
         OnDeletePost(args);
     }
 }
Esempio n. 8
0
 private void DataPortal_Delete(int continent_ID)
 {
     using (var dalManager = DalFactorySelfLoadSoftDelete.GetManager())
     {
         var args = new DataPortalHookArgs();
         // flushes all pending data operations
         FieldManager.UpdateChildren(this);
         OnDeletePre(args);
         var dal = dalManager.GetProvider <IG02_ContinentDal>();
         using (BypassPropertyChecks)
         {
             dal.Delete(continent_ID);
         }
         OnDeletePost(args);
     }
 }
Esempio n. 9
0
 private void Child_Insert(G04_SubContinent parent)
 {
     using (var dalManager = DalFactorySelfLoadSoftDelete.GetManager())
     {
         var args = new DataPortalHookArgs();
         OnInsertPre(args);
         var dal = dalManager.GetProvider <IG05_SubContinent_ChildDal>();
         using (BypassPropertyChecks)
         {
             _rowVersion = dal.Insert(
                 parent.SubContinent_ID,
                 SubContinent_Child_Name
                 );
         }
         OnInsertPost(args);
     }
 }
Esempio n. 10
0
        /// <summary>
        /// Loads a <see cref="G03_SubContinentColl"/> collection from the database, based on given criteria.
        /// </summary>
        /// <param name="parent_Continent_ID">The Parent Continent ID.</param>
        protected void Child_Fetch(int parent_Continent_ID)
        {
            var args = new DataPortalHookArgs(parent_Continent_ID);

            OnFetchPre(args);
            using (var dalManager = DalFactorySelfLoadSoftDelete.GetManager())
            {
                var dal  = dalManager.GetProvider <IG03_SubContinentCollDal>();
                var data = dal.Fetch(parent_Continent_ID);
                Fetch(data);
            }
            OnFetchPost(args);
            foreach (var item in this)
            {
                item.FetchChildren();
            }
        }
        /// <summary>
        /// Loads a <see cref="H01_ContinentColl"/> collection from the database.
        /// </summary>
        protected void DataPortal_Fetch()
        {
            var args = new DataPortalHookArgs();

            OnFetchPre(args);
            using (var dalManager = DalFactorySelfLoadSoftDelete.GetManager())
            {
                var dal  = dalManager.GetProvider <IH01_ContinentCollDal>();
                var data = dal.Fetch();
                LoadCollection(data);
            }
            OnFetchPost(args);
            foreach (var item in this)
            {
                item.FetchChildren();
            }
        }
Esempio n. 12
0
 private void Child_Insert(H02_Continent parent)
 {
     using (var dalManager = DalFactorySelfLoadSoftDelete.GetManager())
     {
         var args = new DataPortalHookArgs();
         OnInsertPre(args);
         var dal = dalManager.GetProvider <IH03_Continent_ReChildDal>();
         using (BypassPropertyChecks)
         {
             dal.Insert(
                 parent.Continent_ID,
                 Continent_Child_Name
                 );
         }
         OnInsertPost(args);
     }
 }
Esempio n. 13
0
 private void Child_Insert(G08_Region parent)
 {
     using (var dalManager = DalFactorySelfLoadSoftDelete.GetManager())
     {
         var args = new DataPortalHookArgs();
         OnInsertPre(args);
         var dal = dalManager.GetProvider <IG09_Region_ChildDal>();
         using (BypassPropertyChecks)
         {
             dal.Insert(
                 parent.Region_ID,
                 Region_Child_Name
                 );
         }
         OnInsertPost(args);
     }
 }
Esempio n. 14
0
        private void Child_Insert(G02_Continent parent)
        {
            var dto = new G03_Continent_ReChildDto();

            dto.Parent_Continent_ID  = parent.Continent_ID;
            dto.Continent_Child_Name = Continent_Child_Name;
            using (var dalManager = DalFactorySelfLoadSoftDelete.GetManager())
            {
                var args = new DataPortalHookArgs(dto);
                OnInsertPre(args);
                var dal = dalManager.GetProvider <IG03_Continent_ReChildDal>();
                using (BypassPropertyChecks)
                {
                    var resultDto = dal.Insert(dto);
                    args = new DataPortalHookArgs(resultDto);
                }
                OnInsertPost(args);
            }
        }
Esempio n. 15
0
 private void Child_Insert(H10_City parent)
 {
     using (var dalManager = DalFactorySelfLoadSoftDelete.GetManager())
     {
         var args = new DataPortalHookArgs();
         OnInsertPre(args);
         var dal = dalManager.GetProvider <IH12_CityRoadDal>();
         using (BypassPropertyChecks)
         {
             int cityRoad_ID = -1;
             dal.Insert(
                 parent.City_ID,
                 out cityRoad_ID,
                 CityRoad_Name
                 );
             LoadProperty(CityRoad_IDProperty, cityRoad_ID);
         }
         OnInsertPost(args);
     }
 }
Esempio n. 16
0
        private void Child_Insert(G10_City parent)
        {
            var dto = new G12_CityRoadDto();

            dto.Parent_City_ID = parent.City_ID;
            dto.CityRoad_Name  = CityRoad_Name;
            using (var dalManager = DalFactorySelfLoadSoftDelete.GetManager())
            {
                var args = new DataPortalHookArgs(dto);
                OnInsertPre(args);
                var dal = dalManager.GetProvider <IG12_CityRoadDal>();
                using (BypassPropertyChecks)
                {
                    var resultDto = dal.Insert(dto);
                    LoadProperty(CityRoad_IDProperty, resultDto.CityRoad_ID);
                    args = new DataPortalHookArgs(resultDto);
                }
                OnInsertPost(args);
            }
        }
Esempio n. 17
0
        private void Child_Insert()
        {
            var dto = new H02_ContinentDto();

            dto.Continent_Name = Continent_Name;
            using (var dalManager = DalFactorySelfLoadSoftDelete.GetManager())
            {
                var args = new DataPortalHookArgs(dto);
                OnInsertPre(args);
                var dal = dalManager.GetProvider <IH02_ContinentDal>();
                using (BypassPropertyChecks)
                {
                    var resultDto = dal.Insert(dto);
                    LoadProperty(Continent_IDProperty, resultDto.Continent_ID);
                    args = new DataPortalHookArgs(resultDto);
                }
                OnInsertPost(args);
                // flushes all pending data operations
                FieldManager.UpdateChildren(this);
            }
        }
Esempio n. 18
0
        protected override void DataPortal_Update()
        {
            var dto = new G02_ContinentDto();

            dto.Continent_ID   = Continent_ID;
            dto.Continent_Name = Continent_Name;
            using (var dalManager = DalFactorySelfLoadSoftDelete.GetManager())
            {
                var args = new DataPortalHookArgs(dto);
                OnUpdatePre(args);
                var dal = dalManager.GetProvider <IG02_ContinentDal>();
                using (BypassPropertyChecks)
                {
                    var resultDto = dal.Update(dto);
                    args = new DataPortalHookArgs(resultDto);
                }
                OnUpdatePost(args);
                // flushes all pending data operations
                FieldManager.UpdateChildren(this);
            }
        }
Esempio n. 19
0
 protected override void DataPortal_Insert()
 {
     using (var dalManager = DalFactorySelfLoadSoftDelete.GetManager())
     {
         var args = new DataPortalHookArgs();
         OnInsertPre(args);
         var dal = dalManager.GetProvider <IG02_ContinentDal>();
         using (BypassPropertyChecks)
         {
             int continent_ID = -1;
             dal.Insert(
                 out continent_ID,
                 Continent_Name
                 );
             LoadProperty(Continent_IDProperty, continent_ID);
         }
         OnInsertPost(args);
         // flushes all pending data operations
         FieldManager.UpdateChildren(this);
     }
 }
Esempio n. 20
0
        private void Child_Update(H04_SubContinent parent)
        {
            if (!IsDirty)
            {
                return;
            }

            using (var dalManager = DalFactorySelfLoadSoftDelete.GetManager())
            {
                var args = new DataPortalHookArgs();
                OnUpdatePre(args);
                var dal = dalManager.GetProvider <IH05_SubContinent_ReChildDal>();
                using (BypassPropertyChecks)
                {
                    dal.Update(
                        parent.SubContinent_ID,
                        SubContinent_Child_Name
                        );
                }
                OnUpdatePost(args);
            }
        }
Esempio n. 21
0
        private void Child_Update(G06_Country parent)
        {
            if (!IsDirty)
            {
                return;
            }

            using (var dalManager = DalFactorySelfLoadSoftDelete.GetManager())
            {
                var args = new DataPortalHookArgs();
                OnUpdatePre(args);
                var dal = dalManager.GetProvider <IG07_Country_ChildDal>();
                using (BypassPropertyChecks)
                {
                    dal.Update(
                        parent.Country_ID,
                        Country_Child_Name
                        );
                }
                OnUpdatePost(args);
            }
        }
Esempio n. 22
0
        private void Child_Insert(G08_Region parent)
        {
            var dto = new G10_CityDto();

            dto.Parent_Region_ID = parent.Region_ID;
            dto.City_Name        = City_Name;
            using (var dalManager = DalFactorySelfLoadSoftDelete.GetManager())
            {
                var args = new DataPortalHookArgs(dto);
                OnInsertPre(args);
                var dal = dalManager.GetProvider <IG10_CityDal>();
                using (BypassPropertyChecks)
                {
                    var resultDto = dal.Insert(dto);
                    LoadProperty(City_IDProperty, resultDto.City_ID);
                    args = new DataPortalHookArgs(resultDto);
                }
                OnInsertPost(args);
                // flushes all pending data operations
                FieldManager.UpdateChildren(this);
            }
        }
 private void Child_Insert(G06_Country parent)
 {
     using (var dalManager = DalFactorySelfLoadSoftDelete.GetManager())
     {
         var args = new DataPortalHookArgs();
         OnInsertPre(args);
         var dal = dalManager.GetProvider <IG08_RegionDal>();
         using (BypassPropertyChecks)
         {
             int region_ID = -1;
             dal.Insert(
                 parent.Country_ID,
                 out region_ID,
                 Region_Name
                 );
             LoadProperty(Region_IDProperty, region_ID);
         }
         OnInsertPost(args);
         // flushes all pending data operations
         FieldManager.UpdateChildren(this);
     }
 }
Esempio n. 24
0
        private void Child_Update()
        {
            if (!IsDirty)
            {
                return;
            }

            using (var dalManager = DalFactorySelfLoadSoftDelete.GetManager())
            {
                var args = new DataPortalHookArgs();
                OnUpdatePre(args);
                var dal = dalManager.GetProvider <IH12_CityRoadDal>();
                using (BypassPropertyChecks)
                {
                    dal.Update(
                        CityRoad_ID,
                        CityRoad_Name
                        );
                }
                OnUpdatePost(args);
            }
        }
Esempio n. 25
0
 private void Child_Insert(G04_SubContinent parent)
 {
     using (var dalManager = DalFactorySelfLoadSoftDelete.GetManager())
     {
         var args = new DataPortalHookArgs();
         OnInsertPre(args);
         var dal = dalManager.GetProvider <IG06_CountryDal>();
         using (BypassPropertyChecks)
         {
             int country_ID = -1;
             _rowVersion = dal.Insert(
                 parent.SubContinent_ID,
                 out country_ID,
                 Country_Name
                 );
             LoadProperty(Country_IDProperty, country_ID);
         }
         OnInsertPost(args);
         // flushes all pending data operations
         FieldManager.UpdateChildren(this);
     }
 }
        private void Child_Insert(G04_SubContinent parent)
        {
            var dto = new G06_CountryDto();

            dto.Parent_SubContinent_ID = parent.SubContinent_ID;
            dto.Country_Name           = Country_Name;
            using (var dalManager = DalFactorySelfLoadSoftDelete.GetManager())
            {
                var args = new DataPortalHookArgs(dto);
                OnInsertPre(args);
                var dal = dalManager.GetProvider <IG06_CountryDal>();
                using (BypassPropertyChecks)
                {
                    var resultDto = dal.Insert(dto);
                    LoadProperty(Country_IDProperty, resultDto.Country_ID);
                    _rowVersion = resultDto.RowVersion;
                    args        = new DataPortalHookArgs(resultDto);
                }
                OnInsertPost(args);
                // flushes all pending data operations
                FieldManager.UpdateChildren(this);
            }
        }
        private void Child_Update(G10_City parent)
        {
            if (!IsDirty)
            {
                return;
            }

            var dto = new G11_City_ChildDto();

            dto.Parent_City_ID  = parent.City_ID;
            dto.City_Child_Name = City_Child_Name;
            using (var dalManager = DalFactorySelfLoadSoftDelete.GetManager())
            {
                var args = new DataPortalHookArgs(dto);
                OnUpdatePre(args);
                var dal = dalManager.GetProvider <IG11_City_ChildDal>();
                using (BypassPropertyChecks)
                {
                    var resultDto = dal.Update(dto);
                    args = new DataPortalHookArgs(resultDto);
                }
                OnUpdatePost(args);
            }
        }
Esempio n. 28
0
        private void Child_Update()
        {
            if (!IsDirty)
            {
                return;
            }

            using (var dalManager = DalFactorySelfLoadSoftDelete.GetManager())
            {
                var args = new DataPortalHookArgs();
                OnUpdatePre(args);
                var dal = dalManager.GetProvider <IH08_RegionDal>();
                using (BypassPropertyChecks)
                {
                    dal.Update(
                        Region_ID,
                        Region_Name
                        );
                }
                OnUpdatePost(args);
                // flushes all pending data operations
                FieldManager.UpdateChildren(this);
            }
        }