Modified code to support structure changes to treeview nodes

This commit is contained in:
Jim
2015-05-16 17:02:26 +00:00
parent f66cb15dd3
commit f005316849
9 changed files with 309 additions and 79 deletions

View File

@@ -12,6 +12,10 @@ namespace VEPROMS.CSLA.Library
{
public partial class Content
{
public string LastChangedString
{
get { return ContentInfo.FormatByteArray(_LastChanged); }
}
public override string ToString()
{
return string.Format("{0} {1}", Number, Text);
@@ -554,6 +558,24 @@ namespace VEPROMS.CSLA.Library
}
public partial class ContentInfo
{
public static string FormatByteArray(byte[] myArray)
{
StringBuilder sb = new StringBuilder();
for (int i = 0; i < myArray.Length; i++)
{
sb.Append(string.Format("{0:x2}", myArray[i]));
}
return sb.ToString();
}
public string LastChangedString
{
get { return ContentInfo.FormatByteArray(_LastChanged); }
}
//Convert.ToInt64( ByteArrayToHexString(_ts), 16 ) )
public Int64 LastChangedInt64
{
get { return Convert.ToInt64(LastChangedString, 16); }
}
public static bool IsInCache(int contentID)
{
return _CacheByPrimaryKey.ContainsKey(contentID.ToString());