diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/AuditExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/AuditExt.cs index 4744a1da..be24e2f7 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/AuditExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/AuditExt.cs @@ -1603,6 +1603,32 @@ namespace VEPROMS.CSLA.Library } cont.Save(); } + if (cont.ContentRoUsageCount > 0) + { + ROFstInfo myrofst = tmp.MyContent.ContentItems[0].MyProcedure.MyDocVersion.DocVersionAssociations[0].MyROFst; + ROFSTLookup mylookup = myrofst.ROFSTLookup; + foreach (ContentRoUsage ro in cont.ContentRoUsages) + { + RoUsageInfo rou = RoUsageInfo.Get(ro.ROUsageID); + ROFSTLookup.rochild rocc = mylookup.GetRoChild12(rou.ROID); + if (rocc.value == null) + rocc = mylookup.GetRoChild(rou.ROID); + string myvalue = rocc.value; + //if (myvalue == null) + //{ + // myvalue = rocc.children[0].value; + //} + int mytype = rocc.type; + cont.FixContentText(rou, myvalue, mytype, null); + } + Content cctmp = cont; + if (cont.IsDirty) + { + cctmp.DTS = DateTime.Now; + cctmp = cont.Save(); + } + ContentInfo.Refresh(cctmp); + } } return tmp; } @@ -1761,14 +1787,36 @@ namespace VEPROMS.CSLA.Library tmp.RefreshContentParts(); tmp.RefreshContentRoUsages(); tmp.RefreshContentTransitions(); + if (tmp.ContentTransitions != null) + { + foreach (TransitionInfo tran in tmp.ContentTransitions) + { + if (tran.MyItemToID != null) + tran.MyItemToID.UpdateTransitionText(); + } + } using (Content ctmp = tmp.Get()) { + if (ctmp.ContentTransitionCount > 0) + { + foreach (ContentTransition tran in ctmp.ContentTransitions) + { + ctmp.FixTransitionText(TransitionInfo.Get(tran.TransitionID)); + } + ctmp.Save(); + } ROFstInfo myrofst = tmp.ContentItems[0].MyProcedure.MyDocVersion.DocVersionAssociations[0].MyROFst; ROFSTLookup mylookup = myrofst.ROFSTLookup; foreach(RoUsageInfo rou in tmp.ContentRoUsages) { ROFSTLookup.rochild rocc = mylookup.GetRoChild12(rou.ROID); + if (rocc.value == null) + rocc = mylookup.GetRoChild(rou.ROID); string myvalue = rocc.value; + //if (myvalue == null) + //{ + // myvalue = rocc.children[0].value; + //} int mytype = rocc.type; ctmp.FixContentText(rou, myvalue, mytype, null); }