C2025-017 Added an option to print (generate) all of the current Approved versions of PDFs and place them in a user specified folder
This commit is contained in:
@@ -534,6 +534,7 @@ namespace VEPROMS
|
||||
tv.QPrintSection += new vlnTreeViewEvent(tv_QPrintSection);
|
||||
tv.QPrintProcedure += new vlnTreeViewEvent(tv_QPrintProcedure);
|
||||
tv.PrintAllProcedures += new vlnTreeViewEvent(tv_PrintAllProcedures);
|
||||
tv.PrintAllApprovedProcedures += new vlnTreeViewEvent(tv_PrintAllApprovedProcedures);
|
||||
tv.ApproveProcedure += new vlnTreeViewEvent(tv_ApproveProcedure);
|
||||
tv.ApproveAllProcedures += new vlnTreeViewEvent(tv_ApproveAllProcedures);
|
||||
tv.ApproveSomeProcedures += new vlnTreeViewEvent(tv_ApproveSomeProcedures);
|
||||
@@ -1212,7 +1213,27 @@ namespace VEPROMS
|
||||
|
||||
dvi.DocVersionConfig.SelectedSlave = 0;
|
||||
}
|
||||
|
||||
|
||||
// C2025-017 print all approved procedure to a specified folder
|
||||
void tv_PrintAllApprovedProcedures(object sender, vlnTreeEventArgs args)
|
||||
{
|
||||
using (DocVersionInfo dvi = (args.Node as VETreeNode).VEObject as DocVersionInfo)
|
||||
{
|
||||
if (dvi == null) return;
|
||||
|
||||
tc.SaveCurrentEditItem(); // save the current edit item if user happens to be editing a procedure
|
||||
|
||||
// add a diaglog to prompt for the path inwhich to put the approved pdfs
|
||||
int currentChildSetting = dvi.DocVersionConfig.SelectedSlave;
|
||||
dvi.DocVersionConfig.SelectedSlave = args.UnitIndex; // set to selected child - will be -1 for non Parent/Child
|
||||
|
||||
dlgPrintAllApprovedProcedures dlgPrnAllAprv = new dlgPrintAllApprovedProcedures(dvi);
|
||||
dlgPrnAllAprv.ShowDialog(this);
|
||||
|
||||
dvi.DocVersionConfig.SelectedSlave = currentChildSetting; // set back to what it was
|
||||
}
|
||||
}
|
||||
|
||||
void tv_PrintProcedure(object sender, vlnTreeEventArgs args)
|
||||
{
|
||||
ProcedureInfo pi = (args.Node as VETreeNode).VEObject as ProcedureInfo;
|
||||
@@ -2470,6 +2491,7 @@ namespace VEPROMS
|
||||
int _ItemID = (int)TabState["ItemID"];
|
||||
ItemInfo _Procedure = ItemInfo.Get(_ItemID);
|
||||
// Open procedure in the editor.
|
||||
if (_Procedure == null) continue; //skip and continue with foreach
|
||||
OpenItem(_Procedure);
|
||||
// SelectedStepTabPanel needs to be set so the print buttons on the ribbon will work.
|
||||
SelectedStepTabPanel = tc.MyEditItem.MyStepPanel.MyStepTabPanel;
|
||||
|
Reference in New Issue
Block a user