diff --git a/PROMS/Volian.Controls.Library/StepTabRibbon.cs b/PROMS/Volian.Controls.Library/StepTabRibbon.cs index b437a0be..f9cd30b1 100644 --- a/PROMS/Volian.Controls.Library/StepTabRibbon.cs +++ b/PROMS/Volian.Controls.Library/StepTabRibbon.cs @@ -75,7 +75,7 @@ namespace Volian.Controls.Library _MyDVI = procInfo.ActiveParent as DocVersionInfo; // added jcb 20121221 to support set ro from word doc if (_MyDVI.DocVersionAssociations != null && _MyDVI.DocVersionAssociations.Count > 0) - MyLookup = _MyDVI.DocVersionAssociations[0].MyROFst.ROFSTLookup; + MyLookup = _MyDVI.DocVersionAssociations[0].MyROFst.GetROFSTLookup(_MyDVI); else MyLookup = null; return _MyDVI; @@ -295,10 +295,10 @@ namespace Volian.Controls.Library // the roid may be 12 or 16 chars long, with the last 4 set if there is unit specific // menuing. Pad to 12 to store in the rousage table. string padroid = (myroid.Length <= 12) ? myroid + "0000" : myroid; - string linktxt = string.Format(@"#Link:ReferencedObject: {0} {1}", padroid, MyLookup.DocVersionInfo.DocVersionAssociations[0].MyROFst.MyRODb.RODbID); + string linktxt = string.Format(@"#Link:ReferencedObject: {0} {1}", padroid, MyLookup.MyDocVersionInfo.DocVersionAssociations[0].MyROFst.MyRODb.RODbID); // Resolve symbols and scientific notation in the RO return value string valtxt = MyLookup.GetTranslatedRoValue(padroid, MyStepRTB.MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.ConvertCaretToDelta); //ConvertSymbolsAndStuff(selectedChld.value); - MyStepRTB.OnRoInsert(this, new StepRTBRoEventArgs(valtxt, myvalue, linktxt, padroid, MyLookup.DocVersionInfo.DocVersionAssociations[0].MyROFst.MyRODb.RODbID)); + MyStepRTB.OnRoInsert(this, new StepRTBRoEventArgs(valtxt, myvalue, linktxt, padroid, MyLookup.MyDocVersionInfo.DocVersionAssociations[0].MyROFst.MyRODb.RODbID)); } private void SaveROWithAnnotation_Click(object sender, EventArgs e) { @@ -312,10 +312,10 @@ namespace Volian.Controls.Library // the roid may be 12 or 16 chars long, with the last 4 set if there is unit specific // menuing. Pad to 12 to store in the rousage table. string padroid = (myroid.Length <= 12) ? myroid + "0000" : myroid; - string linktxt = string.Format(@"#Link:ReferencedObject: {0} {1}", padroid, MyLookup.DocVersionInfo.DocVersionAssociations[0].MyROFst.MyRODb.RODbID); + string linktxt = string.Format(@"#Link:ReferencedObject: {0} {1}", padroid, MyLookup.MyDocVersionInfo.DocVersionAssociations[0].MyROFst.MyRODb.RODbID); // Resolve symbols and scientific notation in the RO return value string valtxt = MyLookup.GetTranslatedRoValue(padroid, MyStepRTB.MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.ConvertCaretToDelta); //ConvertSymbolsAndStuff(selectedChld.value); - MyStepRTB.OnRoInsert(this, new StepRTBRoEventArgs(valtxt, myvalue, linktxt, padroid, MyLookup.DocVersionInfo.DocVersionAssociations[0].MyROFst.MyRODb.RODbID)); + MyStepRTB.OnRoInsert(this, new StepRTBRoEventArgs(valtxt, myvalue, linktxt, padroid, MyLookup.MyDocVersionInfo.DocVersionAssociations[0].MyROFst.MyRODb.RODbID)); } private void NoROFound_Click(object sender, EventArgs e) { @@ -1747,7 +1747,7 @@ namespace Volian.Controls.Library using (DocVersion dv = DocVersion.Get(MyDVI.VersionID)) { roFstInfo.ROTableUpdate += new ROFstInfoROTableUpdateEvent(roFstInfo_ROTableUpdate); - ROFst newrofst = ROFstInfo.UpdateRoFst(roFstInfo.MyRODb, dv.DocVersionAssociations[0], dv, roFstInfo); + ROFst newrofst = ROFstInfo.UpdateRoFst(roFstInfo.MyRODb, dv.DocVersionAssociations[0], dv, roFstInfo, null); roFstInfo.ROTableUpdate -= new ROFstInfoROTableUpdateEvent(roFstInfo_ROTableUpdate); StepPanelTabDisplayEventArgs args = new StepPanelTabDisplayEventArgs("DisplayROUpdateROFST"); MyEditItem.MyStepPanel.OnTabDisplay(sender, args); diff --git a/PROMS/Volian.Controls.Library/vlnTreeView.cs b/PROMS/Volian.Controls.Library/vlnTreeView.cs index 28dae2c7..f63f5dd3 100644 --- a/PROMS/Volian.Controls.Library/vlnTreeView.cs +++ b/PROMS/Volian.Controls.Library/vlnTreeView.cs @@ -317,6 +317,12 @@ namespace Volian.Controls.Library #endregion public partial class vlnTreeView : TreeView { + private int _OverrideDocVersionID = 0; + public int OverrideDocVersionID + { + get { return _OverrideDocVersionID; } + set { _OverrideDocVersionID = value; } + } private SessionInfo _MySessionInfo; public SessionInfo MySessionInfo { @@ -1293,7 +1299,7 @@ namespace Volian.Controls.Library using (DocVersion dv = DocVersion.Get(MyDVI.VersionID)) { roFstInfo.ROTableUpdate += new ROFstInfoROTableUpdateEvent(roFstInfo_ROTableUpdate); - ROFst newrofst = ROFstInfo.UpdateRoFst(roFstInfo.MyRODb, dv.DocVersionAssociations[0], dv, roFstInfo); + ROFst newrofst = ROFstInfo.UpdateRoFst(roFstInfo.MyRODb, dv.DocVersionAssociations[0], dv, roFstInfo, OverrideDocVersionID > 0 ? DocVersionInfo.Get(OverrideDocVersionID) : null); roFstInfo.ROTableUpdate -= new ROFstInfoROTableUpdateEvent(roFstInfo_ROTableUpdate); StepPanelTabDisplayEventArgs args = new StepPanelTabDisplayEventArgs("DisplayROUpdateROFST"); }