This commit is contained in:
2011-03-01 13:20:03 +00:00
parent 7704e926df
commit 5802cfdd10
2 changed files with 49 additions and 10 deletions

View File

@@ -40,6 +40,7 @@ namespace VEPROMS.CSLA.Library
}
}
}
public delegate List<string> ROFstInfoROTableUpdateEvent(object sender, ROFstInfoROTableUpdateEventArgs args);
public partial class ROFstInfo
{
#region Log4Net
@@ -225,8 +226,8 @@ namespace VEPROMS.CSLA.Library
foreach (string chg in chgList)
{
string newvalue = newLU.GetRoValue(chg);
string desc = string.Format("Change in RO Values: Old value = {0}, New value = {1}", origLU.GetRoValue(chg), newvalue);
ROFSTLookup.rochild roch = newLU.GetRoChild(chg);
string desc = string.Format("Change in RO Values: Old value = {0}, New value = {1}", origLU.GetRoValue(chg), roch.value);
// roid's are stored in database as 16 characters long in the rousages table. They may be stored
// as 12 characters in the ro.fst.
string padroid = chg.Length <= 12 ? chg + "0000" : chg;
@@ -236,7 +237,7 @@ namespace VEPROMS.CSLA.Library
{
using (Content content = Content.Get(roUsg.MyContent.ContentID))
{
content.FixContentText(roUsg, newvalue);
content.FixContentText(roUsg, roch, origROFstInfo);
if (content.IsDirty)
content.Save();
}
@@ -356,6 +357,32 @@ namespace VEPROMS.CSLA.Library
}
return false;
}
public event ROFstInfoROTableUpdateEvent ROTableUpdate;
public List<string> OnROTableUpdate(object sender, ROFstInfoROTableUpdateEventArgs args)
{
if (ROTableUpdate != null) return ROTableUpdate(sender, args);
return null;
}
}
public class ROFstInfoROTableUpdateEventArgs
{
private string _ROText;
public string ROText
{
get { return _ROText; }
set { _ROText = value; }
}
private string _OldGridXml;
public string OldGridXml
{
get { return _OldGridXml; }
set { _OldGridXml = value; }
}
public ROFstInfoROTableUpdateEventArgs(string rotext, string oldgridxml)
{
_ROText = rotext;
_OldGridXml = oldgridxml;
}
}
public partial class ROFstInfoList
{