This commit is contained in:
parent
f9fa0d401e
commit
43be8792cd
@ -127,6 +127,29 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
}
|
||||
}
|
||||
private int _IsRange;
|
||||
/// <summary>
|
||||
/// 0 - Not a Range Transition, 1 - Range Transition, 2 - Range Transition - Extends to last Sibling
|
||||
/// </summary>
|
||||
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, "<Role(s)>");
|
||||
//AuthorizationRules.AllowRead(RangeID, "<Role(s)>");
|
||||
//AuthorizationRules.AllowWrite(RangeID, "<Role(s)>");
|
||||
//AuthorizationRules.AllowRead(IsRange, "<Role(s)>");
|
||||
//AuthorizationRules.AllowWrite(IsRange, "<Role(s)>");
|
||||
//AuthorizationRules.AllowRead(TranType, "<Role(s)>");
|
||||
//AuthorizationRules.AllowWrite(TranType, "<Role(s)>");
|
||||
//AuthorizationRules.AllowRead(Config, "<Role(s)>");
|
||||
@ -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; }
|
||||
|
Loading…
x
Reference in New Issue
Block a user