C2024-001-Quick-Print-In-Ribbon
This commit is contained in:
parent
aa28de4ba8
commit
87c4d13abe
@ -1155,7 +1155,7 @@ namespace VEPROMS
|
||||
pi.MyDocVersion.DocVersionConfig.SelectedSlave = 0;
|
||||
}
|
||||
|
||||
void tv_QPrintProcedure(object sender, vlnTreeEventArgs args) // Quick Print
|
||||
void tv_QPrintProcedure(object sender, vlnTreeEventArgs args) // Quick Print right click menu on Procedure name.
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -1409,15 +1409,27 @@ namespace VEPROMS
|
||||
|
||||
//added by jcb 20130718 to support create pdf button when multi-unit and user selects a unit
|
||||
pi.MyDocVersion.DocVersionConfig.SelectedSlave = pi.ProcedureConfig.SelectedSlave;
|
||||
|
||||
using (DlgPrintProcedure prnDlg = new DlgPrintProcedure(pi))
|
||||
try
|
||||
{
|
||||
prnDlg.SelectedSlave = pi.ProcedureConfig.SelectedSlave == 0 ? -1 : pi.ProcedureConfig.SelectedSlave; //added by jcb 20130718 to support create pdf button when multi-unit and user selects a unit
|
||||
prnDlg.MySessionInfo = MySessionInfo;
|
||||
prnDlg.ShowDialog(this); // RHM 20120925 - Center dialog over PROMS window
|
||||
using (DlgPrintProcedure prnDlg = new DlgPrintProcedure(pi))
|
||||
{
|
||||
prnDlg.SelectedSlave = pi.ProcedureConfig.SelectedSlave == 0 ? -1 : pi.ProcedureConfig.SelectedSlave; //added by jcb 20130718 to support create pdf button when multi-unit and user selects a unit
|
||||
prnDlg.MySessionInfo = MySessionInfo;
|
||||
prnDlg.ShowDialog(this); // RHM 20120925 - Center dialog over PROMS window
|
||||
|
||||
//added by jcb 20130718 to support create pdf button when multi-unit and user selects a unit
|
||||
pi.MyDocVersion.DocVersionConfig.SelectedSlave = 0;
|
||||
//added by jcb 20130718 to support create pdf button when multi-unit and user selects a unit
|
||||
pi.MyDocVersion.DocVersionConfig.SelectedSlave = 0;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
sb.AppendLine("Could not create PDF Print");
|
||||
sb.AppendLine();
|
||||
MessageBox.Show(sb.ToString(), "Error when creating PDF Print", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
|
||||
_MyLog.Warn("Failed to create PDF print", ex);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1441,17 +1453,29 @@ namespace VEPROMS
|
||||
pi.MyDocVersion.DocVersionConfig.SelectedSlave = pi.ProcedureConfig.SelectedSlave;
|
||||
|
||||
|
||||
|
||||
using (DlgPrintProcedure prnDlg = new DlgPrintProcedure(pi))
|
||||
try
|
||||
{
|
||||
prnDlg.SelectedSlave = pi.ProcedureConfig.SelectedSlave == 0 ? -1 : pi.ProcedureConfig.SelectedSlave; //added by jcb 20130718 to support create pdf button when multi-unit and user selects a unit
|
||||
prnDlg.MySessionInfo = MySessionInfo;
|
||||
prnDlg.SetupForProcedure(); // Setup filename
|
||||
//prnDlg.ShowDialog(this); // RHM 20120925 - Center dialog over PROMS window
|
||||
prnDlg.QPCreatePDF(); // Create Print report
|
||||
using (DlgPrintProcedure prnDlg = new DlgPrintProcedure(pi))
|
||||
{
|
||||
prnDlg.SelectedSlave = pi.ProcedureConfig.SelectedSlave == 0 ? -1 : pi.ProcedureConfig.SelectedSlave; //added by jcb 20130718 to support create pdf button when multi-unit and user selects a unit
|
||||
prnDlg.MySessionInfo = MySessionInfo;
|
||||
prnDlg.SetupForProcedure(); // Setup filename
|
||||
//prnDlg.ShowDialog(this); // RHM 20120925 - Center dialog over PROMS window
|
||||
prnDlg.QPCreatePDF(); // Create Print report
|
||||
|
||||
//added by jcb 20130718 to support create pdf button when multi-unit and user selects a unit
|
||||
pi.MyDocVersion.DocVersionConfig.SelectedSlave = 0;
|
||||
//added by jcb 20130718 to support create pdf button when multi-unit and user selects a unit
|
||||
pi.MyDocVersion.DocVersionConfig.SelectedSlave = 0;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
sb.AppendLine("Could not create PDF Print");
|
||||
sb.AppendLine();
|
||||
MessageBox.Show(sb.ToString(), "Error when creating PDF Print", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
|
||||
_MyLog.Warn("Failed to create PDF print", ex);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user