From fe7ee44c6e0f2d52c3334e9b62501f1c03fdfd14 Mon Sep 17 00:00:00 2001 From: Kathy Date: Thu, 13 Oct 2022 15:03:27 +0000 Subject: [PATCH] =?UTF-8?q?C2022-022:=20Approval=20dialog/Create=20Summary?= =?UTF-8?q?=20of=20Changes=20dialog=20=E2=80=93=20add=20=E2=80=98Cancel?= =?UTF-8?q?=E2=80=99=20button?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PROMS/VEPROMS User Interface/dlgApproveProcedure.cs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/PROMS/VEPROMS User Interface/dlgApproveProcedure.cs b/PROMS/VEPROMS User Interface/dlgApproveProcedure.cs index 62e9edbc..712df772 100644 --- a/PROMS/VEPROMS User Interface/dlgApproveProcedure.cs +++ b/PROMS/VEPROMS User Interface/dlgApproveProcedure.cs @@ -1149,8 +1149,11 @@ namespace VEPROMS } // C2018-007: When performing more than a single procedure approval (approve all or some), only prompt once whether to include // Summary of Changes (use the following 2 flags, code using them is below) - bool askedSumChg = false; + // C2022-022: Moved the prompt once for Summary of changes out of loop and allow user to cancel, go back to approval dialog bool doSumChg = false; + DialogResult doSumChgDR = FlexibleMessageBox.Show("Do you want to save the Summary of Changes along with the Approved PDF?\r\n\r\nSelecting 'Cancel' will cancel the approval process.", "Create Summary of Changes", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);// == DialogResult.Yes; + if (doSumChgDR == DialogResult.Cancel) return false; + doSumChg = doSumChgDR == DialogResult.Yes; List procsApproved = new List(); foreach (ApprovalProcedure ap in MyProcedures) { @@ -1240,12 +1243,6 @@ namespace VEPROMS } } byte[] summaryBuf = null; - // C2018-007: only prompt once for summary of changes - if (!askedSumChg) - { - doSumChg = MessageBox.Show("Do you want to save the Summary of Changes along with the Approved PDF?", "Create Summary of Changes", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes; - askedSumChg = true; - } //B2017-149 Allow the user to choose if they want the Summary of Changes report created during the approval process if (doSumChg) summaryBuf = CreateSummary(ref pi, summaryPDF, myDTS); DateTime currentDTS = DateTime.Now;