From 625b7158323bce77a17143f85303b5cf1ad088f9 Mon Sep 17 00:00:00 2001 From: mschill Date: Thu, 12 Feb 2026 13:51:06 -0500 Subject: [PATCH] B2026-014 Approved Procedure Export --- .../Extension/RevisionInfoExt.cs | 7 ------- PROMS/Volian.Controls.Library/vlnTreeView.cs | 12 ++++++++---- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/RevisionInfoExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/RevisionInfoExt.cs index e3cc9d67..50b3b2d7 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/RevisionInfoExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/RevisionInfoExt.cs @@ -597,13 +597,6 @@ namespace VEPROMS.CSLA.Library //if (_RevisionInfoList != null) // return _RevisionInfoList; RevisionInfoList tmp = DataPortal.Fetch(new ItemUnitCriteria(itemID, unitID)); - - foreach (var x in tmp) - { - x.LatestVersion.ApprovedXML = x.RevisionID.ToString(); - x.LatestVersion.PDF = Encoding.ASCII.GetBytes(x.RevisionID.ToString()); - x.LatestVersion.SummaryPDF = Encoding.ASCII.GetBytes(x.RevisionID.ToString()); - } RevisionInfo.AddList(tmp); tmp.AddEvents(); //_RevisionInfoList = tmp; diff --git a/PROMS/Volian.Controls.Library/vlnTreeView.cs b/PROMS/Volian.Controls.Library/vlnTreeView.cs index 73889378..12fabd03 100644 --- a/PROMS/Volian.Controls.Library/vlnTreeView.cs +++ b/PROMS/Volian.Controls.Library/vlnTreeView.cs @@ -1601,12 +1601,11 @@ namespace Volian.Controls.Library //B2024-024 create import file for parent/child procedure set void MultiUnitImportProcedure_Click(object sender, EventArgs e) { - //RevisionInfo ri = (sender as MenuItem).Tag as RevisionInfo; RevisionInfo ri = RevisionInfo.Get(int.Parse((sender as MenuItem).Tag.ToString())); RevisionConfig rc = ri.MyConfig as RevisionConfig; // bug fix: B2016-183 - add the child's name (ex Unit 1) to the export file name for Parent/Child procedures. int applIdx = rc.Applicability_Index; - string str = (applIdx > 0) ? _currentPri.MyDocVersion.UnitNames[applIdx - 1] + "_" : ""; // if parent/child get the defined child name to inlcude the export filename + string str = (applIdx > 0) ? _currentPri.MyDocVersion.UnitNames[applIdx - 1] + "_" : ""; // if parent/child get the defined child name to include the export filename System.Xml.XmlDocument xd = new System.Xml.XmlDocument(); xd.LoadXml(ri.LatestVersion.ApprovedXML); string PEIPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\VEPROMS\PEI_" + Database.VEPROMS_SqlConnection.Database; @@ -1615,8 +1614,13 @@ namespace Volian.Controls.Library // B2022-048: Crash when creating Procedure to Import from versions. Couldn't handle '/' in proc number. string fNametmp = xd.SelectSingleNode("procedure/content/@number").InnerText.Replace(" ", "_").Replace(@"\u8209?", "-").Replace(@"\u9586?", "_").Replace("/", "-") + ".pxml"; // B2022-112: If applicability, need to resolve the '<' and '>' characters. Just use the UnitNames, i.e. str, from above. - if (applIdx > 0) fNametmp = Regex.Replace(fNametmp, @"\", str, RegexOptions.IgnoreCase); - string fileName = PEIPath + "\\" + str + "Approved_Rev_" + ri.RevisionNumber.Replace(" ", "_").Replace("\\", "-").Replace("/", "-") + "_" + fNametmp; + if (applIdx > 0) + { + fNametmp = Regex.Replace(fNametmp, @"\", str, RegexOptions.IgnoreCase); + fNametmp = Regex.Replace(fNametmp, @"\", str, RegexOptions.IgnoreCase); + } + + string fileName = PEIPath + "\\" + str + "Approved_Rev_" + ri.RevisionNumber.Replace(" ", "_").Replace("\\", "-").Replace("/", "-") + "_" + fNametmp; xd.Save(fileName); FlexibleMessageBox.Show("Approved procedure saved to import file " + fileName, "Creating Export of Approved Procedure", MessageBoxButtons.OK, MessageBoxIcon.Information); }