This commit is contained in:
2008-08-12 11:22:10 +00:00
parent d0dba2aad4
commit 0c505e9455
3 changed files with 146 additions and 75 deletions

View File

@@ -179,7 +179,7 @@ namespace VEPROMS.CSLA.Library
set
{
CanWriteProperty("MyFormat", true);
if (_MyFormat != value)
if ((_MyFormat == null ? _FormatID : (int?)_MyFormat.FormatID) != (value == null ? null : (int?)value.FormatID))
{
_MyFormat = value;
_FormatID = (value == null ? null : (int?)value.FormatID);
@@ -187,6 +187,26 @@ namespace VEPROMS.CSLA.Library
}
}
}
private double? _ManualOrder;
public double? ManualOrder
{
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
get
{
CanReadProperty("ManualOrder", true);
return _ManualOrder;
}
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
set
{
CanWriteProperty("ManualOrder", true);
if (_ManualOrder != value)
{
_ManualOrder = value;
PropertyHasChanged();
}
}
}
private string _Config = string.Empty;
public string Config
{
@@ -371,6 +391,8 @@ namespace VEPROMS.CSLA.Library
//AuthorizationRules.AllowWrite(ShortName, "<Role(s)>");
//AuthorizationRules.AllowRead(FormatID, "<Role(s)>");
//AuthorizationRules.AllowWrite(FormatID, "<Role(s)>");
//AuthorizationRules.AllowRead(ManualOrder, "<Role(s)>");
//AuthorizationRules.AllowWrite(ManualOrder, "<Role(s)>");
//AuthorizationRules.AllowRead(Config, "<Role(s)>");
//AuthorizationRules.AllowWrite(Config, "<Role(s)>");
//AuthorizationRules.AllowRead(DTS, "<Role(s)>");
@@ -455,6 +477,7 @@ namespace VEPROMS.CSLA.Library
_Title = dr.GetString("Title");
_ShortName = dr.GetString("ShortName");
_FormatID = (int?)dr.GetValue("FormatID");
_ManualOrder = (double?)dr.GetValue("ManualOrder");
_Config = dr.GetString("Config");
_DTS = dr.GetDateTime("DTS");
_UsrID = dr.GetString("UsrID");
@@ -472,7 +495,7 @@ namespace VEPROMS.CSLA.Library
// if we're not dirty then don't update the database
if (!this.IsDirty) return;
SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"];
_LastChanged = Folder.Add(cn, ref _FolderID, Folder.Get(_ParentID), myConnection, _Name, _Title, _ShortName, _MyFormat, _Config, _DTS, _UsrID);
_LastChanged = Folder.Add(cn, ref _FolderID, Folder.Get(_ParentID), myConnection, _Name, _Title, _ShortName, _MyFormat, _ManualOrder, _Config, _DTS, _UsrID);
MarkOld();
}
internal void Update(Connection myConnection)
@@ -480,7 +503,7 @@ namespace VEPROMS.CSLA.Library
// if we're not dirty then don't update the database
if (!this.IsDirty) return;
SqlConnection cn = (SqlConnection)ApplicationContext.LocalContext["cn"];
_LastChanged = Folder.Update(cn, ref _FolderID, Folder.Get(_ParentID), myConnection, _Name, _Title, _ShortName, _MyFormat, _Config, _DTS, _UsrID, ref _LastChanged);
_LastChanged = Folder.Update(cn, ref _FolderID, Folder.Get(_ParentID), myConnection, _Name, _Title, _ShortName, _MyFormat, _ManualOrder, _Config, _DTS, _UsrID, ref _LastChanged);
MarkOld();
}
internal void DeleteSelf(Connection myConnection)