diff --git a/PROMS/VEPROMS User Interface/dlgApproveProcedure.cs b/PROMS/VEPROMS User Interface/dlgApproveProcedure.cs index eb381cba..e71c5179 100644 --- a/PROMS/VEPROMS User Interface/dlgApproveProcedure.cs +++ b/PROMS/VEPROMS User Interface/dlgApproveProcedure.cs @@ -1221,12 +1221,20 @@ namespace VEPROMS //make pdf with promsprinter and get byte stream // Moved to end so that Item and Content are saved at the same time //UpdateProcedureConfig(pi, ap.RevNumber, ap.RevDate, myDTS); + string watermarkColor = "Blue"; // this is the default watermark color string waterMark = Stage.GetJustStage(RevStage).IsApproved > 0 ? null : Stage.GetJustStage(RevStage).Name; + // C2022-004 - BNPP if doing an approval stage, and the format file uses the UseUnitWatermarkOnApproved format flag () + // then use the Unit Designator watermark + if (waterMark == null && MyProcedures[0].ProcInfo.ActiveFormat.PlantFormat.FormatData.PrintData.UseUnitWatermarkOnApproved) + { + waterMark = "Unit Designator"; + frmPDFStatusForm.SetUnitWatermark(MyProcedures[0].ProcInfo, ref waterMark, ref watermarkColor); + } //ProcedureInfo myproc = pi; //frmPDFStatusForm frm = new frmPDFStatusForm(myproc, ap.RevNumber, /* revdate change: ap.RevDate.ToString("MM/dd/yyyy") ,*/ waterMark, false, false, ViewPDF, true, VlnSettings.TemporaryFolder, new ChangeBarDefinition(pi.MyDocVersion.MyConfig as DocVersionConfig, pi.ActiveFormat), pdfTmp, location); //myproc.ChangeBarDate = myDTS; frmPDFStatusForm frm = new frmPDFStatusForm(pi, ap.RevNumAndDate, /* revdate change: ap.RevDate.ToString("MM/dd/yyyy") ,*/ waterMark, false, false, ViewPDF, true, VlnSettings.TemporaryFolder, new ChangeBarDefinition(pi.MyDocVersion.MyConfig as DocVersionConfig, pi.ActiveFormat), pdfTmp, location, pi.MyDocVersion.DocVersionConfig.Print_AddBlankPagesWhenUsingDuplexFoldouts, true, "", false, 0, false, - MyProcedures.Count > (MyProcedures[0].ProcInfo.MyDocVersion.Procedures.Count / 4), pi.MyDocVersion.DocVersionConfig.Print_DuplexBlankPageText, null); // C2019-004: Allow user to define duplex lank page text at the docversion level + MyProcedures.Count > (MyProcedures[0].ProcInfo.MyDocVersion.Procedures.Count / 4), pi.MyDocVersion.DocVersionConfig.Print_DuplexBlankPageText, null, watermarkColor); // C2019-004: Allow user to define duplex lank page text at the docversion level frm.AllowAllWatermarks = true; frm.CloseWhenDone = !ViewPDF; frm.DocReplace = new Dictionary(); // will hold the Word Attachments with resolved ROs