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

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.
This commit is contained in:
John Jenko 2013-01-23 13:40:00 +00:00
parent ac94df746e
commit feaa8b0d2a

View File

@ -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);