This commit is contained in:
@@ -42,7 +42,7 @@ namespace VEPROMS.CSLA.Library
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
||||
get
|
||||
{
|
||||
CanReadProperty("VersionID",true);
|
||||
CanReadProperty("VersionID", true);
|
||||
if (_MyDocVersion != null) _VersionID = _MyDocVersion.VersionID;
|
||||
return _VersionID;
|
||||
}
|
||||
@@ -54,7 +54,7 @@ namespace VEPROMS.CSLA.Library
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
||||
get
|
||||
{
|
||||
CanReadProperty("MyDocVersion",true);
|
||||
CanReadProperty("MyDocVersion", true);
|
||||
if (_MyDocVersion == null && _VersionID != 0) _MyDocVersion = DocVersion.Get(_VersionID);
|
||||
return _MyDocVersion;
|
||||
}
|
||||
@@ -65,7 +65,7 @@ namespace VEPROMS.CSLA.Library
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
||||
get
|
||||
{
|
||||
CanReadProperty("FolderID",true);
|
||||
CanReadProperty("FolderID", true);
|
||||
if (_MyFolder != null) _FolderID = _MyFolder.FolderID;
|
||||
return _FolderID;
|
||||
}
|
||||
@@ -76,14 +76,14 @@ namespace VEPROMS.CSLA.Library
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
||||
get
|
||||
{
|
||||
CanReadProperty("MyFolder",true);
|
||||
CanReadProperty("MyFolder", true);
|
||||
if (_MyFolder == null && _FolderID != 0) _MyFolder = Folder.Get(_FolderID);
|
||||
return _MyFolder;
|
||||
}
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
||||
set
|
||||
{
|
||||
CanWriteProperty("MyFolder",true);
|
||||
CanWriteProperty("MyFolder", true);
|
||||
if (_MyFolder != value)
|
||||
{
|
||||
_MyFolder = value;
|
||||
@@ -100,13 +100,13 @@ namespace VEPROMS.CSLA.Library
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
||||
get
|
||||
{
|
||||
CanReadProperty("VersionType",true);
|
||||
CanReadProperty("VersionType", true);
|
||||
return _VersionType;
|
||||
}
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
||||
set
|
||||
{
|
||||
CanWriteProperty("VersionType",true);
|
||||
CanWriteProperty("VersionType", true);
|
||||
if (_VersionType != value)
|
||||
{
|
||||
_VersionType = value;
|
||||
@@ -120,13 +120,13 @@ namespace VEPROMS.CSLA.Library
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
||||
get
|
||||
{
|
||||
CanReadProperty("Name",true);
|
||||
CanReadProperty("Name", true);
|
||||
return _Name;
|
||||
}
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
||||
set
|
||||
{
|
||||
CanWriteProperty("Name",true);
|
||||
CanWriteProperty("Name", true);
|
||||
if (value == null) value = string.Empty;
|
||||
if (_Name != value)
|
||||
{
|
||||
@@ -141,13 +141,13 @@ namespace VEPROMS.CSLA.Library
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
||||
get
|
||||
{
|
||||
CanReadProperty("Title",true);
|
||||
CanReadProperty("Title", true);
|
||||
return _Title;
|
||||
}
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
||||
set
|
||||
{
|
||||
CanWriteProperty("Title",true);
|
||||
CanWriteProperty("Title", true);
|
||||
if (value == null) value = string.Empty;
|
||||
if (_Title != value)
|
||||
{
|
||||
@@ -162,7 +162,7 @@ namespace VEPROMS.CSLA.Library
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
||||
get
|
||||
{
|
||||
CanReadProperty("FormatID",true);
|
||||
CanReadProperty("FormatID", true);
|
||||
if (_MyFormat != null) _FormatID = _MyFormat.FormatID;
|
||||
return _FormatID;
|
||||
}
|
||||
@@ -173,18 +173,18 @@ namespace VEPROMS.CSLA.Library
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
||||
get
|
||||
{
|
||||
CanReadProperty("MyFormat",true);
|
||||
CanReadProperty("MyFormat", true);
|
||||
if (_MyFormat == null && _FormatID != null) _MyFormat = Format.Get((int)_FormatID);
|
||||
return _MyFormat;
|
||||
}
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
||||
set
|
||||
{
|
||||
CanWriteProperty("MyFormat",true);
|
||||
CanWriteProperty("MyFormat", true);
|
||||
if (_MyFormat != value)
|
||||
{
|
||||
_MyFormat = value;
|
||||
_FormatID = (value == null ? null : (int?) value.FormatID);
|
||||
_FormatID = (value == null ? null : (int?)value.FormatID);
|
||||
PropertyHasChanged();
|
||||
}
|
||||
}
|
||||
@@ -195,13 +195,13 @@ namespace VEPROMS.CSLA.Library
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
||||
get
|
||||
{
|
||||
CanReadProperty("Config",true);
|
||||
CanReadProperty("Config", true);
|
||||
return _Config;
|
||||
}
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
||||
set
|
||||
{
|
||||
CanWriteProperty("Config",true);
|
||||
CanWriteProperty("Config", true);
|
||||
if (value == null) value = string.Empty;
|
||||
if (_Config != value)
|
||||
{
|
||||
@@ -216,13 +216,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;
|
||||
@@ -236,13 +236,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)
|
||||
{
|
||||
@@ -258,7 +258,7 @@ namespace VEPROMS.CSLA.Library
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
||||
get
|
||||
{
|
||||
CanReadProperty("Folder_ParentID",true);
|
||||
CanReadProperty("Folder_ParentID", true);
|
||||
return _Folder_ParentID;
|
||||
}
|
||||
}
|
||||
@@ -268,7 +268,7 @@ namespace VEPROMS.CSLA.Library
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
||||
get
|
||||
{
|
||||
CanReadProperty("Folder_DBID",true);
|
||||
CanReadProperty("Folder_DBID", true);
|
||||
return _Folder_DBID;
|
||||
}
|
||||
}
|
||||
@@ -278,7 +278,7 @@ namespace VEPROMS.CSLA.Library
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
||||
get
|
||||
{
|
||||
CanReadProperty("Folder_Name",true);
|
||||
CanReadProperty("Folder_Name", true);
|
||||
return _Folder_Name;
|
||||
}
|
||||
}
|
||||
@@ -288,7 +288,7 @@ namespace VEPROMS.CSLA.Library
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
||||
get
|
||||
{
|
||||
CanReadProperty("Folder_Title",true);
|
||||
CanReadProperty("Folder_Title", true);
|
||||
return _Folder_Title;
|
||||
}
|
||||
}
|
||||
@@ -298,7 +298,7 @@ namespace VEPROMS.CSLA.Library
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
||||
get
|
||||
{
|
||||
CanReadProperty("Folder_ShortName",true);
|
||||
CanReadProperty("Folder_ShortName", true);
|
||||
return _Folder_ShortName;
|
||||
}
|
||||
}
|
||||
@@ -308,7 +308,7 @@ namespace VEPROMS.CSLA.Library
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
||||
get
|
||||
{
|
||||
CanReadProperty("Folder_FormatID",true);
|
||||
CanReadProperty("Folder_FormatID", true);
|
||||
return _Folder_FormatID;
|
||||
}
|
||||
}
|
||||
@@ -318,7 +318,7 @@ namespace VEPROMS.CSLA.Library
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
||||
get
|
||||
{
|
||||
CanReadProperty("Folder_Config",true);
|
||||
CanReadProperty("Folder_Config", true);
|
||||
return _Folder_Config;
|
||||
}
|
||||
}
|
||||
@@ -328,7 +328,7 @@ namespace VEPROMS.CSLA.Library
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
||||
get
|
||||
{
|
||||
CanReadProperty("Folder_DTS",true);
|
||||
CanReadProperty("Folder_DTS", true);
|
||||
return _Folder_DTS;
|
||||
}
|
||||
}
|
||||
@@ -338,7 +338,7 @@ namespace VEPROMS.CSLA.Library
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
||||
get
|
||||
{
|
||||
CanReadProperty("Folder_UsrID",true);
|
||||
CanReadProperty("Folder_UsrID", true);
|
||||
return _Folder_UsrID;
|
||||
}
|
||||
}
|
||||
@@ -371,24 +371,24 @@ 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 (_MyFolder != null && (hasBrokenRules = _MyFolder.HasBrokenRules) != null) return hasBrokenRules;
|
||||
if (_MyFormat != null && (hasBrokenRules = _MyFormat.HasBrokenRules) != null) return hasBrokenRules;
|
||||
return hasBrokenRules;
|
||||
_CheckingBrokenRules = true;
|
||||
IVEHasBrokenRules hasBrokenRules = null;
|
||||
if (_MyFolder != null && (hasBrokenRules = _MyFolder.HasBrokenRules) != null) return hasBrokenRules;
|
||||
if (_MyFormat != null && (hasBrokenRules = _MyFormat.HasBrokenRules) != null) return hasBrokenRules;
|
||||
return hasBrokenRules;
|
||||
}
|
||||
finally
|
||||
{
|
||||
_CheckingBrokenRules=false;
|
||||
_CheckingBrokenRules = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -519,8 +519,8 @@ namespace VEPROMS.CSLA.Library
|
||||
_VersionType = _ItemDocVersionExtension.DefaultVersionType;
|
||||
_DTS = _ItemDocVersionExtension.DefaultDTS;
|
||||
_UserID = _ItemDocVersionExtension.DefaultUserID;
|
||||
_MyFolder = myFolder;
|
||||
_Name = name;
|
||||
_MyFolder = myFolder;
|
||||
_Name = name;
|
||||
ValidationRules.CheckRules();
|
||||
}
|
||||
internal ItemDocVersion(SafeDataReader dr)
|
||||
@@ -532,7 +532,7 @@ namespace VEPROMS.CSLA.Library
|
||||
#region Data Access Portal
|
||||
private void Fetch(SafeDataReader dr)
|
||||
{
|
||||
if(_MyLog.IsDebugEnabled)_MyLog.DebugFormat("[{0}] ItemDocVersion.FetchDR", GetHashCode());
|
||||
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] ItemDocVersion.FetchDR", GetHashCode());
|
||||
try
|
||||
{
|
||||
_VersionID = dr.GetInt32("VersionID");
|
||||
@@ -557,7 +557,7 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
catch (Exception ex) // FKItem Fetch
|
||||
{
|
||||
if(_MyLog.IsErrorEnabled)_MyLog.Error("ItemDocVersion.FetchDR", ex);
|
||||
if (_MyLog.IsErrorEnabled) _MyLog.Error("ItemDocVersion.FetchDR", ex);
|
||||
throw new DbCslaException("ItemDocVersion.Fetch", ex);
|
||||
}
|
||||
MarkOld();
|
||||
|
Reference in New Issue
Block a user