Reset Selected Slave after processing

Added and Commented-out some debug output
Use GetTranslatedROValue to get the correct RO value when text is restored
Fix logic to attempt to use existing DocVersionInfo rather than creating a new instance
Base lookup on ROFSTID and Selected Slave
This commit is contained in:
Rich
2014-03-12 22:01:55 +00:00
parent 1581653387
commit e8453b8648
6 changed files with 32 additions and 24 deletions

View File

@@ -1611,14 +1611,8 @@ namespace VEPROMS.CSLA.Library
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;
//}
string myvalue = mylookup.GetTranslatedRoValue(rou.ROID, tmp.ActiveFormat.PlantFormat.FormatData.SectData.ConvertCaretToDelta);
ROFSTLookup.rochild rocc = mylookup.GetRoChild(rou.ROID);
int mytype = rocc.type;
cont.FixContentText(rou, myvalue, mytype, null);
}
@@ -1810,14 +1804,8 @@ namespace VEPROMS.CSLA.Library
ROFSTLookup mylookup = myrofst.GetROFSTLookup(tmp.ContentItems[0].MyProcedure.MyDocVersion);
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;
//}
string myvalue = mylookup.GetTranslatedRoValue(rou.ROID, tmp.ContentItems[0].ActiveFormat.PlantFormat.FormatData.SectData.ConvertCaretToDelta);
ROFSTLookup.rochild rocc = mylookup.GetRoChild(rou.ROID);
int mytype = rocc.type;
ctmp.FixContentText(rou, myvalue, mytype, null);
}