From 43be8792cd2657d02af62a04b9cb254ec3fc2eff Mon Sep 17 00:00:00 2001 From: Kathy Date: Mon, 25 Oct 2010 17:39:18 +0000 Subject: [PATCH] --- .../Generated/ContentTransition.cs | 40 ++++++++++++++++++- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/PROMS/VEPROMS.CSLA.Library/Generated/ContentTransition.cs b/PROMS/VEPROMS.CSLA.Library/Generated/ContentTransition.cs index e9fb5a17..6d6e8d68 100644 --- a/PROMS/VEPROMS.CSLA.Library/Generated/ContentTransition.cs +++ b/PROMS/VEPROMS.CSLA.Library/Generated/ContentTransition.cs @@ -127,6 +127,29 @@ namespace VEPROMS.CSLA.Library } } } + private int _IsRange; + /// + /// 0 - Not a Range Transition, 1 - Range Transition, 2 - Range Transition - Extends to last Sibling + /// + public int IsRange + { + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + get + { + CanReadProperty("IsRange", true); + return _IsRange; + } + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + set + { + CanWriteProperty("IsRange", true); + if (_IsRange != value) + { + _IsRange = value; + PropertyHasChanged(); + } + } + } private int _TranType; public int TranType { @@ -421,6 +444,8 @@ namespace VEPROMS.CSLA.Library //AuthorizationRules.AllowWrite(ToID, ""); //AuthorizationRules.AllowRead(RangeID, ""); //AuthorizationRules.AllowWrite(RangeID, ""); + //AuthorizationRules.AllowRead(IsRange, ""); + //AuthorizationRules.AllowWrite(IsRange, ""); //AuthorizationRules.AllowRead(TranType, ""); //AuthorizationRules.AllowWrite(TranType, ""); //AuthorizationRules.AllowRead(Config, ""); @@ -478,6 +503,7 @@ namespace VEPROMS.CSLA.Library { MarkAsChild(); _TransitionID = Transition.NextTransitionID; + _IsRange = _ContentTransitionExtension.DefaultIsRange; _TranType = _ContentTransitionExtension.DefaultTranType; _DTS = _ContentTransitionExtension.DefaultDTS; _UserID = _ContentTransitionExtension.DefaultUserID; @@ -488,6 +514,7 @@ namespace VEPROMS.CSLA.Library MarkAsChild(); // CSLATODO: Add any initialization & defaults _TransitionID = Transition.NextTransitionID; + _IsRange = _ContentTransitionExtension.DefaultIsRange; _TranType = _ContentTransitionExtension.DefaultTranType; _DTS = _ContentTransitionExtension.DefaultDTS; _UserID = _ContentTransitionExtension.DefaultUserID; @@ -510,6 +537,7 @@ namespace VEPROMS.CSLA.Library _TransitionID = dr.GetInt32("TransitionID"); _ToID = dr.GetInt32("ToID"); _RangeID = dr.GetInt32("RangeID"); + _IsRange = dr.GetInt32("IsRange"); _TranType = dr.GetInt32("TranType"); _Config = dr.GetString("Config"); _DTS = dr.GetDateTime("DTS"); @@ -536,7 +564,7 @@ namespace VEPROMS.CSLA.Library // if we're not dirty then don't update the database if (!this.IsDirty) return; SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"]; - _LastChanged = Transition.Add(cn, ref _TransitionID, myContent, _MyItemToID, _MyItemRangeID, _TranType, _Config, _DTS, _UserID); + _LastChanged = Transition.Add(cn, ref _TransitionID, myContent, _MyItemToID, _MyItemRangeID, _IsRange, _TranType, _Config, _DTS, _UserID); MarkOld(); } internal void Update(Content myContent) @@ -544,7 +572,7 @@ namespace VEPROMS.CSLA.Library // if we're not dirty then don't update the database if (!this.IsDirty) return; SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"]; - _LastChanged = Transition.Update(cn, ref _TransitionID, myContent, _MyItemToID, _MyItemRangeID, _TranType, _Config, _DTS, _UserID, ref _LastChanged); + _LastChanged = Transition.Update(cn, ref _TransitionID, myContent, _MyItemToID, _MyItemRangeID, _IsRange, _TranType, _Config, _DTS, _UserID, ref _LastChanged); MarkOld(); } internal void DeleteSelf(Content myContent) @@ -569,6 +597,10 @@ namespace VEPROMS.CSLA.Library class extensionBase { // Default Values + public virtual int DefaultIsRange + { + get { return 0; } + } public virtual int DefaultTranType { get { return 0; } @@ -634,6 +666,10 @@ namespace VEPROMS.CSLA.Library // partial class ContentTransitionExtension : extensionBase // { // // CSLATODO: Override automatic defaults +// public virtual int DefaultIsRange +// { +// get { return 0; } +// } // public virtual int DefaultTranType // { // get { return 0; }