Csla.Core.BusinessBase.LoadProperty(Csla.Core.IPropertyInfo, object)

Here are the examples of the csharp api Csla.Core.BusinessBase.LoadProperty(Csla.Core.IPropertyInfo, object) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

852 Examples 7

19 View Source File : B02Level1.Designer.cs
License : MIT License
Project Creator : CslaGenFork

[Transactional(TransactionalTypes.TransactionScope)]
        private void Child_DeleteSelf()
        {
            using (var ctx = ConnectionManager<SqlConnection>.GetManager("DeepLoad"))
            {
                // flushes all pending data operations
                FieldManager.UpdateChildren(this);
                using (var cmd = new SqlCommand("DeleteB02Level1", ctx.Connection))
                {
                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.AddWithValue("@Level_1_ID", ReadProperty(Level_1_IDProperty)).DbType = DbType.Int32;
                    var args = new DataPortalHookArgs(cmd);
                    OnDeletePre(args);
                    cmd.ExecuteNonQuery();
                    OnDeletePost(args);
                }
            }
            // removes all previous references to children
            LoadProperty(B03Level11SingleObjectProperty, DataPortal.CreateChild<B03Level11Child>());
            LoadProperty(B03Level11ASingleObjectProperty, DataPortal.CreateChild<B03Level11ReChild>());
            LoadProperty(B03Level11ObjectsProperty, DataPortal.CreateChild<B03Level11Coll>());
        }

19 View Source File : B03Level11Child.Designer.cs
License : MIT License
Project Creator : CslaGenFork

private void Fetch(SafeDataReader dr)
        {
            // Value properties
            LoadProperty(Level_1_1_Child_NameProperty, dr.GetString("Level_1_1_Child_Name"));
            cParentID1 = dr.GetInt32("CParentID1");
            var args = new DataPortalHookArgs(dr);
            OnFetchRead(args);
        }

19 View Source File : B04Level11.Designer.cs
License : MIT License
Project Creator : CslaGenFork

internal void LoadChild(B05Level111Child child)
        {
            LoadProperty(B05Level111SingleObjectProperty, child);
        }

19 View Source File : B06Level111.Designer.cs
License : MIT License
Project Creator : CslaGenFork

private void Fetch(SafeDataReader dr)
        {
            // Value properties
            LoadProperty(Level_1_1_1_IDProperty, dr.GetInt32("Level_1_1_1_ID"));
            LoadProperty(Level_1_1_1_NameProperty, dr.GetString("Level_1_1_1_Name"));
            marentID1 = dr.GetInt32("MarentID1");
            var args = new DataPortalHookArgs(dr);
            OnFetchRead(args);
        }

19 View Source File : B06Level111.Designer.cs
License : MIT License
Project Creator : CslaGenFork

[Transactional(TransactionalTypes.TransactionScope)]
        private void Child_DeleteSelf()
        {
            using (var ctx = ConnectionManager<SqlConnection>.GetManager("DeepLoad"))
            {
                // flushes all pending data operations
                FieldManager.UpdateChildren(this);
                using (var cmd = new SqlCommand("DeleteB06Level111", ctx.Connection))
                {
                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.AddWithValue("@Level_1_1_1_ID", ReadProperty(Level_1_1_1_IDProperty)).DbType = DbType.Int32;
                    var args = new DataPortalHookArgs(cmd);
                    OnDeletePre(args);
                    cmd.ExecuteNonQuery();
                    OnDeletePost(args);
                }
            }
            // removes all previous references to children
            LoadProperty(B07Level1111SingleObjectProperty, DataPortal.CreateChild<B07Level1111Child>());
            LoadProperty(B07Level1111ASingleObjectProperty, DataPortal.CreateChild<B07Level1111ReChild>());
            LoadProperty(B07Level1111ObjectsProperty, DataPortal.CreateChild<B07Level1111Coll>());
        }

19 View Source File : B02Level1.Designer.cs
License : MIT License
Project Creator : CslaGenFork

internal static B02Level1 GetB02Level1(SafeDataReader dr)
        {
            B02Level1 obj = new B02Level1();
            // show the framework that this is a child object
            obj.MarkAsChild();
            obj.Fetch(dr);
            obj.LoadProperty(B03Level11ObjectsProperty, B03Level11Coll.NewB03Level11Coll());
            obj.MarkOld();
            return obj;
        }

19 View Source File : B02Level1.Designer.cs
License : MIT License
Project Creator : CslaGenFork

[Csla.RunLocal]
        protected override void Child_Create()
        {
            LoadProperty(Level_1_IDProperty, System.Threading.Interlocked.Decrement(ref _lastID));
            LoadProperty(B03Level11SingleObjectProperty, DataPortal.CreateChild<B03Level11Child>());
            LoadProperty(B03Level11ASingleObjectProperty, DataPortal.CreateChild<B03Level11ReChild>());
            LoadProperty(B03Level11ObjectsProperty, DataPortal.CreateChild<B03Level11Coll>());
            var args = new DataPortalHookArgs();
            OnCreate(args);
            base.Child_Create();
        }

19 View Source File : B02Level1.Designer.cs
License : MIT License
Project Creator : CslaGenFork

[Transactional(TransactionalTypes.TransactionScope)]
        private void Child_Insert()
        {
            using (var ctx = ConnectionManager<SqlConnection>.GetManager("DeepLoad"))
            {
                using (var cmd = new SqlCommand("AddB02Level1", ctx.Connection))
                {
                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.AddWithValue("@Level_1_ID", ReadProperty(Level_1_IDProperty)).Direction = ParameterDirection.Output;
                    cmd.Parameters.AddWithValue("@Level_1_Name", ReadProperty(Level_1_NameProperty)).DbType = DbType.String;
                    var args = new DataPortalHookArgs(cmd);
                    OnInsertPre(args);
                    cmd.ExecuteNonQuery();
                    OnInsertPost(args);
                    LoadProperty(Level_1_IDProperty, (int) cmd.Parameters["@Level_1_ID"].Value);
                }
                FieldManager.UpdateChildren(this);
            }
        }

19 View Source File : B04Level11.Designer.cs
License : MIT License
Project Creator : CslaGenFork

internal static B04Level11 GetB04Level11(SafeDataReader dr)
        {
            B04Level11 obj = new B04Level11();
            // show the framework that this is a child object
            obj.MarkAsChild();
            obj.Fetch(dr);
            obj.LoadProperty(B05Level111ObjectsProperty, B05Level111Coll.NewB05Level111Coll());
            obj.MarkOld();
            return obj;
        }

19 View Source File : B04Level11.Designer.cs
License : MIT License
Project Creator : CslaGenFork

[Csla.RunLocal]
        protected override void Child_Create()
        {
            LoadProperty(Level_1_1_IDProperty, System.Threading.Interlocked.Decrement(ref _lastID));
            LoadProperty(B05Level111ASingleObjectProperty, DataPortal.CreateChild<B05Level111ReChild>());
            LoadProperty(B05Level111SingleObjectProperty, DataPortal.CreateChild<B05Level111Child>());
            LoadProperty(B05Level111ObjectsProperty, DataPortal.CreateChild<B05Level111Coll>());
            var args = new DataPortalHookArgs();
            OnCreate(args);
            base.Child_Create();
        }

19 View Source File : B04Level11.Designer.cs
License : MIT License
Project Creator : CslaGenFork

private void Fetch(SafeDataReader dr)
        {
            // Value properties
            LoadProperty(Level_1_1_IDProperty, dr.GetInt32("Level_1_1_ID"));
            LoadProperty(Level_1_1_NameProperty, dr.GetString("Level_1_1_Name"));
            parentID1 = dr.GetInt32("ParentID1");
            var args = new DataPortalHookArgs(dr);
            OnFetchRead(args);
        }

19 View Source File : B04Level11.Designer.cs
License : MIT License
Project Creator : CslaGenFork

[Transactional(TransactionalTypes.TransactionScope)]
        private void Child_Insert(B02Level1 parent)
        {
            using (var ctx = ConnectionManager<SqlConnection>.GetManager("DeepLoad"))
            {
                using (var cmd = new SqlCommand("AddB04Level11", ctx.Connection))
                {
                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.AddWithValue("@Level_1_ID", parent.Level_1_ID).DbType = DbType.Int32;
                    cmd.Parameters.AddWithValue("@Level_1_1_ID", ReadProperty(Level_1_1_IDProperty)).Direction = ParameterDirection.Output;
                    cmd.Parameters.AddWithValue("@Level_1_1_Name", ReadProperty(Level_1_1_NameProperty)).DbType = DbType.String;
                    var args = new DataPortalHookArgs(cmd);
                    OnInsertPre(args);
                    cmd.ExecuteNonQuery();
                    OnInsertPost(args);
                    LoadProperty(Level_1_1_IDProperty, (int) cmd.Parameters["@Level_1_1_ID"].Value);
                }
                FieldManager.UpdateChildren(this);
            }
        }

19 View Source File : B05Level111Child.Designer.cs
License : MIT License
Project Creator : CslaGenFork

private void Fetch(SafeDataReader dr)
        {
            // Value properties
            LoadProperty(Level_1_1_1_Child_NameProperty, dr.GetString("Level_1_1_1_Child_Name"));
            cMarentID1 = dr.GetInt32("CMarentID1");
            var args = new DataPortalHookArgs(dr);
            OnFetchRead(args);
        }

19 View Source File : B05Level111ReChild.Designer.cs
License : MIT License
Project Creator : CslaGenFork

private void Fetch(SafeDataReader dr)
        {
            // Value properties
            LoadProperty(Level_1_1_1_Child_NameProperty, dr.GetString("Level_1_1_1_Child_Name"));
            cMarentID2 = dr.GetInt32("CMarentID2");
            var args = new DataPortalHookArgs(dr);
            OnFetchRead(args);
        }

19 View Source File : B07Level1111ReChild.Designer.cs
License : MIT License
Project Creator : CslaGenFork

private void Fetch(SafeDataReader dr)
        {
            // Value properties
            LoadProperty(Level_1_1_1_1_Child_NameProperty, dr.GetString("Level_1_1_1_1_Child_Name"));
            cLarentID2 = dr.GetInt32("CLarentID2");
            var args = new DataPortalHookArgs(dr);
            OnFetchRead(args);
        }

19 View Source File : B08Level1111.Designer.cs
License : MIT License
Project Creator : CslaGenFork

internal static B08Level1111 GetB08Level1111(SafeDataReader dr)
        {
            B08Level1111 obj = new B08Level1111();
            // show the framework that this is a child object
            obj.MarkAsChild();
            obj.Fetch(dr);
            obj.LoadProperty(B09Level11111ObjectsProperty, B09Level11111Coll.NewB09Level11111Coll());
            obj.MarkOld();
            return obj;
        }

19 View Source File : B08Level1111.Designer.cs
License : MIT License
Project Creator : CslaGenFork

[Csla.RunLocal]
        protected override void Child_Create()
        {
            LoadProperty(Level_1_1_1_1_IDProperty, System.Threading.Interlocked.Decrement(ref _lastID));
            LoadProperty(B09Level11111SingleObjectProperty, DataPortal.CreateChild<B09Level11111Child>());
            LoadProperty(B09Level11111ASingleObjectProperty, DataPortal.CreateChild<B09Level11111ReChild>());
            LoadProperty(B09Level11111ObjectsProperty, DataPortal.CreateChild<B09Level11111Coll>());
            var args = new DataPortalHookArgs();
            OnCreate(args);
            base.Child_Create();
        }

19 View Source File : B08Level1111.Designer.cs
License : MIT License
Project Creator : CslaGenFork

private void Fetch(SafeDataReader dr)
        {
            // Value properties
            LoadProperty(Level_1_1_1_1_IDProperty, dr.GetInt32("Level_1_1_1_1_ID"));
            LoadProperty(Level_1_1_1_1_NameProperty, dr.GetString("Level_1_1_1_1_Name"));
            larentID1 = dr.GetInt32("LarentID1");
            var args = new DataPortalHookArgs(dr);
            OnFetchRead(args);
        }

19 View Source File : B08Level1111.Designer.cs
License : MIT License
Project Creator : CslaGenFork

internal void LoadChild(B09Level11111Child child)
        {
            LoadProperty(B09Level11111SingleObjectProperty, child);
        }

19 View Source File : B08Level1111.Designer.cs
License : MIT License
Project Creator : CslaGenFork

internal void LoadChild(B09Level11111ReChild child)
        {
            LoadProperty(B09Level11111ASingleObjectProperty, child);
        }

19 View Source File : B08Level1111.Designer.cs
License : MIT License
Project Creator : CslaGenFork

[Transactional(TransactionalTypes.TransactionScope)]
        private void Child_Insert(B06Level111 parent)
        {
            using (var ctx = ConnectionManager<SqlConnection>.GetManager("DeepLoad"))
            {
                using (var cmd = new SqlCommand("AddB08Level1111", ctx.Connection))
                {
                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.AddWithValue("@Level_1_1_1_ID", parent.Level_1_1_1_ID).DbType = DbType.Int32;
                    cmd.Parameters.AddWithValue("@Level_1_1_1_1_ID", ReadProperty(Level_1_1_1_1_IDProperty)).Direction = ParameterDirection.Output;
                    cmd.Parameters.AddWithValue("@Level_1_1_1_1_Name", ReadProperty(Level_1_1_1_1_NameProperty)).DbType = DbType.String;
                    var args = new DataPortalHookArgs(cmd);
                    OnInsertPre(args);
                    cmd.ExecuteNonQuery();
                    OnInsertPost(args);
                    LoadProperty(Level_1_1_1_1_IDProperty, (int) cmd.Parameters["@Level_1_1_1_1_ID"].Value);
                }
                FieldManager.UpdateChildren(this);
            }
        }

19 View Source File : B08Level1111.Designer.cs
License : MIT License
Project Creator : CslaGenFork

[Transactional(TransactionalTypes.TransactionScope)]
        private void Child_DeleteSelf()
        {
            using (var ctx = ConnectionManager<SqlConnection>.GetManager("DeepLoad"))
            {
                // flushes all pending data operations
                FieldManager.UpdateChildren(this);
                using (var cmd = new SqlCommand("DeleteB08Level1111", ctx.Connection))
                {
                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.AddWithValue("@Level_1_1_1_1_ID", ReadProperty(Level_1_1_1_1_IDProperty)).DbType = DbType.Int32;
                    var args = new DataPortalHookArgs(cmd);
                    OnDeletePre(args);
                    cmd.ExecuteNonQuery();
                    OnDeletePost(args);
                }
            }
            // removes all previous references to children
            LoadProperty(B09Level11111SingleObjectProperty, DataPortal.CreateChild<B09Level11111Child>());
            LoadProperty(B09Level11111ASingleObjectProperty, DataPortal.CreateChild<B09Level11111ReChild>());
            LoadProperty(B09Level11111ObjectsProperty, DataPortal.CreateChild<B09Level11111Coll>());
        }

19 View Source File : B09Level11111Child.Designer.cs
License : MIT License
Project Creator : CslaGenFork

private void Fetch(SafeDataReader dr)
        {
            // Value properties
            LoadProperty(Level_1_1_1_1_1_Child_NameProperty, dr.GetString("Level_1_1_1_1_1_Child_Name"));
            cNarentID1 = dr.GetInt32("CNarentID1");
            var args = new DataPortalHookArgs(dr);
            OnFetchRead(args);
        }

19 View Source File : B09Level11111ReChild.Designer.cs
License : MIT License
Project Creator : CslaGenFork

private void Fetch(SafeDataReader dr)
        {
            // Value properties
            LoadProperty(Level_1_1_1_1_1_Child_NameProperty, dr.GetString("Level_1_1_1_1_1_Child_Name"));
            cNarentID2 = dr.GetInt32("CNarentID2");
            var args = new DataPortalHookArgs(dr);
            OnFetchRead(args);
        }

19 View Source File : B10Level11111.Designer.cs
License : MIT License
Project Creator : CslaGenFork

internal static B10Level11111 GetB10Level11111(SafeDataReader dr)
        {
            B10Level11111 obj = new B10Level11111();
            // show the framework that this is a child object
            obj.MarkAsChild();
            obj.Fetch(dr);
            obj.LoadProperty(B11Level111111ObjectsProperty, B11Level111111Coll.NewB11Level111111Coll());
            obj.MarkOld();
            return obj;
        }

19 View Source File : B10Level11111.Designer.cs
License : MIT License
Project Creator : CslaGenFork

private void Fetch(SafeDataReader dr)
        {
            // Value properties
            LoadProperty(Level_1_1_1_1_1_IDProperty, dr.GetInt32("Level_1_1_1_1_1_ID"));
            LoadProperty(Level_1_1_1_1_1_NameProperty, dr.GetString("Level_1_1_1_1_1_Name"));
            narentID1 = dr.GetInt32("NarentID1");
            var args = new DataPortalHookArgs(dr);
            OnFetchRead(args);
        }

19 View Source File : B10Level11111.Designer.cs
License : MIT License
Project Creator : CslaGenFork

internal void LoadChild(B11Level111111Child child)
        {
            LoadProperty(B11Level111111SingleObjectProperty, child);
        }

19 View Source File : B10Level11111.Designer.cs
License : MIT License
Project Creator : CslaGenFork

internal void LoadChild(B11Level111111ReChild child)
        {
            LoadProperty(B11Level111111ASingleObjectProperty, child);
        }

19 View Source File : B10Level11111.Designer.cs
License : MIT License
Project Creator : CslaGenFork

[Transactional(TransactionalTypes.TransactionScope)]
        private void Child_Insert(B08Level1111 parent)
        {
            using (var ctx = ConnectionManager<SqlConnection>.GetManager("DeepLoad"))
            {
                using (var cmd = new SqlCommand("AddB10Level11111", ctx.Connection))
                {
                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.AddWithValue("@Level_1_1_1_1_ID", parent.Level_1_1_1_1_ID).DbType = DbType.Int32;
                    cmd.Parameters.AddWithValue("@Level_1_1_1_1_1_ID", ReadProperty(Level_1_1_1_1_1_IDProperty)).Direction = ParameterDirection.Output;
                    cmd.Parameters.AddWithValue("@Level_1_1_1_1_1_Name", ReadProperty(Level_1_1_1_1_1_NameProperty)).DbType = DbType.String;
                    var args = new DataPortalHookArgs(cmd);
                    OnInsertPre(args);
                    cmd.ExecuteNonQuery();
                    OnInsertPost(args);
                    LoadProperty(Level_1_1_1_1_1_IDProperty, (int) cmd.Parameters["@Level_1_1_1_1_1_ID"].Value);
                }
                FieldManager.UpdateChildren(this);
            }
        }

19 View Source File : B10Level11111.Designer.cs
License : MIT License
Project Creator : CslaGenFork

[Transactional(TransactionalTypes.TransactionScope)]
        private void Child_DeleteSelf()
        {
            using (var ctx = ConnectionManager<SqlConnection>.GetManager("DeepLoad"))
            {
                // flushes all pending data operations
                FieldManager.UpdateChildren(this);
                using (var cmd = new SqlCommand("DeleteB10Level11111", ctx.Connection))
                {
                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.AddWithValue("@Level_1_1_1_1_1_ID", ReadProperty(Level_1_1_1_1_1_IDProperty)).DbType = DbType.Int32;
                    var args = new DataPortalHookArgs(cmd);
                    OnDeletePre(args);
                    cmd.ExecuteNonQuery();
                    OnDeletePost(args);
                }
            }
            // removes all previous references to children
            LoadProperty(B11Level111111SingleObjectProperty, DataPortal.CreateChild<B11Level111111Child>());
            LoadProperty(B11Level111111ASingleObjectProperty, DataPortal.CreateChild<B11Level111111ReChild>());
            LoadProperty(B11Level111111ObjectsProperty, DataPortal.CreateChild<B11Level111111Coll>());
        }

19 View Source File : B11Level111111Child.Designer.cs
License : MIT License
Project Creator : CslaGenFork

private void Fetch(SafeDataReader dr)
        {
            // Value properties
            LoadProperty(Level_1_1_1_1_1_1_Child_NameProperty, dr.GetString("Level_1_1_1_1_1_1_Child_Name"));
            cQarentID1 = dr.GetInt32("CQarentID1");
            var args = new DataPortalHookArgs(dr);
            OnFetchRead(args);
        }

19 View Source File : B11Level111111ReChild.Designer.cs
License : MIT License
Project Creator : CslaGenFork

private void Fetch(SafeDataReader dr)
        {
            // Value properties
            LoadProperty(Level_1_1_1_1_1_1_Child_NameProperty, dr.GetString("Level_1_1_1_1_1_1_Child_Name"));
            cQarentID2 = dr.GetInt32("CQarentID2");
            var args = new DataPortalHookArgs(dr);
            OnFetchRead(args);
        }

19 View Source File : A02Level1.Designer.cs
License : MIT License
Project Creator : CslaGenFork

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);
        }

19 View Source File : A02Level1.Designer.cs
License : MIT License
Project Creator : CslaGenFork

[Transactional(TransactionalTypes.TransactionScope)]
        protected void DataPortal_Delete(int level_1_ID)
        {
            using (var ctx = ConnectionManager<SqlConnection>.GetManager("DeepLoad"))
            {
                // flushes all pending data operations
                FieldManager.UpdateChildren(this);
                using (var cmd = new SqlCommand("DeleteA02Level1", ctx.Connection))
                {
                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.AddWithValue("@Level_1_ID", level_1_ID).DbType = DbType.Int32;
                    var args = new DataPortalHookArgs(cmd, level_1_ID);
                    OnDeletePre(args);
                    cmd.ExecuteNonQuery();
                    OnDeletePost(args);
                }
            }
            // removes all previous references to children
            LoadProperty(A03Level11SingleObjectProperty, DataPortal.CreateChild<A03Level11Child>());
            LoadProperty(A03Level11ASingleObjectProperty, DataPortal.CreateChild<A03Level11ReChild>());
            LoadProperty(A03Level11ObjectsProperty, DataPortal.CreateChild<A03Level11Coll>());
        }

19 View Source File : A04Level11.Designer.cs
License : MIT License
Project Creator : CslaGenFork

[Csla.RunLocal]
        protected override void Child_Create()
        {
            LoadProperty(Level_1_1_IDProperty, System.Threading.Interlocked.Decrement(ref _lastID));
            LoadProperty(A05Level111SingleObjectProperty, DataPortal.CreateChild<A05Level111Child>());
            LoadProperty(A05Level111ASingleObjectProperty, DataPortal.CreateChild<A05Level111ReChild>());
            LoadProperty(A05Level111ObjectsProperty, DataPortal.CreateChild<A05Level111Coll>());
            var args = new DataPortalHookArgs();
            OnCreate(args);
            base.Child_Create();
        }

19 View Source File : A04Level11.Designer.cs
License : MIT License
Project Creator : CslaGenFork

private void Fetch(SafeDataReader dr)
        {
            // Value properties
            LoadProperty(Level_1_1_IDProperty, dr.GetInt32("Level_1_1_ID"));
            LoadProperty(Level_1_1_NameProperty, dr.GetString("Level_1_1_Name"));
            var args = new DataPortalHookArgs(dr);
            OnFetchRead(args);
        }

19 View Source File : A04Level11.Designer.cs
License : MIT License
Project Creator : CslaGenFork

internal void LoadChild(A05Level111Child child)
        {
            LoadProperty(A05Level111SingleObjectProperty, child);
        }

19 View Source File : A04Level11.Designer.cs
License : MIT License
Project Creator : CslaGenFork

internal void LoadChild(A05Level111ReChild child)
        {
            LoadProperty(A05Level111ASingleObjectProperty, child);
        }

19 View Source File : A04Level11.Designer.cs
License : MIT License
Project Creator : CslaGenFork

[Transactional(TransactionalTypes.TransactionScope)]
        private void Child_DeleteSelf()
        {
            using (var ctx = ConnectionManager<SqlConnection>.GetManager("DeepLoad"))
            {
                // flushes all pending data operations
                FieldManager.UpdateChildren(this);
                using (var cmd = new SqlCommand("DeleteA04Level11", ctx.Connection))
                {
                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.AddWithValue("@Level_1_1_ID", ReadProperty(Level_1_1_IDProperty)).DbType = DbType.Int32;
                    var args = new DataPortalHookArgs(cmd);
                    OnDeletePre(args);
                    cmd.ExecuteNonQuery();
                    OnDeletePost(args);
                }
            }
            // removes all previous references to children
            LoadProperty(A05Level111SingleObjectProperty, DataPortal.CreateChild<A05Level111Child>());
            LoadProperty(A05Level111ASingleObjectProperty, DataPortal.CreateChild<A05Level111ReChild>());
            LoadProperty(A05Level111ObjectsProperty, DataPortal.CreateChild<A05Level111Coll>());
        }

19 View Source File : A05Level111Child.Designer.cs
License : MIT License
Project Creator : CslaGenFork

private void Fetch(SafeDataReader dr)
        {
            // Value properties
            LoadProperty(Level_1_1_1_Child_NameProperty, dr.GetString("Level_1_1_1_Child_Name"));
            LoadProperty(CMarentID1Property, dr.GetInt32("CMarentID1"));
            _rowVersion = (dr.GetValue("RowVersion")) as byte[];
            cMarentID1 = dr.GetInt32("CMarentID1");
            var args = new DataPortalHookArgs(dr);
            OnFetchRead(args);
        }

19 View Source File : A05Level111ReChild.Designer.cs
License : MIT License
Project Creator : CslaGenFork

private void Fetch(SafeDataReader dr)
        {
            // Value properties
            LoadProperty(Level_1_1_1_Child_NameProperty, dr.GetString("Level_1_1_1_Child_Name"));
            _rowVersion = (dr.GetValue("RowVersion")) as byte[];
            cMarentID2 = dr.GetInt32("CMarentID2");
            var args = new DataPortalHookArgs(dr);
            OnFetchRead(args);
        }

19 View Source File : A06Level111.Designer.cs
License : MIT License
Project Creator : CslaGenFork

private void Fetch(SafeDataReader dr)
        {
            // Value properties
            LoadProperty(Level_1_1_1_IDProperty, dr.GetInt32("Level_1_1_1_ID"));
            LoadProperty(Level_1_1_1_NameProperty, dr.GetString("Level_1_1_1_Name"));
            LoadProperty(MarentID1Property, dr.GetInt32("MarentID1"));
            _rowVersion = (dr.GetValue("RowVersion")) as byte[];
            marentID1 = dr.GetInt32("MarentID1");
            var args = new DataPortalHookArgs(dr);
            OnFetchRead(args);
        }

19 View Source File : A06Level111.Designer.cs
License : MIT License
Project Creator : CslaGenFork

[Transactional(TransactionalTypes.TransactionScope)]
        private void Child_DeleteSelf()
        {
            using (var ctx = ConnectionManager<SqlConnection>.GetManager("DeepLoad"))
            {
                // flushes all pending data operations
                FieldManager.UpdateChildren(this);
                using (var cmd = new SqlCommand("DeleteA06Level111", ctx.Connection))
                {
                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.AddWithValue("@Level_1_1_1_ID", ReadProperty(Level_1_1_1_IDProperty)).DbType = DbType.Int32;
                    var args = new DataPortalHookArgs(cmd);
                    OnDeletePre(args);
                    cmd.ExecuteNonQuery();
                    OnDeletePost(args);
                }
            }
            // removes all previous references to children
            LoadProperty(A07Level1111SingleObjectProperty, DataPortal.CreateChild<A07Level1111Child>());
            LoadProperty(A07Level1111ASingleObjectProperty, DataPortal.CreateChild<A07Level1111ReChild>());
            LoadProperty(A07Level1111ObjectsProperty, DataPortal.CreateChild<A07Level1111Coll>());
        }

19 View Source File : A08Level1111.Designer.cs
License : MIT License
Project Creator : CslaGenFork

internal void LoadChild(A09Level11111Child child)
        {
            LoadProperty(A09Level11111SingleObjectProperty, child);
        }

19 View Source File : A08Level1111.Designer.cs
License : MIT License
Project Creator : CslaGenFork

[Transactional(TransactionalTypes.TransactionScope)]
        private void Child_DeleteSelf()
        {
            using (var ctx = ConnectionManager<SqlConnection>.GetManager("DeepLoad"))
            {
                // flushes all pending data operations
                FieldManager.UpdateChildren(this);
                using (var cmd = new SqlCommand("DeleteA08Level1111", ctx.Connection))
                {
                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.AddWithValue("@Level_1_1_1_1_ID", ReadProperty(Level_1_1_1_1_IDProperty)).DbType = DbType.Int32;
                    var args = new DataPortalHookArgs(cmd);
                    OnDeletePre(args);
                    cmd.ExecuteNonQuery();
                    OnDeletePost(args);
                }
            }
            // removes all previous references to children
            LoadProperty(A09Level11111SingleObjectProperty, DataPortal.CreateChild<A09Level11111Child>());
            LoadProperty(A09Level11111ASingleObjectProperty, DataPortal.CreateChild<A09Level11111ReChild>());
            LoadProperty(A09Level11111ObjectsProperty, DataPortal.CreateChild<A09Level11111Coll>());
        }

19 View Source File : A10Level11111.Designer.cs
License : MIT License
Project Creator : CslaGenFork

internal static A10Level11111 GetA10Level11111(SafeDataReader dr)
        {
            A10Level11111 obj = new A10Level11111();
            // show the framework that this is a child object
            obj.MarkAsChild();
            obj.Fetch(dr);
            obj.LoadProperty(A11Level111111ObjectsProperty, A11Level111111Coll.NewA11Level111111Coll());
            obj.MarkOld();
            return obj;
        }

19 View Source File : A10Level11111.Designer.cs
License : MIT License
Project Creator : CslaGenFork

[Csla.RunLocal]
        protected override void Child_Create()
        {
            LoadProperty(Level_1_1_1_1_1_IDProperty, System.Threading.Interlocked.Decrement(ref _lastID));
            LoadProperty(A11Level111111SingleObjectProperty, DataPortal.CreateChild<A11Level111111Child>());
            LoadProperty(A11Level111111ASingleObjectProperty, DataPortal.CreateChild<A11Level111111ReChild>());
            LoadProperty(A11Level111111ObjectsProperty, DataPortal.CreateChild<A11Level111111Coll>());
            var args = new DataPortalHookArgs();
            OnCreate(args);
            base.Child_Create();
        }

19 View Source File : A10Level11111.Designer.cs
License : MIT License
Project Creator : CslaGenFork

internal void LoadChild(A11Level111111Child child)
        {
            LoadProperty(A11Level111111SingleObjectProperty, child);
        }

19 View Source File : A10Level11111.Designer.cs
License : MIT License
Project Creator : CslaGenFork

internal void LoadChild(A11Level111111ReChild child)
        {
            LoadProperty(A11Level111111ASingleObjectProperty, child);
        }

19 View Source File : A10Level11111.Designer.cs
License : MIT License
Project Creator : CslaGenFork

[Transactional(TransactionalTypes.TransactionScope)]
        private void Child_Insert(A08Level1111 parent)
        {
            using (var ctx = ConnectionManager<SqlConnection>.GetManager("DeepLoad"))
            {
                using (var cmd = new SqlCommand("AddA10Level11111", ctx.Connection))
                {
                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.Parameters.AddWithValue("@Level_1_1_1_1_ID", parent.Level_1_1_1_1_ID).DbType = DbType.Int32;
                    cmd.Parameters.AddWithValue("@Level_1_1_1_1_1_ID", ReadProperty(Level_1_1_1_1_1_IDProperty)).Direction = ParameterDirection.Output;
                    cmd.Parameters.AddWithValue("@Level_1_1_1_1_1_Name", ReadProperty(Level_1_1_1_1_1_NameProperty)).DbType = DbType.String;
                    var args = new DataPortalHookArgs(cmd);
                    OnInsertPre(args);
                    cmd.ExecuteNonQuery();
                    OnInsertPost(args);
                    LoadProperty(Level_1_1_1_1_1_IDProperty, (int) cmd.Parameters["@Level_1_1_1_1_1_ID"].Value);
                }
                FieldManager.UpdateChildren(this);
            }
        }

See More Examples