Change Manager
This commit is contained in:
@@ -1702,6 +1702,8 @@ namespace VEPROMS.CSLA.Library
|
||||
ItemInfo tmp = this;
|
||||
while (tmp.ActiveParent != null && tmp.ActiveParent.GetType() != typeof(DocVersionInfo))
|
||||
tmp = (ItemInfo)tmp.ActiveParent;
|
||||
if (tmp is ProcedureInfo)
|
||||
return tmp as ProcedureInfo;
|
||||
return ProcedureInfo.Get(tmp.ItemID);
|
||||
}
|
||||
}
|
||||
@@ -1842,7 +1844,29 @@ namespace VEPROMS.CSLA.Library
|
||||
//Console.WriteLine("Local {0}", (MyContent.MyFormat==null)?"MYformat is null": MyContent.MyFormat.Name);
|
||||
return MyContent.MyFormat; }
|
||||
}
|
||||
private ConfigDynamicTypeDescriptor _MyConfig=null;
|
||||
private bool _IsDeleted = false;
|
||||
public bool IsDeleted
|
||||
{
|
||||
get { return _IsDeleted; }
|
||||
set
|
||||
{
|
||||
_IsDeleted = value;
|
||||
if (value == true)
|
||||
UpdateCacheIsDeleted(ItemID);
|
||||
}
|
||||
}
|
||||
private static void UpdateCacheIsDeleted(int itemID)
|
||||
{
|
||||
ConvertListToDictionary();
|
||||
string key = itemID.ToString();
|
||||
if (key != null && _CacheByPrimaryKey.ContainsKey(key))
|
||||
{
|
||||
ItemInfo[] items = _CacheByPrimaryKey[key].ToArray();
|
||||
foreach (ItemInfo item in items)
|
||||
item._IsDeleted = true;
|
||||
}
|
||||
}
|
||||
private ConfigDynamicTypeDescriptor _MyConfig = null;
|
||||
public ConfigDynamicTypeDescriptor MyConfig
|
||||
{
|
||||
get
|
||||
@@ -2336,6 +2360,30 @@ namespace VEPROMS.CSLA.Library
|
||||
if (tmp.Count > 0) _MyMacros = tmp;
|
||||
}
|
||||
#endregion
|
||||
#region JCB Item Status
|
||||
private bool _IsItemNew = false;
|
||||
public bool IsItemNew
|
||||
{
|
||||
get
|
||||
{
|
||||
ProcedureInfo pi = this.MyProcedure;
|
||||
if (pi != null)
|
||||
_IsItemNew = (this.DTS > pi.DTS);
|
||||
return _IsItemNew;
|
||||
}
|
||||
}
|
||||
private bool _IsItemChanged;
|
||||
public bool IsItemChanged
|
||||
{
|
||||
get
|
||||
{
|
||||
ProcedureInfo pi = this.MyProcedure;
|
||||
if (pi != null)
|
||||
_IsItemChanged = (this.MyContent.DTS > pi.DTS);
|
||||
return _IsItemChanged;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
#endregion ItemInfo
|
||||
#region Tab
|
||||
|
Reference in New Issue
Block a user