This commit is contained in:
Jsj
2008-05-16 18:07:47 +00:00
parent 9d0b3cd543
commit cda0291dbd
116 changed files with 4257 additions and 3382 deletions

View File

@@ -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("ItemID",true);
CanReadProperty("ItemID", true);
if (_MyItem != null) _ItemID = _MyItem.ItemID;
return _ItemID;
}
@@ -173,18 +173,18 @@ namespace VEPROMS.CSLA.Library
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get
{
CanReadProperty("MyItem",true);
CanReadProperty("MyItem", true);
if (_MyItem == null && _ItemID != null) _MyItem = Item.Get((int)_ItemID);
return _MyItem;
}
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set
{
CanWriteProperty("MyItem",true);
CanWriteProperty("MyItem", true);
if (_MyItem != value)
{
_MyItem = value;
_ItemID = (value == null ? null : (int?) value.ItemID);
_ItemID = (value == null ? null : (int?)value.ItemID);
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 (_MyItem != null && (hasBrokenRules = _MyItem.HasBrokenRules) != null) return hasBrokenRules;
return hasBrokenRules;
_CheckingBrokenRules = true;
IVEHasBrokenRules hasBrokenRules = null;
if (_MyFolder != null && (hasBrokenRules = _MyFolder.HasBrokenRules) != null) return hasBrokenRules;
if (_MyItem != null && (hasBrokenRules = _MyItem.HasBrokenRules) != null) return hasBrokenRules;
return hasBrokenRules;
}
finally
{
_CheckingBrokenRules=false;
_CheckingBrokenRules = false;
}
}
}
@@ -519,8 +519,8 @@ namespace VEPROMS.CSLA.Library
_VersionType = _FormatDocVersionExtension.DefaultVersionType;
_DTS = _FormatDocVersionExtension.DefaultDTS;
_UserID = _FormatDocVersionExtension.DefaultUserID;
_MyFolder = myFolder;
_Name = name;
_MyFolder = myFolder;
_Name = name;
ValidationRules.CheckRules();
}
internal FormatDocVersion(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}] FormatDocVersion.FetchDR", GetHashCode());
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] FormatDocVersion.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("FormatDocVersion.FetchDR", ex);
if (_MyLog.IsErrorEnabled) _MyLog.Error("FormatDocVersion.FetchDR", ex);
throw new DbCslaException("FormatDocVersion.Fetch", ex);
}
MarkOld();