From a0be60a1b9e0aa145ac76be5adc48768318545e6 Mon Sep 17 00:00:00 2001 From: Paul Larsen Date: Sat, 7 Mar 2026 22:38:18 -0500 Subject: [PATCH 01/21] B2026-025_Unicode_removed_from_RO_menu_titles_in_treeview --- .../LibSource/RODBInterface/RODBInterface.cs | 20 ++++++++++++++++--- .../LibSource/RODBInterface/VlnXml.cs | 5 ++++- PROMS/Volian.Controls.Library/StepRTB.cs | 2 +- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/PROMS/ReferencedObjects/LibSource/RODBInterface/RODBInterface.cs b/PROMS/ReferencedObjects/LibSource/RODBInterface/RODBInterface.cs index f6ba23fe..a92492ee 100644 --- a/PROMS/ReferencedObjects/LibSource/RODBInterface/RODBInterface.cs +++ b/PROMS/ReferencedObjects/LibSource/RODBInterface/RODBInterface.cs @@ -2186,6 +2186,20 @@ namespace RODBInterface } string xmlstr = GenerateXmlString(ro, false); + StringBuilder xmlstrTmp = new StringBuilder(); // B2026-025 prep the info field data so it will be saved correctly. + char[] chrAry = xmlstr.ToCharArray(); + foreach (int chr in chrAry) + { + if (chr > 160) + { + xmlstrTmp.Append($"\\u{(int)chr}?"); + } + else + { + xmlstrTmp.Append((char)chr); + } + } + string wraccid = null; if (ro.HasAttribute("AccPageID")) { @@ -2209,13 +2223,13 @@ namespace RODBInterface // strInsert = "INSERT INTO " + parent.GetAttribute("Table") + "( RecID, RecType, ParentID, AccPageID, ModDateTime, Info ) "; strInsert = "INSERT INTO " + parent.GetAttribute("Table") + "( RecID, RecType, ParentID, ModDateTime, AccPageID, Info ) "; strInsert = strInsert + " VALUES ('" + ro.GetAttribute("RecID") + "'," + (uint)RecordType.Group + ",'" + ro.GetAttribute("ParentID"); - strInsert = strInsert + "','" + wraccid + "','" + dt + "','" + xmlstr + "');"; + strInsert = strInsert + "','" + wraccid + "','" + dt + "','" + xmlstrTmp + "');"; } else { strInsert = "INSERT INTO " + parent.GetAttribute("Table") + "( RecID, RecType, ParentID, ModDateTime, Info ) "; strInsert = strInsert + " VALUES ('" + ro.GetAttribute("RecID") + "'," + (uint)RecordType.Group + ",'" + ro.GetAttribute("ParentID"); - strInsert = strInsert + "','" + dt + "','" + xmlstr + "');"; + strInsert = strInsert + "','" + dt + "','" + xmlstrTmp + "');"; } } @@ -2223,7 +2237,7 @@ namespace RODBInterface { strInsert = "INSERT INTO " + parent.GetAttribute("Table") + "( RecID, RecType, ParentID, AccPageId, ModDateTime, Info ) "; strInsert = strInsert + " VALUES ('" + ro.GetAttribute("RecID") + "'," + (uint)RecordType.RRO + ",'" + ro.GetAttribute("ParentID"); - strInsert = strInsert + "','" + wraccid + "','" + dt + "','" + xmlstr + "');"; + strInsert = strInsert + "','" + wraccid + "','" + dt + "','" + xmlstrTmp + "');"; } try diff --git a/PROMS/ReferencedObjects/LibSource/RODBInterface/VlnXml.cs b/PROMS/ReferencedObjects/LibSource/RODBInterface/VlnXml.cs index eb5f1c20..d2ddc83a 100644 --- a/PROMS/ReferencedObjects/LibSource/RODBInterface/VlnXml.cs +++ b/PROMS/ReferencedObjects/LibSource/RODBInterface/VlnXml.cs @@ -96,6 +96,7 @@ using System.IO; using System.Windows.Forms; using ROFields; using VlnStatus; +using System.Text.RegularExpressions; //using VlnProfiler; //don't forget to add VlnProfiler to the reference list namespace RODBInterface @@ -517,7 +518,9 @@ namespace RODBInterface strtmp.Append(" "); cnt++; } - if ((cnt + text.Length) > frmt2) // longer than the field length? + // string sym = symbcode < 256 ? ((char)symbcode).ToString() : string.Format(@"\u{0}", symbcode); + text = Regex.Replace(text, @"\\u([0-9]{1,4})\?", m => Convert.ToChar(int.Parse(m.Groups[1].Value)).ToString()); //B2026-025 Unicode removed from RO menu titles in treeview. + if ((cnt + text.Length) > frmt2) // longer than the field length? strtmp.Append(text.Substring(0,frmt2-cnt)); else strtmp.Append(text); diff --git a/PROMS/Volian.Controls.Library/StepRTB.cs b/PROMS/Volian.Controls.Library/StepRTB.cs index 0556dbba..c0661359 100644 --- a/PROMS/Volian.Controls.Library/StepRTB.cs +++ b/PROMS/Volian.Controls.Library/StepRTB.cs @@ -1404,7 +1404,7 @@ namespace Volian.Controls.Library var pattern = @"\\u([0-9]{1,4})\?"; // RO Editor add symbols C2022 - 003 foreach (Match match in Regex.Matches(linkValue, pattern, RegexOptions.IgnoreCase)) { - linkValue = linkValue.Replace(match.Value, "\\f1 " + match.Value + " \\f0"); + linkValue = linkValue.Replace(match.Value, "\\f1 " + match.Value + "\\f0"); } linkValue = linkValue.Replace(@"{", @"\{"); From 955ffc48d384ef86ee352eba7bbc31d0ea27fab6 Mon Sep 17 00:00:00 2001 From: Paul Larsen Date: Mon, 9 Mar 2026 11:41:13 -0400 Subject: [PATCH 02/21] B2026-025_Unicode_removed_from_RO_menu_titles_in_treeview --- .../LibSource/RODBInterface/RODBInterface.cs | 30 +++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/PROMS/ReferencedObjects/LibSource/RODBInterface/RODBInterface.cs b/PROMS/ReferencedObjects/LibSource/RODBInterface/RODBInterface.cs index a92492ee..d68d0c14 100644 --- a/PROMS/ReferencedObjects/LibSource/RODBInterface/RODBInterface.cs +++ b/PROMS/ReferencedObjects/LibSource/RODBInterface/RODBInterface.cs @@ -2142,7 +2142,20 @@ namespace RODBInterface wraccid = accid; string dt = string.Format("{0:yyyyMMddHHmmss}", System.DateTime.Now); string xmlstr = GenerateXmlString(ro, false); - string strUpdate = "UPDATE " + ro.GetAttribute("Table") + " SET Info = '" + xmlstr + "'"; + StringBuilder xmlstrTmp = new StringBuilder(); // B2026-025 prep the info field data so it will be saved correctly. + char[] chrAry = xmlstr.ToCharArray(); + foreach (int chr in chrAry) + { + if (chr > 160) + { + xmlstrTmp.Append($"\\u{(int)chr}?"); + } + else + { + xmlstrTmp.Append((char)chr); + } + } + string strUpdate = "UPDATE " + ro.GetAttribute("Table") + " SET Info = '" + xmlstrTmp + "'"; if (movedRO) { VlnXmlElement parent = (VlnXmlElement)ro.ParentNode; @@ -2645,7 +2658,20 @@ namespace RODBInterface } } StatMsgWindow.StatusMessage = echild.GetAttribute("MenuTitle"); - str = "UPDATE " + echild.GetAttribute("Table") + " SET Info = '" + tinfo2 + "'"; + StringBuilder tinfo2Tmp = new StringBuilder(); // B2026-025 prep the info field data so it will be saved correctly. + char[] chrAry = tinfo2.ToCharArray(); + foreach (int chr in chrAry) + { + if (chr > 160) + { + tinfo2Tmp.Append($"\\u{(int)chr}?"); + } + else + { + tinfo2Tmp.Append((char)chr); + } + } + str = "UPDATE " + echild.GetAttribute("Table") + " SET Info = '" + tinfo2Tmp + "'"; str = str + ", ModDateTime = '" + dt + "' WHERE RecID = '" + echild.GetAttribute("RecID") + "';"; DBE.Command(str); DBE.Reader(); From 33cc6508719e18c6bc5736d4e35c25ac66bd7afa Mon Sep 17 00:00:00 2001 From: Paul Larsen Date: Mon, 9 Mar 2026 14:26:19 -0400 Subject: [PATCH 03/21] B2026-025_Unicode_removed_from_RO_menu_titles_in_treeview --- .../LibSource/RODBInterface/RODBInterface.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/PROMS/ReferencedObjects/LibSource/RODBInterface/RODBInterface.cs b/PROMS/ReferencedObjects/LibSource/RODBInterface/RODBInterface.cs index d68d0c14..d4f5b170 100644 --- a/PROMS/ReferencedObjects/LibSource/RODBInterface/RODBInterface.cs +++ b/PROMS/ReferencedObjects/LibSource/RODBInterface/RODBInterface.cs @@ -2146,7 +2146,7 @@ namespace RODBInterface char[] chrAry = xmlstr.ToCharArray(); foreach (int chr in chrAry) { - if (chr > 160) + if (chr > 166) { xmlstrTmp.Append($"\\u{(int)chr}?"); } @@ -2155,7 +2155,7 @@ namespace RODBInterface xmlstrTmp.Append((char)chr); } } - string strUpdate = "UPDATE " + ro.GetAttribute("Table") + " SET Info = '" + xmlstrTmp + "'"; + string strUpdate = "UPDATE " + ro.GetAttribute("Table") + " SET Info = '" + xmlstrTmp.ToString() + "'"; if (movedRO) { VlnXmlElement parent = (VlnXmlElement)ro.ParentNode; @@ -2203,7 +2203,7 @@ namespace RODBInterface char[] chrAry = xmlstr.ToCharArray(); foreach (int chr in chrAry) { - if (chr > 160) + if (chr > 166) { xmlstrTmp.Append($"\\u{(int)chr}?"); } @@ -2236,13 +2236,13 @@ namespace RODBInterface // strInsert = "INSERT INTO " + parent.GetAttribute("Table") + "( RecID, RecType, ParentID, AccPageID, ModDateTime, Info ) "; strInsert = "INSERT INTO " + parent.GetAttribute("Table") + "( RecID, RecType, ParentID, ModDateTime, AccPageID, Info ) "; strInsert = strInsert + " VALUES ('" + ro.GetAttribute("RecID") + "'," + (uint)RecordType.Group + ",'" + ro.GetAttribute("ParentID"); - strInsert = strInsert + "','" + wraccid + "','" + dt + "','" + xmlstrTmp + "');"; + strInsert = strInsert + "','" + wraccid + "','" + dt + "','" + xmlstrTmp.ToString() + "');"; } else { strInsert = "INSERT INTO " + parent.GetAttribute("Table") + "( RecID, RecType, ParentID, ModDateTime, Info ) "; strInsert = strInsert + " VALUES ('" + ro.GetAttribute("RecID") + "'," + (uint)RecordType.Group + ",'" + ro.GetAttribute("ParentID"); - strInsert = strInsert + "','" + dt + "','" + xmlstrTmp + "');"; + strInsert = strInsert + "','" + dt + "','" + xmlstrTmp.ToString() + "');"; } } @@ -2250,7 +2250,7 @@ namespace RODBInterface { strInsert = "INSERT INTO " + parent.GetAttribute("Table") + "( RecID, RecType, ParentID, AccPageId, ModDateTime, Info ) "; strInsert = strInsert + " VALUES ('" + ro.GetAttribute("RecID") + "'," + (uint)RecordType.RRO + ",'" + ro.GetAttribute("ParentID"); - strInsert = strInsert + "','" + wraccid + "','" + dt + "','" + xmlstrTmp + "');"; + strInsert = strInsert + "','" + wraccid + "','" + dt + "','" + xmlstrTmp.ToString() + "');"; } try @@ -2662,7 +2662,7 @@ namespace RODBInterface char[] chrAry = tinfo2.ToCharArray(); foreach (int chr in chrAry) { - if (chr > 160) + if (chr > 166) { tinfo2Tmp.Append($"\\u{(int)chr}?"); } @@ -2671,7 +2671,7 @@ namespace RODBInterface tinfo2Tmp.Append((char)chr); } } - str = "UPDATE " + echild.GetAttribute("Table") + " SET Info = '" + tinfo2Tmp + "'"; + str = "UPDATE " + echild.GetAttribute("Table") + " SET Info = '" + tinfo2Tmp.ToString() + "'"; str = str + ", ModDateTime = '" + dt + "' WHERE RecID = '" + echild.GetAttribute("RecID") + "';"; DBE.Command(str); DBE.Reader(); From 9ccdaef3540274e1a53d970438d59e0c89caab8b Mon Sep 17 00:00:00 2001 From: mschill Date: Tue, 10 Mar 2026 07:02:50 -0400 Subject: [PATCH 04/21] B2026-029 Update the Clipboard Copying in PROMS StepTabRibbon to retry --- PROMS/Volian.Controls.Library/StepTabRibbon.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/PROMS/Volian.Controls.Library/StepTabRibbon.cs b/PROMS/Volian.Controls.Library/StepTabRibbon.cs index 482e4c1a..06f8474e 100644 --- a/PROMS/Volian.Controls.Library/StepTabRibbon.cs +++ b/PROMS/Volian.Controls.Library/StepTabRibbon.cs @@ -1672,9 +1672,11 @@ namespace Volian.Controls.Library //if can't, log it and use old method of scoping clipboard to PROMS life try { - Clipboard.SetDataObject(myDO, true); // this saves the cleaned up information to the Windows clipboard + // noticed that sometimes the clipboard will get stuck - so set it to retry twice + // and if it fails, scope the clipboard to within PROMS + Clipboard.SetDataObject(myDO, true, 2, 100); // this saves the cleaned up information to the Windows clipboard } - catch (Exception ex) + catch (System.Runtime.InteropServices.ExternalException ex) { _MyLog.Warn($"Error Setting Clipboard Object to Persist beyond PROMS. Clipboard will be scoped to PROMS. Error:{ex.Message}"); Clipboard.SetDataObject(myDO); // this saves the cleaned up information to the Windows clipboard From 13b03f4f890f40feb161260d2c24e794bd340083 Mon Sep 17 00:00:00 2001 From: Paul Larsen Date: Tue, 10 Mar 2026 11:50:21 -0400 Subject: [PATCH 05/21] B2026-025_Unicode_removed_from_RO_menu_titles_in_treeview --- PROMS/ReferencedObjects/LibSource/RODBInterface/VlnXml.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/PROMS/ReferencedObjects/LibSource/RODBInterface/VlnXml.cs b/PROMS/ReferencedObjects/LibSource/RODBInterface/VlnXml.cs index d2ddc83a..6a0c10db 100644 --- a/PROMS/ReferencedObjects/LibSource/RODBInterface/VlnXml.cs +++ b/PROMS/ReferencedObjects/LibSource/RODBInterface/VlnXml.cs @@ -518,8 +518,7 @@ namespace RODBInterface strtmp.Append(" "); cnt++; } - // string sym = symbcode < 256 ? ((char)symbcode).ToString() : string.Format(@"\u{0}", symbcode); - text = Regex.Replace(text, @"\\u([0-9]{1,4})\?", m => Convert.ToChar(int.Parse(m.Groups[1].Value)).ToString()); //B2026-025 Unicode removed from RO menu titles in treeview. + text = Regex.Replace(text, @"\\u([0-9]{1,4})\?", m => int.TryParse(m?.Groups[1]?.Value, out int result) ? Convert.ToChar(result).ToString() : ""); //B2026-025 Unicode removed from RO menu titles in treeview. if ((cnt + text.Length) > frmt2) // longer than the field length? strtmp.Append(text.Substring(0,frmt2-cnt)); else From 7636fe76867173b68d3b081e616798c1e835f028 Mon Sep 17 00:00:00 2001 From: Paul Larsen Date: Wed, 11 Mar 2026 20:26:01 -0400 Subject: [PATCH 06/21] B2026-022-Adding-RO-Editor-symbols-to-RO-Tables --- .../Exe/RefObj/ROEditor/ROEditor.cs | 1 + .../LibSource/RODBInterface/RODBInterface.cs | 37 +++++++++++++++++-- PROMS/Volian.Controls.Library/VlnFlexGrid.cs | 16 ++++++++ 3 files changed, 50 insertions(+), 4 deletions(-) diff --git a/PROMS/ReferencedObjects/Exe/RefObj/ROEditor/ROEditor.cs b/PROMS/ReferencedObjects/Exe/RefObj/ROEditor/ROEditor.cs index 3c5a5e99..783ee109 100644 --- a/PROMS/ReferencedObjects/Exe/RefObj/ROEditor/ROEditor.cs +++ b/PROMS/ReferencedObjects/Exe/RefObj/ROEditor/ROEditor.cs @@ -419,6 +419,7 @@ namespace ROEditor System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-US"); // The data path the was passed in. + PassedInPath = @"V:\Active Project Files\Farley PROMS Delivery\2022\RO"; DbConnectPath = PassedInPath; // Setup the context menu diff --git a/PROMS/ReferencedObjects/LibSource/RODBInterface/RODBInterface.cs b/PROMS/ReferencedObjects/LibSource/RODBInterface/RODBInterface.cs index f6ba23fe..2beac2bd 100644 --- a/PROMS/ReferencedObjects/LibSource/RODBInterface/RODBInterface.cs +++ b/PROMS/ReferencedObjects/LibSource/RODBInterface/RODBInterface.cs @@ -2142,7 +2142,21 @@ namespace RODBInterface wraccid = accid; string dt = string.Format("{0:yyyyMMddHHmmss}", System.DateTime.Now); string xmlstr = GenerateXmlString(ro, false); - string strUpdate = "UPDATE " + ro.GetAttribute("Table") + " SET Info = '" + xmlstr + "'"; + StringBuilder xmlstrTmp = new StringBuilder(); // B2026-025 prep the info field data so it will be saved correctly. + char[] chrAry = xmlstr.ToCharArray(); + foreach (int chr in chrAry) + { + if (chr > 166) + + { + xmlstrTmp.Append($"\\u{(int)chr}?"); + } + else + { + xmlstrTmp.Append((char)chr); + } + } + string strUpdate = "UPDATE " + ro.GetAttribute("Table") + " SET Info = '" + xmlstrTmp.ToString() + "'"; if (movedRO) { VlnXmlElement parent = (VlnXmlElement)ro.ParentNode; @@ -2186,6 +2200,21 @@ namespace RODBInterface } string xmlstr = GenerateXmlString(ro, false); + StringBuilder xmlstrTmp = new StringBuilder(); // B2026-025 prep the info field data so it will be saved correctly. + char[] chrAry = xmlstr.ToCharArray(); + foreach (int chr in chrAry) + { + if (chr > 166) + + { + xmlstrTmp.Append($"\\u{(int)chr}?"); + } + else + { + xmlstrTmp.Append((char)chr); + } + } + string wraccid = null; if (ro.HasAttribute("AccPageID")) { @@ -2209,13 +2238,13 @@ namespace RODBInterface // strInsert = "INSERT INTO " + parent.GetAttribute("Table") + "( RecID, RecType, ParentID, AccPageID, ModDateTime, Info ) "; strInsert = "INSERT INTO " + parent.GetAttribute("Table") + "( RecID, RecType, ParentID, ModDateTime, AccPageID, Info ) "; strInsert = strInsert + " VALUES ('" + ro.GetAttribute("RecID") + "'," + (uint)RecordType.Group + ",'" + ro.GetAttribute("ParentID"); - strInsert = strInsert + "','" + wraccid + "','" + dt + "','" + xmlstr + "');"; + strInsert = strInsert + "','" + wraccid + "','" + dt + "','" + xmlstrTmp.ToString() + "');"; } else { strInsert = "INSERT INTO " + parent.GetAttribute("Table") + "( RecID, RecType, ParentID, ModDateTime, Info ) "; strInsert = strInsert + " VALUES ('" + ro.GetAttribute("RecID") + "'," + (uint)RecordType.Group + ",'" + ro.GetAttribute("ParentID"); - strInsert = strInsert + "','" + dt + "','" + xmlstr + "');"; + strInsert = strInsert + "','" + dt + "','" + xmlstrTmp.ToString() + "');"; } } @@ -2223,7 +2252,7 @@ namespace RODBInterface { strInsert = "INSERT INTO " + parent.GetAttribute("Table") + "( RecID, RecType, ParentID, AccPageId, ModDateTime, Info ) "; strInsert = strInsert + " VALUES ('" + ro.GetAttribute("RecID") + "'," + (uint)RecordType.RRO + ",'" + ro.GetAttribute("ParentID"); - strInsert = strInsert + "','" + wraccid + "','" + dt + "','" + xmlstr + "');"; + strInsert = strInsert + "','" + wraccid + "','" + dt + "','" + xmlstrTmp.ToString() + "');"; } try diff --git a/PROMS/Volian.Controls.Library/VlnFlexGrid.cs b/PROMS/Volian.Controls.Library/VlnFlexGrid.cs index ee6162dc..465d323a 100644 --- a/PROMS/Volian.Controls.Library/VlnFlexGrid.cs +++ b/PROMS/Volian.Controls.Library/VlnFlexGrid.cs @@ -2473,6 +2473,19 @@ namespace Volian.Controls.Library private string ConvertTableText(string str) { string rtn = str; + string pattern = @"\\u([0-9]{1,4})\?"; + + string mValue, mValue2 = ""; + foreach (Match match in Regex.Matches(rtn, pattern, RegexOptions.IgnoreCase)) + { + mValue = match.Value; + mValue2 = @"\f1 " + mValue + @"\f0"; + rtn = rtn.Replace(match.Value, mValue2); + // @"\f1\u9474 ?\f0") + // linkValue = linkValue.Replace(match.Value, "\\f1 " + match.Value + "\\f0"); + } + + //ShowRawString(str, "ConvertTableText IN"); rtn = rtn.Replace(@"START]\v0", @"START]\cf1\v0"); rtn = rtn.Replace(@"\v #Link:", @"\cf0\v #Link:"); @@ -3827,6 +3840,9 @@ namespace Volian.Controls.Library this.MergedRanges.Clear(); this.Clear(); this.IsRoTable = true; + //valtext = valtext.Replace(@"\u8209?", "-"); + //valtext = Regex.Replace(valtext, @"\\u([0-9]{1,4})\?", m => int.TryParse(m?.Groups[1]?.Value, out int result) ? Convert.ToChar(result).ToString() : ""); + //valtext = valtext.Replace("-", @"\u8209?"); this.ParseTableFromText(valtext, GridLinePattern.Single); this.AutoSizeCols(); this.AutoSizeRows(); From 83f88b6df3f5af3e451e0b7847b1bd3c203ff7a8 Mon Sep 17 00:00:00 2001 From: mschill Date: Thu, 12 Mar 2026 11:10:04 -0400 Subject: [PATCH 07/21] B2026-031 PROMS Crash in Admin Tools Maintenance - Purge Change History --- PROMS/VEPROMS User Interface/PROMSFixes.Sql | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/PROMS/VEPROMS User Interface/PROMSFixes.Sql b/PROMS/VEPROMS User Interface/PROMSFixes.Sql index 4d6b672e..81fa98e6 100644 --- a/PROMS/VEPROMS User Interface/PROMSFixes.Sql +++ b/PROMS/VEPROMS User Interface/PROMSFixes.Sql @@ -24329,8 +24329,10 @@ BEGIN OR FromID in (Select ContentID from tblContents where deletestatus != 0 and ActionDTS < @dte) ) PRINT 'Deleting Items and Parts' + alter table tblParts nocheck constraint FK_Parts_Items delete from tblItems where deletestatus != 0 and DTS < @dte delete from tblParts where deletestatus != 0 and ItemID Not IN (Select ItemID from Items) and DTS < @dte + alter table tblParts check constraint FK_Parts_Items PRINT 'Purging Parts with deleted Contents' DELETE from Child FROM tblParts AS Child @@ -24355,7 +24357,9 @@ BEGIN ON Itms.ItemID = tblItems.ItemID AND Itms.deletestatus = tblItems.deletestatus alter table tblItems check constraint FK_Items_Items PRINT 'Purging Contents' + alter table tblEntries nocheck constraint FK_Entries_Contents delete from tblContents where deletestatus != 0 and ActionDTS < @dte + alter table tblEntries check constraint FK_Entries_Contents PRINT 'Phase 3' delete from AnnotationAudits where DTS < @dte delete from ContentAudits where DTS < @dte @@ -24766,8 +24770,8 @@ BEGIN TRY -- Try Block DECLARE @RevDate varchar(255) DECLARE @RevDescription varchar(255) - set @RevDate = '02/18/2026 7:00 AM' - set @RevDescription = 'Added Audit Ability for ChangeBars' + set @RevDate = '03/12/2026 11:00 AM' + set @RevDescription = 'Update to Purge Change History Tool' Select cast(@RevDate as datetime) RevDate, @RevDescription RevDescription PRINT 'SQL Code Revision ' + @RevDate + ' - ' + @RevDescription From c2a5a8ec7dc98c73280a6a9542d4b6c05cb4583c Mon Sep 17 00:00:00 2001 From: mschill Date: Thu, 12 Mar 2026 14:35:32 -0400 Subject: [PATCH 08/21] Revert Clipboard B2025-064 --- PROMS/Volian.Controls.Library/StepTabRibbon.cs | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/PROMS/Volian.Controls.Library/StepTabRibbon.cs b/PROMS/Volian.Controls.Library/StepTabRibbon.cs index 06f8474e..1b3ec4c0 100644 --- a/PROMS/Volian.Controls.Library/StepTabRibbon.cs +++ b/PROMS/Volian.Controls.Library/StepTabRibbon.cs @@ -1668,20 +1668,8 @@ namespace Volian.Controls.Library } Clipboard.Clear(); - //Try to update the data object to persist beyond PROMS life - //if can't, log it and use old method of scoping clipboard to PROMS life - try - { - // noticed that sometimes the clipboard will get stuck - so set it to retry twice - // and if it fails, scope the clipboard to within PROMS - Clipboard.SetDataObject(myDO, true, 2, 100); // this saves the cleaned up information to the Windows clipboard - } - catch (System.Runtime.InteropServices.ExternalException ex) - { - _MyLog.Warn($"Error Setting Clipboard Object to Persist beyond PROMS. Clipboard will be scoped to PROMS. Error:{ex.Message}"); - Clipboard.SetDataObject(myDO); // this saves the cleaned up information to the Windows clipboard - } - } + Clipboard.SetDataObject(myDO); // this saves the cleaned up information to the Windows clipboard + } iData = Clipboard.GetDataObject(); bool noEquationData = true; // part of bug B2017-117 we were running out of window handles when printing, found this similar use of From ed615dbb31a4daa491d2b1b5fda5a8f264bed385 Mon Sep 17 00:00:00 2001 From: Paul Larsen Date: Mon, 16 Mar 2026 13:30:36 -0400 Subject: [PATCH 09/21] B2026-022-Adding-RO-Editor-symbols-to-RO-Tables --- PROMS/ReferencedObjects/Exe/RefObj/ROEditor/ROEditor.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/PROMS/ReferencedObjects/Exe/RefObj/ROEditor/ROEditor.cs b/PROMS/ReferencedObjects/Exe/RefObj/ROEditor/ROEditor.cs index 783ee109..fe7edb61 100644 --- a/PROMS/ReferencedObjects/Exe/RefObj/ROEditor/ROEditor.cs +++ b/PROMS/ReferencedObjects/Exe/RefObj/ROEditor/ROEditor.cs @@ -418,8 +418,7 @@ namespace ROEditor // NOTE: not doing the "Using System.Threading;" statement at beginning of file because it conflicts with the declaration of the "Timer" variable System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-US"); - // The data path the was passed in. - PassedInPath = @"V:\Active Project Files\Farley PROMS Delivery\2022\RO"; + // The data path the was passed in. DbConnectPath = PassedInPath; // Setup the context menu From 294d19e9d1809c46201bd05be8fdeb2a2a7ea2cb Mon Sep 17 00:00:00 2001 From: John Jenko Date: Mon, 16 Mar 2026 14:32:57 -0400 Subject: [PATCH 10/21] C2026-030 Barakah asked that the white space between the procedure number and procedure title be reduced when the KEPCO number is not printed --- PROMS/Formats/fmtall/BNPP1Newall.xml | Bin 243444 -> 243848 bytes PROMS/Formats/fmtall/BNPP1all.xml | Bin 184806 -> 185210 bytes PROMS/Formats/fmtall/BNPP2all.xml | Bin 199004 -> 199362 bytes PROMS/Formats/fmtall/BNPPalrall.xml | Bin 236928 -> 237646 bytes PROMS/Formats/fmtall/BNPPbckall.xml | Bin 163138 -> 163542 bytes 5 files changed, 0 insertions(+), 0 deletions(-) diff --git a/PROMS/Formats/fmtall/BNPP1Newall.xml b/PROMS/Formats/fmtall/BNPP1Newall.xml index 95276f4217c984caebcdebd59c33df3208539663..c58da4beead2cd33a138339f7530782688a0fb57 100644 GIT binary patch delta 170 zcmezJmapR@UqcIH3)2*4mFWgT%sSKk!kK4HuaaZdn110ulg;D=WuEB@!pwFcaVh2+ zhUn?F5zMl}u?)2gN(>4NK@9l}he g9+*lkrVIEoYi-{U$^49C`UQDrh3%WTnVnVx07)G)^Z)<= delta 46 zcmV+}0MY-5@ecIu4uFIKgaVWUB$u!^11Oi=0s|PA@aO_Kw=`J;_6nEqTLU7uNDTu( EtGs{_=Kufz diff --git a/PROMS/Formats/fmtall/BNPP1all.xml b/PROMS/Formats/fmtall/BNPP1all.xml index 8a25a67ff401e2e7e30ce89cd69df32d0405312d..1e852979510272e5696d8a6c97d147e1b5255cdf 100644 GIT binary patch delta 229 zcmaF1nETf1Th2vu|JR>!r%$SK0vWphFS(C1_hvaK0`T!Es$+A tU2qDM@U&@6EYtNunGEn6FHgYm>5k4!!qXMPu)ET)nMrHAS~$~zDge-@Iu-x` delta 94 zcmeyhjQiPQ?uHh|Ell%5rYpEGX-q#8!Zc&L!wW`^=@T58B&G{QFxgCRIKjj<{eUBr e!E}Q#CYk9D)l34@7lbo;;8LfzeL@7&t119oCLvV- diff --git a/PROMS/Formats/fmtall/BNPP2all.xml b/PROMS/Formats/fmtall/BNPP2all.xml index 44e5776885634668ca497557c74a0ceb46c4a554..f7193fd06bab7f9443c02a6111415adb9bf70535 100644 GIT binary patch delta 91 zcmcaJiRaK%o`x32Eldl7rVD5=u}zN)WRhU6VThhSKZr?IJeHxBL5V?uA&4QLp`5`M o$TngyWiXw7F^K8)^a&139ANc~5Y>#a(!mFLbRo`x32Eldl7rXLDol9^uT$|SJeD1>RkHUPA+3q=3` diff --git a/PROMS/Formats/fmtall/BNPPalrall.xml b/PROMS/Formats/fmtall/BNPPalrall.xml index f0c58c99d1c7222cab4959c585f5669f7b7ee825..58b11ba9d32e29e7dbed94e42cc9ce01b0ec172c 100644 GIT binary patch delta 198 zcmZqJ&3EnqUqcJy7ACU=(-$0IVw=81n^}OP(`BCGZr%KncmRPqz5*M8)i}s)GYB>hFS(C1_g#7hJ1!{23sK8h{24( rVtSxHbMEvB(#%Z=8&EVu?eJZ|6g@q_g?YtvJ~n2p?Rkrsgnk16Ql2^H delta 74 zcmX?ifUjXUUqcJy7ACU=(;vt&7ft_nkV#?sf%!~j(+xP7#ilz{F$qoo;Lhv?mnfP3 W!H~HG#8sN!;K{79{lZeFx?cc_+8>Po diff --git a/PROMS/Formats/fmtall/BNPPbckall.xml b/PROMS/Formats/fmtall/BNPPbckall.xml index 5c1811e0b91a3744e75ebffd2caaef34960139b2..073abde92f5c93e4c0abf61a33abd310f339a743 100644 GIT binary patch delta 208 zcmX@~i}TuF&W0AoEld>}(^s5i1IJpe5lGKm}?lKr=Qhik`<3-sAW)MP+$mR$Y&^Lum!S>7)%*Vryo>jawgI+Mu<_2 cvC|XnnS@!57%UhJh|qt;m&s|HHj`5j0RF#0Z~y=R delta 85 zcmccim-Ems&W0AoEld>}(;FO^G^QJ9Gf7O}r@_=P{htw&!t__#Og7UKG=O3OW=u-c oxwM#MrXP@H5@0oAuw*cveo&oh`*a6gph5#VCavvLbeNoi0P#Z_WB>pF From bc3c14589ec34b2b162c13ab5f304abd1ee6099d Mon Sep 17 00:00:00 2001 From: mschill Date: Mon, 16 Mar 2026 14:45:04 -0400 Subject: [PATCH 11/21] C2026-007 Upgrade - Generate Missing Word Attachments/B2026-027 Update Refresh Tables For Search Tooltip --- PROMS/VEPROMS User Interface/PROMSFixes.Sql | 44 +++- .../frmBatchRefresh.Designer.cs | 53 ++++- .../VEPROMS User Interface/frmBatchRefresh.cs | 127 +++++++++++- .../frmBatchRefresh.resx | 191 +++++++++--------- .../Extension/DocumentExt.cs | 72 +++---- PROMS/VEPROMS.CSLA.Library/Generated/Pdf.cs | 21 +- .../Minimal/Maintenance.cs | 35 +++- 7 files changed, 388 insertions(+), 155 deletions(-) diff --git a/PROMS/VEPROMS User Interface/PROMSFixes.Sql b/PROMS/VEPROMS User Interface/PROMSFixes.Sql index 81fa98e6..0cbd1891 100644 --- a/PROMS/VEPROMS User Interface/PROMSFixes.Sql +++ b/PROMS/VEPROMS User Interface/PROMSFixes.Sql @@ -24736,6 +24736,46 @@ GO ========================================================================================================== */ +IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[GetMissingDocsByUnit]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1) + DROP PROCEDURE [GetMissingDocsByUnit]; + +GO + +-- ============================================= +-- Author: Matthew Schill +-- Create date: 02/27/2026 +-- Description: Get Missing Docs by Unit for Generating Pdf table +-- ============================================= +CREATE PROCEDURE [dbo].[GetMissingDocsByUnit] +AS +BEGIN + + select Docs.DocID, UnitID, SectionID = MIN(SectionID) + FROM + (SELECT DISTINCT [DocID] + FROM [VEPROMS_Barakah].[dbo].[tblDocuments]) Docs + INNER JOIN Entries on Docs.DocID = Entries.DocID + INNER JOIN Contents on Entries.ContentID = Contents.ContentID + inner join Items on Items.ContentID = Contents.ContentID + outer apply + (Select UnitID = ID FROM dbo.vefn_SplitInt([dbo].[ve_GetItemDerivedApplicability](Items.ItemID),',')) Unit + outer apply + (Select TOP 1 SectionID = ItemID FROM Contents SecC where SecC.ContentID = Contents.ContentID + AND (SecC.Type / 10000) = 1 + AND dbo.vefn_GetVersionIDByItemID(ItemID) IS NOT NULL + ) Section + left outer join Pdfs on Pdfs.DocID = Docs.DocID AND Pdfs.DebugStatus = CASE WHEN UNITID IS NULL THEN 0 ELSE UnitID * 10 END + WHERE Pdfs.DocID IS NULL + AND SectionID IS NOT NULL + Group by Docs.DocID, UnitID + order by Docs.DocID, UnitID + + RETURN +END + +IF (@@Error = 0) PRINT 'Procedure Creation: [GetMissingDocsByUnit] Succeeded' +ELSE PRINT 'Procedure Creation: [GetMissingDocsByUnit] Error on Creation' +GO /* --------------------------------------------------------------------------- @@ -24770,8 +24810,8 @@ BEGIN TRY -- Try Block DECLARE @RevDate varchar(255) DECLARE @RevDescription varchar(255) - set @RevDate = '03/12/2026 11:00 AM' - set @RevDescription = 'Update to Purge Change History Tool' + set @RevDate = '03/13/2026 7:00 AM' + set @RevDescription = 'Added Get Missing Docs by Unit for Generating Pdf table' Select cast(@RevDate as datetime) RevDate, @RevDescription RevDescription PRINT 'SQL Code Revision ' + @RevDate + ' - ' + @RevDescription diff --git a/PROMS/VEPROMS User Interface/frmBatchRefresh.Designer.cs b/PROMS/VEPROMS User Interface/frmBatchRefresh.Designer.cs index 7cc148dd..41c381d5 100644 --- a/PROMS/VEPROMS User Interface/frmBatchRefresh.Designer.cs +++ b/PROMS/VEPROMS User Interface/frmBatchRefresh.Designer.cs @@ -113,6 +113,8 @@ this.lblAdmToolProgressType = new DevComponents.DotNetBar.LabelX(); this.buttonItem1 = new DevComponents.DotNetBar.ButtonItem(); this.superTooltip1 = new DevComponents.DotNetBar.SuperTooltip(); + this.swRegenWordAttmts = new DevComponents.DotNetBar.Controls.SwitchButton(); + this.labelX1 = new DevComponents.DotNetBar.LabelX(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).BeginInit(); this.splitContainer3.Panel1.SuspendLayout(); this.splitContainer3.Panel2.SuspendLayout(); @@ -902,6 +904,8 @@ // // sideNavPanel2 // + this.sideNavPanel2.Controls.Add(this.swRegenWordAttmts); + this.sideNavPanel2.Controls.Add(this.labelX1); this.sideNavPanel2.Controls.Add(this.swRefreshTblsForSrch); this.sideNavPanel2.Controls.Add(this.lblRefreshTblForSrch); this.sideNavPanel2.Controls.Add(this.warningBox4); @@ -930,11 +934,11 @@ // // this.swRefreshTblsForSrch.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.swRefreshTblsForSrch.Location = new System.Drawing.Point(10, 153); + this.swRefreshTblsForSrch.Location = new System.Drawing.Point(10, 178); this.swRefreshTblsForSrch.Name = "swRefreshTblsForSrch"; this.swRefreshTblsForSrch.Size = new System.Drawing.Size(91, 22); this.swRefreshTblsForSrch.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.superTooltip1.SetSuperTooltip(this.swRefreshTblsForSrch, new DevComponents.DotNetBar.SuperTooltipInfo("Refresh Word Attachments", "", resources.GetString("swRefreshTblsForSrch.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(300, 200))); + this.superTooltip1.SetSuperTooltip(this.swRefreshTblsForSrch, new DevComponents.DotNetBar.SuperTooltipInfo("Refesh Tables For Search", "", resources.GetString("swRefreshTblsForSrch.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(300, 125))); this.swRefreshTblsForSrch.SwitchClickTogglesValue = true; this.swRefreshTblsForSrch.TabIndex = 32; this.swRefreshTblsForSrch.Value = true; @@ -949,10 +953,10 @@ // this.lblRefreshTblForSrch.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; this.lblRefreshTblForSrch.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblRefreshTblForSrch.Location = new System.Drawing.Point(107, 153); + this.lblRefreshTblForSrch.Location = new System.Drawing.Point(107, 178); this.lblRefreshTblForSrch.Name = "lblRefreshTblForSrch"; this.lblRefreshTblForSrch.Size = new System.Drawing.Size(186, 22); - this.superTooltip1.SetSuperTooltip(this.lblRefreshTblForSrch, new DevComponents.DotNetBar.SuperTooltipInfo("Refresh Word Attachments", "", resources.GetString("lblRefreshTblForSrch.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(300, 200))); + this.superTooltip1.SetSuperTooltip(this.lblRefreshTblForSrch, new DevComponents.DotNetBar.SuperTooltipInfo("Refresh Tables For Search", "", resources.GetString("lblRefreshTblForSrch.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(300, 125))); this.lblRefreshTblForSrch.TabIndex = 31; this.lblRefreshTblForSrch.Text = "Refresh Tables For Search"; // @@ -961,7 +965,7 @@ this.warningBox4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(196)))), ((int)(((byte)(219)))), ((int)(((byte)(249))))); this.warningBox4.CloseButtonVisible = false; this.warningBox4.Image = ((System.Drawing.Image)(resources.GetObject("warningBox4.Image"))); - this.warningBox4.Location = new System.Drawing.Point(12, 264); + this.warningBox4.Location = new System.Drawing.Point(12, 287); this.warningBox4.Margin = new System.Windows.Forms.Padding(4); this.warningBox4.Name = "warningBox4"; this.warningBox4.OptionsButtonVisible = false; @@ -974,7 +978,7 @@ this.warningBox2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(196)))), ((int)(((byte)(219)))), ((int)(((byte)(249))))); this.warningBox2.CloseButtonVisible = false; this.warningBox2.Image = ((System.Drawing.Image)(resources.GetObject("warningBox2.Image"))); - this.warningBox2.Location = new System.Drawing.Point(12, 302); + this.warningBox2.Location = new System.Drawing.Point(12, 325); this.warningBox2.Margin = new System.Windows.Forms.Padding(4); this.warningBox2.Name = "warningBox2"; this.warningBox2.OptionsButtonVisible = false; @@ -1128,7 +1132,7 @@ // line2 // this.line2.BackColor = System.Drawing.Color.Transparent; - this.line2.Location = new System.Drawing.Point(4, 237); + this.line2.Location = new System.Drawing.Point(4, 260); this.line2.Name = "line2"; this.line2.Size = new System.Drawing.Size(281, 12); this.line2.TabIndex = 20; @@ -1140,7 +1144,7 @@ this.btnRunRepair.Checked = true; this.btnRunRepair.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; this.btnRunRepair.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnRunRepair.Location = new System.Drawing.Point(5, 198); + this.btnRunRepair.Location = new System.Drawing.Point(5, 221); this.btnRunRepair.Name = "btnRunRepair"; this.btnRunRepair.Size = new System.Drawing.Size(280, 23); this.btnRunRepair.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; @@ -1303,6 +1307,37 @@ this.superTooltip1.DefaultTooltipSettings = new DevComponents.DotNetBar.SuperTooltipInfo("", "", "", null, null, DevComponents.DotNetBar.eTooltipColor.Gray); this.superTooltip1.LicenseKey = "F962CEC7-CD8F-4911-A9E9-CAB39962FC1F"; // + // swRegenWordAttmts + // + // + // + // + this.swRegenWordAttmts.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.swRegenWordAttmts.Location = new System.Drawing.Point(10, 150); + this.swRegenWordAttmts.Name = "swRegenWordAttmts"; + this.swRegenWordAttmts.Size = new System.Drawing.Size(91, 22); + this.swRegenWordAttmts.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.superTooltip1.SetSuperTooltip(this.swRegenWordAttmts, new DevComponents.DotNetBar.SuperTooltipInfo("Generate Word Attachments", "", resources.GetString("swRegenWordAttmts.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(300, 200))); + this.swRegenWordAttmts.SwitchClickTogglesValue = true; + this.swRegenWordAttmts.TabIndex = 34; + this.swRegenWordAttmts.Value = true; + this.swRegenWordAttmts.ValueObject = "Y"; + // + // labelX1 + // + this.labelX1.BackColor = System.Drawing.Color.Transparent; + // + // + // + this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.labelX1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.labelX1.Location = new System.Drawing.Point(107, 150); + this.labelX1.Name = "labelX1"; + this.labelX1.Size = new System.Drawing.Size(186, 22); + this.superTooltip1.SetSuperTooltip(this.labelX1, new DevComponents.DotNetBar.SuperTooltipInfo("Generate Word Attachments", "", resources.GetString("labelX1.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(300, 200))); + this.labelX1.TabIndex = 33; + this.labelX1.Text = "Generate Missing Word Attachments"; + // // frmBatchRefresh // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -1430,6 +1465,8 @@ private DevComponents.DotNetBar.PanelEx itemPanel2; private DevComponents.DotNetBar.PanelEx itemPanel3; private DevComponents.DotNetBar.ButtonX btnROsNotUsed; + private DevComponents.DotNetBar.Controls.SwitchButton swRegenWordAttmts; + private DevComponents.DotNetBar.LabelX labelX1; } } diff --git a/PROMS/VEPROMS User Interface/frmBatchRefresh.cs b/PROMS/VEPROMS User Interface/frmBatchRefresh.cs index 249ddb19..0af71439 100644 --- a/PROMS/VEPROMS User Interface/frmBatchRefresh.cs +++ b/PROMS/VEPROMS User Interface/frmBatchRefresh.cs @@ -62,6 +62,8 @@ namespace VEPROMS swRmObsoleteROData.Enabled = false; swRmOrphanDataRecs.Enabled = false; swRefreshWordAttmts.Enabled = false; + swRegenWordAttmts.Enabled = false; + swRefreshTblsForSrch.Enabled = false; swStandardHypenChars.Enabled = false; //if not full admin, disable Purge Change History @@ -648,11 +650,111 @@ namespace VEPROMS this.Cursor = Cursors.Default; } - // B2022-047 - refresh the Content/Text field for table, i.e. Grid, Data so that search will find text in the Grid - // NOTE that an out of memeory error occurs when having to process alot of tables. A config flag is used on the - // grid record to flag that this operation has been run. And a message is placed in the result window stating to - // rerun until all tables/text fields are completed. - private void RefreshTablesForSearch() + private int RegenCounter = 0; + private int RegenTotal = 0; + private const int TicksToupdate = 300000; //5 minutes(300 seconds). + + // C2026-007 - Generate Missing PDFs + // regenerates the saved attachment PDFs from the database + // so that this is not needed the next time the procedures are printed. This also forces ROs to be refreshed in the attachments + private void RegenPDFs() + { + this.Cursor = Cursors.WaitCursor; + DateTime pStart = DateTime.Now; + txtProcess.AppendText("Generating missing Word Attachments"); + txtProcess.AppendText(Environment.NewLine); + txtProcess.AppendText(string.Format("Started: {0}", pStart.ToString("MM/dd/yyyy @ HH:mm"))); + txtProcess.AppendText(Environment.NewLine); + txtProcess.AppendText("Gathering data for Word Attachments that need generated."); + txtProcess.AppendText(Environment.NewLine); + Application.DoEvents(); + + //get data of missing Docs by Unit that will need regenerated + DataTable dt = Maintenance.GetMissingDocsByUnit(); + RegenCounter = 0; + RegenTotal = dt.Rows.Count; + txtProcess.AppendText($"Word Attachments to be generated: {RegenTotal}"); + txtProcess.AppendText(Environment.NewLine); + txtProcess.AppendText(Environment.NewLine); + txtProcess.AppendText($"Note that this will provide updates approximately every {TicksToupdate/60000} minutes. Some attachments may take longer than others due to size/number of pages/number of ROs. If PROMS is in the middle of generating a large attachment, it may delay the update message until generation of that attachment completes (in that case taking more than 5 minutes between updates)."); + txtProcess.AppendText(Environment.NewLine); + txtProcess.AppendText(Environment.NewLine); + txtResults.AppendText($"{RegenTotal} Word Attachments to be generated."); + txtResults.AppendText(Environment.NewLine); + txtResults.AppendText(Environment.NewLine); + + //generate as if not debug + int debugstatus = MSWordToPDF.DebugStatus; + MSWordToPDF.DebugStatus = 0; + MSWordToPDF.OverrideColor = Color.Transparent; + + Timer timer1 = new Timer(); + timer1.Tick += new EventHandler(UpdateRegenProgress); + timer1.Interval = TicksToupdate; + timer1.Start(); + + foreach (DataRow dr in dt.Rows) + { + //Do Generation + using (Section sect = Section.Get((int)dr["SectionID"])) + { + using (DocumentInfo docInfo = DocumentInfo.Get((int)dr["DocID"])) + { + if (!dr.IsNull("UnitID")) sect.MyItemInfo.MyDocVersion.DocVersionConfig.SelectedSlave = (int)dr["UnitID"]; + MSWordToPDF.SetDocPdf(docInfo, sect.MyItemInfo); + } + } + + //Increment - message every _ minutes + RegenCounter++; + } + + //done with loop - stop timer and destroy it + timer1.Stop(); + timer1.Dispose(); + + //Change DebugStatus Back to what it was + if (debugstatus == 1) + { + MSWordToPDF.DebugStatus = 1; + MSWordToPDF.OverrideColor = Color.Red; + } + else + { + MSWordToPDF.DebugStatus = 0; + MSWordToPDF.OverrideColor = Color.Transparent; + } + + //end messaging + txtProcess.AppendText(Environment.NewLine); + txtProcess.AppendText($"Word Attachments Generated: {RegenTotal}"); + txtProcess.AppendText(Environment.NewLine); + txtResults.AppendText(Environment.NewLine); + txtResults.AppendText($"{RegenTotal} Word Attachments generated."); + txtResults.AppendText(Environment.NewLine); + txtResults.AppendText(Environment.NewLine); + txtProcess.AppendText($"Completed: {DateTime.Now:G}"); + txtProcess.AppendText(Environment.NewLine); + txtProcess.AppendText(Environment.NewLine); + Application.DoEvents(); + this.Cursor = Cursors.Default; + } + + //Outputs the Progress of Regenerating the PDFs every __ minutes + private void UpdateRegenProgress(Object myObject, EventArgs myEventArgs) + { + string progress_str = $"Generated {RegenCounter} of {RegenTotal} ({(decimal)RegenCounter / RegenTotal * 100M:F2}%): {DateTime.Now:G}"; + txtProcess.AppendText(progress_str); + txtProcess.AppendText(Environment.NewLine); + txtResults.AppendText(progress_str); + txtResults.AppendText(Environment.NewLine); + } + + // B2022-047 - refresh the Content/Text field for table, i.e. Grid, Data so that search will find text in the Grid + // NOTE that an out of memeory error occurs when having to process alot of tables. A config flag is used on the + // grid record to flag that this operation has been run. And a message is placed in the result window stating to + // rerun until all tables/text fields are completed. + private void RefreshTablesForSearch() { this.Cursor = Cursors.WaitCursor; DateTime pStart = DateTime.Now; @@ -1305,7 +1407,8 @@ namespace VEPROMS DevComponents.DotNetBar.StepItem siObsoleteROData = new DevComponents.DotNetBar.StepItem("siObsoleteROData", "Obsolete RO Data"); DevComponents.DotNetBar.StepItem siStandardHyphens = new DevComponents.DotNetBar.StepItem("siStandardHyphens", "Standardize Hyphens"); DevComponents.DotNetBar.StepItem siRefreshAttmts = new DevComponents.DotNetBar.StepItem("siRefreshAttmts", "Refresh Word Attachments"); - DevComponents.DotNetBar.StepItem siRefreshTblsSrchTxt = new DevComponents.DotNetBar.StepItem("siRefreshTblsSrchTxt", "Refresh Tables For Search"); + DevComponents.DotNetBar.StepItem siRegenAttmts = new DevComponents.DotNetBar.StepItem("siRegenAttmts", "Regenerate Word Attachments"); + DevComponents.DotNetBar.StepItem siRefreshTblsSrchTxt = new DevComponents.DotNetBar.StepItem("siRefreshTblsSrchTxt", "Refresh Tables For Search"); // this will update/rebuild the progress bar in the bottom panel of Admin Tools private void setupProgessSteps1() { @@ -1323,7 +1426,9 @@ namespace VEPROMS progressSteps1.Items.Add(siStandardHyphens); if (swRefreshWordAttmts.Value) progressSteps1.Items.Add(siRefreshAttmts); - if (swRefreshTblsForSrch.Value) + if (swRegenWordAttmts.Value) + progressSteps1.Items.Add(siRegenAttmts); + if (swRefreshTblsForSrch.Value) progressSteps1.Items.Add(siRefreshTblsSrchTxt); splitContainer3.Panel2Collapsed = false; progressSteps1.Visible = true; @@ -1487,7 +1592,13 @@ namespace VEPROMS DeletePDFs(); // refresh word attachments StepProgress(prgStpIdx, 100); } - if (swRefreshTblsForSrch.Value) + if (swRegenWordAttmts.Value) + { + StepProgress(++prgStpIdx, 50); + RegenPDFs(); // generate missing pdfs + StepProgress(prgStpIdx, 100); + } + if (swRefreshTblsForSrch.Value) { StepProgress(++prgStpIdx, 50); RefreshTablesForSearch(); diff --git a/PROMS/VEPROMS User Interface/frmBatchRefresh.resx b/PROMS/VEPROMS User Interface/frmBatchRefresh.resx index 7e66d1f3..15533721 100644 --- a/PROMS/VEPROMS User Interface/frmBatchRefresh.resx +++ b/PROMS/VEPROMS User Interface/frmBatchRefresh.resx @@ -117,108 +117,30 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - Purges all audit information and change history older than the above date. -It is recommended that you perform a database backup before performing this action. -Note after purging the information, this will automatically perform the Index -Maintenance function to realign indexes with the cut down audit data. -Only Full PROMS Administrator Users can perform this action. - - - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAp5JREFUOE+F - k11Ik1Ecxv9zouJ2E4TWnR8V5tAppJmYsLnNlaLTxAoiKIQiibpYSmEEmSSa0IVGISMUw7rpE+yiQiuk - /IhROssPyjanpL4udeq29z3nCdcH+Wb1g+fq/zzP+R8Oh+gvPK4kNWujp1IrPek8S5Hy+X9hbXSN9aVC - eq1FwEYN8vk/mWqiDPZwI+NOHbhLj8CdDaK7npLlvnWpO0AKqZV62YgO/GMquDMN0rAevkbqlHvXZdlG - h6Rn8eATu4GJncB0Fvh8HnwPYuGpJ4vcvwZbGYWJrcpPzGXG8ngGtsZFQJOggrS0B9J0MbwNIR9uHqRQ - ee4XPhuVSy814IIB/lk9QkIIanUomFgIzkux0qHB/CUqk+eCtB2jCLEl1M1mLcBSLthKHlQqJaKjw8FZ - Mbi/ENKXEizUKD/f2k9h8jz5mumk2K0F9xUAUgE4K0JUVDji4yLBvflgMyYwlxFL9zSYq6ITa8I3DlNY - wKZ0soVSgFkAXgwuFSEmJhJJiWqwCR3YSCbY2x0QB4zwnFc6W4p+22KxiY4EXiQF74kf6/L5vdi+TYV0 - rRpsMB2sPxWsRwvpTTq87QmYOUNHg+HqQlL4ryscbK4UPGD5vu60CWw8G7evbkN7bSykXm0w/FMBew6E - CsXQFQMpaLKezP6OLeDL+8AFM5hLBzaciennKcFXUCgI7o7ENQWSfRcWmmPgPEW5tNJIj8QxM9hkDthY - FthAGlh/SvAPXC7fjOrjmyC+Sl5TsCpfdzYEK92llUbllDiaD3HEDPG9CaLDCGnI9IdEhwnioBHiOwMC - dj38fYbVglHy1FGJt57uL9ZS10IN9cxfJPvXCzTgqSKH5xwNzVXSkFBBDsFKA4KV7IKVegQrda2e7j5N - ud8AKwnMnBpmYFAAAAAASUVORK5CYII= - - - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAp5JREFUOE+F - k11Ik1Ecxv9zouJ2E4TWnR8V5tAppJmYsLnNlaLTxAoiKIQiibpYSmEEmSSa0IVGISMUw7rpE+yiQiuk - /IhROssPyjanpL4udeq29z3nCdcH+Wb1g+fq/zzP+R8Oh+gvPK4kNWujp1IrPek8S5Hy+X9hbXSN9aVC - eq1FwEYN8vk/mWqiDPZwI+NOHbhLj8CdDaK7npLlvnWpO0AKqZV62YgO/GMquDMN0rAevkbqlHvXZdlG - h6Rn8eATu4GJncB0Fvh8HnwPYuGpJ4vcvwZbGYWJrcpPzGXG8ngGtsZFQJOggrS0B9J0MbwNIR9uHqRQ - ee4XPhuVSy814IIB/lk9QkIIanUomFgIzkux0qHB/CUqk+eCtB2jCLEl1M1mLcBSLthKHlQqJaKjw8FZ - Mbi/ENKXEizUKD/f2k9h8jz5mumk2K0F9xUAUgE4K0JUVDji4yLBvflgMyYwlxFL9zSYq6ITa8I3DlNY - wKZ0soVSgFkAXgwuFSEmJhJJiWqwCR3YSCbY2x0QB4zwnFc6W4p+22KxiY4EXiQF74kf6/L5vdi+TYV0 - rRpsMB2sPxWsRwvpTTq87QmYOUNHg+HqQlL4ryscbK4UPGD5vu60CWw8G7evbkN7bSykXm0w/FMBew6E - CsXQFQMpaLKezP6OLeDL+8AFM5hLBzaciennKcFXUCgI7o7ENQWSfRcWmmPgPEW5tNJIj8QxM9hkDthY - FthAGlh/SvAPXC7fjOrjmyC+Sl5TsCpfdzYEK92llUbllDiaD3HEDPG9CaLDCGnI9IdEhwnioBHiOwMC - dj38fYbVglHy1FGJt57uL9ZS10IN9cxfJPvXCzTgqSKH5xwNzVXSkFBBDsFKA4KV7IKVegQrda2e7j5N - ud8AKwnMnBpmYFAAAAAASUVORK5CYII= - - - - This will perform Index Maintenance to realign indexes to optimize performance. -This function will cause no change to data or records in PROMS. -It should however be performed when other users are not in PROMS, as it could -cause slowdown or errors for other users while it is running. - - + 17, 17 - - - This allows the user to remove folders and sub folders as well as their contents. - -Be sure a current backup of the database exists prior performing this function. - -It is recommended that this be done during off hours. + + + When Word attachments are modified and saved, PROMS will create a PDF of the attachment contents and save it in the database. When this is done, all the of the RO references are resolved as well as pagination of the attachment. This speeds up the overall printing of the procedure in that PROMS simply inserts the attachment contents. Certain actions like loading a new RO.FST require that these PDFs be regenerated which is normally done at print time. +This function will generate (and save) any missing saved attachment PDFS stored in the database (not the PDFs of the entire procedure that you had previous printed). This will cause printing to be faster when you print after this as the PDFs will be pre-genrated in those cases (and thus not require regeneration unless changes were made to the Word Sections or ROs after running this). - - This allows the user to remove folders and sub folders as well as their contents. - -Be sure a current backup of the database exists prior performing this function. - -It is recommended that this be done during off hours. + + When Word attachments are modified and saved, PROMS will create a PDF of the attachment contents and save it in the database. When this is done, all the of the RO references are resolved as well as pagination of the attachment. This speeds up the overall printing of the procedure in that PROMS simply inserts the attachment contents. Certain actions like loading a new RO.FST require that these PDFs be regenerated which is normally done at print time. +This function will generate (and save) any missing saved attachment PDFS stored in the database (not the PDFs of the entire procedure that you had previous printed). This will cause printing to be faster when you print after this as the PDFs will be pre-genrated in those cases (and thus not require regeneration unless changes were made to the Word Sections or ROs after running this). - - - This function will allow the user to remove annotations from the selected working drafts. - -Be sure a current backup of the database exists prior to running this function. - -If more than one working draft is selected, it is recommended that this be performed during off hours. - - - This function will allow the user to remove annotations from the selected working drafts. - -Be sure a current backup of the database exists prior to running this function. - -If more than one working draft is selected, it is recommended that this be performed during off hours. - - - This will allow for the deletion of groups of annotations and allow for deleting entire folders within PROMS. Use the tree nodes to select which items to delete. - -Click on the on/off switches to turn on/off each tool. - -Note that only one of these tools can be run at a time. - When Word attachments are modified and saved, PROMS will create a PDF of the attachment contents and save it in the database. When this is done, all the of the RO references are resolved as well as pagination of the attachment. This speeds up the overall printing of the procedure in that PROMS simply inserts the attachment contents. - -This function will remove all of the saved attachment PDFS stored in the database (not the PDFs of the entire procedure that you had previous printed). This will force PROMS to regenerate (and save) the word attachment PDFs the next time the procedure is printed. + To allow for a quicker search of the contents within a PROMS Step editor table, a text version of the table is stored separately. If the PROMS Search function is not finding something in a table, this tool will refresh the content of that separately stored table text. Another search should then be performed for the content that was not originally found. - When Word attachments are modified and saved, PROMS will create a PDF of the attachment contents and save it in the database. When this is done, all the of the RO references are resolved as well as pagination of the attachment. This speeds up the overall printing of the procedure in that PROMS simply inserts the attachment contents. - -This function will remove all of the saved attachment PDFS stored in the database (not the PDFs of the entire procedure that you had previous printed). This will force PROMS to regenerate (and save) the word attachment PDFs the next time the procedure is printed. + To allow for a quicker search of the contents within a PROMS Step editor table, a text version of the table is stored separately. If the PROMS Search function is not finding something in a table, this tool will refresh the content of that separately stored table text. Another search should then be performed for the content that was not originally found. + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAp5JREFUOE+F @@ -302,6 +224,53 @@ Should an item become orphaned (disconnected) from the rest of the data, it will Should an item become orphaned (disconnected) from the rest of the data, it will no longer be accessible. This tool removes any orphaned items from the database. + + + Purges all audit information and change history older than the above date. +It is recommended that you perform a database backup before performing this action. +Note after purging the information, this will automatically perform the Index +Maintenance function to realign indexes with the cut down audit data. +Only Full PROMS Administrator Users can perform this action. + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAp5JREFUOE+F + k11Ik1Ecxv9zouJ2E4TWnR8V5tAppJmYsLnNlaLTxAoiKIQiibpYSmEEmSSa0IVGISMUw7rpE+yiQiuk + /IhROssPyjanpL4udeq29z3nCdcH+Wb1g+fq/zzP+R8Oh+gvPK4kNWujp1IrPek8S5Hy+X9hbXSN9aVC + eq1FwEYN8vk/mWqiDPZwI+NOHbhLj8CdDaK7npLlvnWpO0AKqZV62YgO/GMquDMN0rAevkbqlHvXZdlG + h6Rn8eATu4GJncB0Fvh8HnwPYuGpJ4vcvwZbGYWJrcpPzGXG8ngGtsZFQJOggrS0B9J0MbwNIR9uHqRQ + ee4XPhuVSy814IIB/lk9QkIIanUomFgIzkux0qHB/CUqk+eCtB2jCLEl1M1mLcBSLthKHlQqJaKjw8FZ + Mbi/ENKXEizUKD/f2k9h8jz5mumk2K0F9xUAUgE4K0JUVDji4yLBvflgMyYwlxFL9zSYq6ITa8I3DlNY + wKZ0soVSgFkAXgwuFSEmJhJJiWqwCR3YSCbY2x0QB4zwnFc6W4p+22KxiY4EXiQF74kf6/L5vdi+TYV0 + rRpsMB2sPxWsRwvpTTq87QmYOUNHg+HqQlL4ryscbK4UPGD5vu60CWw8G7evbkN7bSykXm0w/FMBew6E + CsXQFQMpaLKezP6OLeDL+8AFM5hLBzaciennKcFXUCgI7o7ENQWSfRcWmmPgPEW5tNJIj8QxM9hkDthY + FthAGlh/SvAPXC7fjOrjmyC+Sl5TsCpfdzYEK92llUbllDiaD3HEDPG9CaLDCGnI9IdEhwnioBHiOwMC + dj38fYbVglHy1FGJt57uL9ZS10IN9cxfJPvXCzTgqSKH5xwNzVXSkFBBDsFKA4KV7IKVegQrda2e7j5N + ud8AKwnMnBpmYFAAAAAASUVORK5CYII= + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAp5JREFUOE+F + k11Ik1Ecxv9zouJ2E4TWnR8V5tAppJmYsLnNlaLTxAoiKIQiibpYSmEEmSSa0IVGISMUw7rpE+yiQiuk + /IhROssPyjanpL4udeq29z3nCdcH+Wb1g+fq/zzP+R8Oh+gvPK4kNWujp1IrPek8S5Hy+X9hbXSN9aVC + eq1FwEYN8vk/mWqiDPZwI+NOHbhLj8CdDaK7npLlvnWpO0AKqZV62YgO/GMquDMN0rAevkbqlHvXZdlG + h6Rn8eATu4GJncB0Fvh8HnwPYuGpJ4vcvwZbGYWJrcpPzGXG8ngGtsZFQJOggrS0B9J0MbwNIR9uHqRQ + ee4XPhuVSy814IIB/lk9QkIIanUomFgIzkux0qHB/CUqk+eCtB2jCLEl1M1mLcBSLthKHlQqJaKjw8FZ + Mbi/ENKXEizUKD/f2k9h8jz5mumk2K0F9xUAUgE4K0JUVDji4yLBvflgMyYwlxFL9zSYq6ITa8I3DlNY + wKZ0soVSgFkAXgwuFSEmJhJJiWqwCR3YSCbY2x0QB4zwnFc6W4p+22KxiY4EXiQF74kf6/L5vdi+TYV0 + rRpsMB2sPxWsRwvpTTq87QmYOUNHg+HqQlL4ryscbK4UPGD5vu60CWw8G7evbkN7bSykXm0w/FMBew6E + CsXQFQMpaLKezP6OLeDL+8AFM5hLBzaciennKcFXUCgI7o7ENQWSfRcWmmPgPEW5tNJIj8QxM9hkDthY + FthAGlh/SvAPXC7fjOrjmyC+Sl5TsCpfdzYEK92llUbllDiaD3HEDPG9CaLDCGnI9IdEhwnioBHiOwMC + dj38fYbVglHy1FGJt57uL9ZS10IN9cxfJPvXCzTgqSKH5xwNzVXSkFBBDsFKA4KV7IKVegQrda2e7j5N + ud8AKwnMnBpmYFAAAAAASUVORK5CYII= + + + + This will perform Index Maintenance to realign indexes to optimize performance. +This function will cause no change to data or records in PROMS. +It should however be performed when other users are not in PROMS, as it could +cause slowdown or errors for other users while it is running. This allows the user to check referenced object links in procedure step data for multiple working drafts in a batch mode. @@ -388,8 +357,46 @@ If more than one procedure is selected, it is recommended that this be performed ud8AKwnMnBpmYFAAAAAASUVORK5CYII= - - - 25 + + This allows the user to remove folders and sub folders as well as their contents. + +Be sure a current backup of the database exists prior performing this function. + +It is recommended that this be done during off hours. + + + + This allows the user to remove folders and sub folders as well as their contents. + +Be sure a current backup of the database exists prior performing this function. + +It is recommended that this be done during off hours. + + + + + This function will allow the user to remove annotations from the selected working drafts. + +Be sure a current backup of the database exists prior to running this function. + +If more than one working draft is selected, it is recommended that this be performed during off hours. + + + This function will allow the user to remove annotations from the selected working drafts. + +Be sure a current backup of the database exists prior to running this function. + +If more than one working draft is selected, it is recommended that this be performed during off hours. + + + This will allow for the deletion of groups of annotations and allow for deleting entire folders within PROMS. Use the tree nodes to select which items to delete. + +Click on the on/off switches to turn on/off each tool. + +Note that only one of these tools can be run at a time. + + + 25 + \ No newline at end of file diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/DocumentExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/DocumentExt.cs index aebad38d..2dec2bda 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/DocumentExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/DocumentExt.cs @@ -1003,40 +1003,34 @@ namespace VEPROMS.CSLA.Library if (pdfTmp == null) return false; FileInfo pdfFile = new FileInfo(pdfTmp); - FileStream fs = pdfFile.Open(FileMode.Open, FileAccess.Read, FileShare.ReadWrite); - Byte[] buf = new byte[pdfFile.Length]; - fs.Read(buf, 0, buf.Length); - fs.Close(); + Byte[] buf = new byte[pdfFile.Length]; - // B2023-022 & B2023-023 commented out the deletion of the temporary Word section PDF file - // These files are deleted when the procedure pdf file is closed after being generated. - // PROMS was crashing because it could not find these temporary files to delete. - //try - //{ - // pdfFile.Delete(); - //} - //catch { } - - using (Document doc = docInfo.Get()) + using (FileStream fs = pdfFile.Open(FileMode.Open, FileAccess.Read, FileShare.ReadWrite)) { - DocStyle myDocStyle = sect.ActiveSection.MyDocStyle; - SectionConfig sc = sect.ActiveSection.MyConfig as SectionConfig; - int ss = sect.MyDocVersion.DocVersionConfig.SelectedSlave; - - if (sc != null && sc.Section_WordMargin == "Y") - { - using (Pdf myPdf = Pdf.MakePdf(doc, ss * 10 + MSWordToPDF.DebugStatus, 0, 0, 0, 0, (double)sect.MSWordPageCount, buf)) {; } - } - else - { - using (Pdf myPdf1 = Pdf.MakePdf(doc, ss * 10 + MSWordToPDF.DebugStatus, (int)myDocStyle.Layout.TopMargin, (int)myDocStyle.Layout.PageLength, - (int)myDocStyle.Layout.LeftMargin, (int)myDocStyle.Layout.PageWidth, (double)sect.MSWordPageCount, buf)) {; } - } - - doc.UpdateDRoUsages(roids); - doc.Save(); + fs.Read(buf, 0, buf.Length); + fs.Close(); } + using (Document doc = docInfo.Get()) + { + DocStyle myDocStyle = sect.ActiveSection.MyDocStyle; + SectionConfig sc = sect.ActiveSection.MyConfig as SectionConfig; + int ss = sect.MyDocVersion.DocVersionConfig.SelectedSlave; + + if (sc != null && sc.Section_WordMargin == "Y") + { + using (Pdf myPdf = Pdf.MakePdf(doc, ss * 10 + MSWordToPDF.DebugStatus, 0, 0, 0, 0, (double)sect.MSWordPageCount, buf)) {; } + } + else + { + using (Pdf myPdf1 = Pdf.MakePdf(doc, ss * 10 + MSWordToPDF.DebugStatus, (int)myDocStyle.Layout.TopMargin, (int)myDocStyle.Layout.PageLength, + (int)myDocStyle.Layout.LeftMargin, (int)myDocStyle.Layout.PageWidth, (double)sect.MSWordPageCount, buf)) {; } + } + + doc.UpdateDRoUsages(roids); + doc.Save(); + } + docInfo.RefreshConfig(); return true; @@ -1482,12 +1476,22 @@ namespace VEPROMS.CSLA.Library } catch { } - if (CloseWordWhenDone) + try + { + if (CloseWordWhenDone) + { + CloseAppAfterWait(); + } + } + catch (Exception ex) { - CloseAppAfterWait(); - } + System.Windows.Forms.Application.DoEvents(); + _MyLog.Error("Failed to close Microsoft Word. Collecting reclaimable memory.", ex); + GC.Collect(); + _MyLog.Warn("Finished collecting reclaimable memory."); + } - if (statusChange != null) statusChange(VolianStatusType.Complete, 0, string.Empty); + if (statusChange != null) statusChange(VolianStatusType.Complete, 0, string.Empty); if (Volian.Base.Library.BaselineMetaFile.IsOpen && Volian.Base.Library.BaselineMetaFile.IncludeWordSecText) Volian.Base.Library.BaselineMetaFile.WriteLine("++EndTxt++"); // [jpr 2022.07.26] - For memory optimization diff --git a/PROMS/VEPROMS.CSLA.Library/Generated/Pdf.cs b/PROMS/VEPROMS.CSLA.Library/Generated/Pdf.cs index 699521a0..9bd0d5d8 100644 --- a/PROMS/VEPROMS.CSLA.Library/Generated/Pdf.cs +++ b/PROMS/VEPROMS.CSLA.Library/Generated/Pdf.cs @@ -522,19 +522,22 @@ namespace VEPROMS.CSLA.Library } public static Pdf MakePdf(Document myDocument, int debugStatus, int topRow, int pageLength, int leftMargin, int pageWidth, double pageCount, byte[] docPdf) { - Pdf tmp = Pdf.New(myDocument, debugStatus, topRow, pageLength, leftMargin, pageWidth, pageCount, docPdf); - if (tmp.IsSavable) - tmp = tmp.Save(); - else + using (Pdf tmp = Pdf.New(myDocument, debugStatus, topRow, pageLength, leftMargin, pageWidth, pageCount, docPdf)) { - Csla.Validation.BrokenRulesCollection brc = tmp.ValidationRules.GetBrokenRules(); - tmp._ErrorMessage = "Failed Validation:"; - foreach (Csla.Validation.BrokenRule br in brc) + if (tmp.IsSavable) + return tmp.Save(); + else { - tmp._ErrorMessage += "\r\n\tFailure: " + br.RuleName; + Csla.Validation.BrokenRulesCollection brc = tmp.ValidationRules.GetBrokenRules(); + tmp._ErrorMessage = "Failed Validation:"; + foreach (Csla.Validation.BrokenRule br in brc) + { + tmp._ErrorMessage += "\r\n\tFailure: " + br.RuleName; + } + return tmp; } } - return tmp; + } public static Pdf Get(int docID, int debugStatus, int topRow, int pageLength, int leftMargin, int pageWidth) { diff --git a/PROMS/VEPROMS.CSLA.Library/Minimal/Maintenance.cs b/PROMS/VEPROMS.CSLA.Library/Minimal/Maintenance.cs index a4ef77e1..e1c2cb0b 100644 --- a/PROMS/VEPROMS.CSLA.Library/Minimal/Maintenance.cs +++ b/PROMS/VEPROMS.CSLA.Library/Minimal/Maintenance.cs @@ -86,7 +86,38 @@ namespace VEPROMS.CSLA.Library throw new DbCslaException("Error in vesp_GetOtherActiveSessions: retrieving data failed", ex); } } - #endregion + #endregion - } + #region Get Docs by Unit + //C2026-007 Get Missing Docs by Unit + // for Generating/Regenerating Pdf table + // can be ran overnight to assist with Printing when RO Updates + // and large Word Sections conatining ROs + public static DataTable GetMissingDocsByUnit() + { + try + { + using (SqlConnection cn = Database.VEPROMS_SqlConnection) + { + using (SqlCommand cm = cn.CreateCommand()) + { + cm.CommandType = CommandType.StoredProcedure; + cm.CommandText = "GetMissingDocsByUnit"; + cm.CommandTimeout = Database.DefaultTimeout; + using (SqlDataAdapter da = new SqlDataAdapter(cm)) + { + DataTable dt = new DataTable(); + da.Fill(dt); + return dt; + } + } + } + } + catch (Exception ex) + { + throw new DbCslaException("Error in GetMissingDocsByUnit: retrieving data failed", ex); + } + } + #endregion + } } From d17688fc9d010d4b710a04865fec078ddb18f1c1 Mon Sep 17 00:00:00 2001 From: John Jenko Date: Tue, 17 Mar 2026 11:24:24 -0400 Subject: [PATCH 12/21] C2026-030 corrected the Alarm format cover page --- PROMS/Formats/fmtall/BNPPalrall.xml | Bin 237646 -> 237670 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/PROMS/Formats/fmtall/BNPPalrall.xml b/PROMS/Formats/fmtall/BNPPalrall.xml index 58b11ba9d32e29e7dbed94e42cc9ce01b0ec172c..0cb98e6b9b933083ae03eafe4478c48c7e982fde 100644 GIT binary patch delta 77 zcmX?ifbZD>zJ?aYElg$$rcao}#4>F@lfw3p1x$R5aPD*ZY delta 82 zcmaEMfbZM^zJ?aYElg$$roCojn;!C!Nnm@>0wys=ICnabt1x}ZLZ&|mA*LlvO55)( OV&Xt3+YS^<`2zrCS0HBq From 4b479b3ceb2a3f21854e569b9182624c2891635e Mon Sep 17 00:00:00 2001 From: Paul Larsen Date: Tue, 17 Mar 2026 15:30:35 -0400 Subject: [PATCH 13/21] B2026-022-Adding-RO-Editor-symbols-to-RO-Tables --- .../LibSource/RODBInterface/RODBInterface.cs | 16 ++++++++++++++-- PROMS/Volian.Controls.Library/VlnFlexGrid.cs | 9 ++------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/PROMS/ReferencedObjects/LibSource/RODBInterface/RODBInterface.cs b/PROMS/ReferencedObjects/LibSource/RODBInterface/RODBInterface.cs index 2beac2bd..ee29fbcd 100644 --- a/PROMS/ReferencedObjects/LibSource/RODBInterface/RODBInterface.cs +++ b/PROMS/ReferencedObjects/LibSource/RODBInterface/RODBInterface.cs @@ -2147,7 +2147,6 @@ namespace RODBInterface foreach (int chr in chrAry) { if (chr > 166) - { xmlstrTmp.Append($"\\u{(int)chr}?"); } @@ -2205,7 +2204,6 @@ namespace RODBInterface foreach (int chr in chrAry) { if (chr > 166) - { xmlstrTmp.Append($"\\u{(int)chr}?"); } @@ -2660,7 +2658,21 @@ namespace RODBInterface } } StatMsgWindow.StatusMessage = echild.GetAttribute("MenuTitle"); + StringBuilder tinfo2Tmp = new StringBuilder(); // B2026-025 prep the info field data so it will be saved correctly. str = "UPDATE " + echild.GetAttribute("Table") + " SET Info = '" + tinfo2 + "'"; + char[] chrAry = tinfo2.ToCharArray(); + foreach (int chr in chrAry) + { + if (chr > 166) + { + tinfo2Tmp.Append($"\\u{(int)chr}?"); + } + else + { + tinfo2Tmp.Append((char)chr); + } + } + str = "UPDATE " + echild.GetAttribute("Table") + " SET Info = '" + tinfo2Tmp.ToString() + "'"; str = str + ", ModDateTime = '" + dt + "' WHERE RecID = '" + echild.GetAttribute("RecID") + "';"; DBE.Command(str); DBE.Reader(); diff --git a/PROMS/Volian.Controls.Library/VlnFlexGrid.cs b/PROMS/Volian.Controls.Library/VlnFlexGrid.cs index 465d323a..f7f2310f 100644 --- a/PROMS/Volian.Controls.Library/VlnFlexGrid.cs +++ b/PROMS/Volian.Controls.Library/VlnFlexGrid.cs @@ -2479,10 +2479,8 @@ namespace Volian.Controls.Library foreach (Match match in Regex.Matches(rtn, pattern, RegexOptions.IgnoreCase)) { mValue = match.Value; - mValue2 = @"\f1 " + mValue + @"\f0"; - rtn = rtn.Replace(match.Value, mValue2); - // @"\f1\u9474 ?\f0") - // linkValue = linkValue.Replace(match.Value, "\\f1 " + match.Value + "\\f0"); + mValue2 = $"\\f1 {mValue}\\f0"; + rtn = rtn.Replace(match.Value, mValue2); } @@ -3840,9 +3838,6 @@ namespace Volian.Controls.Library this.MergedRanges.Clear(); this.Clear(); this.IsRoTable = true; - //valtext = valtext.Replace(@"\u8209?", "-"); - //valtext = Regex.Replace(valtext, @"\\u([0-9]{1,4})\?", m => int.TryParse(m?.Groups[1]?.Value, out int result) ? Convert.ToChar(result).ToString() : ""); - //valtext = valtext.Replace("-", @"\u8209?"); this.ParseTableFromText(valtext, GridLinePattern.Single); this.AutoSizeCols(); this.AutoSizeRows(); From e03ae6195ab988749521792b9f6d00c334dcc08e Mon Sep 17 00:00:00 2001 From: mschill Date: Wed, 18 Mar 2026 07:53:17 -0400 Subject: [PATCH 14/21] =?UTF-8?q?C2026-028=20Update=20Tooltip=20for=20?= =?UTF-8?q?=E2=80=9CSet=20All=20at=20Level=E2=80=9D=20in=20Applicability.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PROMS/Volian.Controls.Library/DisplayApplicability.Designer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PROMS/Volian.Controls.Library/DisplayApplicability.Designer.cs b/PROMS/Volian.Controls.Library/DisplayApplicability.Designer.cs index 74a354b4..cc37fbea 100644 --- a/PROMS/Volian.Controls.Library/DisplayApplicability.Designer.cs +++ b/PROMS/Volian.Controls.Library/DisplayApplicability.Designer.cs @@ -49,7 +49,7 @@ namespace Volian.Controls.Library this.btnApplicabilitychg.Size = new System.Drawing.Size(80, 22); this.btnApplicabilitychg.Margin = new System.Windows.Forms.Padding(2); this.btnApplicabilitychg.RightToLeft = System.Windows.Forms.RightToLeft.No; - this.superTooltip1.SetSuperTooltip(this.btnApplicabilitychg, new DevComponents.DotNetBar.SuperTooltipInfo("Change applicability settings - All At Level", "", "When clicked, all steps at the level of the current step will have their applicability settings changed.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray)); + this.superTooltip1.SetSuperTooltip(this.btnApplicabilitychg, new DevComponents.DotNetBar.SuperTooltipInfo("Change applicability settings - All At Level", "", "When clicked, all steps at the level of the current step will have their applicability settings changed. Note that for two column procedures, the left column and right column are handled separately.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray)); this.btnApplicabilitychg.TabIndex = 0; this.btnApplicabilitychg.Text = "Set All at Level"; this.btnApplicabilitychg.ColorTable = DevComponents.DotNetBar.eButtonColor.BlueOrb; From 5eca8a5150a670dc3c3b86beb79009744e2a261e Mon Sep 17 00:00:00 2001 From: mschill Date: Wed, 18 Mar 2026 14:44:45 -0400 Subject: [PATCH 15/21] B2026-030 GoTo sometimes requires being pressed twice for ROs --- PROMS/Volian.Controls.Library/DisplayRO.cs | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/PROMS/Volian.Controls.Library/DisplayRO.cs b/PROMS/Volian.Controls.Library/DisplayRO.cs index c1f7725e..b40aa139 100644 --- a/PROMS/Volian.Controls.Library/DisplayRO.cs +++ b/PROMS/Volian.Controls.Library/DisplayRO.cs @@ -1164,12 +1164,21 @@ namespace Volian.Controls.Library tbROValue.Text = null; lbROId.Text = string.Empty; - // Disable all buttons by default - btnGoToRO.Enabled = false; + // Disable all buttons by default btnSaveRO.Enabled = false; btnCancelRO.Enabled = false; btnPreviewRO.Enabled = false; - } + + //B2026-030 GoTo sometimes requires being pressed twice + if (MyUserInfo != null && MyDvi != null && selectedChld.value != null) + { + btnGoToRO.Enabled = UserInfo.CanEditROs(MyUserInfo, MyDvi); // Writers and Reviewers cannot edit ROs (run the RO Editor) + } + else + { + btnGoToRO.Enabled = false; + } + } #endregion } From a10798c9831aa9fd39696f269358e76f7aa84709 Mon Sep 17 00:00:00 2001 From: mschill Date: Fri, 20 Mar 2026 15:30:51 -0400 Subject: [PATCH 16/21] B2026-033 Tooltip for Generate Word Attachments --- .../frmBatchRefresh.Designer.cs | 4 ++-- PROMS/VEPROMS User Interface/frmBatchRefresh.resx | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/PROMS/VEPROMS User Interface/frmBatchRefresh.Designer.cs b/PROMS/VEPROMS User Interface/frmBatchRefresh.Designer.cs index 41c381d5..ceed4fe9 100644 --- a/PROMS/VEPROMS User Interface/frmBatchRefresh.Designer.cs +++ b/PROMS/VEPROMS User Interface/frmBatchRefresh.Designer.cs @@ -1317,7 +1317,7 @@ this.swRegenWordAttmts.Name = "swRegenWordAttmts"; this.swRegenWordAttmts.Size = new System.Drawing.Size(91, 22); this.swRegenWordAttmts.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.superTooltip1.SetSuperTooltip(this.swRegenWordAttmts, new DevComponents.DotNetBar.SuperTooltipInfo("Generate Word Attachments", "", resources.GetString("swRegenWordAttmts.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(300, 200))); + this.superTooltip1.SetSuperTooltip(this.swRegenWordAttmts, new DevComponents.DotNetBar.SuperTooltipInfo("Generate Word Attachments", "", resources.GetString("swRegenWordAttmts.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(300, 250))); this.swRegenWordAttmts.SwitchClickTogglesValue = true; this.swRegenWordAttmts.TabIndex = 34; this.swRegenWordAttmts.Value = true; @@ -1334,7 +1334,7 @@ this.labelX1.Location = new System.Drawing.Point(107, 150); this.labelX1.Name = "labelX1"; this.labelX1.Size = new System.Drawing.Size(186, 22); - this.superTooltip1.SetSuperTooltip(this.labelX1, new DevComponents.DotNetBar.SuperTooltipInfo("Generate Word Attachments", "", resources.GetString("labelX1.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(300, 200))); + this.superTooltip1.SetSuperTooltip(this.labelX1, new DevComponents.DotNetBar.SuperTooltipInfo("Generate Word Attachments", "", resources.GetString("labelX1.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(300, 250))); this.labelX1.TabIndex = 33; this.labelX1.Text = "Generate Missing Word Attachments"; // diff --git a/PROMS/VEPROMS User Interface/frmBatchRefresh.resx b/PROMS/VEPROMS User Interface/frmBatchRefresh.resx index 15533721..c8355cb0 100644 --- a/PROMS/VEPROMS User Interface/frmBatchRefresh.resx +++ b/PROMS/VEPROMS User Interface/frmBatchRefresh.resx @@ -121,15 +121,15 @@ 17, 17 - When Word attachments are modified and saved, PROMS will create a PDF of the attachment contents and save it in the database. When this is done, all the of the RO references are resolved as well as pagination of the attachment. This speeds up the overall printing of the procedure in that PROMS simply inserts the attachment contents. Certain actions like loading a new RO.FST require that these PDFs be regenerated which is normally done at print time. + When Word attachments are modified and saved, PROMS will create a PDF of the attachment contents and save it in the database. When this is done, all of the RO references are resolved as well as pagination of the attachment. This speeds up the overall printing of the procedure in that PROMS simply inserts the attachment contents. Certain actions like loading a new RO.FST require that these PDFs be regenerated which is normally done at print time. -This function will generate (and save) any missing saved attachment PDFS stored in the database (not the PDFs of the entire procedure that you had previous printed). This will cause printing to be faster when you print after this as the PDFs will be pre-genrated in those cases (and thus not require regeneration unless changes were made to the Word Sections or ROs after running this). +This function will generate (and save) any missing saved attachment PDFs stored in the database (not the PDFs of the entire procedure that you had previous printed). This will cause printing to be faster when you print after this as the PDFs will be pre-genrated in those cases (and thus not require regeneration unless changes were made to the Word Sections or ROs after running this). - When Word attachments are modified and saved, PROMS will create a PDF of the attachment contents and save it in the database. When this is done, all the of the RO references are resolved as well as pagination of the attachment. This speeds up the overall printing of the procedure in that PROMS simply inserts the attachment contents. Certain actions like loading a new RO.FST require that these PDFs be regenerated which is normally done at print time. + When Word attachments are modified and saved, PROMS will create a PDF of the attachment contents and save it in the database. When this is done, all of the RO references are resolved as well as pagination of the attachment. This speeds up the overall printing of the procedure in that PROMS simply inserts the attachment contents. Certain actions like loading a new RO.FST require that these PDFs be regenerated which is normally done at print time. -This function will generate (and save) any missing saved attachment PDFS stored in the database (not the PDFs of the entire procedure that you had previous printed). This will cause printing to be faster when you print after this as the PDFs will be pre-genrated in those cases (and thus not require regeneration unless changes were made to the Word Sections or ROs after running this). +This function will generate (and save) any missing saved attachment PDFs stored in the database (not the PDFs of the entire procedure that you had previous printed). This will cause printing to be faster when you print after this as the PDFs will be pre-genrated in those cases (and thus not require regeneration unless changes were made to the Word Sections or ROs after running this). @@ -183,7 +183,7 @@ RO paths, ROFST versions, and the contents of RO figures are stored in the datab Be sure a current backup exists prior to running this function!! - When Word attachments are modified and saved, PROMS will create a PDF of the attachment contents and save it in the database. When this is done, all the of the RO references are resolved as well as pagination of the attachment. This speeds up the overall printing of the procedure in that PROMS simply inserts the attachment contents. + When Word attachments are modified and saved, PROMS will create a PDF of the attachment contents and save it in the database. When this is done, all of the RO references are resolved as well as pagination of the attachment. This speeds up the overall printing of the procedure in that PROMS simply inserts the attachment contents. This function will remove all of the saved attachment PDFS stored in the database (not the PDFs of the entire procedure that you had previous printed). This will force PROMS to regenerate (and save) the word attachment PDFs the next time the procedure is printed. @@ -202,9 +202,9 @@ RO paths, ROFST versions, and the contents of RO figures are stored in the datab Be sure a current backup exists prior to running this function!! - When Word attachments are modified and saved, PROMS will create a PDF of the attachment contents and save it in the database. When this is done, all the of the RO references are resolved as well as pagination of the attachment. This speeds up the overall printing of the procedure in that PROMS simply inserts the attachment contents. + When Word attachments are modified and saved, PROMS will create a PDF of the attachment contents and save it in the database. When this is done, all of the RO references are resolved as well as pagination of the attachment. This speeds up the overall printing of the procedure in that PROMS simply inserts the attachment contents. -This function will remove all of the saved attachment PDFS stored in the database (not the PDFs of the entire procedure that you had previous printed). This will force PROMS to regenerate (and save) the word attachment PDFs the next time the procedure is printed. +This function will remove all of the saved attachment PDFs stored in the database (not the PDFs of the entire procedure that you had previous printed). This will force PROMS to regenerate (and save) the word attachment PDFs the next time the procedure is printed. From 8cbc8c497ee963c5f91e264d0a19f2f2df49620e Mon Sep 17 00:00:00 2001 From: mschill Date: Mon, 23 Mar 2026 06:30:41 -0400 Subject: [PATCH 17/21] C2026-007 - Handle case for Step Progress when all switchboxes are turned off and then Regen Word Attachments is turned back on. --- PROMS/VEPROMS User Interface/frmBatchRefresh.Designer.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/PROMS/VEPROMS User Interface/frmBatchRefresh.Designer.cs b/PROMS/VEPROMS User Interface/frmBatchRefresh.Designer.cs index 41c381d5..7145cd52 100644 --- a/PROMS/VEPROMS User Interface/frmBatchRefresh.Designer.cs +++ b/PROMS/VEPROMS User Interface/frmBatchRefresh.Designer.cs @@ -1322,6 +1322,7 @@ this.swRegenWordAttmts.TabIndex = 34; this.swRegenWordAttmts.Value = true; this.swRegenWordAttmts.ValueObject = "Y"; + this.swRegenWordAttmts.ValueChanged += new System.EventHandler(this.swCk_ValueChanged); // // labelX1 // From 714751f4045e70d213f92ab3746d10b0d9a6b872 Mon Sep 17 00:00:00 2001 From: mschill Date: Tue, 24 Mar 2026 08:45:55 -0400 Subject: [PATCH 18/21] C2026-007 Admin Tool Generate Word Attachments --- PROMS/VEPROMS User Interface/PROMSFixes.Sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PROMS/VEPROMS User Interface/PROMSFixes.Sql b/PROMS/VEPROMS User Interface/PROMSFixes.Sql index 0cbd1891..7e34dfd6 100644 --- a/PROMS/VEPROMS User Interface/PROMSFixes.Sql +++ b/PROMS/VEPROMS User Interface/PROMSFixes.Sql @@ -24753,7 +24753,7 @@ BEGIN select Docs.DocID, UnitID, SectionID = MIN(SectionID) FROM (SELECT DISTINCT [DocID] - FROM [VEPROMS_Barakah].[dbo].[tblDocuments]) Docs + FROM [tblDocuments]) Docs INNER JOIN Entries on Docs.DocID = Entries.DocID INNER JOIN Contents on Entries.ContentID = Contents.ContentID inner join Items on Items.ContentID = Contents.ContentID From d76c81a9d86b0287e8063a1b8b2f3d641ba3da74 Mon Sep 17 00:00:00 2001 From: John Jenko Date: Tue, 24 Mar 2026 16:27:22 -0400 Subject: [PATCH 19/21] B2026-034 Fixed issue where import of procedure set failed when it was deleting the temporary folders that are created during the process, preventing the importing code to try and fix transitions and foldout information (link). --- PROMS/VEPROMS User Interface/dlgExportImport.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/PROMS/VEPROMS User Interface/dlgExportImport.cs b/PROMS/VEPROMS User Interface/dlgExportImport.cs index 1606a03a..f1e052bf 100644 --- a/PROMS/VEPROMS User Interface/dlgExportImport.cs +++ b/PROMS/VEPROMS User Interface/dlgExportImport.cs @@ -947,14 +947,16 @@ namespace VEPROMS pi = AddProcedure(xd.DocumentElement, dvi, pi); GC.Collect(); // need to cleanup memory after importing each procedure due to use of Regular Expressions in processing RO and Transition links } - DirectoryInfo di = new DirectoryInfo(PEIPath); - DirectoryInfo[] dis = di.GetDirectories(); - for (int d = 0; d < dis.Length; d++) - dis[d].Delete(true); lblImportStatus.Text = "Updating Transitions"; AddTransitions(); FixFloatingFoldouts(); SaveTransitionAndItemContentIDs(); + // B2026-034 remove the folders created from un-ziping the import set file - this was done prior to updating transitions + // so if there was an issue deleting these temporay folders and files, the actual importing will be completed + DirectoryInfo di = new DirectoryInfo(PEIPath); + DirectoryInfo[] dis = di.GetDirectories(); + for (int d = 0; d < dis.Length; d++) + dis[d].Delete(true); return true; } } From c0d12f57214c08f4c7318a87f5d77b44176dbeeb Mon Sep 17 00:00:00 2001 From: Paul Larsen Date: Wed, 25 Mar 2026 11:34:58 -0400 Subject: [PATCH 20/21] B2026-023-Adding-RO-Editor-symbols-to-RO-X_Y_plots --- PROMS/XYPlots/XYPlots.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/PROMS/XYPlots/XYPlots.cs b/PROMS/XYPlots/XYPlots.cs index dc098b3f..7721e5af 100644 --- a/PROMS/XYPlots/XYPlots.cs +++ b/PROMS/XYPlots/XYPlots.cs @@ -491,10 +491,12 @@ namespace XYPlots // remove an extra spaces between >< //Buff = Regex.Replace(Buff, @"[ ]+<", "<"); Buff = Buff.Replace(">\r ", ">\r\n "); + Buff = Buff.Replace(">\n ", ">\r\n "); // C2022-003 if RO has symbols Buff = Regex.Replace(Buff, @"[ ]+<", "<"); // some data only had carriage return, replace these with cr/nl so that following code // will work Buff = Buff.Replace(">\r<", ">\r\n<"); + Buff = Buff.Replace(">\n<", ">\r\n<"); // C2022-003 if RO has symbols Buff = Buff.Replace("><", ">\r\n<"); // some data had cr/cr/nl, change to cr/nl Buff = Buff.Replace("\r\r\n", "\r\n"); @@ -520,6 +522,7 @@ namespace XYPlots Buff = Buff.Substring(0, Buff.Length - 2) + " \r\n\0x00"; // needs to end with null else if (Buff.EndsWith(">")) // doesn't end with return chars... Buff = Buff.Substring(0, Buff.Length - 1) + " \r\n\0x00"; // needs to end with null + Buff = Regex.Replace(Buff, @"\\u([0-9]{1,4})\?", m => int.TryParse(m?.Groups[1]?.Value, out int result) ? Convert.ToChar(result).ToString() : ""); Buff = Regex.Replace(Buff, @"([0-9])\r\n([0-9])", "$1 $2"); } private void CloseGraph() From b7b0e55d9407f835f03fb8257860a1b99d4929b1 Mon Sep 17 00:00:00 2001 From: Paul Larsen Date: Wed, 25 Mar 2026 11:41:39 -0400 Subject: [PATCH 21/21] B2026-023-Adding-RO-Editor-symbols-to-RO-X_Y_plots --- PROMS/XYPlots/XYPlots.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PROMS/XYPlots/XYPlots.cs b/PROMS/XYPlots/XYPlots.cs index 7721e5af..8ac65c0d 100644 --- a/PROMS/XYPlots/XYPlots.cs +++ b/PROMS/XYPlots/XYPlots.cs @@ -522,7 +522,7 @@ namespace XYPlots Buff = Buff.Substring(0, Buff.Length - 2) + " \r\n\0x00"; // needs to end with null else if (Buff.EndsWith(">")) // doesn't end with return chars... Buff = Buff.Substring(0, Buff.Length - 1) + " \r\n\0x00"; // needs to end with null - Buff = Regex.Replace(Buff, @"\\u([0-9]{1,4})\?", m => int.TryParse(m?.Groups[1]?.Value, out int result) ? Convert.ToChar(result).ToString() : ""); + Buff = Regex.Replace(Buff, @"\\u([0-9]{1,4})\?", m => int.TryParse(m?.Groups[1]?.Value, out int result) ? Convert.ToChar(result).ToString() : ""); // C2022-003 RO Symbols. Convert unicode to character. Buff = Regex.Replace(Buff, @"([0-9])\r\n([0-9])", "$1 $2"); } private void CloseGraph()