Development #779
@@ -67,6 +67,7 @@ namespace VEPROMS
|
||||
MyFrmVEPROMS = myFrmVEPROMS;// Save frmVEPROMS for Import to shutoff SessionPing
|
||||
_MyApproval = new ApprovalInfo(myFrmVEPROMS);// Save frmVEPROMS for Import to shutoff SessionPing
|
||||
ApplicabilityIndex = myDocVersion.DocVersionConfig.SelectedSlave;
|
||||
_MyApproval.SavedSlave = ApplicabilityIndex;
|
||||
this.ConsistencyPrintRequest -= new DisplayConsistencyReportEvent(dlgApproveProcedure_ConsistencyPrintRequest);
|
||||
this.ConsistencyPrintRequest += new DisplayConsistencyReportEvent(dlgApproveProcedure_ConsistencyPrintRequest);
|
||||
_MyDocVersion = myDocVersion;
|
||||
@@ -292,6 +293,7 @@ namespace VEPROMS
|
||||
expAddProcConChk.Expanded = true;
|
||||
_initializing = true;
|
||||
ApplicabilityIndex = myDocVersion.DocVersionConfig.SelectedSlave;
|
||||
_MyApproval.SavedSlave = ApplicabilityIndex;
|
||||
InitializePanelApprove();
|
||||
InitializePanelSelect();
|
||||
_initializing = false;
|
||||
@@ -306,6 +308,7 @@ namespace VEPROMS
|
||||
_MyDocVersion = myProcedure.MyDocVersion;
|
||||
_MyDocVersion.ResetProcedures(); // B2021-035: Pasted, modified number and deleted procedures not refreshed so missing from list
|
||||
ApplicabilityIndex = _MyDocVersion.DocVersionConfig.SelectedSlave; // B2022-033 set the child being approved or workflow so other procedure list can populate
|
||||
_MyApproval.SavedSlave = ApplicabilityIndex;
|
||||
InitializeComponent();
|
||||
FlexGridAddEvents();
|
||||
SetupComboBoxes();
|
||||
@@ -914,6 +917,11 @@ namespace VEPROMS
|
||||
get { return _MyProcedures; }
|
||||
//set { _MyProcedures = value; }
|
||||
}
|
||||
|
||||
//B2026-058 - If approving multiple procedures at the same time with a multiunit set and one of the procedures is open, PROMS sometimes loses that it is set for an individual unit.
|
||||
// this will save the SectedSlave in case a refresh causes it to get lost
|
||||
public int SavedSlave { get; set; } = 0;
|
||||
|
||||
public ApprovalInfo(frmVEPROMS myFrmVEPROMS)
|
||||
{
|
||||
MyFrmVEPROMS = myFrmVEPROMS;// Save frmVEPROMS for Import to shutoff SessionPing
|
||||
@@ -1173,9 +1181,14 @@ namespace VEPROMS
|
||||
string pdfPath = string.Format(@"{0}\{1}", VlnSettings.TemporaryFolder, pdfTmp);
|
||||
if (!TryToDelete(summaryPDF, "Change Summary")) break;
|
||||
if (!TryToDelete(pdfPath,revisionStage)) break;
|
||||
if (SavedSlave > 0 && ap.ProcInfo.MyDocVersion.DocVersionConfig.SelectedSlave < 1)
|
||||
{
|
||||
//B2026-058 - If approving multiple procedures at the same time with a multiunit set and one of the procedures is open, PROMS sometimes loses that it is set for an individual unit.
|
||||
ap.ProcInfo.MyDocVersion.DocVersionConfig.SelectedSlave = SavedSlave;
|
||||
}
|
||||
procsApproved.Add(ap.ProcInfo.DisplayNumber + " " + ap.ProcInfo.DisplayText);
|
||||
RevisionInfo ric = pi.MyDocVersion.DocVersionConfig.SelectedSlave > 0 ? RevisionInfo.GetCurrentByItemIDandUnitID(pi.ItemID, pi.MyDocVersion.DocVersionConfig.SelectedSlave) : RevisionInfo.GetCurrentByItemID(pi.ItemID);
|
||||
// RevisionInfo rip = RevisionInfo.GetPreviousByItemID(pi.ItemID);
|
||||
// RevisionInfo rip = RevisionInfo.GetPreviousByItemID(pi.ItemID);
|
||||
DateTime myDTS = pi.DTS; // pi.DTS is date of last approval
|
||||
string cbDTS = (pi.MyConfig as ProcedureConfig).Print_ChangeBarDate;
|
||||
// pi.DTS was the field that was used to store the approval date before master/slave code was added. Use ChangeBarDate if it is set - this is set either manually if no approval date (from treeview menu) or
|
||||
|
||||
@@ -4113,7 +4113,10 @@ namespace VEPROMS.CSLA.Library
|
||||
// date). Print_ViewableAfterChangeBarDate was created to get only that user specified date, if it exists. If it does exist, we compare
|
||||
// that with the Content datetime, otherwise we proceed as before.
|
||||
DateTime? viewableStartingDateTime = (MyProcedure.MyConfig as ProcedureConfig).Print_ViewableStartingChangeBarDate;
|
||||
if (viewableStartingDateTime != null && viewableStartingDateTime > MyProcedure.ChangeBarDate && (MyProcedure.MyConfig as ProcedureConfig).SelectedSlave == 0)
|
||||
// B2026-060 & B2026-061 removed the check of SelectedSlave (aka the selected child) from the IF statement,
|
||||
// This was causing some step to print with change bars when there should not have been - because of the use of
|
||||
// the Show Change Bars After date. The logic we need is built into the get of ChangeBarDate and Print_ViewableStartingChangeBarDate.
|
||||
if (viewableStartingDateTime != null && viewableStartingDateTime > MyProcedure.ChangeBarDate)
|
||||
return (MyContent.DTS > viewableStartingDateTime);
|
||||
return (MyContent.DTS > MyProcedure.ChangeBarDate);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user