Compare commits

...

10 Commits

Author SHA1 Message Date
836cdaf087 Merge pull request 'B2026-019 Attempt to prevent an Access Error by utilizing a different Refresh if a Procedure is Open' (#719) from B2026-019 into Development
good for testing phase
2026-02-25 15:48:11 -05:00
6f5c41abb8 Merge branch 'Development' into B2026-019 2026-02-25 15:41:45 -05:00
6379321785 Merge pull request 'F2026-010_VogtleBack_fontsize' (#720) from F2026-010_VogtleBack_fontsize into Development
format only change.
2026-02-25 15:40:41 -05:00
e4c6e4393e B2026-019 Attempt to prevent an Access Error by utilizing a different Refresh if a Procedure is Open 2026-02-25 15:36:44 -05:00
3e6bb81e39 F2025-010 Vogtle Units 3&4 Backgrounds. Made the font size of the hard-coded section 5.0 title and the linked step tab and step number consistent with the rest of the document. 2026-02-25 15:34:19 -05:00
81643e2aef Merge pull request 'C2026-023 Change "Applicability - Set All at Level" to check the transitions at each level for steps that would be changed.' (#718) from C2026-023 into Development
good for testing
2026-02-25 11:30:15 -05:00
8a186f9f0c C2026-023 Change "Applicability - Set All at Level" to check the transitions at each level for steps that would be changed. 2026-02-25 08:37:29 -05:00
14aa39976a Merge pull request 'B2025-064 PROMS clears the windows clipboard when closing PROMS with tabs open.' (#717) from B2025-064_v2 into Development
good for testing
2026-02-24 09:10:36 -05:00
c077e0ddc2 Merge pull request 'B2026-016 Fix Error Approving a Procedure without ROs set' (#716) from B2026-016 into Development
good for testing
2026-02-24 09:08:40 -05:00
7f36a33dea B2026-016 Fix Error Approving a Procedure without ROs set 2026-02-24 07:08:07 -05:00
6 changed files with 115 additions and 39 deletions

View File

@@ -1312,7 +1312,15 @@ namespace VEPROMS
pi.MyDocVersion.DocVersionConfig.SelectedSlave = 0;
if (si.IsApproved == 1)
{
dlgExportImport dlg = new dlgExportImport("Export", pi, MyFrmVEPROMS, (selectedSlave)); // "true tell export to convert ROs and Transitions to text
//B2026-016 - Fix error pulling Reference Object info into Export
if (pi.MyDocVersion.DocVersionAssociationCount == 0)
{
MessageBox.Show("Prior to Approval you must set the Referenced Object Database", "No RO Database set", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
return false;
}
dlgExportImport dlg = new dlgExportImport("Export", pi, MyFrmVEPROMS, (selectedSlave)); // "true tell export to convert ROs and Transitions to text
dlg.DocReplace = frm.DocReplace; // this tells approval to prepare an export file with resolved transitions and ROs, word sections are saved with resolved ROs during approval PDF creation and saved in DocReplace
System.Xml.XmlDocument xd = new System.Xml.XmlDocument();
dlg.ExportItem(xd, pi, "procedure");
@@ -1329,24 +1337,37 @@ namespace VEPROMS
pi.ClearChangeBarOverrides();
//B2019-140 Change bars do not get refreshed when approval is run.
ProcedureInfo newproc = ItemInfo.ResetProcedure(pi.ItemID);
ProcedureInfo newproc;
//// Refresh the StepPanel for the current Procedure
//// so change bars update
//// on any open StepPanel
DisplayTabItem dti = MyFrmVEPROMS.GetTabContainingProcedure(pi.ItemID);
//// Refresh the StepPanel for the current Procedure
//// so change bars update
//// on any open StepPanel
//B2026-019 Attempt to prevent an Access Error by utilizing a different Refresh if a Procedure is Open
DisplayTabItem dti = MyFrmVEPROMS.GetTabContainingProcedure(pi.ItemID);
if (dti != null)
{
if (!dti.MyStepTabPanel.MyStepPanel.ContainsFocus)
dti.MyStepTabPanel.MyStepPanel.Focus();
foreach (EditItem eitm in dti.MyStepTabPanel.MyStepPanel.Controls.OfType<EditItem>())
eitm.ChangeBar = eitm.MyItemInfo.HasChangeBar;
}
{
eitm.ChangeBar = eitm.MyItemInfo.HasChangeBar;
}
//since in a separate form, need to update the tree view
//so "Showing Change Bars" Content Menu Item is correct
MyFrmVEPROMS.RefreshProcedureNode(newproc);
dti.MyStepTabPanel.MyStepTabRibbon.RefreshProcedure();
Application.DoEvents();
newproc = ProcedureInfo.Get(pi.ItemID);
}
else
{
newproc = ItemInfo.ResetProcedure(pi.ItemID);
}
//since in a separate form, need to update the tree view
//so "Showing Change Bars" Content Menu Item is correct
MyFrmVEPROMS.RefreshProcedureNode(newproc);
}
else
UpdateProcedureConfig(pi, ap.RevNumber, ap.RevDate, myDTS, selectedSlave);

View File

@@ -1618,8 +1618,15 @@ namespace VEPROMS
public void ExportItem(XmlDocument xd, ItemInfo ii, string nodename)
{
XmlElement xe = xd.CreateElement(nodename);
if (ii.IsProcedure)
//B2026-016 - Fix error pulling Reference Object info into Export
if (ii.MyDocVersion.DocVersionAssociationCount == 0)
{
MessageBox.Show("Prior to Exporting Procedures you must set the Referenced Object Database", "No RO Database set", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
return;
}
XmlElement xe = xd.CreateElement(nodename);
if (ii.IsProcedure)
{
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "rodbid", ii.MyDocVersion.DocVersionAssociations[0].MyROFst.MyRODb.RODbID.ToString()));
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "rofolderpath", ii.MyDocVersion.DocVersionAssociations[0].MyROFst.MyRODb.FolderPath));

View File

@@ -626,22 +626,31 @@ namespace VEPROMS
itm.UserID = Volian.Base.Library.VlnSettings.UserID;
itm.Save();
//B2019-140 Change bars do not get refreshed when approval is run.
// Reset a Procedure and sub items in the cache
ProcedureInfo newproc = ItemInfo.ResetProcedure(pi.ItemID);
//B2019-140 Change bars do not get refreshed when approval is run.
// Reset a Procedure and sub items in the cache
//// Refresh the StepPanel for the current Procedure
//// so change bars update
//// on any open StepPanel
DisplayTabItem dti = GetTabContainingProcedure(pi.ItemID);
if (dti != null)
{
if (!dti.MyStepTabPanel.MyStepPanel.ContainsFocus)
dti.MyStepTabPanel.MyStepPanel.Focus();
//// Refresh the StepPanel for the current Procedure
//// so change bars update
//// on any open StepPanel
//B2026-019 Attempt to prevent an Access Error by utilizing a different Refresh if a Procedure is Open
DisplayTabItem dti = GetTabContainingProcedure(pi.ItemID);
if (dti != null)
{
if (!dti.MyStepTabPanel.MyStepPanel.ContainsFocus)
dti.MyStepTabPanel.MyStepPanel.Focus();
foreach (EditItem eitm in dti.MyStepTabPanel.MyStepPanel.Controls.OfType<EditItem>())
{
eitm.ChangeBar = eitm.MyItemInfo.HasChangeBar;
}
dti.MyStepTabPanel.MyStepTabRibbon.RefreshProcedure();
}
else
{
_ = ItemInfo.ResetProcedure(pi.ItemID);
}
}
}
}

View File

@@ -3839,9 +3839,17 @@ namespace VEPROMS.CSLA.Library
_SupInfos = null;
}
//B2019-140 Change bars do not get refreshed when approval is run.
// Reset a Procedure and sub items in the cache
public static ProcedureInfo ResetProcedure(int procID)
//B2019-140 Change bars do not get refreshed when approval is run.
// Reset a Procedure and sub items in the cache
// **********************
// Be carefull calling this when the Procedure is Open
// When the Procedure is Open - use StepTabRibbon.RefreshProcedure(); instead
// When a Procedure is open and you try to refresh it,
// events can fire behind the scenes - causing data to try to be accessed while you are trying to refresh it
// When This occurs, it will cause a
// "ThreadException ... Collection was modified; enumeration operation may not execute.”
// **********************
public static ProcedureInfo ResetProcedure(int procID)
{
// The following lines reload the procedure info cache
ProcedureInfo newproc = ProcedureInfo.Get(procID, true);

View File

@@ -5,6 +5,7 @@ using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using VEPROMS.CSLA.Library;
@@ -225,8 +226,8 @@ namespace Volian.Controls.Library
// return internal and external for the procedure level)
if ((!MyItemInfo.IsProcedure && invalidTrans.Count == 0) || IsProcWithNoExternalTrans(MyItemInfo, invalidTrans))
{
// C2021 - 027: Procedure level PC/PC
if (MyItemInfo.IsProcedure && MyItemInfo.ActiveFormat.PlantFormat.FormatData.ProcData.ProcAppl)
// C2021 - 027: Procedure level PC/PC
if (MyItemInfo.IsProcedure && MyItemInfo.ActiveFormat.PlantFormat.FormatData.ProcData.ProcAppl)
{
ProcedureConfig sc = MyItemInfo.MyConfig as ProcedureConfig;
sc.MasterSlave_Applicability = Volian.Base.Library.BigNum.MakeBigNum(MyApplicability);
@@ -284,26 +285,56 @@ namespace Volian.Controls.Library
Volian.Base.Library.BigNum MasterSlave_ApplicabilityTmp;
StepConfig sc = MyItemInfo.MyConfig as StepConfig;
MasterSlave_ApplicabilityTmp = sc.MasterSlave_Applicability;
StringBuilder sb = new StringBuilder();
ItemInfo startitm = MyItemInfo.FirstSibling;
ItemInfo startitm = MyItemInfo.FirstSibling;
while (startitm != null)
{
StepConfig sc2 = startitm.MyConfig as StepConfig;
using (Content cnt = Content.Get(startitm.MyContent.ContentID))
{
sc2.MasterSlave_Applicability = (MasterSlave_ApplicabilityTmp);
cnt.Config = sc2.ToString();
cnt.Save();
// C2026-023: Check for Transitions when setting Applicability to all for a level
List<InvalidTransition> invalidTrans = WillTransitionsBeValidCommand.Execute(startitm.ItemID, MasterSlave_ApplicabilityTmp.ToString());
if (IsProcWithNoExternalTrans(startitm, invalidTrans))
{
StepConfig sc2 = startitm.MyConfig as StepConfig;
using (Content cnt = Content.Get(startitm.MyContent.ContentID))
{
sc2.MasterSlave_Applicability = (MasterSlave_ApplicabilityTmp);
cnt.Config = sc2.ToString();
cnt.Save();
}
}
else
{
if (sb.Length == 0)
{
sb.AppendLine("The applicability for some Step(s) cannot be changed due to transition links.");
sb.AppendLine("Applicability settings for these steps will return to original settings when OK is selected.");
sb.AppendLine("Changing the applicability for would invalidate a transition in the following steps:");
sb.AppendLine();
}
foreach (InvalidTransition inv in invalidTrans.Where(x => !x.TgtStep.StartsWith(x.SrcStep)))
{
sb.AppendLine(string.Format("{0} : From {1} to {2}.", startitm.MyTab.CleanTextNoSymbols.Trim(), inv.TgtStep, inv.SrcStep));
}
invalidTrans.Clear();
}
startitm = startitm.GetNext();
}
_MyDisplayTabItem.MyStepTabPanel.MyStepTabRibbon.RefreshProcedure();
}
if (sb.Length > 0)
FlexibleMessageBox.Show(sb.ToString(), "Transitions Affected By Applicability Change");
// B2021-149: for procedure, only consider external transitions as invalid
private bool IsProcWithNoExternalTrans(ItemInfo ii, List<InvalidTransition> invalidTrans)
}
// B2021-149: for procedure, only consider external transitions as invalid
private bool IsProcWithNoExternalTrans(ItemInfo ii, List<InvalidTransition> invalidTrans)
{
if (invalidTrans.Count == 0) return true;
foreach (InvalidTransition iT in invalidTrans)