C2021-027: Procedure level PC/PC
This commit is contained in:
parent
1a543f663d
commit
a203bc199b
Binary file not shown.
@ -669,6 +669,9 @@ namespace VEPROMS
|
|||||||
{
|
{
|
||||||
// This is master/slave & a slave has been selected for printing (SelectedSlave > 0)
|
// This is master/slave & a slave has been selected for printing (SelectedSlave > 0)
|
||||||
if (SelectedSlave > 0)
|
if (SelectedSlave > 0)
|
||||||
|
{
|
||||||
|
bool includeProc = MyProcedure.ApplInclude(SelectedSlave); // C2021-027: Procedure level PC/PC
|
||||||
|
if (includeProc)
|
||||||
{
|
{
|
||||||
MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = SelectedSlave;
|
MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = SelectedSlave;
|
||||||
SetupForProcedure();
|
SetupForProcedure();
|
||||||
@ -694,6 +697,7 @@ namespace VEPROMS
|
|||||||
if (frmStatus.CancelPrinting) break;
|
if (frmStatus.CancelPrinting) break;
|
||||||
AddToMergeList(myProc, locpdfname);
|
AddToMergeList(myProc, locpdfname);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// This is a master/slave for printing of all slaves (SelectedSave == 0)
|
// This is a master/slave for printing of all slaves (SelectedSave == 0)
|
||||||
else if (SelectedSlave == 0)
|
else if (SelectedSlave == 0)
|
||||||
{
|
{
|
||||||
|
@ -73,10 +73,14 @@ namespace VEPROMS
|
|||||||
_MyApproval.StatusUpdated += new ApprovalStatusChangeEvent(_MyApproval_StatusUpdated);
|
_MyApproval.StatusUpdated += new ApprovalStatusChangeEvent(_MyApproval_StatusUpdated);
|
||||||
SetupComboBoxes();
|
SetupComboBoxes();
|
||||||
foreach (ProcedureInfo pi in myDocVersion.Procedures)
|
foreach (ProcedureInfo pi in myDocVersion.Procedures)
|
||||||
|
{
|
||||||
|
bool includeProc = pi.ApplInclude(ApplicabilityIndex); // C2021-027: Procedure level PC/PC
|
||||||
|
if (includeProc)
|
||||||
{
|
{
|
||||||
pi.MyDocVersion.DocVersionConfig.SelectedSlave = ApplicabilityIndex;
|
pi.MyDocVersion.DocVersionConfig.SelectedSlave = ApplicabilityIndex;
|
||||||
_MyApproval.AddProcedure(pi);
|
_MyApproval.AddProcedure(pi);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
SetupMyApproval();
|
SetupMyApproval();
|
||||||
// C2018-008 redesign of user interface
|
// C2018-008 redesign of user interface
|
||||||
_initializing = true;
|
_initializing = true;
|
||||||
@ -187,6 +191,9 @@ namespace VEPROMS
|
|||||||
{
|
{
|
||||||
dpl.Clear();
|
dpl.Clear();
|
||||||
foreach (ProcedureInfo pi in _MyDocVersion.Procedures)
|
foreach (ProcedureInfo pi in _MyDocVersion.Procedures)
|
||||||
|
{
|
||||||
|
bool includeProc = pi.ApplInclude(ApplicabilityIndex); // C2021-027: Procedure level PC/PC
|
||||||
|
if (includeProc)
|
||||||
{
|
{
|
||||||
OwnerInfo oi = OwnerInfo.GetByItemID(pi.ItemID, CheckOutType.Procedure);
|
OwnerInfo oi = OwnerInfo.GetByItemID(pi.ItemID, CheckOutType.Procedure);
|
||||||
pi.MyDocVersion.DocVersionConfig.SelectedSlave = _MyDocVersion.DocVersionConfig.SelectedSlave;
|
pi.MyDocVersion.DocVersionConfig.SelectedSlave = _MyDocVersion.DocVersionConfig.SelectedSlave;
|
||||||
@ -206,6 +213,7 @@ namespace VEPROMS
|
|||||||
tmpProcedures.Add(pi.DisplayNumber, pi);
|
tmpProcedures.Add(pi.DisplayNumber, pi);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (dpl.Count > 0) return false; // C2018-025 cannot load list of procedure - duplicate proc numbers
|
if (dpl.Count > 0) return false; // C2018-025 cannot load list of procedure - duplicate proc numbers
|
||||||
for (int i = 0; i < clbMore.Items.Count; i++)
|
for (int i = 0; i < clbMore.Items.Count; i++)
|
||||||
{
|
{
|
||||||
@ -267,6 +275,7 @@ namespace VEPROMS
|
|||||||
// C2018-008 redesign of user interface
|
// C2018-008 redesign of user interface
|
||||||
expAddProcConChk.Expanded = true;
|
expAddProcConChk.Expanded = true;
|
||||||
_initializing = true;
|
_initializing = true;
|
||||||
|
ApplicabilityIndex = myDocVersion.DocVersionConfig.SelectedSlave;
|
||||||
InitializePanelApprove();
|
InitializePanelApprove();
|
||||||
InitializePanelSelect();
|
InitializePanelSelect();
|
||||||
_initializing = false;
|
_initializing = false;
|
||||||
|
@ -3569,7 +3569,8 @@ namespace VEPROMS
|
|||||||
displayTags.IsVisible = true;
|
displayTags.IsVisible = true;
|
||||||
}
|
}
|
||||||
infotabHistory.Visible = 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;
|
infotabApplicability.Visible = true;
|
||||||
displayApplicability.MyItemInfo = args.MyEditItem.MyItemInfo;
|
displayApplicability.MyItemInfo = args.MyEditItem.MyItemInfo;
|
||||||
|
@ -987,7 +987,10 @@ namespace VEPROMS.CSLA.Library
|
|||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
|
if (value != null)
|
||||||
_Xp["MasterSlave", "Applicability"] = value.FlagList;
|
_Xp["MasterSlave", "Applicability"] = value.FlagList;
|
||||||
|
else
|
||||||
|
_Xp["MasterSlave", "Applicability"] = null;
|
||||||
OnPropertyChanged("MasterSlave_Applicability");
|
OnPropertyChanged("MasterSlave_Applicability");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2740,7 +2740,11 @@ namespace VEPROMS.CSLA.Library
|
|||||||
return true;
|
return true;
|
||||||
ItemInfo parent = this.ActiveParent as ItemInfo;
|
ItemInfo parent = this.ActiveParent as ItemInfo;
|
||||||
IItemConfig cfg = this.MyConfig as IItemConfig;
|
IItemConfig cfg = this.MyConfig as IItemConfig;
|
||||||
return (this.IsProcedure || parent.IsApplicable(apple)) && (cfg.MasterSlave_Applicability.GetFlags().Count == 0 || cfg.MasterSlave_Applicability.GetFlags().Contains(apple));
|
if (IsProcedure) // C2021-027: Procedure level PC/PC. if procedure, don't go to parent.
|
||||||
|
{
|
||||||
|
return (cfg.MasterSlave_Applicability.GetFlags().Count == 0 || cfg.MasterSlave_Applicability.GetFlags().Contains(apple));
|
||||||
|
}
|
||||||
|
return (parent.IsApplicable(apple)) && (cfg.MasterSlave_Applicability.GetFlags().Count == 0 || cfg.MasterSlave_Applicability.GetFlags().Contains(apple));
|
||||||
}
|
}
|
||||||
//end jcb added inherited applicability
|
//end jcb added inherited applicability
|
||||||
public string FormattedDisplayText
|
public string FormattedDisplayText
|
||||||
@ -5282,6 +5286,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
{
|
{
|
||||||
if (_SectionCheckOffHeader == null)
|
if (_SectionCheckOffHeader == null)
|
||||||
{
|
{
|
||||||
|
if (ActiveSection == null) return _SectionCheckOffHeader;
|
||||||
// first check if format has checkoff data, including checkoffheaders.
|
// first check if format has checkoff data, including checkoffheaders.
|
||||||
ProcData pd = ActiveFormat.PlantFormat.FormatData.ProcData;
|
ProcData pd = ActiveFormat.PlantFormat.FormatData.ProcData;
|
||||||
if (pd.CheckOffData == null || pd.CheckOffData.CheckOffHeaderList == null || pd.CheckOffData.CheckOffHeaderList.MaxIndex <= 1) _SectionCheckOffHeader = string.Empty;
|
if (pd.CheckOffData == null || pd.CheckOffData.CheckOffHeaderList == null || pd.CheckOffData.CheckOffHeaderList.MaxIndex <= 1) _SectionCheckOffHeader = string.Empty;
|
||||||
@ -6906,6 +6911,34 @@ namespace VEPROMS.CSLA.Library
|
|||||||
[Serializable()]
|
[Serializable()]
|
||||||
public partial class ProcedureInfo : ItemInfo, IVEDrillDownReadOnly
|
public partial class ProcedureInfo : ItemInfo, IVEDrillDownReadOnly
|
||||||
{
|
{
|
||||||
|
// C2021-027: Procedure level PC/PC. these 2 methods determine whether a procedure is included, either by an integer index
|
||||||
|
// or by a string name of the unit
|
||||||
|
public bool ApplInclude(int ApplicabilityIndex)
|
||||||
|
{
|
||||||
|
if (ActiveFormat.PlantFormat.FormatData.ProcData.ProcAppl)
|
||||||
|
{
|
||||||
|
ProcedureConfig cfg = MyConfig as ProcedureConfig;
|
||||||
|
return (cfg.MasterSlave_Applicability.GetFlags().Count == 0 || cfg.MasterSlave_Applicability.GetFlags().Contains(ApplicabilityIndex));
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
public bool ApplIncludeFromStr(string s)
|
||||||
|
{
|
||||||
|
// s is the unitname, find this name in list of applicabilities & then see if this one is used
|
||||||
|
if (ActiveFormat.PlantFormat.FormatData.ProcData.ProcAppl)
|
||||||
|
{
|
||||||
|
// get index
|
||||||
|
int i = 1;
|
||||||
|
foreach (string str in MyDocVersion.UnitNames)
|
||||||
|
{
|
||||||
|
if (str == s) break;
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
ProcedureConfig cfg = MyConfig as ProcedureConfig;
|
||||||
|
return (cfg.MasterSlave_Applicability.GetFlags().Count == 0 || cfg.MasterSlave_Applicability.GetFlags().Contains(i));
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
private bool? _ProcHasSupInfoData = null;
|
private bool? _ProcHasSupInfoData = null;
|
||||||
public bool ProcHasSupInfoData
|
public bool ProcHasSupInfoData
|
||||||
{
|
{
|
||||||
|
@ -1395,6 +1395,14 @@ namespace VEPROMS.CSLA.Library
|
|||||||
return LazyLoad(ref _NotesToFootnotes, "@NotesToFootnotes");
|
return LazyLoad(ref _NotesToFootnotes, "@NotesToFootnotes");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
private LazyLoad<bool> _ProcAppl;
|
||||||
|
public bool ProcAppl // C2021-027: Procedure level PC/PC
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return LazyLoad(ref _ProcAppl, "@ProcAppl");
|
||||||
|
}
|
||||||
|
}
|
||||||
private LazyLoad<bool> _CountFoldoutPages;
|
private LazyLoad<bool> _CountFoldoutPages;
|
||||||
public bool CountFoldoutPages
|
public bool CountFoldoutPages
|
||||||
{
|
{
|
||||||
|
@ -214,7 +214,13 @@ namespace Volian.Controls.Library
|
|||||||
List<InvalidTransition> invalidTrans = WillTransitionsBeValidCommand.Execute(MyItemInfo.ItemID, MyApplicability);
|
List<InvalidTransition> invalidTrans = WillTransitionsBeValidCommand.Execute(MyItemInfo.ItemID, MyApplicability);
|
||||||
if (invalidTrans.Count == 0)
|
if (invalidTrans.Count == 0)
|
||||||
{
|
{
|
||||||
if (MyItemInfo.IsSection)
|
// C2021 - 027: Procedure level PC/PC
|
||||||
|
if (MyItemInfo.IsProcedure && MyItemInfo.ActiveFormat.PlantFormat.FormatData.ProcData.ProcAppl)
|
||||||
|
{
|
||||||
|
ProcedureConfig sc = MyItemInfo.MyConfig as ProcedureConfig;
|
||||||
|
sc.MasterSlave_Applicability = Volian.Base.Library.BigNum.MakeBigNum(MyApplicability);
|
||||||
|
}
|
||||||
|
else if (MyItemInfo.IsSection)
|
||||||
{
|
{
|
||||||
SectionConfig sc = MyItemInfo.MyConfig as SectionConfig;
|
SectionConfig sc = MyItemInfo.MyConfig as SectionConfig;
|
||||||
sc.MasterSlave_Applicability = Volian.Base.Library.BigNum.MakeBigNum(MyApplicability);
|
sc.MasterSlave_Applicability = Volian.Base.Library.BigNum.MakeBigNum(MyApplicability);
|
||||||
@ -237,6 +243,9 @@ namespace Volian.Controls.Library
|
|||||||
FlexibleMessageBox.Show(sb.ToString(), "Transitions Affected By Applicability Change");
|
FlexibleMessageBox.Show(sb.ToString(), "Transitions Affected By Applicability Change");
|
||||||
MyItemInfo = MyItemInfo;
|
MyItemInfo = MyItemInfo;
|
||||||
}
|
}
|
||||||
|
// C2021 - 027: Procedure level PC/PC - checkbox for applicability changed, fix ribbon's menus
|
||||||
|
if (MyItemInfo.IsProcedure) _MyDisplayTabItem.MyStepTabPanel.MyStepTabRibbon.SetParentChildCreatePDFButton(MyItemInfo.MyDocVersion.UnitNames, MyItemInfo);
|
||||||
|
|
||||||
//using (Content cnt = Content.Get(MyItemInfo.MyContent.ContentID))
|
//using (Content cnt = Content.Get(MyItemInfo.MyContent.ContentID))
|
||||||
//{
|
//{
|
||||||
// cnt.DTS = DateTime.Now;
|
// cnt.DTS = DateTime.Now;
|
||||||
@ -375,9 +384,12 @@ namespace Volian.Controls.Library
|
|||||||
EnableCheckboxes();
|
EnableCheckboxes();
|
||||||
OnApplicabilityViewModeChanged();
|
OnApplicabilityViewModeChanged();
|
||||||
EditItem ei = MyDisplayTabItem.MyStepTabPanel.SelectedEditItem;
|
EditItem ei = MyDisplayTabItem.MyStepTabPanel.SelectedEditItem;
|
||||||
while (ei.Enabled == false)
|
while (ei!=null && ei.Enabled == false)
|
||||||
ei = ei.MyParentEditItem ?? ei.MyPreviousEditItem;
|
ei = ei.MyParentEditItem ?? ei.MyPreviousEditItem;
|
||||||
ei.MyStepRTB.Focus();
|
// C2021 - 027: Procedure level PC/PC - handle procedure level too for viewing in editor
|
||||||
|
if (MyDisplayTabItem.MyStepTabPanel.SelectedItemInfo != null && MyDisplayTabItem.MyStepTabPanel.SelectedItemInfo.IsProcedure)
|
||||||
|
ei = MyDisplayTabItem.MyStepTabPanel.SelectedEditItem;
|
||||||
|
if (ei != null) ei.MyStepRTB.Focus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -263,8 +263,9 @@ namespace Volian.Controls.Library
|
|||||||
if (dvi == null) return;
|
if (dvi == null) return;
|
||||||
if (dvi.VersionType > 127)
|
if (dvi.VersionType > 127)
|
||||||
MyStepTabPanel.MyStepPanel.VwMode = E_ViewMode.View;
|
MyStepTabPanel.MyStepPanel.VwMode = E_ViewMode.View;
|
||||||
|
// C2021 - 027: Procedure level PC/PC - add _MyIteminfo to argument list
|
||||||
if (dvi.MultiUnitCount > 1)
|
if (dvi.MultiUnitCount > 1)
|
||||||
this.MyStepTabPanel.MyStepTabRibbon.SetParentChildCreatePDFButton(dvi.UnitNames); //C2020-013 add parent/child sub menu items for printing specific children (units)
|
this.MyStepTabPanel.MyStepTabRibbon.SetParentChildCreatePDFButton(dvi.UnitNames, _MyItemInfo); //C2020-013 add parent/child sub menu items for printing specific children (units)
|
||||||
}
|
}
|
||||||
void _MyItemInfo_Changed(object sender)
|
void _MyItemInfo_Changed(object sender)
|
||||||
{
|
{
|
||||||
|
@ -716,6 +716,9 @@ namespace Volian.Controls.Library
|
|||||||
// if in Calvert Alarms Condition/Response, disable insert of Cautions and Notes
|
// if in Calvert Alarms Condition/Response, disable insert of Cautions and Notes
|
||||||
//if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm)
|
//if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm)
|
||||||
//btnInsCaut.Enabled = btnInsNote.Enabled = btnCMInsCaution.Enabled = btnCMInsNote.Enabled = allow && !MyItemInfo.IsInCalvertConditionResponse;
|
//btnInsCaut.Enabled = btnInsNote.Enabled = btnCMInsCaution.Enabled = btnCMInsNote.Enabled = allow && !MyItemInfo.IsInCalvertConditionResponse;
|
||||||
|
// C2021 - 027: Procedure level PC/PC - if text changed, i.e. applicability may have changed, redo the print menus
|
||||||
|
if (MyItemInfo != null && MyItemInfo.MyDocVersion.MultiUnitCount > 1)
|
||||||
|
SetParentChildCreatePDFButton(MyItemInfo.MyDocVersion.UnitNames, MyItemInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyFlexGrid_SelChange(object sender, EventArgs e)
|
void MyFlexGrid_SelChange(object sender, EventArgs e)
|
||||||
@ -1916,7 +1919,7 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
MyItemInfo.MyProcedure.ProcedureConfig.SelectedSlave = 0; // unselect the unit (child)
|
MyItemInfo.MyProcedure.ProcedureConfig.SelectedSlave = 0; // unselect the unit (child)
|
||||||
}
|
}
|
||||||
public void SetParentChildCreatePDFButton(string[] unitNames)
|
public void SetParentChildCreatePDFButton(string[] unitNames, ItemInfo ii)
|
||||||
{
|
{
|
||||||
btnPdfCreate.SubItems.Clear();
|
btnPdfCreate.SubItems.Clear();
|
||||||
btnPdfCreate.Tag = null;
|
btnPdfCreate.Tag = null;
|
||||||
@ -1930,10 +1933,18 @@ namespace Volian.Controls.Library
|
|||||||
int k = 0;
|
int k = 0;
|
||||||
foreach (string s in unitNames)
|
foreach (string s in unitNames)
|
||||||
{
|
{
|
||||||
|
// C2021-027: Procedure level PC/PC - see if menu items for unit should be enabled
|
||||||
|
bool procAppl = ii.MyProcedure.ApplIncludeFromStr(s);
|
||||||
k++;
|
k++;
|
||||||
btnPdfCreate.SubItems.Add(MakeSubMenuButton(s,k,miMultiUnit_Click));
|
ButtonItem btn = MakeSubMenuButton(s, k, miMultiUnit_Click);
|
||||||
btnReviewCreatePDF.SubItems.Add(MakeSubMenuButton(s, k, miMultiUnit_Click));
|
btn.Enabled = procAppl;
|
||||||
btnCASCreate.SubItems.Add(MakeSubMenuButton(s, k, miMultiUnit_Click));
|
btnPdfCreate.SubItems.Add(btn);
|
||||||
|
btn = MakeSubMenuButton(s, k, miMultiUnit_Click);
|
||||||
|
btn.Enabled = procAppl;
|
||||||
|
btnReviewCreatePDF.SubItems.Add(btn);
|
||||||
|
btn = MakeSubMenuButton(s, k, miMultiUnit_Click);
|
||||||
|
btn.Enabled = procAppl;
|
||||||
|
btnCASCreate.SubItems.Add(btn);
|
||||||
}
|
}
|
||||||
btnPdfCreate.AutoExpandOnClick = true;
|
btnPdfCreate.AutoExpandOnClick = true;
|
||||||
btnReviewCreatePDF.AutoExpandOnClick = true;
|
btnReviewCreatePDF.AutoExpandOnClick = true;
|
||||||
|
@ -829,12 +829,17 @@ namespace Volian.Controls.Library
|
|||||||
int k = 0;
|
int k = 0;
|
||||||
foreach (string s in pri.MyDocVersion.UnitNames)
|
foreach (string s in pri.MyDocVersion.UnitNames)
|
||||||
{
|
{
|
||||||
|
// C2021-027: Procedure level PC/PC - see if menu items for unit should be enabled
|
||||||
|
bool procAppl = pri.ApplIncludeFromStr(s);
|
||||||
k++;
|
k++;
|
||||||
MenuItem mp = mip.MenuItems.Add(s, new EventHandler(miMultiUnit_Click));
|
MenuItem mp = mip.MenuItems.Add(s, new EventHandler(miMultiUnit_Click));
|
||||||
|
mp.Enabled = procAppl;
|
||||||
mp.Tag = k;
|
mp.Tag = k;
|
||||||
MenuItem ma = mia.MenuItems.Add(s, new EventHandler(miMultiUnit_Click));
|
MenuItem ma = mia.MenuItems.Add(s, new EventHandler(miMultiUnit_Click));
|
||||||
|
ma.Enabled = procAppl;
|
||||||
ma.Tag = k;
|
ma.Tag = k;
|
||||||
MenuItem mc = micas.MenuItems.Add(s, new EventHandler(miMultiUnit_Click));
|
MenuItem mc = micas.MenuItems.Add(s, new EventHandler(miMultiUnit_Click));
|
||||||
|
mc.Enabled = procAppl;
|
||||||
mc.Tag = k;
|
mc.Tag = k;
|
||||||
}
|
}
|
||||||
cm.MenuItems.Add(micas);
|
cm.MenuItems.Add(micas);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user