Compare commits
4 Commits
F2026-010_
...
Developmen
| Author | SHA1 | Date | |
|---|---|---|---|
| 836cdaf087 | |||
| 6f5c41abb8 | |||
| 6379321785 | |||
| e4c6e4393e |
@@ -1337,11 +1337,13 @@ 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
|
||||
|
||||
//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)
|
||||
{
|
||||
@@ -1349,9 +1351,20 @@ namespace VEPROMS
|
||||
dti.MyStepTabPanel.MyStepPanel.Focus();
|
||||
|
||||
foreach (EditItem eitm in dti.MyStepTabPanel.MyStepPanel.Controls.OfType<EditItem>())
|
||||
{
|
||||
eitm.ChangeBar = eitm.MyItemInfo.HasChangeBar;
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
@@ -628,11 +628,12 @@ namespace VEPROMS
|
||||
|
||||
//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);
|
||||
|
||||
//// 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)
|
||||
{
|
||||
@@ -640,8 +641,16 @@ namespace VEPROMS
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3841,6 +3841,14 @@ namespace VEPROMS.CSLA.Library
|
||||
|
||||
//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
|
||||
|
||||
Reference in New Issue
Block a user