diff --git a/PROMS/VEPROMS.CSLA.Library/Generated/Transition.cs b/PROMS/VEPROMS.CSLA.Library/Generated/Transition.cs index 9ef650ea..110919f0 100644 --- a/PROMS/VEPROMS.CSLA.Library/Generated/Transition.cs +++ b/PROMS/VEPROMS.CSLA.Library/Generated/Transition.cs @@ -207,6 +207,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 { @@ -467,6 +490,7 @@ namespace VEPROMS.CSLA.Library //AuthorizationRules.AllowRead(FromID, ""); //AuthorizationRules.AllowRead(ToID, ""); //AuthorizationRules.AllowRead(RangeID, ""); + //AuthorizationRules.AllowRead(IsRange, ""); //AuthorizationRules.AllowRead(TranType, ""); //AuthorizationRules.AllowRead(Config, ""); //AuthorizationRules.AllowRead(DTS, ""); @@ -474,6 +498,7 @@ namespace VEPROMS.CSLA.Library //AuthorizationRules.AllowWrite(FromID, ""); //AuthorizationRules.AllowWrite(ToID, ""); //AuthorizationRules.AllowWrite(RangeID, ""); + //AuthorizationRules.AllowWrite(IsRange, ""); //AuthorizationRules.AllowWrite(TranType, ""); //AuthorizationRules.AllowWrite(Config, ""); //AuthorizationRules.AllowWrite(DTS, ""); @@ -574,21 +599,22 @@ namespace VEPROMS.CSLA.Library tmp.MyItemRangeID = myItemRangeID; return tmp; } - public static Transition New(Content myContent, Item myItemToID, Item myItemRangeID, int tranType, string config, DateTime dts, string userID) + public static Transition New(Content myContent, Item myItemToID, Item myItemRangeID, int isRange, int tranType, string config, DateTime dts, string userID) { Transition tmp = Transition.New(); tmp.MyContent = myContent; tmp.MyItemToID = myItemToID; tmp.MyItemRangeID = myItemRangeID; + tmp.IsRange = isRange; tmp.TranType = tranType; tmp.Config = config; tmp.DTS = dts; tmp.UserID = userID; return tmp; } - public static Transition MakeTransition(Content myContent, Item myItemToID, Item myItemRangeID, int tranType, string config, DateTime dts, string userID) + public static Transition MakeTransition(Content myContent, Item myItemToID, Item myItemRangeID, int isRange, int tranType, string config, DateTime dts, string userID) { - Transition tmp = Transition.New(myContent, myItemToID, myItemRangeID, tranType, config, dts, userID); + Transition tmp = Transition.New(myContent, myItemToID, myItemRangeID, isRange, tranType, config, dts, userID); if (tmp.IsSavable) { Transition tmp2 = tmp; @@ -722,6 +748,7 @@ namespace VEPROMS.CSLA.Library { _TransitionID = NextTransitionID; // Database Defaults + _IsRange = _TransitionExtension.DefaultIsRange; _TranType = _TransitionExtension.DefaultTranType; _DTS = _TransitionExtension.DefaultDTS; _UserID = _TransitionExtension.DefaultUserID; @@ -737,6 +764,7 @@ namespace VEPROMS.CSLA.Library _FromID = dr.GetInt32("FromID"); _ToID = dr.GetInt32("ToID"); _RangeID = dr.GetInt32("RangeID"); + _IsRange = dr.GetInt32("IsRange"); _TranType = dr.GetInt32("TranType"); _Config = dr.GetString("Config"); _DTS = dr.GetDateTime("DTS"); @@ -833,6 +861,7 @@ namespace VEPROMS.CSLA.Library cm.Parameters.AddWithValue("@FromID", FromID); cm.Parameters.AddWithValue("@ToID", ToID); cm.Parameters.AddWithValue("@RangeID", RangeID); + cm.Parameters.AddWithValue("@IsRange", _IsRange); cm.Parameters.AddWithValue("@TranType", _TranType); cm.Parameters.AddWithValue("@Config", _Config); if (_DTS.Year >= 1753 && _DTS.Year <= 9999) cm.Parameters.AddWithValue("@DTS", _DTS); @@ -863,7 +892,7 @@ namespace VEPROMS.CSLA.Library } } [Transactional(TransactionalTypes.TransactionScope)] - public static byte[] Add(SqlConnection cn, ref int transitionID, Content myContent, Item myItemToID, Item myItemRangeID, int tranType, string config, DateTime dts, string userID) + public static byte[] Add(SqlConnection cn, ref int transitionID, Content myContent, Item myItemToID, Item myItemRangeID, int isRange, int tranType, string config, DateTime dts, string userID) { if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] Transition.Add", 0); try @@ -876,6 +905,7 @@ namespace VEPROMS.CSLA.Library cm.Parameters.AddWithValue("@FromID", myContent.ContentID); cm.Parameters.AddWithValue("@ToID", myItemToID.ItemID); cm.Parameters.AddWithValue("@RangeID", myItemRangeID.ItemID); + cm.Parameters.AddWithValue("@IsRange", isRange); cm.Parameters.AddWithValue("@TranType", tranType); cm.Parameters.AddWithValue("@Config", config); if (dts.Year >= 1753 && dts.Year <= 9999) cm.Parameters.AddWithValue("@DTS", dts); @@ -945,6 +975,7 @@ namespace VEPROMS.CSLA.Library cm.Parameters.AddWithValue("@FromID", FromID); cm.Parameters.AddWithValue("@ToID", ToID); cm.Parameters.AddWithValue("@RangeID", RangeID); + cm.Parameters.AddWithValue("@IsRange", _IsRange); cm.Parameters.AddWithValue("@TranType", _TranType); cm.Parameters.AddWithValue("@Config", _Config); if (_DTS.Year >= 1753 && _DTS.Year <= 9999) cm.Parameters.AddWithValue("@DTS", _DTS); @@ -978,15 +1009,15 @@ namespace VEPROMS.CSLA.Library { SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"]; if (IsNew) - _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); else - _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(); } if (_MyZTransition != null) _MyZTransition.Update(this); } [Transactional(TransactionalTypes.TransactionScope)] - public static byte[] Update(SqlConnection cn, ref int transitionID, Content myContent, Item myItemToID, Item myItemRangeID, int tranType, string config, DateTime dts, string userID, ref byte[] lastChanged) + public static byte[] Update(SqlConnection cn, ref int transitionID, Content myContent, Item myItemToID, Item myItemRangeID, int isRange, int tranType, string config, DateTime dts, string userID, ref byte[] lastChanged) { if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] Transition.Update", 0); try @@ -1000,6 +1031,7 @@ namespace VEPROMS.CSLA.Library cm.Parameters.AddWithValue("@FromID", myContent.ContentID); cm.Parameters.AddWithValue("@ToID", myItemToID.ItemID); cm.Parameters.AddWithValue("@RangeID", myItemRangeID.ItemID); + cm.Parameters.AddWithValue("@IsRange", isRange); cm.Parameters.AddWithValue("@TranType", tranType); cm.Parameters.AddWithValue("@Config", config); if (dts.Year >= 1753 && dts.Year <= 9999) cm.Parameters.AddWithValue("@DTS", dts); @@ -1137,6 +1169,10 @@ namespace VEPROMS.CSLA.Library class extensionBase { // Default Values + public virtual int DefaultIsRange + { + get { return 0; } + } public virtual int DefaultTranType { get { return 0; } @@ -1202,6 +1238,10 @@ namespace VEPROMS.CSLA.Library // partial class TransitionExtension : extensionBase // { // // CSLATODO: Override automatic defaults +// public virtual int DefaultIsRange +// { +// get { return 0; } +// } // public virtual int DefaultTranType // { // get { return 0; } diff --git a/PROMS/VEPROMS.CSLA.Library/Generated/TransitionInfo.cs b/PROMS/VEPROMS.CSLA.Library/Generated/TransitionInfo.cs index f67802f3..4b064462 100644 --- a/PROMS/VEPROMS.CSLA.Library/Generated/TransitionInfo.cs +++ b/PROMS/VEPROMS.CSLA.Library/Generated/TransitionInfo.cs @@ -169,6 +169,19 @@ namespace VEPROMS.CSLA.Library return _MyItemRangeID; } } + 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; + } + } private int _TranType; public int TranType { @@ -312,6 +325,7 @@ namespace VEPROMS.CSLA.Library } _MyItemRangeID = null; // Reset list so that the next line gets a new list if (MyItemRangeID != null) MyItemRangeID.RefreshItemTransitions_RangeID(); // Update List for new value + _IsRange = tmp.IsRange; _TranType = tmp.TranType; _Config = tmp.Config; _DTS = tmp.DTS; @@ -376,6 +390,7 @@ namespace VEPROMS.CSLA.Library } _MyItemRangeID = null; // Reset list so that the next line gets a new list if (MyItemRangeID != null) MyItemRangeID.RefreshItemTransitions_RangeID(); // Update List for new value + _IsRange = tmp.IsRange; _TranType = tmp.TranType; _Config = tmp.Config; _DTS = tmp.DTS; @@ -440,6 +455,7 @@ namespace VEPROMS.CSLA.Library } _MyItemToID = null; // Reset list so that the next line gets a new list if (MyItemToID != null) MyItemToID.RefreshItemTransitions_ToID(); // Update List for new value + _IsRange = tmp.IsRange; _TranType = tmp.TranType; _Config = tmp.Config; _DTS = tmp.DTS; @@ -504,6 +520,7 @@ namespace VEPROMS.CSLA.Library } _MyItemRangeID = null; // Reset list so that the next line gets a new list if (MyItemRangeID != null) MyItemRangeID.RefreshItemTransitions_RangeID(); // Update List for new value + _IsRange = tmp.IsRange; _TranType = tmp.TranType; _Config = tmp.Config; _DTS = tmp.DTS; @@ -603,6 +620,7 @@ namespace VEPROMS.CSLA.Library _FromID = dr.GetInt32("FromID"); _ToID = dr.GetInt32("ToID"); _RangeID = dr.GetInt32("RangeID"); + _IsRange = dr.GetInt32("IsRange"); _TranType = dr.GetInt32("TranType"); _Config = dr.GetString("Config"); _DTS = dr.GetDateTime("DTS");