B2026-019 Attempt to prevent an Access Error by utilizing a different Refresh if a Procedure is Open

This commit is contained in:
2026-02-25 15:36:44 -05:00
parent 14aa39976a
commit e4c6e4393e
3 changed files with 54 additions and 24 deletions

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);