Fixed checkoff logic so that it handles Signoff style of checkoffs
The checkoff/signoff list was not always refreshing in the step properties panel. Added format flag CheckoffOnSubStepsOnly for Bryon and Braidwood
This commit is contained in:
parent
afdf8a280e
commit
48ee3854a2
@ -25,6 +25,7 @@ namespace VEPROMS
|
|||||||
private Document _DocumentToDelete = null;
|
private Document _DocumentToDelete = null;
|
||||||
private StepTabRibbon _MyStepTabRibbon;
|
private StepTabRibbon _MyStepTabRibbon;
|
||||||
private bool _isStepSection = true;
|
private bool _isStepSection = true;
|
||||||
|
private bool _hasSectionCheckoffDefault = false;
|
||||||
|
|
||||||
public frmSectionProperties(SectionConfig sectionConfig)
|
public frmSectionProperties(SectionConfig sectionConfig)
|
||||||
{
|
{
|
||||||
@ -84,8 +85,8 @@ namespace VEPROMS
|
|||||||
CheckOffList chkoffList = pf.FormatData.ProcData.CheckOffData.CheckOffList;
|
CheckOffList chkoffList = pf.FormatData.ProcData.CheckOffData.CheckOffList;
|
||||||
CheckOffHeaderList chkoffHeaderList = pf.FormatData.ProcData.CheckOffData.CheckOffHeaderList;
|
CheckOffHeaderList chkoffHeaderList = pf.FormatData.ProcData.CheckOffData.CheckOffHeaderList;
|
||||||
if (ppGpbxSignoffCheckoff.Enabled && (chkoffList != null && chkoffList.Count > 1)
|
if (ppGpbxSignoffCheckoff.Enabled && (chkoffList != null && chkoffList.Count > 1)
|
||||||
&& (ppCmbxCheckoffType.SelectedIndex != _SectionConfig.Section_CheckoffListSelection - 1))
|
&& (ppCmbxCheckoffType.SelectedIndex != _SectionConfig.Section_CheckoffListSelection - (_hasSectionCheckoffDefault? 1:0)))
|
||||||
_SectionConfig.Section_CheckoffListSelection = ppCmbxCheckoffType.SelectedIndex + 1;
|
_SectionConfig.Section_CheckoffListSelection = ppCmbxCheckoffType.SelectedIndex + (_hasSectionCheckoffDefault? 1:0);
|
||||||
if (ppCmbxCheckoffHeading.Enabled && chkoffHeaderList != null && chkoffHeaderList.Count > 1)
|
if (ppCmbxCheckoffHeading.Enabled && chkoffHeaderList != null && chkoffHeaderList.Count > 1)
|
||||||
_SectionConfig.Section_CheckoffHeaderSelection = ppCmbxCheckoffHeading.SelectedIndex;
|
_SectionConfig.Section_CheckoffHeaderSelection = ppCmbxCheckoffHeading.SelectedIndex;
|
||||||
|
|
||||||
@ -464,18 +465,24 @@ namespace VEPROMS
|
|||||||
PlantFormat pf = _SectionConfig.MyFormat!=null?_SectionConfig.MyFormat.PlantFormat:_SectionConfig.MyDefaultFormat.PlantFormat;
|
PlantFormat pf = _SectionConfig.MyFormat!=null?_SectionConfig.MyFormat.PlantFormat:_SectionConfig.MyDefaultFormat.PlantFormat;
|
||||||
CheckOffList chkoffList = pf.FormatData.ProcData.CheckOffData.CheckOffList;
|
CheckOffList chkoffList = pf.FormatData.ProcData.CheckOffData.CheckOffList;
|
||||||
CheckOffHeaderList chkoffHeaderList = pf.FormatData.ProcData.CheckOffData.CheckOffHeaderList;
|
CheckOffHeaderList chkoffHeaderList = pf.FormatData.ProcData.CheckOffData.CheckOffHeaderList;
|
||||||
if (chkoffList != null && chkoffList.Count > 0)
|
if (chkoffList != null && chkoffList.Count > 0 &&
|
||||||
|
(pf.FormatData.ProcData.CheckOffData.Menu == "Signoff" || chkoffList[0].MenuItem.ToUpper().Equals("{SECTION DEFAULT}")))
|
||||||
{
|
{
|
||||||
if (SectionPropertyCheckOffList!=null)SectionPropertyCheckOffList.Clear();
|
if (SectionPropertyCheckOffList!=null)SectionPropertyCheckOffList.Clear();
|
||||||
SectionPropertyCheckOffList = new List<CheckOff>();
|
SectionPropertyCheckOffList = new List<CheckOff>();
|
||||||
// Don't put up the first item in the chkoffList, it is '{Section Default}'.
|
// Don't put up the first item in the chkoffList, it is '{Section Default}'.
|
||||||
for (int i = 1; i < chkoffList.Count; i++)
|
_hasSectionCheckoffDefault = false;
|
||||||
|
//for (int i = 1; i < chkoffList.Count; i++)
|
||||||
|
for (int i = 0; i < chkoffList.Count; i++)
|
||||||
{
|
{
|
||||||
|
if (!chkoffList[i].MenuItem.ToUpper().Equals("{SECTION DEFAULT}"))
|
||||||
SectionPropertyCheckOffList.Add(chkoffList[i]);
|
SectionPropertyCheckOffList.Add(chkoffList[i]);
|
||||||
|
else
|
||||||
|
_hasSectionCheckoffDefault = true;
|
||||||
}
|
}
|
||||||
ppGpbxSignoffCheckoff.Enabled = true;
|
ppGpbxSignoffCheckoff.Enabled = true;
|
||||||
ppCmbxCheckoffType.DataSource = SectionPropertyCheckOffList;
|
ppCmbxCheckoffType.DataSource = SectionPropertyCheckOffList;
|
||||||
ppCmbxCheckoffType.SelectedIndex = _SectionConfig.Section_CheckoffListSelection-1;
|
ppCmbxCheckoffType.SelectedIndex = _SectionConfig.Section_CheckoffListSelection - (_hasSectionCheckoffDefault ? 1 : 0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1909,6 +1909,7 @@ namespace VEPROMS
|
|||||||
infotabFoldoutMaint.Visible = infotabRO.Visible = infotabTransition.Visible = infotabTags.Visible = infotabHistory.Visible = infotabApplicability.Visible = false;
|
infotabFoldoutMaint.Visible = infotabRO.Visible = infotabTransition.Visible = infotabTags.Visible = infotabHistory.Visible = infotabApplicability.Visible = false;
|
||||||
// When infotabTags is set to InVisible, the matching panel also needs to be set to invisible
|
// When infotabTags is set to InVisible, the matching panel also needs to be set to invisible
|
||||||
infotabControlPanelTags.Visible = false;
|
infotabControlPanelTags.Visible = false;
|
||||||
|
displayTags.MyEditItem = null;
|
||||||
displayTags.Visible = false;
|
displayTags.Visible = false;
|
||||||
SelectedStepTabPanel = null;
|
SelectedStepTabPanel = null;
|
||||||
lblItemID.Text = "No Item Selected";
|
lblItemID.Text = "No Item Selected";
|
||||||
|
@ -1250,6 +1250,15 @@ namespace VEPROMS.CSLA.Library
|
|||||||
return LazyLoad(ref _SkipSpaces, "@SkipSpaces");
|
return LazyLoad(ref _SkipSpaces, "@SkipSpaces");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// put in for Bryon and Braidwood
|
||||||
|
private LazyLoad<bool> _CheckoffOnSubStepsOnly;
|
||||||
|
public bool CheckoffOnSubStepsOnly
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return LazyLoad(ref _CheckoffOnSubStepsOnly, "@CheckoffOnSubStepsOnly");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
//#region RightCheckOffBox
|
//#region RightCheckOffBox
|
||||||
|
Loading…
x
Reference in New Issue
Block a user