Beispiel #1
0
        private void Child_Update()
        {
            if (!IsDirty)
            {
                return;
            }

            var dto = new C06_CountryDto();

            dto.Country_ID           = Country_ID;
            dto.Country_Name         = Country_Name;
            dto.ParentSubContinentID = ParentSubContinentID;
            dto.RowVersion           = _rowVersion;
            using (var dalManager = DalFactorySelfLoad.GetManager())
            {
                var args = new DataPortalHookArgs(dto);
                OnUpdatePre(args);
                var dal = dalManager.GetProvider <IC06_CountryDal>();
                using (BypassPropertyChecks)
                {
                    var resultDto = dal.Update(dto);
                    _rowVersion = resultDto.RowVersion;
                    args        = new DataPortalHookArgs(resultDto);
                }
                OnUpdatePost(args);
                // flushes all pending data operations
                FieldManager.UpdateChildren(this);
            }
        }
        private void Child_Update(C04_SubContinent parent)
        {
            if (!IsDirty)
            {
                return;
            }

            var dto = new C05_SubContinent_ChildDto();

            dto.Parent_SubContinent_ID  = parent.SubContinent_ID;
            dto.SubContinent_Child_Name = SubContinent_Child_Name;
            dto.RowVersion = _rowVersion;
            using (var dalManager = DalFactorySelfLoad.GetManager())
            {
                var args = new DataPortalHookArgs(dto);
                OnUpdatePre(args);
                var dal = dalManager.GetProvider <IC05_SubContinent_ChildDal>();
                using (BypassPropertyChecks)
                {
                    var resultDto = dal.Update(dto);
                    _rowVersion = resultDto.RowVersion;
                    args        = new DataPortalHookArgs(resultDto);
                }
                OnUpdatePost(args);
            }
        }
Beispiel #3
0
        private void Child_Update()
        {
            if (!IsDirty)
            {
                return;
            }

            var dto = new D04_SubContinentDto();

            dto.SubContinent_ID   = SubContinent_ID;
            dto.SubContinent_Name = SubContinent_Name;
            using (var dalManager = DalFactorySelfLoad.GetManager())
            {
                var args = new DataPortalHookArgs(dto);
                OnUpdatePre(args);
                var dal = dalManager.GetProvider <ID04_SubContinentDal>();
                using (BypassPropertyChecks)
                {
                    var resultDto = dal.Update(dto);
                    args = new DataPortalHookArgs(resultDto);
                }
                OnUpdatePost(args);
                // flushes all pending data operations
                FieldManager.UpdateChildren(this);
            }
        }
Beispiel #4
0
        private void Child_Update()
        {
            if (!IsDirty)
            {
                return;
            }

            using (var dalManager = DalFactorySelfLoad.GetManager())
            {
                var args = new DataPortalHookArgs();
                OnUpdatePre(args);
                var dal = dalManager.GetProvider <IC06_CountryDal>();
                using (BypassPropertyChecks)
                {
                    _rowVersion = dal.Update(
                        Country_ID,
                        Country_Name,
                        ParentSubContinentID,
                        _rowVersion
                        );
                }
                OnUpdatePost(args);
                // flushes all pending data operations
                FieldManager.UpdateChildren(this);
            }
        }
 protected override void DataPortal_Update()
 {
     using (var dalManager = DalFactorySelfLoad.GetManager())
     {
         base.Child_Update();
     }
 }
        /// <summary>
        /// Loads a <see cref="C11_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 = DalFactorySelfLoad.GetManager())
            {
                var dal  = dalManager.GetProvider <IC11_CityRoadCollDal>();
                var data = dal.Fetch(parent_City_ID);
                Fetch(data);
            }
            OnFetchPost(args);
        }
Beispiel #7
0
        /// <summary>
        /// Loads a <see cref="D09_Region_Child"/> object from the database, based on given criteria.
        /// </summary>
        /// <param name="region_ID1">The Region ID1.</param>
        protected void Child_Fetch(int region_ID1)
        {
            var args = new DataPortalHookArgs(region_ID1);

            OnFetchPre(args);
            using (var dalManager = DalFactorySelfLoad.GetManager())
            {
                var dal  = dalManager.GetProvider <ID09_Region_ChildDal>();
                var data = dal.Fetch(region_ID1);
                Fetch(data);
            }
            OnFetchPost(args);
        }
        /// <summary>
        /// Loads a <see cref="C05_SubContinent_Child"/> object from the database, based on given criteria.
        /// </summary>
        /// <param name="parentSubContinent_ID1">The Parent Sub Continent ID1.</param>
        protected void Child_Fetch(int parentSubContinent_ID1)
        {
            var args = new DataPortalHookArgs(parentSubContinent_ID1);

            OnFetchPre(args);
            using (var dalManager = DalFactorySelfLoad.GetManager())
            {
                var dal  = dalManager.GetProvider <IC05_SubContinent_ChildDal>();
                var data = dal.Fetch(parentSubContinent_ID1);
                Fetch(data);
            }
            OnFetchPost(args);
        }
Beispiel #9
0
 private void Child_DeleteSelf()
 {
     using (var dalManager = DalFactorySelfLoad.GetManager())
     {
         var args = new DataPortalHookArgs();
         OnDeletePre(args);
         var dal = dalManager.GetProvider <IC12_CityRoadDal>();
         using (BypassPropertyChecks)
         {
             dal.Delete(ReadProperty(CityRoad_IDProperty));
         }
         OnDeletePost(args);
     }
 }
 private void Child_DeleteSelf(C04_SubContinent parent)
 {
     using (var dalManager = DalFactorySelfLoad.GetManager())
     {
         var args = new DataPortalHookArgs();
         OnDeletePre(args);
         var dal = dalManager.GetProvider <IC05_SubContinent_ChildDal>();
         using (BypassPropertyChecks)
         {
             dal.Delete(parent.SubContinent_ID);
         }
         OnDeletePost(args);
     }
 }
 private void Child_DeleteSelf(D10_City parent)
 {
     using (var dalManager = DalFactorySelfLoad.GetManager())
     {
         var args = new DataPortalHookArgs();
         OnDeletePre(args);
         var dal = dalManager.GetProvider <ID11_City_ReChildDal>();
         using (BypassPropertyChecks)
         {
             dal.Delete(parent.City_ID);
         }
         OnDeletePost(args);
     }
 }
        /// <summary>
        /// Loads a <see cref="D11_City_ReChild"/> object from the database, based on given criteria.
        /// </summary>
        /// <param name="city_ID2">The City ID2.</param>
        protected void Child_Fetch(int city_ID2)
        {
            var args = new DataPortalHookArgs(city_ID2);

            OnFetchPre(args);
            using (var dalManager = DalFactorySelfLoad.GetManager())
            {
                var dal  = dalManager.GetProvider <ID11_City_ReChildDal>();
                var data = dal.Fetch(city_ID2);
                Fetch(data);
            }
            OnFetchPost(args);
            // check all object rules and property rules
            BusinessRules.CheckRules();
        }
Beispiel #13
0
        /// <summary>
        /// Loads a <see cref="C02_Continent"/> object from the database, based on given criteria.
        /// </summary>
        /// <param name="continent_ID">The Continent ID.</param>
        protected void DataPortal_Fetch(int continent_ID)
        {
            var args = new DataPortalHookArgs(continent_ID);

            OnFetchPre(args);
            using (var dalManager = DalFactorySelfLoad.GetManager())
            {
                var dal  = dalManager.GetProvider <IC02_ContinentDal>();
                var data = dal.Fetch(continent_ID);
                Fetch(data);
            }
            OnFetchPost(args);
            FetchChildren();
            // check all object rules and property rules
            BusinessRules.CheckRules();
        }
 private void Child_DeleteSelf()
 {
     using (var dalManager = DalFactorySelfLoad.GetManager())
     {
         var args = new DataPortalHookArgs();
         // flushes all pending data operations
         FieldManager.UpdateChildren(this);
         OnDeletePre(args);
         var dal = dalManager.GetProvider <ID02_ContinentDal>();
         using (BypassPropertyChecks)
         {
             dal.Delete(ReadProperty(Continent_IDProperty));
         }
         OnDeletePost(args);
     }
 }
 private void Child_Insert(D04_SubContinent parent)
 {
     using (var dalManager = DalFactorySelfLoad.GetManager())
     {
         var args = new DataPortalHookArgs();
         OnInsertPre(args);
         var dal = dalManager.GetProvider <ID05_SubContinent_ReChildDal>();
         using (BypassPropertyChecks)
         {
             dal.Insert(
                 parent.SubContinent_ID,
                 SubContinent_Child_Name
                 );
         }
         OnInsertPost(args);
     }
 }
        /// <summary>
        /// Loads a <see cref="D01_ContinentColl"/> collection from the database.
        /// </summary>
        protected void DataPortal_Fetch()
        {
            var args = new DataPortalHookArgs();

            OnFetchPre(args);
            using (var dalManager = DalFactorySelfLoad.GetManager())
            {
                var dal  = dalManager.GetProvider <ID01_ContinentCollDal>();
                var data = dal.Fetch();
                Fetch(data);
            }
            OnFetchPost(args);
            foreach (var item in this)
            {
                item.FetchChildren();
            }
        }
        /// <summary>
        /// Loads a <see cref="C09_CityColl"/> collection from the database, based on given criteria.
        /// </summary>
        /// <param name="parent_Region_ID">The Parent Region ID.</param>
        protected void Child_Fetch(int parent_Region_ID)
        {
            var args = new DataPortalHookArgs(parent_Region_ID);

            OnFetchPre(args);
            using (var dalManager = DalFactorySelfLoad.GetManager())
            {
                var dal  = dalManager.GetProvider <IC09_CityCollDal>();
                var data = dal.Fetch(parent_Region_ID);
                Fetch(data);
            }
            OnFetchPost(args);
            foreach (var item in this)
            {
                item.FetchChildren();
            }
        }
        /// <summary>
        /// Loads a <see cref="D05_CountryColl"/> collection from the database, based on given criteria.
        /// </summary>
        /// <param name="parent_SubContinent_ID">The Parent Sub Continent ID.</param>
        protected void Child_Fetch(int parent_SubContinent_ID)
        {
            var args = new DataPortalHookArgs(parent_SubContinent_ID);

            OnFetchPre(args);
            using (var dalManager = DalFactorySelfLoad.GetManager())
            {
                var dal  = dalManager.GetProvider <ID05_CountryCollDal>();
                var data = dal.Fetch(parent_SubContinent_ID);
                LoadCollection(data);
            }
            OnFetchPost(args);
            foreach (var item in this)
            {
                item.FetchChildren();
            }
        }
Beispiel #19
0
 private void Child_Insert(C06_Country parent)
 {
     using (var dalManager = DalFactorySelfLoad.GetManager())
     {
         var args = new DataPortalHookArgs();
         OnInsertPre(args);
         var dal = dalManager.GetProvider <IC07_Country_ReChildDal>();
         using (BypassPropertyChecks)
         {
             dal.Insert(
                 parent.Country_ID,
                 Country_Child_Name
                 );
         }
         OnInsertPost(args);
     }
 }
Beispiel #20
0
 protected override void DataPortal_Update()
 {
     using (var dalManager = DalFactorySelfLoad.GetManager())
     {
         var args = new DataPortalHookArgs();
         OnUpdatePre(args);
         var dal = dalManager.GetProvider <IC02_ContinentDal>();
         using (BypassPropertyChecks)
         {
             dal.Update(
                 Continent_ID,
                 Continent_Name
                 );
         }
         OnUpdatePost(args);
         // flushes all pending data operations
         FieldManager.UpdateChildren(this);
     }
 }
        private void Child_Insert(D10_City parent)
        {
            var dto = new D11_City_ReChildDto();

            dto.Parent_City_ID  = parent.City_ID;
            dto.City_Child_Name = City_Child_Name;
            using (var dalManager = DalFactorySelfLoad.GetManager())
            {
                var args = new DataPortalHookArgs(dto);
                OnInsertPre(args);
                var dal = dalManager.GetProvider <ID11_City_ReChildDal>();
                using (BypassPropertyChecks)
                {
                    var resultDto = dal.Insert(dto);
                    args = new DataPortalHookArgs(resultDto);
                }
                OnInsertPost(args);
            }
        }
Beispiel #22
0
 private void Child_Insert(C10_City parent)
 {
     using (var dalManager = DalFactorySelfLoad.GetManager())
     {
         var args = new DataPortalHookArgs();
         OnInsertPre(args);
         var dal = dalManager.GetProvider <IC12_CityRoadDal>();
         using (BypassPropertyChecks)
         {
             int cityRoad_ID = -1;
             dal.Insert(
                 parent.City_ID,
                 out cityRoad_ID,
                 CityRoad_Name
                 );
             LoadProperty(CityRoad_IDProperty, cityRoad_ID);
         }
         OnInsertPost(args);
     }
 }
 private void Child_Insert()
 {
     using (var dalManager = DalFactorySelfLoad.GetManager())
     {
         var args = new DataPortalHookArgs();
         OnInsertPre(args);
         var dal = dalManager.GetProvider <ID02_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);
     }
 }
Beispiel #24
0
        private void Child_Insert()
        {
            var dto = new D02_ContinentDto();

            dto.Continent_Name = Continent_Name;
            using (var dalManager = DalFactorySelfLoad.GetManager())
            {
                var args = new DataPortalHookArgs(dto);
                OnInsertPre(args);
                var dal = dalManager.GetProvider <ID02_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);
            }
        }
        private void Child_Update(D04_SubContinent parent)
        {
            if (!IsDirty)
            {
                return;
            }

            using (var dalManager = DalFactorySelfLoad.GetManager())
            {
                var args = new DataPortalHookArgs();
                OnUpdatePre(args);
                var dal = dalManager.GetProvider <ID05_SubContinent_ReChildDal>();
                using (BypassPropertyChecks)
                {
                    dal.Update(
                        parent.SubContinent_ID,
                        SubContinent_Child_Name
                        );
                }
                OnUpdatePost(args);
            }
        }
 private void Child_Insert(D06_Country parent)
 {
     using (var dalManager = DalFactorySelfLoad.GetManager())
     {
         var args = new DataPortalHookArgs();
         OnInsertPre(args);
         var dal = dalManager.GetProvider <ID08_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);
     }
 }
        private void Child_Insert(C08_Region parent)
        {
            var dto = new C10_CityDto();

            dto.Parent_Region_ID = parent.Region_ID;
            dto.City_Name        = City_Name;
            using (var dalManager = DalFactorySelfLoad.GetManager())
            {
                var args = new DataPortalHookArgs(dto);
                OnInsertPre(args);
                var dal = dalManager.GetProvider <IC10_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);
            }
        }
Beispiel #28
0
        private void Child_Update(C06_Country parent)
        {
            if (!IsDirty)
            {
                return;
            }

            using (var dalManager = DalFactorySelfLoad.GetManager())
            {
                var args = new DataPortalHookArgs();
                OnUpdatePre(args);
                var dal = dalManager.GetProvider <IC07_Country_ReChildDal>();
                using (BypassPropertyChecks)
                {
                    dal.Update(
                        parent.Country_ID,
                        Country_Child_Name
                        );
                }
                OnUpdatePost(args);
            }
        }
Beispiel #29
0
        private void Child_Update()
        {
            if (!IsDirty)
            {
                return;
            }

            using (var dalManager = DalFactorySelfLoad.GetManager())
            {
                var args = new DataPortalHookArgs();
                OnUpdatePre(args);
                var dal = dalManager.GetProvider <IC12_CityRoadDal>();
                using (BypassPropertyChecks)
                {
                    dal.Update(
                        CityRoad_ID,
                        CityRoad_Name
                        );
                }
                OnUpdatePost(args);
            }
        }
Beispiel #30
0
        private void Child_Insert(C04_SubContinent parent)
        {
            var dto = new C06_CountryDto();

            dto.Parent_SubContinent_ID = parent.SubContinent_ID;
            dto.Country_Name           = Country_Name;
            using (var dalManager = DalFactorySelfLoad.GetManager())
            {
                var args = new DataPortalHookArgs(dto);
                OnInsertPre(args);
                var dal = dalManager.GetProvider <IC06_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);
            }
        }