B2022-004: BNPP1new, BNPP2, BNPPalr - Crash when adding transition to Parent/Child Procedure & support for PC proc transitions
This commit is contained in:
parent
82fceaff2d
commit
2b32b245a4
@ -392,6 +392,10 @@ namespace VEPROMS.CSLA.Library
|
|||||||
public string UnitSpecific(string str, int len, ItemInfo ii)
|
public string UnitSpecific(string str, int len, ItemInfo ii)
|
||||||
{
|
{
|
||||||
ProcedureInfo pi = ii as ProcedureInfo;
|
ProcedureInfo pi = ii as ProcedureInfo;
|
||||||
|
if (pi == null) // B2022-004: Don't crash if Proc PC/PC (ii is from a list, so wasn't an ItemInfo)
|
||||||
|
{
|
||||||
|
pi = ProcedureInfo.Get(ii.ItemID);
|
||||||
|
}
|
||||||
if (pi == null) return "";
|
if (pi == null) return "";
|
||||||
string unitdes = "ID";
|
string unitdes = "ID";
|
||||||
string prefix = null;
|
string prefix = null;
|
||||||
|
@ -938,8 +938,17 @@ namespace VEPROMS.CSLA.Library
|
|||||||
if (unitnum != null && unitnum.Length > 0)
|
if (unitnum != null && unitnum.Length > 0)
|
||||||
{
|
{
|
||||||
unitnum = unitnum.Replace("-", @"\u8209?");
|
unitnum = unitnum.Replace("-", @"\u8209?");
|
||||||
|
// B2022-004: Remove Proc PC/PC token from transition text. The '#' token was in the text 4 times, one for each applicable unit, so trans text had proc title 4 times:
|
||||||
|
if (tb._FromItem.ActiveFormat != null && tb._FromItem.ActiveFormat.PlantFormat.FormatData.TransData.ProcLevelPCPC && unitnum.Contains("#")) unitnum = "#";
|
||||||
retstr = unitnum.Replace("#", retstr);
|
retstr = unitnum.Replace("#", retstr);
|
||||||
}
|
}
|
||||||
|
// B2022-004: Remove Proc PC/PC token from transition text.
|
||||||
|
if (tb._FromItem.ActiveFormat != null && tb._FromItem.ActiveFormat.PlantFormat.FormatData.TransData.ProcLevelPCPC && retstr.ToUpper().StartsWith("<U"))
|
||||||
|
{
|
||||||
|
int indx = retstr.IndexOf(">");
|
||||||
|
retstr = retstr.Substring(indx + 1);
|
||||||
|
if (retstr.StartsWith(@"\u8209?")) retstr = retstr.Substring(7); // don't start transition text with a '-'
|
||||||
|
}
|
||||||
// B2019-072: use si & psi as a prefix to the transition
|
// B2019-072: use si & psi as a prefix to the transition
|
||||||
string outsideprefix = null;
|
string outsideprefix = null;
|
||||||
if (tb._ToItem.MyDocVersion != tb._FromItem.MyDocVersion) // doc versions not equal means it is an outside transition
|
if (tb._ToItem.MyDocVersion != tb._FromItem.MyDocVersion) // doc versions not equal means it is an outside transition
|
||||||
|
@ -6969,6 +6969,15 @@ namespace VEPROMS.CSLA.Library
|
|||||||
return LazyLoad(ref _AdjustStepTransitionText, "@AdjustStepTransitionText");
|
return LazyLoad(ref _AdjustStepTransitionText, "@AdjustStepTransitionText");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//ProcLevelPCPC
|
||||||
|
private LazyLoad<bool> _ProcLevelPCPC;
|
||||||
|
public bool ProcLevelPCPC // B2022-004: Remove Proc PC/PC token from transition text
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return LazyLoad(ref _ProcLevelPCPC, "@ProcLevelPCPC");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
#region TransType
|
#region TransType
|
||||||
|
Loading…
x
Reference in New Issue
Block a user