B2024-089 Loic to clean up transitioning to a section that does not have a section number. Also added and updated comments.
This commit is contained in:
@@ -676,37 +676,47 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
public void AppendPrefix()
|
||||
{
|
||||
if (HasText && Prefix != null)
|
||||
if (Prefix == null) return; // no Prefix text to add
|
||||
if (HasText)
|
||||
{
|
||||
if (!_Results.ToString().EndsWith(_Prefix))
|
||||
if (!_Results.ToString().EndsWith(_Prefix)) //existing transition text does not end with Prefix text, OK to append
|
||||
_Results.Append(Prefix);
|
||||
_Prefix = null;
|
||||
}
|
||||
else if (_TranType == 4 && _ToItem.MoreThanOneStepSection())
|
||||
{
|
||||
if (!HasText && Prefix != null && Prefix.ToUpper().StartsWith(", STEP")
|
||||
&& _FromItem.ActiveFormat.Name.StartsWith("WEP"))
|
||||
{
|
||||
Console.WriteLine("Format,'{0}'", _FromItem.ActiveFormat.Name);
|
||||
_Prefix = null;
|
||||
return;
|
||||
}
|
||||
// WEP (Point Beach) is no longer a customer - commented out
|
||||
//if (!HasText && Prefix.ToUpper().StartsWith(", STEP")
|
||||
// && _FromItem.ActiveFormat.Name.StartsWith("WEP"))
|
||||
//{
|
||||
// Console.WriteLine("Format,'{0}'", _FromItem.ActiveFormat.Name);
|
||||
// _Prefix = null;
|
||||
// return;
|
||||
//}
|
||||
_Results.Append(Prefix);
|
||||
_Prefix = null;
|
||||
}
|
||||
else if (_TranType == 5 && Prefix != null)
|
||||
{
|
||||
if (!HasText && Prefix.StartsWith(", "))
|
||||
_Results.Append(Prefix.TrimStart(", ".ToCharArray()));
|
||||
else
|
||||
_Results.Append(Prefix);
|
||||
_Prefix = null;
|
||||
}
|
||||
// If the prefix contains an open paren, we want to add the open paren regardless
|
||||
// of whether there already is text in the resulting string.
|
||||
else if (!HasText && Prefix != null && Prefix.Contains("("))
|
||||
else if (!HasText && Prefix.Contains("("))
|
||||
{
|
||||
_Results.Append(Prefix.TrimStart(" ".ToCharArray())); // since no text in result, trim starting space.
|
||||
_Prefix = null;
|
||||
}
|
||||
else if (!HasText && Prefix.StartsWith(", "))
|
||||
{
|
||||
_Results.Append(Prefix.TrimStart(", ".ToCharArray()));// no preceeding text, remove comma and space
|
||||
_Prefix = null;
|
||||
}
|
||||
else if (!HasText && Prefix.StartsWith(","))
|
||||
{
|
||||
_Results.Append(Prefix.TrimStart(",".ToCharArray())); // no preceeding text, remove comma
|
||||
_Prefix = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
_Results.Append(Prefix); // append prefix as is
|
||||
_Prefix = null;
|
||||
}
|
||||
}
|
||||
public string OverridePrefix
|
||||
|
Reference in New Issue
Block a user