From feaa8b0d2a941641db9a08ec3d88d3a1711c514b Mon Sep 17 00:00:00 2001 From: John Date: Wed, 23 Jan 2013 13:40:00 +0000 Subject: [PATCH] B2013-011 - The current date instead of the Revision Date was printing on the Cover page of an approved Westinghouse procedure. Needed to support the DoRevDate format flag in the Approved logic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit B2013-012 - On the Approval dialog, when the Revision number is changed, the Revision Date will change to today’s date. Commented out the line of code that set the Revision Date to today when the Revision Number was changed. Found that the Approval dialog constructor is explicitly setting the revision date with the value in the procedure config. --- .../dlgApproveProcedure.cs | 24 +++++++++++++++---- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/PROMS/VEPROMS User Interface/dlgApproveProcedure.cs b/PROMS/VEPROMS User Interface/dlgApproveProcedure.cs index 6df32854..ec5a2452 100644 --- a/PROMS/VEPROMS User Interface/dlgApproveProcedure.cs +++ b/PROMS/VEPROMS User Interface/dlgApproveProcedure.cs @@ -628,7 +628,7 @@ namespace VEPROMS if (value.Trim() != _RevNumber) { _RevNumber = value.Trim(); - _RevDate = DateTime.Now; + //_RevDate = DateTime.Now; // commented out for bug fix B2013-012 } } } @@ -638,6 +638,19 @@ namespace VEPROMS get { return _RevDate; } set { _RevDate = value; } } + // added RevNumAndDate to handle the use use of the DoRevDate flag + // this fixes bug B2013-011 where Today's date would print on the approved procedures (Westinghouse data) + // instead of the the Revision Date assigned to the procedure. + public string RevNumAndDate + { + get + { + if (_ProcInfo.ActiveFormat.PlantFormat.FormatData.PrintData.DoRevDate) + return RevNumber + "/" + RevDate.ToString("M/d/yyyy"); + else + return RevNumber; + } + } public string DisplayNumber { get { return _ProcInfo.DisplayNumber; } @@ -1056,10 +1069,11 @@ namespace VEPROMS string waterMark = Stage.Get(RevStage).IsApproved > 0 ? null : Stage.Get(RevStage).Name; using (ProcedureInfo myproc = ProcedureInfo.GetItemAndChildren(pi.ItemID)) { - 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); - frm.AllowAllWatermarks = true; - frm.CloseWhenDone = !ViewPDF; - frm.ShowDialog(); + //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); + frmPDFStatusForm frm = new frmPDFStatusForm(myproc, 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); + frm.AllowAllWatermarks = true; + frm.CloseWhenDone = !ViewPDF; + frm.ShowDialog(); } pdfFile = new FileInfo(pdfPath); fs = pdfFile.Open(FileMode.Open, FileAccess.Read, FileShare.ReadWrite);