When restoring content or item changes in change manager, make sure update both ro values and transitions
This commit is contained in:
parent
d09eac44b8
commit
53123154fc
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user