This commit is contained in:
parent
43be8792cd
commit
004006c932
@ -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;
|
private int _TranType;
|
||||||
public int TranType
|
public int TranType
|
||||||
{
|
{
|
||||||
@ -406,6 +429,8 @@ namespace VEPROMS.CSLA.Library
|
|||||||
//AuthorizationRules.AllowWrite(FromID, "<Role(s)>");
|
//AuthorizationRules.AllowWrite(FromID, "<Role(s)>");
|
||||||
//AuthorizationRules.AllowRead(ToID, "<Role(s)>");
|
//AuthorizationRules.AllowRead(ToID, "<Role(s)>");
|
||||||
//AuthorizationRules.AllowWrite(ToID, "<Role(s)>");
|
//AuthorizationRules.AllowWrite(ToID, "<Role(s)>");
|
||||||
|
//AuthorizationRules.AllowRead(IsRange, "<Role(s)>");
|
||||||
|
//AuthorizationRules.AllowWrite(IsRange, "<Role(s)>");
|
||||||
//AuthorizationRules.AllowRead(TranType, "<Role(s)>");
|
//AuthorizationRules.AllowRead(TranType, "<Role(s)>");
|
||||||
//AuthorizationRules.AllowWrite(TranType, "<Role(s)>");
|
//AuthorizationRules.AllowWrite(TranType, "<Role(s)>");
|
||||||
//AuthorizationRules.AllowRead(Config, "<Role(s)>");
|
//AuthorizationRules.AllowRead(Config, "<Role(s)>");
|
||||||
@ -463,6 +488,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
{
|
{
|
||||||
MarkAsChild();
|
MarkAsChild();
|
||||||
_TransitionID = Transition.NextTransitionID;
|
_TransitionID = Transition.NextTransitionID;
|
||||||
|
_IsRange = _ItemTransition_RangeIDExtension.DefaultIsRange;
|
||||||
_TranType = _ItemTransition_RangeIDExtension.DefaultTranType;
|
_TranType = _ItemTransition_RangeIDExtension.DefaultTranType;
|
||||||
_DTS = _ItemTransition_RangeIDExtension.DefaultDTS;
|
_DTS = _ItemTransition_RangeIDExtension.DefaultDTS;
|
||||||
_UserID = _ItemTransition_RangeIDExtension.DefaultUserID;
|
_UserID = _ItemTransition_RangeIDExtension.DefaultUserID;
|
||||||
@ -473,6 +499,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
MarkAsChild();
|
MarkAsChild();
|
||||||
// CSLATODO: Add any initialization & defaults
|
// CSLATODO: Add any initialization & defaults
|
||||||
_TransitionID = Transition.NextTransitionID;
|
_TransitionID = Transition.NextTransitionID;
|
||||||
|
_IsRange = _ItemTransition_RangeIDExtension.DefaultIsRange;
|
||||||
_TranType = _ItemTransition_RangeIDExtension.DefaultTranType;
|
_TranType = _ItemTransition_RangeIDExtension.DefaultTranType;
|
||||||
_DTS = _ItemTransition_RangeIDExtension.DefaultDTS;
|
_DTS = _ItemTransition_RangeIDExtension.DefaultDTS;
|
||||||
_UserID = _ItemTransition_RangeIDExtension.DefaultUserID;
|
_UserID = _ItemTransition_RangeIDExtension.DefaultUserID;
|
||||||
@ -495,6 +522,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
_TransitionID = dr.GetInt32("TransitionID");
|
_TransitionID = dr.GetInt32("TransitionID");
|
||||||
_FromID = dr.GetInt32("FromID");
|
_FromID = dr.GetInt32("FromID");
|
||||||
_ToID = dr.GetInt32("ToID");
|
_ToID = dr.GetInt32("ToID");
|
||||||
|
_IsRange = dr.GetInt32("IsRange");
|
||||||
_TranType = dr.GetInt32("TranType");
|
_TranType = dr.GetInt32("TranType");
|
||||||
_Config = dr.GetString("Config");
|
_Config = dr.GetString("Config");
|
||||||
_DTS = dr.GetDateTime("DTS");
|
_DTS = dr.GetDateTime("DTS");
|
||||||
@ -520,7 +548,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
// if we're not dirty then don't update the database
|
// if we're not dirty then don't update the database
|
||||||
if (!this.IsDirty) return;
|
if (!this.IsDirty) return;
|
||||||
SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"];
|
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();
|
MarkOld();
|
||||||
}
|
}
|
||||||
internal void Update(Item myItemRangeID)
|
internal void Update(Item myItemRangeID)
|
||||||
@ -528,7 +556,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
// if we're not dirty then don't update the database
|
// if we're not dirty then don't update the database
|
||||||
if (!this.IsDirty) return;
|
if (!this.IsDirty) return;
|
||||||
SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"];
|
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();
|
MarkOld();
|
||||||
}
|
}
|
||||||
internal void DeleteSelf(Item myItemRangeID)
|
internal void DeleteSelf(Item myItemRangeID)
|
||||||
@ -553,6 +581,10 @@ namespace VEPROMS.CSLA.Library
|
|||||||
class extensionBase
|
class extensionBase
|
||||||
{
|
{
|
||||||
// Default Values
|
// Default Values
|
||||||
|
public virtual int DefaultIsRange
|
||||||
|
{
|
||||||
|
get { return 0; }
|
||||||
|
}
|
||||||
public virtual int DefaultTranType
|
public virtual int DefaultTranType
|
||||||
{
|
{
|
||||||
get { return 0; }
|
get { return 0; }
|
||||||
@ -618,6 +650,10 @@ namespace VEPROMS.CSLA.Library
|
|||||||
// partial class ItemTransition_RangeIDExtension : extensionBase
|
// partial class ItemTransition_RangeIDExtension : extensionBase
|
||||||
// {
|
// {
|
||||||
// // CSLATODO: Override automatic defaults
|
// // CSLATODO: Override automatic defaults
|
||||||
|
// public virtual int DefaultIsRange
|
||||||
|
// {
|
||||||
|
// get { return 0; }
|
||||||
|
// }
|
||||||
// public virtual int DefaultTranType
|
// public virtual int DefaultTranType
|
||||||
// {
|
// {
|
||||||
// get { return 0; }
|
// get { return 0; }
|
||||||
|
@ -124,6 +124,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;
|
private int _TranType;
|
||||||
public int TranType
|
public int TranType
|
||||||
{
|
{
|
||||||
@ -403,6 +426,8 @@ namespace VEPROMS.CSLA.Library
|
|||||||
//AuthorizationRules.AllowWrite(FromID, "<Role(s)>");
|
//AuthorizationRules.AllowWrite(FromID, "<Role(s)>");
|
||||||
//AuthorizationRules.AllowRead(RangeID, "<Role(s)>");
|
//AuthorizationRules.AllowRead(RangeID, "<Role(s)>");
|
||||||
//AuthorizationRules.AllowWrite(RangeID, "<Role(s)>");
|
//AuthorizationRules.AllowWrite(RangeID, "<Role(s)>");
|
||||||
|
//AuthorizationRules.AllowRead(IsRange, "<Role(s)>");
|
||||||
|
//AuthorizationRules.AllowWrite(IsRange, "<Role(s)>");
|
||||||
//AuthorizationRules.AllowRead(TranType, "<Role(s)>");
|
//AuthorizationRules.AllowRead(TranType, "<Role(s)>");
|
||||||
//AuthorizationRules.AllowWrite(TranType, "<Role(s)>");
|
//AuthorizationRules.AllowWrite(TranType, "<Role(s)>");
|
||||||
//AuthorizationRules.AllowRead(Config, "<Role(s)>");
|
//AuthorizationRules.AllowRead(Config, "<Role(s)>");
|
||||||
@ -460,6 +485,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
{
|
{
|
||||||
MarkAsChild();
|
MarkAsChild();
|
||||||
_TransitionID = Transition.NextTransitionID;
|
_TransitionID = Transition.NextTransitionID;
|
||||||
|
_IsRange = _ItemTransition_ToIDExtension.DefaultIsRange;
|
||||||
_TranType = _ItemTransition_ToIDExtension.DefaultTranType;
|
_TranType = _ItemTransition_ToIDExtension.DefaultTranType;
|
||||||
_DTS = _ItemTransition_ToIDExtension.DefaultDTS;
|
_DTS = _ItemTransition_ToIDExtension.DefaultDTS;
|
||||||
_UserID = _ItemTransition_ToIDExtension.DefaultUserID;
|
_UserID = _ItemTransition_ToIDExtension.DefaultUserID;
|
||||||
@ -470,6 +496,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
MarkAsChild();
|
MarkAsChild();
|
||||||
// CSLATODO: Add any initialization & defaults
|
// CSLATODO: Add any initialization & defaults
|
||||||
_TransitionID = Transition.NextTransitionID;
|
_TransitionID = Transition.NextTransitionID;
|
||||||
|
_IsRange = _ItemTransition_ToIDExtension.DefaultIsRange;
|
||||||
_TranType = _ItemTransition_ToIDExtension.DefaultTranType;
|
_TranType = _ItemTransition_ToIDExtension.DefaultTranType;
|
||||||
_DTS = _ItemTransition_ToIDExtension.DefaultDTS;
|
_DTS = _ItemTransition_ToIDExtension.DefaultDTS;
|
||||||
_UserID = _ItemTransition_ToIDExtension.DefaultUserID;
|
_UserID = _ItemTransition_ToIDExtension.DefaultUserID;
|
||||||
@ -492,6 +519,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
_TransitionID = dr.GetInt32("TransitionID");
|
_TransitionID = dr.GetInt32("TransitionID");
|
||||||
_FromID = dr.GetInt32("FromID");
|
_FromID = dr.GetInt32("FromID");
|
||||||
_RangeID = dr.GetInt32("RangeID");
|
_RangeID = dr.GetInt32("RangeID");
|
||||||
|
_IsRange = dr.GetInt32("IsRange");
|
||||||
_TranType = dr.GetInt32("TranType");
|
_TranType = dr.GetInt32("TranType");
|
||||||
_Config = dr.GetString("Config");
|
_Config = dr.GetString("Config");
|
||||||
_DTS = dr.GetDateTime("DTS");
|
_DTS = dr.GetDateTime("DTS");
|
||||||
@ -517,7 +545,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
// if we're not dirty then don't update the database
|
// if we're not dirty then don't update the database
|
||||||
if (!this.IsDirty) return;
|
if (!this.IsDirty) return;
|
||||||
SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"];
|
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();
|
MarkOld();
|
||||||
}
|
}
|
||||||
internal void Update(Item myItemToID)
|
internal void Update(Item myItemToID)
|
||||||
@ -525,7 +553,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
// if we're not dirty then don't update the database
|
// if we're not dirty then don't update the database
|
||||||
if (!this.IsDirty) return;
|
if (!this.IsDirty) return;
|
||||||
SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"];
|
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();
|
MarkOld();
|
||||||
}
|
}
|
||||||
internal void DeleteSelf(Item myItemToID)
|
internal void DeleteSelf(Item myItemToID)
|
||||||
@ -550,6 +578,10 @@ namespace VEPROMS.CSLA.Library
|
|||||||
class extensionBase
|
class extensionBase
|
||||||
{
|
{
|
||||||
// Default Values
|
// Default Values
|
||||||
|
public virtual int DefaultIsRange
|
||||||
|
{
|
||||||
|
get { return 0; }
|
||||||
|
}
|
||||||
public virtual int DefaultTranType
|
public virtual int DefaultTranType
|
||||||
{
|
{
|
||||||
get { return 0; }
|
get { return 0; }
|
||||||
@ -615,6 +647,10 @@ namespace VEPROMS.CSLA.Library
|
|||||||
// partial class ItemTransition_ToIDExtension : extensionBase
|
// partial class ItemTransition_ToIDExtension : extensionBase
|
||||||
// {
|
// {
|
||||||
// // CSLATODO: Override automatic defaults
|
// // CSLATODO: Override automatic defaults
|
||||||
|
// public virtual int DefaultIsRange
|
||||||
|
// {
|
||||||
|
// get { return 0; }
|
||||||
|
// }
|
||||||
// public virtual int DefaultTranType
|
// public virtual int DefaultTranType
|
||||||
// {
|
// {
|
||||||
// get { return 0; }
|
// get { return 0; }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user