Added sql procedure ‘ClearCBOverrideForProcedure’ to clear content/config’s Step CBOverride fields for an input itemID (that is a procedure), to fix B2015-039

B2015-039: Clear Change Bar Overrides for approval
This commit is contained in:
2016-02-08 17:17:36 +00:00
parent 54520ef0a2
commit cec6aa2e17
4 changed files with 153 additions and 0 deletions

View File

@@ -5887,6 +5887,29 @@ namespace VEPROMS.CSLA.Library
tranLookup.NewLookupNeeded += new TransitionLookupEvent(GetNewLookup);
SetParentSectionAndDocVersionPageNum(tmp, tmp.MyDocVersion, null, tmp, tmp.MyDocVersion, tranLookup);
}
public void ClearChangeBarOverrides()
{
try
{
using (ContentInfoList cil = ContentInfoList.GetClearedCBOverrides(ItemID))
{
foreach (ContentInfo ci in cil)
{
using (Content c = ci.Get())
{
// first refresh configs because the ContentInfo.Refresh causes events to occur that refresh screen
// and if configs aren't done first, the screen refresh, if based on config data, will not be correct.
foreach (ItemInfo ii in ci.ContentItems) ii.RefreshConfig();
ContentInfo.Refresh(c);
}
}
}
}
catch (Exception ex)
{
throw new DbCslaException("Error on ProcedureInfo:ClearChangeBarOverrides", ex);
}
}
//jcb add 20120501 item and children by unit
public static ProcedureInfo GetItemAndChildrenByUnit(int? itemID, int? parentID, int? unitID)
{