C2021-027: Procedure level PC/PC
This commit is contained in:
@@ -670,29 +670,33 @@ namespace VEPROMS
|
||||
// This is master/slave & a slave has been selected for printing (SelectedSlave > 0)
|
||||
if (SelectedSlave > 0)
|
||||
{
|
||||
MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = SelectedSlave;
|
||||
SetupForProcedure();
|
||||
pbPDFsStatus.TextVisible = true;
|
||||
pbPDFsStatus.Text = string.Format("Creating PDF for {0} ({1} of {2})", myProc.DisplayNumber, ++i, n);
|
||||
pbPDFsStatus.Value = i;
|
||||
// this.Text = string.Format("Create PDF for {0} ({1} of {2})", myProc.DisplayNumber, ++i, n);
|
||||
MyProcedure = ProcedureInfo.GetItemAndChildrenByUnit(MyProcedure.ItemID, 0, MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave);
|
||||
// C2018-015 add the procedure tree path and the procedure number and title to the meta file
|
||||
if (BaselineMetaFile.IsOpen && i == 1) BaselineMetaFile.WriteLine("!! {0}", MyProcedure.SearchDVPath.Replace("\a", " | "));
|
||||
if (BaselineMetaFile.IsOpen) BaselineMetaFile.WriteLine("!! {0} | {1}", MyProcedure.DisplayNumber, MyProcedure.DisplayText);
|
||||
string myPDFPath = GetMultiunitPDFPath();
|
||||
_MergedPdfPath = myPDFPath; // If Slave, need its subdirectory/unit path for merging
|
||||
// RHM 20120925 Overlay the bottom of the dialog so that cancel button is covered.
|
||||
frmPDFStatusForm frmStatus = new frmPDFStatusForm(MyProcedure, RevNumAndDate, pw.ToString(), cbxDebug.Checked, cbxOrPgBrk.Checked,
|
||||
cbxOpenAfterCreate2.Checked, cbxOverwritePDF2.Checked, myPDFPath, cbd, txbPDFName.Text, new Point(Left, Bottom - 50),
|
||||
swtbtnBlankPgsForDuplex.Value, _AllProcedures || Automatic, Prefix, SaveLinks, RemoveTrailingHardReturnsAndManualPageBreaks, swtbtnPROMSVersion.Value, true, tbBlankPage.Text, _MergedPfd);//C2018-009 print PROMS version
|
||||
frmStatus.CloseWhenDone = true;
|
||||
Application.DoEvents();
|
||||
frmStatus.CancelStop = true;
|
||||
frmStatus.ShowDialog();
|
||||
locpdfname = frmStatus.PdfFile;
|
||||
if (frmStatus.CancelPrinting) break;
|
||||
AddToMergeList(myProc, locpdfname);
|
||||
bool includeProc = MyProcedure.ApplInclude(SelectedSlave); // C2021-027: Procedure level PC/PC
|
||||
if (includeProc)
|
||||
{
|
||||
MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = SelectedSlave;
|
||||
SetupForProcedure();
|
||||
pbPDFsStatus.TextVisible = true;
|
||||
pbPDFsStatus.Text = string.Format("Creating PDF for {0} ({1} of {2})", myProc.DisplayNumber, ++i, n);
|
||||
pbPDFsStatus.Value = i;
|
||||
// this.Text = string.Format("Create PDF for {0} ({1} of {2})", myProc.DisplayNumber, ++i, n);
|
||||
MyProcedure = ProcedureInfo.GetItemAndChildrenByUnit(MyProcedure.ItemID, 0, MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave);
|
||||
// C2018-015 add the procedure tree path and the procedure number and title to the meta file
|
||||
if (BaselineMetaFile.IsOpen && i == 1) BaselineMetaFile.WriteLine("!! {0}", MyProcedure.SearchDVPath.Replace("\a", " | "));
|
||||
if (BaselineMetaFile.IsOpen) BaselineMetaFile.WriteLine("!! {0} | {1}", MyProcedure.DisplayNumber, MyProcedure.DisplayText);
|
||||
string myPDFPath = GetMultiunitPDFPath();
|
||||
_MergedPdfPath = myPDFPath; // If Slave, need its subdirectory/unit path for merging
|
||||
// RHM 20120925 Overlay the bottom of the dialog so that cancel button is covered.
|
||||
frmPDFStatusForm frmStatus = new frmPDFStatusForm(MyProcedure, RevNumAndDate, pw.ToString(), cbxDebug.Checked, cbxOrPgBrk.Checked,
|
||||
cbxOpenAfterCreate2.Checked, cbxOverwritePDF2.Checked, myPDFPath, cbd, txbPDFName.Text, new Point(Left, Bottom - 50),
|
||||
swtbtnBlankPgsForDuplex.Value, _AllProcedures || Automatic, Prefix, SaveLinks, RemoveTrailingHardReturnsAndManualPageBreaks, swtbtnPROMSVersion.Value, true, tbBlankPage.Text, _MergedPfd);//C2018-009 print PROMS version
|
||||
frmStatus.CloseWhenDone = true;
|
||||
Application.DoEvents();
|
||||
frmStatus.CancelStop = true;
|
||||
frmStatus.ShowDialog();
|
||||
locpdfname = frmStatus.PdfFile;
|
||||
if (frmStatus.CancelPrinting) break;
|
||||
AddToMergeList(myProc, locpdfname);
|
||||
}
|
||||
}
|
||||
// This is a master/slave for printing of all slaves (SelectedSave == 0)
|
||||
else if (SelectedSlave == 0)
|
||||
|
@@ -74,8 +74,12 @@ namespace VEPROMS
|
||||
SetupComboBoxes();
|
||||
foreach (ProcedureInfo pi in myDocVersion.Procedures)
|
||||
{
|
||||
pi.MyDocVersion.DocVersionConfig.SelectedSlave = ApplicabilityIndex;
|
||||
_MyApproval.AddProcedure(pi);
|
||||
bool includeProc = pi.ApplInclude(ApplicabilityIndex); // C2021-027: Procedure level PC/PC
|
||||
if (includeProc)
|
||||
{
|
||||
pi.MyDocVersion.DocVersionConfig.SelectedSlave = ApplicabilityIndex;
|
||||
_MyApproval.AddProcedure(pi);
|
||||
}
|
||||
}
|
||||
SetupMyApproval();
|
||||
// C2018-008 redesign of user interface
|
||||
@@ -188,22 +192,26 @@ namespace VEPROMS
|
||||
dpl.Clear();
|
||||
foreach (ProcedureInfo pi in _MyDocVersion.Procedures)
|
||||
{
|
||||
OwnerInfo oi = OwnerInfo.GetByItemID(pi.ItemID, CheckOutType.Procedure);
|
||||
pi.MyDocVersion.DocVersionConfig.SelectedSlave = _MyDocVersion.DocVersionConfig.SelectedSlave;
|
||||
if (clbMore.Items.Contains(pi.DisplayNumber))
|
||||
bool includeProc = pi.ApplInclude(ApplicabilityIndex); // C2021-027: Procedure level PC/PC
|
||||
if (includeProc)
|
||||
{
|
||||
if (!dpl.Contains(pi.DisplayNumber)) dpl.Add(pi.DisplayNumber); //C2020-036 add to duplicate proc number list
|
||||
continue;
|
||||
OwnerInfo oi = OwnerInfo.GetByItemID(pi.ItemID, CheckOutType.Procedure);
|
||||
pi.MyDocVersion.DocVersionConfig.SelectedSlave = _MyDocVersion.DocVersionConfig.SelectedSlave;
|
||||
if (clbMore.Items.Contains(pi.DisplayNumber))
|
||||
{
|
||||
if (!dpl.Contains(pi.DisplayNumber)) dpl.Add(pi.DisplayNumber); //C2020-036 add to duplicate proc number list
|
||||
continue;
|
||||
}
|
||||
// B2018-083: check for null MySessionInfo.
|
||||
if (oi != null && MySessionInfo != null && oi.SessionID != MySessionInfo.SessionID)
|
||||
{
|
||||
string prcNumber = pi.DisplayNumber + string.Format(" Checked out to {0}", oi.SessionUserID);
|
||||
clbMore.Items.Add(prcNumber);
|
||||
}
|
||||
else
|
||||
clbMore.Items.Add(pi.DisplayNumber);
|
||||
tmpProcedures.Add(pi.DisplayNumber, pi);
|
||||
}
|
||||
// B2018-083: check for null MySessionInfo.
|
||||
if (oi != null && MySessionInfo != null && oi.SessionID != MySessionInfo.SessionID)
|
||||
{
|
||||
string prcNumber = pi.DisplayNumber + string.Format(" Checked out to {0}", oi.SessionUserID);
|
||||
clbMore.Items.Add(prcNumber);
|
||||
}
|
||||
else
|
||||
clbMore.Items.Add(pi.DisplayNumber);
|
||||
tmpProcedures.Add(pi.DisplayNumber, pi);
|
||||
}
|
||||
}
|
||||
if (dpl.Count > 0) return false; // C2018-025 cannot load list of procedure - duplicate proc numbers
|
||||
@@ -267,6 +275,7 @@ namespace VEPROMS
|
||||
// C2018-008 redesign of user interface
|
||||
expAddProcConChk.Expanded = true;
|
||||
_initializing = true;
|
||||
ApplicabilityIndex = myDocVersion.DocVersionConfig.SelectedSlave;
|
||||
InitializePanelApprove();
|
||||
InitializePanelSelect();
|
||||
_initializing = false;
|
||||
|
@@ -3569,7 +3569,8 @@ namespace VEPROMS
|
||||
displayTags.IsVisible = true;
|
||||
}
|
||||
infotabHistory.Visible = true;
|
||||
if (args.MyItemInfo.MyDocVersion.MultiUnitCount > 1 && !args.MyItemInfo.IsProcedure)
|
||||
// C2021-027: Procedure level PC/PC
|
||||
if (args.MyItemInfo.MyDocVersion.MultiUnitCount > 1 && args.MyItemInfo.ActiveFormat.PlantFormat.FormatData.ProcData.ProcAppl) //&& !args.MyItemInfo.IsProcedure)
|
||||
{
|
||||
infotabApplicability.Visible = true;
|
||||
displayApplicability.MyItemInfo = args.MyEditItem.MyItemInfo;
|
||||
|
Reference in New Issue
Block a user