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
This commit is contained in:
2026-05-11 14:42:48 -04:00
parent 45e78ef184
commit c5f1c3a340
5 changed files with 36 additions and 31 deletions
@@ -1319,10 +1319,10 @@ namespace VEPROMS
{ {
if (ProgressBar == null) return; if (ProgressBar == null) return;
ProgressBar.Value = 100; ProgressBar.Text = value;
ProgressBar.Maximum = 100; ProgressBar.Maximum = 100;
ProgressBar.Text = value; ProgressBar.Value = 100;
txtProcess.AppendText(value); txtProcess.AppendText(value);
txtProcess.AppendText(Environment.NewLine); txtProcess.AppendText(Environment.NewLine);
txtProcess.AppendText(Environment.NewLine); txtProcess.AppendText(Environment.NewLine);
@@ -899,10 +899,10 @@ namespace VEPROMS
set set
{ {
if (ProgressBar == null) return; if (ProgressBar == null) return;
ProgressBar.Maximum = 100; ProgressBar.Text = value;
ProgressBar.Value = 100; ProgressBar.Maximum = 100;
ProgressBar.Text = value; ProgressBar.Value = 100;
Application.DoEvents(); Application.DoEvents();
} }
} }
+18 -14
View File
@@ -314,9 +314,9 @@ namespace Volian.Controls.Library
set set
{ {
if (ProgressBar == null) return; if (ProgressBar == null) return;
ProgressBar.Value = 100;
ProgressBar.Maximum = 100;
ProgressBar.Text = value; ProgressBar.Text = value;
ProgressBar.Maximum = 100;
ProgressBar.Value = 100;
Application.DoEvents(); Application.DoEvents();
} }
} }
@@ -639,28 +639,32 @@ namespace Volian.Controls.Library
if (_docVersionInfo != null && fstid != -1 && fstid != MyROFSTLookup.RofstID) if (_docVersionInfo != null && fstid != -1 && fstid != MyROFSTLookup.RofstID)
{ {
string message = string.Empty; 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); FlexibleMessageBox.Show(this, message, "Working Draft Has Items Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning);
FinalProgressBarMessage = "Cannot check-out Working Draft"; 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 roFstInfo = ROFstInfo.Get(fstid);
roFstInfo.ROTableUpdate += new ROFstInfoROTableUpdateEvent(roFstInfo_ROTableUpdate); roFstInfo.ROTableUpdate += new ROFstInfoROTableUpdateEvent(roFstInfo_ROTableUpdate);
ROFstInfo.RefreshROFstAtItemLevel(_docVersionInfo, DoProgressBarRefresh, null, roFstInfo, origfstid, fstid); ROFstInfo.RefreshROFstAtItemLevel(_docVersionInfo, DoProgressBarRefresh, null, roFstInfo, origfstid, fstid);
roFstInfo.ROTableUpdate -= new ROFstInfoROTableUpdateEvent(roFstInfo_ROTableUpdate); roFstInfo.ROTableUpdate -= new ROFstInfoROTableUpdateEvent(roFstInfo_ROTableUpdate);
Application.DoEvents(); Application.DoEvents();
FinalProgressBarMessage = "ROs values updated"; FinalProgressBarMessage = "ROs values updated";
MyROFST = roFstInfo; MyROFST = roFstInfo;
updatedROs = true; updatedROs = true;
} }
} }
//B2025-008 //B2025-008
@@ -3578,7 +3578,7 @@ namespace Volian.Controls.Library
} }
Cursor = Cursors.Default; Cursor = Cursors.Default;
FinalProgressBarMessage = "ROs values updated"; FinalProgressBarMessage = "ROs values updated";
} }
private System.IO.StreamWriter swROUpdate; 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 // 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) void ContentInfo_StaticContentInfoChange(object sender, StaticContentInfoEventArgs args)
@@ -3618,10 +3618,11 @@ namespace Volian.Controls.Library
set set
{ {
if (ProgressBar == null) return; if (ProgressBar == null) return;
ProgressBar.Value = 100;
ProgressBar.Maximum = 100; ProgressBar.Text = value;
ProgressBar.Text = value; ProgressBar.Maximum = 100;
Application.DoEvents(); ProgressBar.Value = 100;
Application.DoEvents();
} }
} }
+4 -4
View File
@@ -2530,10 +2530,10 @@ namespace Volian.Controls.Library
set set
{ {
if (ProgressBar == null) return; if (ProgressBar == null) return;
ProgressBar.Value = 100; ProgressBar.Text = value;
ProgressBar.Maximum = 100; ProgressBar.Maximum = 100;
ProgressBar.Text = value; ProgressBar.Value = 100;
Application.DoEvents(); Application.DoEvents();
} }
} }
public List<string> roFstInfo_ROTableUpdate(object sender, ROFstInfoROTableUpdateEventArgs args) public List<string> roFstInfo_ROTableUpdate(object sender, ROFstInfoROTableUpdateEventArgs args)