From c5f1c3a3401498f52627698a53e4d7b927e18cc0 Mon Sep 17 00:00:00 2001 From: mschill Date: Mon, 11 May 2026 14:42:48 -0400 Subject: [PATCH] C2026-008 - Re-Architect RO.FST to include RO Modification date/time and use those when updating ROs from the RO.FST Update ProgressBar & fix Already Checked out popup multiple times --- .../VEPROMS User Interface/frmBatchRefresh.cs | 8 ++--- .../frmVersionsProperties.cs | 8 ++--- PROMS/Volian.Controls.Library/DisplayRO.cs | 32 +++++++++++-------- .../Volian.Controls.Library/StepTabRibbon.cs | 11 ++++--- PROMS/Volian.Controls.Library/vlnTreeView.cs | 8 ++--- 5 files changed, 36 insertions(+), 31 deletions(-) diff --git a/PROMS/VEPROMS User Interface/frmBatchRefresh.cs b/PROMS/VEPROMS User Interface/frmBatchRefresh.cs index 68bbecf5..3a039660 100644 --- a/PROMS/VEPROMS User Interface/frmBatchRefresh.cs +++ b/PROMS/VEPROMS User Interface/frmBatchRefresh.cs @@ -1319,10 +1319,10 @@ namespace VEPROMS { if (ProgressBar == null) return; - ProgressBar.Value = 100; - ProgressBar.Maximum = 100; - ProgressBar.Text = value; - txtProcess.AppendText(value); + ProgressBar.Text = value; + ProgressBar.Maximum = 100; + ProgressBar.Value = 100; + txtProcess.AppendText(value); txtProcess.AppendText(Environment.NewLine); txtProcess.AppendText(Environment.NewLine); diff --git a/PROMS/VEPROMS User Interface/frmVersionsProperties.cs b/PROMS/VEPROMS User Interface/frmVersionsProperties.cs index dc32c284..b4d28658 100644 --- a/PROMS/VEPROMS User Interface/frmVersionsProperties.cs +++ b/PROMS/VEPROMS User Interface/frmVersionsProperties.cs @@ -899,10 +899,10 @@ namespace VEPROMS set { if (ProgressBar == null) return; - ProgressBar.Maximum = 100; - ProgressBar.Value = 100; - ProgressBar.Text = value; - Application.DoEvents(); + ProgressBar.Text = value; + ProgressBar.Maximum = 100; + ProgressBar.Value = 100; + Application.DoEvents(); } } diff --git a/PROMS/Volian.Controls.Library/DisplayRO.cs b/PROMS/Volian.Controls.Library/DisplayRO.cs index 47b37dc7..375bcedc 100644 --- a/PROMS/Volian.Controls.Library/DisplayRO.cs +++ b/PROMS/Volian.Controls.Library/DisplayRO.cs @@ -314,9 +314,9 @@ namespace Volian.Controls.Library set { if (ProgressBar == null) return; - ProgressBar.Value = 100; - ProgressBar.Maximum = 100; ProgressBar.Text = value; + ProgressBar.Maximum = 100; + ProgressBar.Value = 100; Application.DoEvents(); } } @@ -639,28 +639,32 @@ namespace Volian.Controls.Library if (_docVersionInfo != null && fstid != -1 && fstid != MyROFSTLookup.RofstID) { string message = string.Empty; - if (!MySessionInfo.CanCheckOutItem(_docVersionInfo.VersionID, CheckOutType.DocVersion, ref message)) + if (_progressBar?.Text != "Cannot check-out Working Draft" && !MySessionInfo.CanCheckOutItem(_docVersionInfo.VersionID, CheckOutType.DocVersion, ref message)) { FlexibleMessageBox.Show(this, message, "Working Draft Has Items Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning); FinalProgressBarMessage = "Cannot check-out Working Draft"; } - else if (changedDocVersion && MessageBox.Show($"There exists a newer ROFST for this RO database that was loaded for other sets.\r\n\r\nDo you want to update this set's ROs to be consistent/use the latest loaded ROFST?", "Load ROs", MessageBoxButtons.YesNo) == DialogResult.Yes) + else if (!MySessionInfo.CanCheckOutItem(_docVersionInfo.VersionID, CheckOutType.DocVersion, ref message)) + { + //do nothing - is still checked out + } + else if (changedDocVersion && MessageBox.Show($"There exists a newer ROFST for this RO database that was loaded for other sets.\r\n\r\nDo you want to update this set's ROs to be consistent/use the latest loaded ROFST?", "Load ROs", MessageBoxButtons.YesNo) == DialogResult.Yes) { - InitialProgressBarMessage = "Updating ROs"; + InitialProgressBarMessage = "Updating ROs"; - ROFstInfo roFstInfo = ROFstInfo.Get(fstid); - roFstInfo.ROTableUpdate += new ROFstInfoROTableUpdateEvent(roFstInfo_ROTableUpdate); - ROFstInfo.RefreshROFstAtItemLevel(_docVersionInfo, DoProgressBarRefresh, null, roFstInfo, origfstid, fstid); - roFstInfo.ROTableUpdate -= new ROFstInfoROTableUpdateEvent(roFstInfo_ROTableUpdate); + ROFstInfo roFstInfo = ROFstInfo.Get(fstid); + roFstInfo.ROTableUpdate += new ROFstInfoROTableUpdateEvent(roFstInfo_ROTableUpdate); + ROFstInfo.RefreshROFstAtItemLevel(_docVersionInfo, DoProgressBarRefresh, null, roFstInfo, origfstid, fstid); + roFstInfo.ROTableUpdate -= new ROFstInfoROTableUpdateEvent(roFstInfo_ROTableUpdate); - Application.DoEvents(); + Application.DoEvents(); - FinalProgressBarMessage = "ROs values updated"; - MyROFST = roFstInfo; + FinalProgressBarMessage = "ROs values updated"; + MyROFST = roFstInfo; - updatedROs = true; - } + updatedROs = true; + } } //B2025-008 diff --git a/PROMS/Volian.Controls.Library/StepTabRibbon.cs b/PROMS/Volian.Controls.Library/StepTabRibbon.cs index 4f17d18b..261a08b8 100644 --- a/PROMS/Volian.Controls.Library/StepTabRibbon.cs +++ b/PROMS/Volian.Controls.Library/StepTabRibbon.cs @@ -3578,7 +3578,7 @@ namespace Volian.Controls.Library } Cursor = Cursors.Default; FinalProgressBarMessage = "ROs values updated"; - } + } private System.IO.StreamWriter swROUpdate; // write the RO reference changes to a text file, include the old/new text, location, and the itemid of the step element void ContentInfo_StaticContentInfoChange(object sender, StaticContentInfoEventArgs args) @@ -3618,10 +3618,11 @@ namespace Volian.Controls.Library set { if (ProgressBar == null) return; - ProgressBar.Value = 100; - ProgressBar.Maximum = 100; - ProgressBar.Text = value; - Application.DoEvents(); + + ProgressBar.Text = value; + ProgressBar.Maximum = 100; + ProgressBar.Value = 100; + Application.DoEvents(); } } diff --git a/PROMS/Volian.Controls.Library/vlnTreeView.cs b/PROMS/Volian.Controls.Library/vlnTreeView.cs index a7855317..4868032b 100644 --- a/PROMS/Volian.Controls.Library/vlnTreeView.cs +++ b/PROMS/Volian.Controls.Library/vlnTreeView.cs @@ -2530,10 +2530,10 @@ namespace Volian.Controls.Library set { if (ProgressBar == null) return; - ProgressBar.Value = 100; - ProgressBar.Maximum = 100; - ProgressBar.Text = value; - Application.DoEvents(); + ProgressBar.Text = value; + ProgressBar.Maximum = 100; + ProgressBar.Value = 100; + Application.DoEvents(); } } public List roFstInfo_ROTableUpdate(object sender, ROFstInfoROTableUpdateEventArgs args)