This commit is contained in:
@@ -42,7 +42,7 @@ namespace VEPROMS.CSLA.Library
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
||||
get
|
||||
{
|
||||
CanReadProperty("ItemID",true);
|
||||
CanReadProperty("ItemID", true);
|
||||
if (_MyItem != null) _ItemID = _MyItem.ItemID;
|
||||
return _ItemID;
|
||||
}
|
||||
@@ -54,7 +54,7 @@ namespace VEPROMS.CSLA.Library
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
||||
get
|
||||
{
|
||||
CanReadProperty("MyItem",true);
|
||||
CanReadProperty("MyItem", true);
|
||||
if (_MyItem == null && _ItemID != 0) _MyItem = Item.Get(_ItemID);
|
||||
return _MyItem;
|
||||
}
|
||||
@@ -65,7 +65,7 @@ namespace VEPROMS.CSLA.Library
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
||||
get
|
||||
{
|
||||
CanReadProperty("PreviousID",true);
|
||||
CanReadProperty("PreviousID", true);
|
||||
if (_MyPrevious != null) _PreviousID = _MyPrevious.ItemID;
|
||||
return _PreviousID;
|
||||
}
|
||||
@@ -76,18 +76,18 @@ namespace VEPROMS.CSLA.Library
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
||||
get
|
||||
{
|
||||
CanReadProperty("MyPrevious",true);
|
||||
CanReadProperty("MyPrevious", true);
|
||||
if (_MyPrevious == null && _PreviousID != null) _MyPrevious = Item.Get((int)_PreviousID);
|
||||
return _MyPrevious;
|
||||
}
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
||||
set
|
||||
{
|
||||
CanWriteProperty("MyPrevious",true);
|
||||
CanWriteProperty("MyPrevious", true);
|
||||
if (_MyPrevious != value)
|
||||
{
|
||||
_MyPrevious = value;
|
||||
_PreviousID = (value == null ? null : (int?) value.ItemID);
|
||||
_PreviousID = (value == null ? null : (int?)value.ItemID);
|
||||
PropertyHasChanged();
|
||||
}
|
||||
}
|
||||
@@ -98,13 +98,13 @@ namespace VEPROMS.CSLA.Library
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
||||
get
|
||||
{
|
||||
CanReadProperty("DTS",true);
|
||||
CanReadProperty("DTS", true);
|
||||
return _DTS;
|
||||
}
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
||||
set
|
||||
{
|
||||
CanWriteProperty("DTS",true);
|
||||
CanWriteProperty("DTS", true);
|
||||
if (_DTS != value)
|
||||
{
|
||||
_DTS = value;
|
||||
@@ -118,13 +118,13 @@ namespace VEPROMS.CSLA.Library
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
||||
get
|
||||
{
|
||||
CanReadProperty("UserID",true);
|
||||
CanReadProperty("UserID", true);
|
||||
return _UserID;
|
||||
}
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
||||
set
|
||||
{
|
||||
CanWriteProperty("UserID",true);
|
||||
CanWriteProperty("UserID", true);
|
||||
if (value == null) value = string.Empty;
|
||||
if (_UserID != value)
|
||||
{
|
||||
@@ -155,23 +155,23 @@ namespace VEPROMS.CSLA.Library
|
||||
#endregion
|
||||
#region ValidationRules
|
||||
[NonSerialized]
|
||||
private bool _CheckingBrokenRules=false;
|
||||
private bool _CheckingBrokenRules = false;
|
||||
public IVEHasBrokenRules HasBrokenRules
|
||||
{
|
||||
get
|
||||
{
|
||||
if(_CheckingBrokenRules)return null;
|
||||
if (_CheckingBrokenRules) return null;
|
||||
if (BrokenRulesCollection.Count > 0) return this;
|
||||
try
|
||||
{
|
||||
_CheckingBrokenRules=true;
|
||||
IVEHasBrokenRules hasBrokenRules = null;
|
||||
if (_MyItem != null && (hasBrokenRules = _MyItem.HasBrokenRules) != null) return hasBrokenRules;
|
||||
return hasBrokenRules;
|
||||
_CheckingBrokenRules = true;
|
||||
IVEHasBrokenRules hasBrokenRules = null;
|
||||
if (_MyItem != null && (hasBrokenRules = _MyItem.HasBrokenRules) != null) return hasBrokenRules;
|
||||
return hasBrokenRules;
|
||||
}
|
||||
finally
|
||||
{
|
||||
_CheckingBrokenRules=false;
|
||||
_CheckingBrokenRules = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -272,7 +272,7 @@ namespace VEPROMS.CSLA.Library
|
||||
#region Data Access Portal
|
||||
private void Fetch(SafeDataReader dr)
|
||||
{
|
||||
if(_MyLog.IsDebugEnabled)_MyLog.DebugFormat("[{0}] ContentItem.FetchDR", GetHashCode());
|
||||
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] ContentItem.FetchDR", GetHashCode());
|
||||
try
|
||||
{
|
||||
_ItemID = dr.GetInt32("ItemID");
|
||||
@@ -283,7 +283,7 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
catch (Exception ex) // FKItem Fetch
|
||||
{
|
||||
if(_MyLog.IsErrorEnabled)_MyLog.Error("ContentItem.FetchDR", ex);
|
||||
if (_MyLog.IsErrorEnabled) _MyLog.Error("ContentItem.FetchDR", ex);
|
||||
throw new DbCslaException("ContentItem.Fetch", ex);
|
||||
}
|
||||
MarkOld();
|
||||
|
Reference in New Issue
Block a user