Added logic to assure that edits are saved before printing or approval
This commit is contained in:
@@ -681,6 +681,34 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
return null;
|
||||
}
|
||||
/// <summary>
|
||||
/// Save the current EditItem if it is in Edit mode
|
||||
/// </summary>
|
||||
/// <param name="pi">ProcedureInfo</param>
|
||||
public void SaveCurrentEditItem(ProcedureInfo pi)
|
||||
{
|
||||
DisplayTabItem dti = GetProcDisplayTabItem(pi);
|
||||
if (dti == null) return;
|
||||
EditItem ei = dti.MyStepTabPanel.SelectedEditItem;
|
||||
if (ei == null) return;
|
||||
ei.SaveCurrentAndContents();
|
||||
}
|
||||
/// <summary>
|
||||
/// Save the current EditItem if it is in Edit mode
|
||||
/// </summary>
|
||||
public void SaveCurrentEditItem()
|
||||
{
|
||||
foreach (DisplayTabItem dti in _MyDisplayTabItems.Values)
|
||||
{
|
||||
StepTabPanel stp = dti.MyStepTabPanel;
|
||||
if (stp != null)
|
||||
{
|
||||
EditItem ei = stp.SelectedEditItem;
|
||||
if (ei != null)
|
||||
ei.SaveCurrentAndContents();
|
||||
}
|
||||
}
|
||||
}
|
||||
public DisplayTabItem GetProcDisplayTabItem(ItemInfo myItemInfo)
|
||||
{
|
||||
ItemInfo proc = myItemInfo.MyProcedure; // Find procedure Item
|
||||
|
Reference in New Issue
Block a user