This commit is contained in:
@@ -42,7 +42,7 @@ namespace VEPROMS.CSLA.Library
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
||||
get
|
||||
{
|
||||
CanReadProperty("FromType",true);
|
||||
CanReadProperty("FromType", true);
|
||||
return _FromType;
|
||||
}
|
||||
}
|
||||
@@ -52,7 +52,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;
|
||||
}
|
||||
@@ -63,14 +63,14 @@ 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;
|
||||
}
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
||||
set
|
||||
{
|
||||
CanWriteProperty("MyItem",true);
|
||||
CanWriteProperty("MyItem", true);
|
||||
if (_MyItem != value)
|
||||
{
|
||||
_MyItem = value;
|
||||
@@ -84,13 +84,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;
|
||||
@@ -104,13 +104,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)
|
||||
{
|
||||
@@ -126,7 +126,7 @@ namespace VEPROMS.CSLA.Library
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
||||
get
|
||||
{
|
||||
CanReadProperty("Item_PreviousID",true);
|
||||
CanReadProperty("Item_PreviousID", true);
|
||||
return _Item_PreviousID;
|
||||
}
|
||||
}
|
||||
@@ -136,7 +136,7 @@ namespace VEPROMS.CSLA.Library
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
||||
get
|
||||
{
|
||||
CanReadProperty("Item_ContentID",true);
|
||||
CanReadProperty("Item_ContentID", true);
|
||||
return _Item_ContentID;
|
||||
}
|
||||
}
|
||||
@@ -146,7 +146,7 @@ namespace VEPROMS.CSLA.Library
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
||||
get
|
||||
{
|
||||
CanReadProperty("Item_DTS",true);
|
||||
CanReadProperty("Item_DTS", true);
|
||||
return _Item_DTS;
|
||||
}
|
||||
}
|
||||
@@ -156,7 +156,7 @@ namespace VEPROMS.CSLA.Library
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
||||
get
|
||||
{
|
||||
CanReadProperty("Item_UserID",true);
|
||||
CanReadProperty("Item_UserID", true);
|
||||
return _Item_UserID;
|
||||
}
|
||||
}
|
||||
@@ -189,23 +189,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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -313,8 +313,8 @@ namespace VEPROMS.CSLA.Library
|
||||
// TODO: Add any initialization & defaults
|
||||
_DTS = _ContentPartExtension.DefaultDTS;
|
||||
_UserID = _ContentPartExtension.DefaultUserID;
|
||||
_FromType = fromType;
|
||||
_MyItem = myItem;
|
||||
_FromType = fromType;
|
||||
_MyItem = myItem;
|
||||
ValidationRules.CheckRules();
|
||||
}
|
||||
internal ContentPart(SafeDataReader dr)
|
||||
@@ -326,7 +326,7 @@ namespace VEPROMS.CSLA.Library
|
||||
#region Data Access Portal
|
||||
private void Fetch(SafeDataReader dr)
|
||||
{
|
||||
if(_MyLog.IsDebugEnabled)_MyLog.DebugFormat("[{0}] ContentPart.FetchDR", GetHashCode());
|
||||
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] ContentPart.FetchDR", GetHashCode());
|
||||
try
|
||||
{
|
||||
_FromType = dr.GetInt32("FromType");
|
||||
@@ -341,7 +341,7 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
catch (Exception ex) // FKItem Fetch
|
||||
{
|
||||
if(_MyLog.IsErrorEnabled)_MyLog.Error("ContentPart.FetchDR", ex);
|
||||
if (_MyLog.IsErrorEnabled) _MyLog.Error("ContentPart.FetchDR", ex);
|
||||
throw new DbCslaException("ContentPart.Fetch", ex);
|
||||
}
|
||||
MarkOld();
|
||||
|
Reference in New Issue
Block a user